generated-configure.sh revision 2080:a83ca44e49af
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647JAVA_FLAGS_BIG
648JAVA_FLAGS
649TEST_JOBS
650JOBS
651MEMORY_SIZE
652NUM_CORES
653BUILD_FAILURE_HANDLER
654ENABLE_INTREE_EC
655STLPORT_LIB
656LIBZIP_CAN_USE_MMAP
657LIBDL
658LIBM
659USE_EXTERNAL_LCMS
660LCMS_LIBS
661LCMS_CFLAGS
662USE_EXTERNAL_LIBZ
663USE_EXTERNAL_LIBPNG
664PNG_LIBS
665PNG_CFLAGS
666USE_EXTERNAL_LIBGIF
667USE_EXTERNAL_LIBJPEG
668LLVM_LIBS
669LLVM_LDFLAGS
670LLVM_CFLAGS
671LLVM_CONFIG
672LIBFFI_LIBS
673LIBFFI_CFLAGS
674ALSA_LIBS
675ALSA_CFLAGS
676FREETYPE_BUNDLE_LIB_PATH
677FREETYPE_LIBS
678FREETYPE_CFLAGS
679CUPS_CFLAGS
680X_EXTRA_LIBS
681X_LIBS
682X_PRE_LIBS
683X_CFLAGS
684XMKMF
685MSVCP_DLL
686MSVCR_DLL
687LIBCXX
688STATIC_CXX_SETTING
689FIXPATH_DETACH_FLAG
690FIXPATH
691VALID_JVM_FEATURES
692JVM_FEATURES_custom
693JVM_FEATURES_zeroshark
694JVM_FEATURES_zero
695JVM_FEATURES_minimal
696JVM_FEATURES_core
697JVM_FEATURES_client
698JVM_FEATURES_server
699INCLUDE_DTRACE
700GCOV_ENABLED
701STRIP_POLICY
702DEBUG_BINARIES
703ZIP_EXTERNAL_DEBUG_SYMBOLS
704COPY_DEBUG_SYMBOLS
705COMPILE_WITH_DEBUG_SYMBOLS
706CFLAGS_WARNINGS_ARE_ERRORS
707BUILD_CC_DISABLE_WARNING_PREFIX
708DISABLE_WARNING_PREFIX
709HOTSPOT_SET_WARNINGS_AS_ERRORS
710WARNINGS_AS_ERRORS
711COMPILER_SUPPORTS_TARGET_BITS_FLAG
712ZERO_ARCHFLAG
713LDFLAGS_TESTEXE
714LDFLAGS_TESTLIB
715CXXFLAGS_TESTEXE
716CXXFLAGS_TESTLIB
717CFLAGS_TESTEXE
718CFLAGS_TESTLIB
719OPENJDK_BUILD_JVM_LIBS
720OPENJDK_BUILD_JVM_ASFLAGS
721OPENJDK_BUILD_JVM_LDFLAGS
722OPENJDK_BUILD_JVM_CFLAGS
723OPENJDK_BUILD_LDFLAGS_HASH_STYLE
724OPENJDK_BUILD_LDFLAGS_CXX_JDK
725OPENJDK_BUILD_JDKEXE_LIBS
726OPENJDK_BUILD_JDKLIB_LIBS
727OPENJDK_BUILD_LDFLAGS_JDKEXE
728OPENJDK_BUILD_LDFLAGS_JDKLIB
729OPENJDK_BUILD_CXXFLAGS_JDKEXE
730OPENJDK_BUILD_CXXFLAGS_JDKLIB
731OPENJDK_BUILD_CFLAGS_JDKEXE
732OPENJDK_BUILD_CFLAGS_JDKLIB
733OPENJDK_BUILD_CXXSTD_CXXFLAG
734JVM_LIBS
735JVM_ASFLAGS
736JVM_LDFLAGS
737JVM_CFLAGS
738LDFLAGS_HASH_STYLE
739LDFLAGS_CXX_JDK
740JDKEXE_LIBS
741JDKLIB_LIBS
742LDFLAGS_JDKEXE
743LDFLAGS_JDKLIB
744CXXFLAGS_JDKEXE
745CXXFLAGS_JDKLIB
746CFLAGS_JDKEXE
747CFLAGS_JDKLIB
748MACOSX_VERSION_MIN
749NO_LIFETIME_DSE_CFLAG
750NO_NULL_POINTER_CHECK_CFLAG
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
885BUILD_JDK
886CREATE_BUILDJDK
887BOOT_JDK_BITS
888JAVAC_FLAGS
889BOOT_JDK_MODULAR
890BOOT_JDK_SOURCETARGET
891JARSIGNER
892JAR
893JAVAH
894JAVAC
895JAVA
896BOOT_JDK
897JAVA_CHECK
898JAVAC_CHECK
899VERSION_IS_GA
900VERSION_SHORT
901VERSION_STRING
902VERSION_NUMBER_FOUR_POSITIONS
903VERSION_NUMBER
904VERSION_OPT
905VERSION_BUILD
906VERSION_PRE
907VERSION_PATCH
908VERSION_SECURITY
909VERSION_MINOR
910VERSION_MAJOR
911MACOSX_BUNDLE_ID_BASE
912MACOSX_BUNDLE_NAME_BASE
913HOTSPOT_VM_DISTRO
914COMPANY_NAME
915JDK_RC_PLATFORM_NAME
916PRODUCT_SUFFIX
917PRODUCT_NAME
918LAUNCHER_NAME
919JLINK_KEEP_PACKAGED_MODULES
920COPYRIGHT_YEAR
921COMPRESS_JARS
922INCLUDE_SA
923UNLIMITED_CRYPTO
924CACERTS_FILE
925BUILD_HEADLESS
926SUPPORT_HEADFUL
927SUPPORT_HEADLESS
928DEFAULT_MAKE_TARGET
929OS_VERSION_MICRO
930OS_VERSION_MINOR
931OS_VERSION_MAJOR
932PKG_CONFIG
933BASH_ARGS
934SETFILE
935CODESIGN
936XATTR
937DSYMUTIL
938IS_GNU_TIME
939PATCH
940DTRACE
941TIME
942STAT
943HG
944READELF
945OTOOL
946LDD
947ZIP
948UNZIP
949FIND_DELETE
950OUTPUT_SYNC
951OUTPUT_SYNC_SUPPORTED
952CHECK_TOOLSDIR_MAKE
953CHECK_TOOLSDIR_GMAKE
954CHECK_MAKE
955CHECK_GMAKE
956MAKE
957PKGHANDLER
958CONFIGURESUPPORT_OUTPUTDIR
959OUTPUT_ROOT
960CONF_NAME
961SPEC
962SDKROOT
963XCODEBUILD
964VALID_JVM_VARIANTS
965JVM_VARIANTS
966DEBUG_LEVEL
967HOTSPOT_DEBUG_LEVEL
968JDK_VARIANT
969SET_OPENJDK
970USERNAME
971CANONICAL_TOPDIR
972ORIGINAL_TOPDIR
973TOPDIR
974PATH_SEP
975ZERO_ARCHDEF
976HOTSPOT_BUILD_CPU_DEFINE
977HOTSPOT_BUILD_CPU_ARCH
978HOTSPOT_BUILD_CPU
979HOTSPOT_BUILD_OS_TYPE
980HOTSPOT_BUILD_OS
981OPENJDK_BUILD_OS_EXPORT_DIR
982OPENJDK_BUILD_CPU_JLI_CFLAGS
983OPENJDK_BUILD_CPU_OSARCH
984OPENJDK_BUILD_CPU_ISADIR
985OPENJDK_BUILD_CPU_LIBDIR
986OPENJDK_BUILD_CPU_LEGACY_LIB
987OPENJDK_BUILD_CPU_LEGACY
988HOTSPOT_TARGET_CPU_DEFINE
989HOTSPOT_TARGET_CPU_ARCH
990HOTSPOT_TARGET_CPU
991HOTSPOT_TARGET_OS_TYPE
992HOTSPOT_TARGET_OS
993DEFINE_CROSS_COMPILE_ARCH
994LP64
995OPENJDK_TARGET_OS_EXPORT_DIR
996OPENJDK_TARGET_CPU_JLI_CFLAGS
997OPENJDK_TARGET_CPU_OSARCH
998OPENJDK_TARGET_CPU_ISADIR
999OPENJDK_TARGET_CPU_LIBDIR
1000OPENJDK_TARGET_CPU_LEGACY_LIB
1001OPENJDK_TARGET_CPU_LEGACY
1002REQUIRED_OS_VERSION
1003REQUIRED_OS_NAME
1004COMPILE_TYPE
1005OPENJDK_TARGET_CPU_ENDIAN
1006OPENJDK_TARGET_CPU_BITS
1007OPENJDK_TARGET_CPU_ARCH
1008OPENJDK_TARGET_CPU
1009OPENJDK_TARGET_OS_ENV
1010OPENJDK_TARGET_OS_TYPE
1011OPENJDK_TARGET_OS
1012OPENJDK_BUILD_CPU_ENDIAN
1013OPENJDK_BUILD_CPU_BITS
1014OPENJDK_BUILD_CPU_ARCH
1015OPENJDK_BUILD_CPU
1016OPENJDK_BUILD_OS_ENV
1017OPENJDK_BUILD_OS_TYPE
1018OPENJDK_BUILD_OS
1019OPENJDK_BUILD_AUTOCONF_NAME
1020OPENJDK_TARGET_AUTOCONF_NAME
1021target_os
1022target_vendor
1023target_cpu
1024target
1025host_os
1026host_vendor
1027host_cpu
1028host
1029build_os
1030build_vendor
1031build_cpu
1032build
1033NICE
1034CPIO
1035DF
1036READLINK
1037CYGPATH
1038SED
1039FGREP
1040EGREP
1041GREP
1042AWK
1043XARGS
1044WHICH
1045WC
1046UNIQ
1047UNAME
1048TR
1049TOUCH
1050TEE
1051TAR
1052TAIL
1053SORT
1054SH
1055RMDIR
1056RM
1057PRINTF
1058NAWK
1059MV
1060MKTEMP
1061MKDIR
1062LS
1063LN
1064HEAD
1065FIND
1066FILE
1067EXPR
1068ECHO
1069DIRNAME
1070DIFF
1071DATE
1072CUT
1073CP
1074COMM
1075CMP
1076CHMOD
1077CAT
1078BASH
1079BASENAME
1080DATE_WHEN_CONFIGURED
1081ORIGINAL_PATH
1082CONFIGURE_COMMAND_LINE
1083target_alias
1084host_alias
1085build_alias
1086LIBS
1087ECHO_T
1088ECHO_N
1089ECHO_C
1090DEFS
1091mandir
1092localedir
1093libdir
1094psdir
1095pdfdir
1096dvidir
1097htmldir
1098infodir
1099docdir
1100oldincludedir
1101includedir
1102localstatedir
1103sharedstatedir
1104sysconfdir
1105datadir
1106datarootdir
1107libexecdir
1108sbindir
1109bindir
1110program_transform_name
1111prefix
1112exec_prefix
1113PACKAGE_URL
1114PACKAGE_BUGREPORT
1115PACKAGE_STRING
1116PACKAGE_VERSION
1117PACKAGE_TARNAME
1118PACKAGE_NAME
1119PATH_SEPARATOR
1120SHELL'
1121ac_subst_files=''
1122ac_user_opts='
1123enable_option_checking
1124with_target_bits
1125enable_openjdk_only
1126with_custom_make_dir
1127with_jdk_variant
1128enable_debug
1129with_debug_level
1130with_jvm_variants
1131with_devkit
1132with_sys_root
1133with_sysroot
1134with_tools_dir
1135with_toolchain_path
1136with_extra_path
1137with_sdk_name
1138with_conf_name
1139with_output_sync
1140with_default_make_target
1141enable_headful
1142with_cacerts_file
1143enable_unlimited_crypto
1144with_copyright_year
1145enable_keep_packaged_modules
1146with_milestone
1147with_update_version
1148with_user_release_suffix
1149with_build_number
1150with_version_string
1151with_version_pre
1152with_version_opt
1153with_version_build
1154with_version_major
1155with_version_minor
1156with_version_security
1157with_version_patch
1158with_boot_jdk
1159with_build_jdk
1160with_add_source_root
1161with_override_source_root
1162with_adds_and_overrides
1163with_override_langtools
1164with_override_corba
1165with_override_jaxp
1166with_override_jaxws
1167with_override_hotspot
1168with_override_nashorn
1169with_override_jdk
1170with_import_hotspot
1171with_import_modules
1172enable_static_build
1173with_toolchain_type
1174with_extra_cflags
1175with_extra_cxxflags
1176with_extra_ldflags
1177with_toolchain_version
1178with_build_devkit
1179with_jtreg
1180enable_warnings_as_errors
1181with_native_debug_symbols
1182enable_debug_symbols
1183enable_zip_debug_info
1184enable_native_coverage
1185enable_dtrace
1186with_jvm_features
1187with_jvm_interpreter
1188with_stdc__lib
1189with_msvcr_dll
1190with_msvcp_dll
1191with_x
1192with_cups
1193with_cups_include
1194with_freetype
1195with_freetype_include
1196with_freetype_lib
1197with_freetype_src
1198enable_freetype_bundling
1199with_alsa
1200with_alsa_include
1201with_alsa_lib
1202with_libffi
1203with_libffi_include
1204with_libffi_lib
1205with_libjpeg
1206with_giflib
1207with_libpng
1208with_zlib
1209with_lcms
1210with_dxsdk
1211with_dxsdk_lib
1212with_dxsdk_include
1213enable_jtreg_failure_handler
1214with_num_cores
1215with_memory_size
1216with_jobs
1217with_test_jobs
1218with_boot_jdk_jvmargs
1219with_sjavac_server_java
1220enable_sjavac
1221enable_javac_server
1222enable_icecc
1223enable_precompiled_headers
1224enable_ccache
1225with_ccache_dir
1226'
1227      ac_precious_vars='build_alias
1228host_alias
1229target_alias
1230BASENAME
1231BASH
1232CAT
1233CHMOD
1234CMP
1235COMM
1236CP
1237CUT
1238DATE
1239DIFF
1240DIRNAME
1241ECHO
1242EXPR
1243FILE
1244FIND
1245HEAD
1246LN
1247LS
1248MKDIR
1249MKTEMP
1250MV
1251NAWK
1252PRINTF
1253RM
1254RMDIR
1255SH
1256SORT
1257TAIL
1258TAR
1259TEE
1260TOUCH
1261TR
1262UNAME
1263UNIQ
1264WC
1265WHICH
1266XARGS
1267AWK
1268GREP
1269EGREP
1270FGREP
1271SED
1272CYGPATH
1273READLINK
1274DF
1275CPIO
1276NICE
1277MAKE
1278UNZIP
1279ZIP
1280LDD
1281OTOOL
1282READELF
1283HG
1284STAT
1285TIME
1286DTRACE
1287PATCH
1288DSYMUTIL
1289XATTR
1290CODESIGN
1291SETFILE
1292PKG_CONFIG
1293JAVA
1294JAVAC
1295JAVAH
1296JAR
1297JARSIGNER
1298CC
1299CFLAGS
1300LDFLAGS
1301LIBS
1302CPPFLAGS
1303CXX
1304CXXFLAGS
1305CCC
1306CPP
1307CXXCPP
1308AS
1309AR
1310LIPO
1311STRIP
1312NM
1313GNM
1314OBJCOPY
1315OBJDUMP
1316BUILD_CC
1317BUILD_CXX
1318BUILD_NM
1319BUILD_AR
1320BUILD_OBJCOPY
1321BUILD_STRIP
1322JTREGEXE
1323XMKMF
1324FREETYPE_CFLAGS
1325FREETYPE_LIBS
1326ALSA_CFLAGS
1327ALSA_LIBS
1328LIBFFI_CFLAGS
1329LIBFFI_LIBS
1330PNG_CFLAGS
1331PNG_LIBS
1332LCMS_CFLAGS
1333LCMS_LIBS
1334ICECC_CMD
1335ICECC_CREATE_ENV
1336ICECC_WRAPPER
1337CCACHE'
1338
1339
1340# Initialize some variables set by options.
1341ac_init_help=
1342ac_init_version=false
1343ac_unrecognized_opts=
1344ac_unrecognized_sep=
1345# The variables have the same names as the options, with
1346# dashes changed to underlines.
1347cache_file=/dev/null
1348exec_prefix=NONE
1349no_create=
1350no_recursion=
1351prefix=NONE
1352program_prefix=NONE
1353program_suffix=NONE
1354program_transform_name=s,x,x,
1355silent=
1356site=
1357srcdir=
1358verbose=
1359x_includes=NONE
1360x_libraries=NONE
1361
1362# Installation directory options.
1363# These are left unexpanded so users can "make install exec_prefix=/foo"
1364# and all the variables that are supposed to be based on exec_prefix
1365# by default will actually change.
1366# Use braces instead of parens because sh, perl, etc. also accept them.
1367# (The list follows the same order as the GNU Coding Standards.)
1368bindir='${exec_prefix}/bin'
1369sbindir='${exec_prefix}/sbin'
1370libexecdir='${exec_prefix}/libexec'
1371datarootdir='${prefix}/share'
1372datadir='${datarootdir}'
1373sysconfdir='${prefix}/etc'
1374sharedstatedir='${prefix}/com'
1375localstatedir='${prefix}/var'
1376includedir='${prefix}/include'
1377oldincludedir='/usr/include'
1378docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1379infodir='${datarootdir}/info'
1380htmldir='${docdir}'
1381dvidir='${docdir}'
1382pdfdir='${docdir}'
1383psdir='${docdir}'
1384libdir='${exec_prefix}/lib'
1385localedir='${datarootdir}/locale'
1386mandir='${datarootdir}/man'
1387
1388ac_prev=
1389ac_dashdash=
1390for ac_option
1391do
1392  # If the previous option needs an argument, assign it.
1393  if test -n "$ac_prev"; then
1394    eval $ac_prev=\$ac_option
1395    ac_prev=
1396    continue
1397  fi
1398
1399  case $ac_option in
1400  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1401  *=)   ac_optarg= ;;
1402  *)    ac_optarg=yes ;;
1403  esac
1404
1405  # Accept the important Cygnus configure options, so we can diagnose typos.
1406
1407  case $ac_dashdash$ac_option in
1408  --)
1409    ac_dashdash=yes ;;
1410
1411  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1412    ac_prev=bindir ;;
1413  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1414    bindir=$ac_optarg ;;
1415
1416  -build | --build | --buil | --bui | --bu)
1417    ac_prev=build_alias ;;
1418  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1419    build_alias=$ac_optarg ;;
1420
1421  -cache-file | --cache-file | --cache-fil | --cache-fi \
1422  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1423    ac_prev=cache_file ;;
1424  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1425  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1426    cache_file=$ac_optarg ;;
1427
1428  --config-cache | -C)
1429    cache_file=config.cache ;;
1430
1431  -datadir | --datadir | --datadi | --datad)
1432    ac_prev=datadir ;;
1433  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1434    datadir=$ac_optarg ;;
1435
1436  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1437  | --dataroo | --dataro | --datar)
1438    ac_prev=datarootdir ;;
1439  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1440  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1441    datarootdir=$ac_optarg ;;
1442
1443  -disable-* | --disable-*)
1444    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1445    # Reject names that are not valid shell variable names.
1446    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1447      as_fn_error $? "invalid feature name: $ac_useropt"
1448    ac_useropt_orig=$ac_useropt
1449    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1450    case $ac_user_opts in
1451      *"
1452"enable_$ac_useropt"
1453"*) ;;
1454      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1455	 ac_unrecognized_sep=', ';;
1456    esac
1457    eval enable_$ac_useropt=no ;;
1458
1459  -docdir | --docdir | --docdi | --doc | --do)
1460    ac_prev=docdir ;;
1461  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1462    docdir=$ac_optarg ;;
1463
1464  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1465    ac_prev=dvidir ;;
1466  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1467    dvidir=$ac_optarg ;;
1468
1469  -enable-* | --enable-*)
1470    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1471    # Reject names that are not valid shell variable names.
1472    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1473      as_fn_error $? "invalid feature name: $ac_useropt"
1474    ac_useropt_orig=$ac_useropt
1475    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1476    case $ac_user_opts in
1477      *"
1478"enable_$ac_useropt"
1479"*) ;;
1480      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1481	 ac_unrecognized_sep=', ';;
1482    esac
1483    eval enable_$ac_useropt=\$ac_optarg ;;
1484
1485  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1486  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1487  | --exec | --exe | --ex)
1488    ac_prev=exec_prefix ;;
1489  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1490  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1491  | --exec=* | --exe=* | --ex=*)
1492    exec_prefix=$ac_optarg ;;
1493
1494  -gas | --gas | --ga | --g)
1495    # Obsolete; use --with-gas.
1496    with_gas=yes ;;
1497
1498  -help | --help | --hel | --he | -h)
1499    ac_init_help=long ;;
1500  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1501    ac_init_help=recursive ;;
1502  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1503    ac_init_help=short ;;
1504
1505  -host | --host | --hos | --ho)
1506    ac_prev=host_alias ;;
1507  -host=* | --host=* | --hos=* | --ho=*)
1508    host_alias=$ac_optarg ;;
1509
1510  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1511    ac_prev=htmldir ;;
1512  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1513  | --ht=*)
1514    htmldir=$ac_optarg ;;
1515
1516  -includedir | --includedir | --includedi | --included | --include \
1517  | --includ | --inclu | --incl | --inc)
1518    ac_prev=includedir ;;
1519  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1520  | --includ=* | --inclu=* | --incl=* | --inc=*)
1521    includedir=$ac_optarg ;;
1522
1523  -infodir | --infodir | --infodi | --infod | --info | --inf)
1524    ac_prev=infodir ;;
1525  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1526    infodir=$ac_optarg ;;
1527
1528  -libdir | --libdir | --libdi | --libd)
1529    ac_prev=libdir ;;
1530  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1531    libdir=$ac_optarg ;;
1532
1533  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1534  | --libexe | --libex | --libe)
1535    ac_prev=libexecdir ;;
1536  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1537  | --libexe=* | --libex=* | --libe=*)
1538    libexecdir=$ac_optarg ;;
1539
1540  -localedir | --localedir | --localedi | --localed | --locale)
1541    ac_prev=localedir ;;
1542  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1543    localedir=$ac_optarg ;;
1544
1545  -localstatedir | --localstatedir | --localstatedi | --localstated \
1546  | --localstate | --localstat | --localsta | --localst | --locals)
1547    ac_prev=localstatedir ;;
1548  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1549  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1550    localstatedir=$ac_optarg ;;
1551
1552  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1553    ac_prev=mandir ;;
1554  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1555    mandir=$ac_optarg ;;
1556
1557  -nfp | --nfp | --nf)
1558    # Obsolete; use --without-fp.
1559    with_fp=no ;;
1560
1561  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1562  | --no-cr | --no-c | -n)
1563    no_create=yes ;;
1564
1565  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1566  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1567    no_recursion=yes ;;
1568
1569  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1570  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1571  | --oldin | --oldi | --old | --ol | --o)
1572    ac_prev=oldincludedir ;;
1573  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1574  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1575  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1576    oldincludedir=$ac_optarg ;;
1577
1578  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1579    ac_prev=prefix ;;
1580  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1581    prefix=$ac_optarg ;;
1582
1583  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1584  | --program-pre | --program-pr | --program-p)
1585    ac_prev=program_prefix ;;
1586  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1587  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1588    program_prefix=$ac_optarg ;;
1589
1590  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1591  | --program-suf | --program-su | --program-s)
1592    ac_prev=program_suffix ;;
1593  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1594  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1595    program_suffix=$ac_optarg ;;
1596
1597  -program-transform-name | --program-transform-name \
1598  | --program-transform-nam | --program-transform-na \
1599  | --program-transform-n | --program-transform- \
1600  | --program-transform | --program-transfor \
1601  | --program-transfo | --program-transf \
1602  | --program-trans | --program-tran \
1603  | --progr-tra | --program-tr | --program-t)
1604    ac_prev=program_transform_name ;;
1605  -program-transform-name=* | --program-transform-name=* \
1606  | --program-transform-nam=* | --program-transform-na=* \
1607  | --program-transform-n=* | --program-transform-=* \
1608  | --program-transform=* | --program-transfor=* \
1609  | --program-transfo=* | --program-transf=* \
1610  | --program-trans=* | --program-tran=* \
1611  | --progr-tra=* | --program-tr=* | --program-t=*)
1612    program_transform_name=$ac_optarg ;;
1613
1614  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1615    ac_prev=pdfdir ;;
1616  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1617    pdfdir=$ac_optarg ;;
1618
1619  -psdir | --psdir | --psdi | --psd | --ps)
1620    ac_prev=psdir ;;
1621  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1622    psdir=$ac_optarg ;;
1623
1624  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1625  | -silent | --silent | --silen | --sile | --sil)
1626    silent=yes ;;
1627
1628  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1629    ac_prev=sbindir ;;
1630  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1631  | --sbi=* | --sb=*)
1632    sbindir=$ac_optarg ;;
1633
1634  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1635  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1636  | --sharedst | --shareds | --shared | --share | --shar \
1637  | --sha | --sh)
1638    ac_prev=sharedstatedir ;;
1639  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1640  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1641  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1642  | --sha=* | --sh=*)
1643    sharedstatedir=$ac_optarg ;;
1644
1645  -site | --site | --sit)
1646    ac_prev=site ;;
1647  -site=* | --site=* | --sit=*)
1648    site=$ac_optarg ;;
1649
1650  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1651    ac_prev=srcdir ;;
1652  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1653    srcdir=$ac_optarg ;;
1654
1655  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1656  | --syscon | --sysco | --sysc | --sys | --sy)
1657    ac_prev=sysconfdir ;;
1658  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1659  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1660    sysconfdir=$ac_optarg ;;
1661
1662  -target | --target | --targe | --targ | --tar | --ta | --t)
1663    ac_prev=target_alias ;;
1664  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1665    target_alias=$ac_optarg ;;
1666
1667  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1668    verbose=yes ;;
1669
1670  -version | --version | --versio | --versi | --vers | -V)
1671    ac_init_version=: ;;
1672
1673  -with-* | --with-*)
1674    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1675    # Reject names that are not valid shell variable names.
1676    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1677      as_fn_error $? "invalid package name: $ac_useropt"
1678    ac_useropt_orig=$ac_useropt
1679    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1680    case $ac_user_opts in
1681      *"
1682"with_$ac_useropt"
1683"*) ;;
1684      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1685	 ac_unrecognized_sep=', ';;
1686    esac
1687    eval with_$ac_useropt=\$ac_optarg ;;
1688
1689  -without-* | --without-*)
1690    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1691    # Reject names that are not valid shell variable names.
1692    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1693      as_fn_error $? "invalid package name: $ac_useropt"
1694    ac_useropt_orig=$ac_useropt
1695    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1696    case $ac_user_opts in
1697      *"
1698"with_$ac_useropt"
1699"*) ;;
1700      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1701	 ac_unrecognized_sep=', ';;
1702    esac
1703    eval with_$ac_useropt=no ;;
1704
1705  --x)
1706    # Obsolete; use --with-x.
1707    with_x=yes ;;
1708
1709  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1710  | --x-incl | --x-inc | --x-in | --x-i)
1711    ac_prev=x_includes ;;
1712  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1713  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1714    x_includes=$ac_optarg ;;
1715
1716  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1717  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1718    ac_prev=x_libraries ;;
1719  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1720  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1721    x_libraries=$ac_optarg ;;
1722
1723  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1724Try \`$0 --help' for more information"
1725    ;;
1726
1727  *=*)
1728    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1729    # Reject names that are not valid shell variable names.
1730    case $ac_envvar in #(
1731      '' | [0-9]* | *[!_$as_cr_alnum]* )
1732      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1733    esac
1734    eval $ac_envvar=\$ac_optarg
1735    export $ac_envvar ;;
1736
1737  *)
1738    # FIXME: should be removed in autoconf 3.0.
1739    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1740    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1741      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1742    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1743    ;;
1744
1745  esac
1746done
1747
1748if test -n "$ac_prev"; then
1749  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1750  as_fn_error $? "missing argument to $ac_option"
1751fi
1752
1753if test -n "$ac_unrecognized_opts"; then
1754  case $enable_option_checking in
1755    no) ;;
1756    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1757    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1758  esac
1759fi
1760
1761# Check all directory arguments for consistency.
1762for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1763		datadir sysconfdir sharedstatedir localstatedir includedir \
1764		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1765		libdir localedir mandir
1766do
1767  eval ac_val=\$$ac_var
1768  # Remove trailing slashes.
1769  case $ac_val in
1770    */ )
1771      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1772      eval $ac_var=\$ac_val;;
1773  esac
1774  # Be sure to have absolute directory names.
1775  case $ac_val in
1776    [\\/$]* | ?:[\\/]* )  continue;;
1777    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1778  esac
1779  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1780done
1781
1782# There might be people who depend on the old broken behavior: `$host'
1783# used to hold the argument of --host etc.
1784# FIXME: To remove some day.
1785build=$build_alias
1786host=$host_alias
1787target=$target_alias
1788
1789# FIXME: To remove some day.
1790if test "x$host_alias" != x; then
1791  if test "x$build_alias" = x; then
1792    cross_compiling=maybe
1793  elif test "x$build_alias" != "x$host_alias"; then
1794    cross_compiling=yes
1795  fi
1796fi
1797
1798ac_tool_prefix=
1799test -n "$host_alias" && ac_tool_prefix=$host_alias-
1800
1801test "$silent" = yes && exec 6>/dev/null
1802
1803
1804ac_pwd=`pwd` && test -n "$ac_pwd" &&
1805ac_ls_di=`ls -di .` &&
1806ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1807  as_fn_error $? "working directory cannot be determined"
1808test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1809  as_fn_error $? "pwd does not report name of working directory"
1810
1811
1812# Find the source files, if location was not specified.
1813if test -z "$srcdir"; then
1814  ac_srcdir_defaulted=yes
1815  # Try the directory containing this script, then the parent directory.
1816  ac_confdir=`$as_dirname -- "$as_myself" ||
1817$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1818	 X"$as_myself" : 'X\(//\)[^/]' \| \
1819	 X"$as_myself" : 'X\(//\)$' \| \
1820	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1821$as_echo X"$as_myself" |
1822    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1823	    s//\1/
1824	    q
1825	  }
1826	  /^X\(\/\/\)[^/].*/{
1827	    s//\1/
1828	    q
1829	  }
1830	  /^X\(\/\/\)$/{
1831	    s//\1/
1832	    q
1833	  }
1834	  /^X\(\/\).*/{
1835	    s//\1/
1836	    q
1837	  }
1838	  s/.*/./; q'`
1839  srcdir=$ac_confdir
1840  if test ! -r "$srcdir/$ac_unique_file"; then
1841    srcdir=..
1842  fi
1843else
1844  ac_srcdir_defaulted=no
1845fi
1846if test ! -r "$srcdir/$ac_unique_file"; then
1847  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1848  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1849fi
1850ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1851ac_abs_confdir=`(
1852	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1853	pwd)`
1854# When building in place, set srcdir=.
1855if test "$ac_abs_confdir" = "$ac_pwd"; then
1856  srcdir=.
1857fi
1858# Remove unnecessary trailing slashes from srcdir.
1859# Double slashes in file names in object file debugging info
1860# mess up M-x gdb in Emacs.
1861case $srcdir in
1862*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1863esac
1864for ac_var in $ac_precious_vars; do
1865  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1866  eval ac_env_${ac_var}_value=\$${ac_var}
1867  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1868  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1869done
1870
1871#
1872# Report the --help message.
1873#
1874if test "$ac_init_help" = "long"; then
1875  # Omit some internal or obsolete options to make the list less imposing.
1876  # This message is too long to be a string in the A/UX 3.1 sh.
1877  cat <<_ACEOF
1878\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1879
1880Usage: $0 [OPTION]... [VAR=VALUE]...
1881
1882To assign environment variables (e.g., CC, CFLAGS...), specify them as
1883VAR=VALUE.  See below for descriptions of some of the useful variables.
1884
1885Defaults for the options are specified in brackets.
1886
1887Configuration:
1888  -h, --help              display this help and exit
1889      --help=short        display options specific to this package
1890      --help=recursive    display the short help of all the included packages
1891  -V, --version           display version information and exit
1892  -q, --quiet, --silent   do not print \`checking ...' messages
1893      --cache-file=FILE   cache test results in FILE [disabled]
1894  -C, --config-cache      alias for \`--cache-file=config.cache'
1895  -n, --no-create         do not create output files
1896      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1897
1898Installation directories:
1899  --prefix=PREFIX         install architecture-independent files in PREFIX
1900                          [$ac_default_prefix]
1901  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1902                          [PREFIX]
1903
1904By default, \`make install' will install all the files in
1905\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1906an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1907for instance \`--prefix=\$HOME'.
1908
1909For better control, use the options below.
1910
1911Fine tuning of the installation directories:
1912  --bindir=DIR            user executables [EPREFIX/bin]
1913  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1914  --libexecdir=DIR        program executables [EPREFIX/libexec]
1915  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1916  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1917  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1918  --libdir=DIR            object code libraries [EPREFIX/lib]
1919  --includedir=DIR        C header files [PREFIX/include]
1920  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1921  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1922  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1923  --infodir=DIR           info documentation [DATAROOTDIR/info]
1924  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1925  --mandir=DIR            man documentation [DATAROOTDIR/man]
1926  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1927  --htmldir=DIR           html documentation [DOCDIR]
1928  --dvidir=DIR            dvi documentation [DOCDIR]
1929  --pdfdir=DIR            pdf documentation [DOCDIR]
1930  --psdir=DIR             ps documentation [DOCDIR]
1931_ACEOF
1932
1933  cat <<\_ACEOF
1934
1935X features:
1936  --x-includes=DIR    X include files are in DIR
1937  --x-libraries=DIR   X library files are in DIR
1938
1939System types:
1940  --build=BUILD     configure for building on BUILD [guessed]
1941  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1942  --target=TARGET   configure for building compilers for TARGET [HOST]
1943_ACEOF
1944fi
1945
1946if test -n "$ac_init_help"; then
1947  case $ac_init_help in
1948     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1949   esac
1950  cat <<\_ACEOF
1951
1952Optional Features:
1953  --disable-option-checking  ignore unrecognized --enable/--with options
1954  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1955  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1956  --enable-openjdk-only   suppress building custom source even if present
1957                          [disabled]
1958  --enable-debug          set the debug level to fastdebug (shorthand for
1959                          --with-debug-level=fastdebug) [disabled]
1960  --disable-headful       disable building headful support (graphical UI
1961                          support) [enabled]
1962  --enable-unlimited-crypto
1963                          Enable unlimited crypto policy [disabled]
1964  --disable-keep-packaged-modules
1965                          Do not keep packaged modules in jdk image [enable]
1966  --enable-static-build   enable static library build [disabled]
1967  --disable-warnings-as-errors
1968                          do not consider native warnings to be an error
1969                          [enabled]
1970  --enable-debug-symbols  Deprecated. Option is kept for backwards
1971                          compatibility and is ignored
1972  --enable-zip-debug-info Deprecated. Option is kept for backwards
1973                          compatibility and is ignored
1974  --enable-native-coverage
1975                          enable native compilation with code coverage
1976                          data[disabled]
1977  --enable-dtrace[=yes/no/auto]
1978                          enable dtrace. Default is auto, where dtrace is
1979                          enabled if all dependencies are present.
1980  --disable-freetype-bundling
1981                          disable bundling of the freetype library with the
1982                          build result [enabled on Windows or when using
1983                          --with-freetype, disabled otherwise]
1984  --enable-jtreg-failure-handler
1985                          forces build of the jtreg failure handler to be
1986                          enabled, missing dependencies become fatal errors.
1987                          Default is auto, where the failure handler is built
1988                          if all dependencies are present and otherwise just
1989                          disabled.
1990  --enable-sjavac         use sjavac to do fast incremental compiles
1991                          [disabled]
1992  --disable-javac-server  disable javac server [enabled]
1993  --enable-icecc          enable distribted compilation of native code using
1994                          icecc/icecream [disabled]
1995  --disable-precompiled-headers
1996                          disable using precompiled headers when compiling C++
1997                          [enabled]
1998  --enable-ccache         enable using ccache to speed up recompilations
1999                          [disabled]
2000
2001Optional Packages:
2002  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2003  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2004  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2005                          support it), e.g. --with-target-bits=32 [guessed]
2006  --with-custom-make-dir  Deprecated. Option is kept for backwards
2007                          compatibility and is ignored
2008  --with-jdk-variant      JDK variant to build (normal) [normal]
2009  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2010                          optimized) [release]
2011  --with-jvm-variants     JVM variants (separated by commas) to build
2012                          (server,client,minimal,core,zero,zeroshark,custom)
2013                          [server]
2014  --with-devkit           use this devkit for compilers, tools and resources
2015  --with-sys-root         alias for --with-sysroot for backwards compatability
2016  --with-sysroot          use this directory as sysroot
2017  --with-tools-dir        alias for --with-toolchain-path for backwards
2018                          compatibility
2019  --with-toolchain-path   prepend these directories when searching for
2020                          toolchain binaries (compilers etc)
2021  --with-extra-path       prepend these directories to the default path
2022  --with-sdk-name         use the platform SDK of the given name. [macosx]
2023  --with-conf-name        use this as the name of the configuration [generated
2024                          from important configuration options]
2025  --with-output-sync      set make output sync type if supported by make.
2026                          [recurse]
2027  --with-default-make-target
2028                          set the default make target [exploded-image]
2029  --with-cacerts-file     specify alternative cacerts file
2030  --with-copyright-year   Set copyright year value for build [current year]
2031  --with-milestone        Deprecated. Option is kept for backwards
2032                          compatibility and is ignored
2033  --with-update-version   Deprecated. Option is kept for backwards
2034                          compatibility and is ignored
2035  --with-user-release-suffix
2036                          Deprecated. Option is kept for backwards
2037                          compatibility and is ignored
2038  --with-build-number     Deprecated. Option is kept for backwards
2039                          compatibility and is ignored
2040  --with-version-string   Set version string [calculated]
2041  --with-version-pre      Set the base part of the version 'PRE' field
2042                          (pre-release identifier) ['internal']
2043  --with-version-opt      Set version 'OPT' field (build metadata)
2044                          [<timestamp>.<user>.<dirname>]
2045  --with-version-build    Set version 'BUILD' field (build number) [not
2046                          specified]
2047  --with-version-major    Set version 'MAJOR' field (first number) [current
2048                          source value]
2049  --with-version-minor    Set version 'MINOR' field (second number) [current
2050                          source value]
2051  --with-version-security Set version 'SECURITY' field (third number) [current
2052                          source value]
2053  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2054                          specified]
2055  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2056  --with-build-jdk        path to JDK of same version as is being built[the
2057                          newly built JDK]
2058  --with-add-source-root  Deprecated. Option is kept for backwards
2059                          compatibility and is ignored
2060  --with-override-source-root
2061                          Deprecated. Option is kept for backwards
2062                          compatibility and is ignored
2063  --with-adds-and-overrides
2064                          Deprecated. Option is kept for backwards
2065                          compatibility and is ignored
2066  --with-override-langtools
2067                          Deprecated. Option is kept for backwards
2068                          compatibility and is ignored
2069  --with-override-corba   Deprecated. Option is kept for backwards
2070                          compatibility and is ignored
2071  --with-override-jaxp    Deprecated. Option is kept for backwards
2072                          compatibility and is ignored
2073  --with-override-jaxws   Deprecated. Option is kept for backwards
2074                          compatibility and is ignored
2075  --with-override-hotspot Deprecated. Option is kept for backwards
2076                          compatibility and is ignored
2077  --with-override-nashorn Deprecated. Option is kept for backwards
2078                          compatibility and is ignored
2079  --with-override-jdk     Deprecated. Option is kept for backwards
2080                          compatibility and is ignored
2081  --with-import-hotspot   import hotspot binaries from this jdk image or
2082                          hotspot build dist dir instead of building from
2083                          source
2084  --with-import-modules   import a set of prebuilt modules either as a zip
2085                          file or an exploded directory
2086  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2087                          to show possible values [platform dependent]
2088  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2089  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2090  --with-extra-ldflags    extra flags to be used when linking jdk
2091  --with-toolchain-version
2092                          the version of the toolchain to look for, use
2093                          '--help' to show possible values [platform
2094                          dependent]
2095  --with-build-devkit     Devkit to use for the build platform toolchain
2096  --with-jtreg            Regression Test Harness [probed]
2097  --with-native-debug-symbols
2098                          set the native debug symbol configuration (none,
2099                          internal, external, zipped) [varying]
2100  --with-jvm-features     additional JVM features to enable (separated by
2101                          comma), use '--help' to show possible values [none]
2102  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2103                          compatibility and is ignored
2104  --with-stdc++lib=<static>,<dynamic>,<default>
2105                          force linking of the C++ runtime on Linux to either
2106                          static or dynamic, default is static with dynamic as
2107                          fallback
2108  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2109                          (Windows only) [probed]
2110  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2111                          (Windows only) [probed]
2112  --with-x                use the X Window System
2113  --with-cups             specify prefix directory for the cups package
2114                          (expecting the headers under PATH/include)
2115  --with-cups-include     specify directory for the cups include files
2116  --with-freetype         specify prefix directory for the freetype package
2117                          (expecting the libraries under PATH/lib and the
2118                          headers under PATH/include)
2119  --with-freetype-include specify directory for the freetype include files
2120  --with-freetype-lib     specify directory for the freetype library
2121  --with-freetype-src     specify directory with freetype sources to
2122                          automatically build the library (experimental,
2123                          Windows-only)
2124  --with-alsa             specify prefix directory for the alsa package
2125                          (expecting the libraries under PATH/lib and the
2126                          headers under PATH/include)
2127  --with-alsa-include     specify directory for the alsa include files
2128  --with-alsa-lib         specify directory for the alsa library
2129  --with-libffi           specify prefix directory for the libffi package
2130                          (expecting the libraries under PATH/lib and the
2131                          headers under PATH/include)
2132  --with-libffi-include   specify directory for the libffi include files
2133  --with-libffi-lib       specify directory for the libffi library
2134  --with-libjpeg          use libjpeg from build system or OpenJDK source
2135                          (system, bundled) [bundled]
2136  --with-giflib           use giflib from build system or OpenJDK source
2137                          (system, bundled) [bundled]
2138  --with-libpng           use libpng from build system or OpenJDK source
2139                          (system, bundled) [bundled]
2140  --with-zlib             use zlib from build system or OpenJDK source
2141                          (system, bundled) [bundled]
2142  --with-lcms             use lcms2 from build system or OpenJDK source
2143                          (system, bundled) [bundled]
2144  --with-dxsdk            Deprecated. Option is kept for backwards
2145                          compatibility and is ignored
2146  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2147                          compatibility and is ignored
2148  --with-dxsdk-include    Deprecated. Option is kept for backwards
2149                          compatibility and is ignored
2150  --with-num-cores        number of cores in the build system, e.g.
2151                          --with-num-cores=8 [probed]
2152  --with-memory-size      memory (in MB) available in the build system, e.g.
2153                          --with-memory-size=1024 [probed]
2154  --with-jobs             number of parallel jobs to let make run [calculated
2155                          based on cores and memory]
2156  --with-test-jobs        number of parallel tests jobs to run [based on build
2157                          jobs]
2158  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2159                          invocations of boot JDK, overriding the default
2160                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2161                          -enableassertions"
2162  --with-sjavac-server-java
2163                          use this java binary for running the sjavac
2164                          background server [Boot JDK java]
2165  --with-ccache-dir       where to store ccache files [~/.ccache]
2166
2167Some influential environment variables:
2168  BASENAME    Override default value for BASENAME
2169  BASH        Override default value for BASH
2170  CAT         Override default value for CAT
2171  CHMOD       Override default value for CHMOD
2172  CMP         Override default value for CMP
2173  COMM        Override default value for COMM
2174  CP          Override default value for CP
2175  CUT         Override default value for CUT
2176  DATE        Override default value for DATE
2177  DIFF        Override default value for DIFF
2178  DIRNAME     Override default value for DIRNAME
2179  ECHO        Override default value for ECHO
2180  EXPR        Override default value for EXPR
2181  FILE        Override default value for FILE
2182  FIND        Override default value for FIND
2183  HEAD        Override default value for HEAD
2184  LN          Override default value for LN
2185  LS          Override default value for LS
2186  MKDIR       Override default value for MKDIR
2187  MKTEMP      Override default value for MKTEMP
2188  MV          Override default value for MV
2189  NAWK        Override default value for NAWK
2190  PRINTF      Override default value for PRINTF
2191  RM          Override default value for RM
2192  RMDIR       Override default value for RMDIR
2193  SH          Override default value for SH
2194  SORT        Override default value for SORT
2195  TAIL        Override default value for TAIL
2196  TAR         Override default value for TAR
2197  TEE         Override default value for TEE
2198  TOUCH       Override default value for TOUCH
2199  TR          Override default value for TR
2200  UNAME       Override default value for UNAME
2201  UNIQ        Override default value for UNIQ
2202  WC          Override default value for WC
2203  WHICH       Override default value for WHICH
2204  XARGS       Override default value for XARGS
2205  AWK         Override default value for AWK
2206  GREP        Override default value for GREP
2207  EGREP       Override default value for EGREP
2208  FGREP       Override default value for FGREP
2209  SED         Override default value for SED
2210  CYGPATH     Override default value for CYGPATH
2211  READLINK    Override default value for READLINK
2212  DF          Override default value for DF
2213  CPIO        Override default value for CPIO
2214  NICE        Override default value for NICE
2215  MAKE        Override default value for MAKE
2216  UNZIP       Override default value for UNZIP
2217  ZIP         Override default value for ZIP
2218  LDD         Override default value for LDD
2219  OTOOL       Override default value for OTOOL
2220  READELF     Override default value for READELF
2221  HG          Override default value for HG
2222  STAT        Override default value for STAT
2223  TIME        Override default value for TIME
2224  DTRACE      Override default value for DTRACE
2225  PATCH       Override default value for PATCH
2226  DSYMUTIL    Override default value for DSYMUTIL
2227  XATTR       Override default value for XATTR
2228  CODESIGN    Override default value for CODESIGN
2229  SETFILE     Override default value for SETFILE
2230  PKG_CONFIG  path to pkg-config utility
2231  JAVA        Override default value for JAVA
2232  JAVAC       Override default value for JAVAC
2233  JAVAH       Override default value for JAVAH
2234  JAR         Override default value for JAR
2235  JARSIGNER   Override default value for JARSIGNER
2236  CC          C compiler command
2237  CFLAGS      C compiler flags
2238  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2239              nonstandard directory <lib dir>
2240  LIBS        libraries to pass to the linker, e.g. -l<library>
2241  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2242              you have headers in a nonstandard directory <include dir>
2243  CXX         C++ compiler command
2244  CXXFLAGS    C++ compiler flags
2245  CPP         C preprocessor
2246  CXXCPP      C++ preprocessor
2247  AS          Override default value for AS
2248  AR          Override default value for AR
2249  LIPO        Override default value for LIPO
2250  STRIP       Override default value for STRIP
2251  NM          Override default value for NM
2252  GNM         Override default value for GNM
2253  OBJCOPY     Override default value for OBJCOPY
2254  OBJDUMP     Override default value for OBJDUMP
2255  BUILD_CC    Override default value for BUILD_CC
2256  BUILD_CXX   Override default value for BUILD_CXX
2257  BUILD_NM    Override default value for BUILD_NM
2258  BUILD_AR    Override default value for BUILD_AR
2259  BUILD_OBJCOPY
2260              Override default value for BUILD_OBJCOPY
2261  BUILD_STRIP Override default value for BUILD_STRIP
2262  JTREGEXE    Override default value for JTREGEXE
2263  XMKMF       Path to xmkmf, Makefile generator for X Window System
2264  FREETYPE_CFLAGS
2265              C compiler flags for FREETYPE, overriding pkg-config
2266  FREETYPE_LIBS
2267              linker flags for FREETYPE, overriding pkg-config
2268  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2269  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2270  LIBFFI_CFLAGS
2271              C compiler flags for LIBFFI, overriding pkg-config
2272  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2273  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2274  PNG_LIBS    linker flags for PNG, overriding pkg-config
2275  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2276  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2277  ICECC_CMD   Override default value for ICECC_CMD
2278  ICECC_CREATE_ENV
2279              Override default value for ICECC_CREATE_ENV
2280  ICECC_WRAPPER
2281              Override default value for ICECC_WRAPPER
2282  CCACHE      Override default value for CCACHE
2283
2284Use these variables to override the choices made by `configure' or to help
2285it to find libraries and programs with nonstandard names/locations.
2286
2287Report bugs to <build-dev@openjdk.java.net>.
2288OpenJDK home page: <http://openjdk.java.net>.
2289_ACEOF
2290ac_status=$?
2291fi
2292
2293if test "$ac_init_help" = "recursive"; then
2294  # If there are subdirs, report their specific --help.
2295  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2296    test -d "$ac_dir" ||
2297      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2298      continue
2299    ac_builddir=.
2300
2301case "$ac_dir" in
2302.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2303*)
2304  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2305  # A ".." for each directory in $ac_dir_suffix.
2306  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2307  case $ac_top_builddir_sub in
2308  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2309  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2310  esac ;;
2311esac
2312ac_abs_top_builddir=$ac_pwd
2313ac_abs_builddir=$ac_pwd$ac_dir_suffix
2314# for backward compatibility:
2315ac_top_builddir=$ac_top_build_prefix
2316
2317case $srcdir in
2318  .)  # We are building in place.
2319    ac_srcdir=.
2320    ac_top_srcdir=$ac_top_builddir_sub
2321    ac_abs_top_srcdir=$ac_pwd ;;
2322  [\\/]* | ?:[\\/]* )  # Absolute name.
2323    ac_srcdir=$srcdir$ac_dir_suffix;
2324    ac_top_srcdir=$srcdir
2325    ac_abs_top_srcdir=$srcdir ;;
2326  *) # Relative name.
2327    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2328    ac_top_srcdir=$ac_top_build_prefix$srcdir
2329    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2330esac
2331ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2332
2333    cd "$ac_dir" || { ac_status=$?; continue; }
2334    # Check for guested configure.
2335    if test -f "$ac_srcdir/configure.gnu"; then
2336      echo &&
2337      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2338    elif test -f "$ac_srcdir/configure"; then
2339      echo &&
2340      $SHELL "$ac_srcdir/configure" --help=recursive
2341    else
2342      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2343    fi || ac_status=$?
2344    cd "$ac_pwd" || { ac_status=$?; break; }
2345  done
2346fi
2347
2348test -n "$ac_init_help" && exit $ac_status
2349if $ac_init_version; then
2350  cat <<\_ACEOF
2351OpenJDK configure jdk9
2352generated by GNU Autoconf 2.69
2353
2354Copyright (C) 2012 Free Software Foundation, Inc.
2355This configure script is free software; the Free Software Foundation
2356gives unlimited permission to copy, distribute and modify it.
2357_ACEOF
2358  exit
2359fi
2360
2361## ------------------------ ##
2362## Autoconf initialization. ##
2363## ------------------------ ##
2364
2365# ac_fn_c_try_compile LINENO
2366# --------------------------
2367# Try to compile conftest.$ac_ext, and return whether this succeeded.
2368ac_fn_c_try_compile ()
2369{
2370  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2371  rm -f conftest.$ac_objext
2372  if { { ac_try="$ac_compile"
2373case "(($ac_try" in
2374  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2375  *) ac_try_echo=$ac_try;;
2376esac
2377eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2378$as_echo "$ac_try_echo"; } >&5
2379  (eval "$ac_compile") 2>conftest.err
2380  ac_status=$?
2381  if test -s conftest.err; then
2382    grep -v '^ *+' conftest.err >conftest.er1
2383    cat conftest.er1 >&5
2384    mv -f conftest.er1 conftest.err
2385  fi
2386  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2387  test $ac_status = 0; } && {
2388	 test -z "$ac_c_werror_flag" ||
2389	 test ! -s conftest.err
2390       } && test -s conftest.$ac_objext; then :
2391  ac_retval=0
2392else
2393  $as_echo "$as_me: failed program was:" >&5
2394sed 's/^/| /' conftest.$ac_ext >&5
2395
2396	ac_retval=1
2397fi
2398  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2399  as_fn_set_status $ac_retval
2400
2401} # ac_fn_c_try_compile
2402
2403# ac_fn_cxx_try_compile LINENO
2404# ----------------------------
2405# Try to compile conftest.$ac_ext, and return whether this succeeded.
2406ac_fn_cxx_try_compile ()
2407{
2408  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2409  rm -f conftest.$ac_objext
2410  if { { ac_try="$ac_compile"
2411case "(($ac_try" in
2412  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2413  *) ac_try_echo=$ac_try;;
2414esac
2415eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2416$as_echo "$ac_try_echo"; } >&5
2417  (eval "$ac_compile") 2>conftest.err
2418  ac_status=$?
2419  if test -s conftest.err; then
2420    grep -v '^ *+' conftest.err >conftest.er1
2421    cat conftest.er1 >&5
2422    mv -f conftest.er1 conftest.err
2423  fi
2424  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2425  test $ac_status = 0; } && {
2426	 test -z "$ac_cxx_werror_flag" ||
2427	 test ! -s conftest.err
2428       } && test -s conftest.$ac_objext; then :
2429  ac_retval=0
2430else
2431  $as_echo "$as_me: failed program was:" >&5
2432sed 's/^/| /' conftest.$ac_ext >&5
2433
2434	ac_retval=1
2435fi
2436  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2437  as_fn_set_status $ac_retval
2438
2439} # ac_fn_cxx_try_compile
2440
2441# ac_fn_c_try_cpp LINENO
2442# ----------------------
2443# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2444ac_fn_c_try_cpp ()
2445{
2446  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2447  if { { ac_try="$ac_cpp conftest.$ac_ext"
2448case "(($ac_try" in
2449  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2450  *) ac_try_echo=$ac_try;;
2451esac
2452eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2453$as_echo "$ac_try_echo"; } >&5
2454  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2455  ac_status=$?
2456  if test -s conftest.err; then
2457    grep -v '^ *+' conftest.err >conftest.er1
2458    cat conftest.er1 >&5
2459    mv -f conftest.er1 conftest.err
2460  fi
2461  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2462  test $ac_status = 0; } > conftest.i && {
2463	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2464	 test ! -s conftest.err
2465       }; then :
2466  ac_retval=0
2467else
2468  $as_echo "$as_me: failed program was:" >&5
2469sed 's/^/| /' conftest.$ac_ext >&5
2470
2471    ac_retval=1
2472fi
2473  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2474  as_fn_set_status $ac_retval
2475
2476} # ac_fn_c_try_cpp
2477
2478# ac_fn_cxx_try_cpp LINENO
2479# ------------------------
2480# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2481ac_fn_cxx_try_cpp ()
2482{
2483  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2484  if { { ac_try="$ac_cpp conftest.$ac_ext"
2485case "(($ac_try" in
2486  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2487  *) ac_try_echo=$ac_try;;
2488esac
2489eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2490$as_echo "$ac_try_echo"; } >&5
2491  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2492  ac_status=$?
2493  if test -s conftest.err; then
2494    grep -v '^ *+' conftest.err >conftest.er1
2495    cat conftest.er1 >&5
2496    mv -f conftest.er1 conftest.err
2497  fi
2498  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2499  test $ac_status = 0; } > conftest.i && {
2500	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2501	 test ! -s conftest.err
2502       }; then :
2503  ac_retval=0
2504else
2505  $as_echo "$as_me: failed program was:" >&5
2506sed 's/^/| /' conftest.$ac_ext >&5
2507
2508    ac_retval=1
2509fi
2510  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2511  as_fn_set_status $ac_retval
2512
2513} # ac_fn_cxx_try_cpp
2514
2515# ac_fn_c_try_link LINENO
2516# -----------------------
2517# Try to link conftest.$ac_ext, and return whether this succeeded.
2518ac_fn_c_try_link ()
2519{
2520  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2521  rm -f conftest.$ac_objext conftest$ac_exeext
2522  if { { ac_try="$ac_link"
2523case "(($ac_try" in
2524  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2525  *) ac_try_echo=$ac_try;;
2526esac
2527eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2528$as_echo "$ac_try_echo"; } >&5
2529  (eval "$ac_link") 2>conftest.err
2530  ac_status=$?
2531  if test -s conftest.err; then
2532    grep -v '^ *+' conftest.err >conftest.er1
2533    cat conftest.er1 >&5
2534    mv -f conftest.er1 conftest.err
2535  fi
2536  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2537  test $ac_status = 0; } && {
2538	 test -z "$ac_c_werror_flag" ||
2539	 test ! -s conftest.err
2540       } && test -s conftest$ac_exeext && {
2541	 test "$cross_compiling" = yes ||
2542	 test -x conftest$ac_exeext
2543       }; then :
2544  ac_retval=0
2545else
2546  $as_echo "$as_me: failed program was:" >&5
2547sed 's/^/| /' conftest.$ac_ext >&5
2548
2549	ac_retval=1
2550fi
2551  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2552  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2553  # interfere with the next link command; also delete a directory that is
2554  # left behind by Apple's compiler.  We do this before executing the actions.
2555  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2556  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2557  as_fn_set_status $ac_retval
2558
2559} # ac_fn_c_try_link
2560
2561# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2562# ---------------------------------------------------------
2563# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2564# the include files in INCLUDES and setting the cache variable VAR
2565# accordingly.
2566ac_fn_cxx_check_header_mongrel ()
2567{
2568  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2569  if eval \${$3+:} false; then :
2570  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2571$as_echo_n "checking for $2... " >&6; }
2572if eval \${$3+:} false; then :
2573  $as_echo_n "(cached) " >&6
2574fi
2575eval ac_res=\$$3
2576	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2577$as_echo "$ac_res" >&6; }
2578else
2579  # Is the header compilable?
2580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2581$as_echo_n "checking $2 usability... " >&6; }
2582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2583/* end confdefs.h.  */
2584$4
2585#include <$2>
2586_ACEOF
2587if ac_fn_cxx_try_compile "$LINENO"; then :
2588  ac_header_compiler=yes
2589else
2590  ac_header_compiler=no
2591fi
2592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2594$as_echo "$ac_header_compiler" >&6; }
2595
2596# Is the header present?
2597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2598$as_echo_n "checking $2 presence... " >&6; }
2599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2600/* end confdefs.h.  */
2601#include <$2>
2602_ACEOF
2603if ac_fn_cxx_try_cpp "$LINENO"; then :
2604  ac_header_preproc=yes
2605else
2606  ac_header_preproc=no
2607fi
2608rm -f conftest.err conftest.i conftest.$ac_ext
2609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2610$as_echo "$ac_header_preproc" >&6; }
2611
2612# So?  What about this header?
2613case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2614  yes:no: )
2615    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2616$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2617    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2618$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2619    ;;
2620  no:yes:* )
2621    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2622$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2623    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2624$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2625    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2626$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2627    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2628$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2629    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2630$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2631( $as_echo "## ----------------------------------------- ##
2632## Report this to build-dev@openjdk.java.net ##
2633## ----------------------------------------- ##"
2634     ) | sed "s/^/$as_me: WARNING:     /" >&2
2635    ;;
2636esac
2637  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2638$as_echo_n "checking for $2... " >&6; }
2639if eval \${$3+:} false; then :
2640  $as_echo_n "(cached) " >&6
2641else
2642  eval "$3=\$ac_header_compiler"
2643fi
2644eval ac_res=\$$3
2645	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2646$as_echo "$ac_res" >&6; }
2647fi
2648  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2649
2650} # ac_fn_cxx_check_header_mongrel
2651
2652# ac_fn_cxx_try_run LINENO
2653# ------------------------
2654# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2655# that executables *can* be run.
2656ac_fn_cxx_try_run ()
2657{
2658  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2659  if { { ac_try="$ac_link"
2660case "(($ac_try" in
2661  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2662  *) ac_try_echo=$ac_try;;
2663esac
2664eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2665$as_echo "$ac_try_echo"; } >&5
2666  (eval "$ac_link") 2>&5
2667  ac_status=$?
2668  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2669  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2670  { { case "(($ac_try" in
2671  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2672  *) ac_try_echo=$ac_try;;
2673esac
2674eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2675$as_echo "$ac_try_echo"; } >&5
2676  (eval "$ac_try") 2>&5
2677  ac_status=$?
2678  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2679  test $ac_status = 0; }; }; then :
2680  ac_retval=0
2681else
2682  $as_echo "$as_me: program exited with status $ac_status" >&5
2683       $as_echo "$as_me: failed program was:" >&5
2684sed 's/^/| /' conftest.$ac_ext >&5
2685
2686       ac_retval=$ac_status
2687fi
2688  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2689  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2690  as_fn_set_status $ac_retval
2691
2692} # ac_fn_cxx_try_run
2693
2694# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2695# ---------------------------------------------------------
2696# Tests whether HEADER exists and can be compiled using the include files in
2697# INCLUDES, setting the cache variable VAR accordingly.
2698ac_fn_cxx_check_header_compile ()
2699{
2700  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2701  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2702$as_echo_n "checking for $2... " >&6; }
2703if eval \${$3+:} false; then :
2704  $as_echo_n "(cached) " >&6
2705else
2706  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2707/* end confdefs.h.  */
2708$4
2709#include <$2>
2710_ACEOF
2711if ac_fn_cxx_try_compile "$LINENO"; then :
2712  eval "$3=yes"
2713else
2714  eval "$3=no"
2715fi
2716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2717fi
2718eval ac_res=\$$3
2719	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2720$as_echo "$ac_res" >&6; }
2721  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2722
2723} # ac_fn_cxx_check_header_compile
2724
2725# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2726# ----------------------------------------------
2727# Tries to find the compile-time value of EXPR in a program that includes
2728# INCLUDES, setting VAR accordingly. Returns whether the value could be
2729# computed
2730ac_fn_cxx_compute_int ()
2731{
2732  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2733  if test "$cross_compiling" = yes; then
2734    # Depending upon the size, compute the lo and hi bounds.
2735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2736/* end confdefs.h.  */
2737$4
2738int
2739main ()
2740{
2741static int test_array [1 - 2 * !(($2) >= 0)];
2742test_array [0] = 0;
2743return test_array [0];
2744
2745  ;
2746  return 0;
2747}
2748_ACEOF
2749if ac_fn_cxx_try_compile "$LINENO"; then :
2750  ac_lo=0 ac_mid=0
2751  while :; do
2752    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2753/* end confdefs.h.  */
2754$4
2755int
2756main ()
2757{
2758static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2759test_array [0] = 0;
2760return test_array [0];
2761
2762  ;
2763  return 0;
2764}
2765_ACEOF
2766if ac_fn_cxx_try_compile "$LINENO"; then :
2767  ac_hi=$ac_mid; break
2768else
2769  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2770			if test $ac_lo -le $ac_mid; then
2771			  ac_lo= ac_hi=
2772			  break
2773			fi
2774			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2775fi
2776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2777  done
2778else
2779  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2780/* end confdefs.h.  */
2781$4
2782int
2783main ()
2784{
2785static int test_array [1 - 2 * !(($2) < 0)];
2786test_array [0] = 0;
2787return test_array [0];
2788
2789  ;
2790  return 0;
2791}
2792_ACEOF
2793if ac_fn_cxx_try_compile "$LINENO"; then :
2794  ac_hi=-1 ac_mid=-1
2795  while :; do
2796    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2797/* end confdefs.h.  */
2798$4
2799int
2800main ()
2801{
2802static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2803test_array [0] = 0;
2804return test_array [0];
2805
2806  ;
2807  return 0;
2808}
2809_ACEOF
2810if ac_fn_cxx_try_compile "$LINENO"; then :
2811  ac_lo=$ac_mid; break
2812else
2813  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2814			if test $ac_mid -le $ac_hi; then
2815			  ac_lo= ac_hi=
2816			  break
2817			fi
2818			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2819fi
2820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2821  done
2822else
2823  ac_lo= ac_hi=
2824fi
2825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2826fi
2827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2828# Binary search between lo and hi bounds.
2829while test "x$ac_lo" != "x$ac_hi"; do
2830  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2831  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2832/* end confdefs.h.  */
2833$4
2834int
2835main ()
2836{
2837static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2838test_array [0] = 0;
2839return test_array [0];
2840
2841  ;
2842  return 0;
2843}
2844_ACEOF
2845if ac_fn_cxx_try_compile "$LINENO"; then :
2846  ac_hi=$ac_mid
2847else
2848  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2849fi
2850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2851done
2852case $ac_lo in #((
2853?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2854'') ac_retval=1 ;;
2855esac
2856  else
2857    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2858/* end confdefs.h.  */
2859$4
2860static long int longval () { return $2; }
2861static unsigned long int ulongval () { return $2; }
2862#include <stdio.h>
2863#include <stdlib.h>
2864int
2865main ()
2866{
2867
2868  FILE *f = fopen ("conftest.val", "w");
2869  if (! f)
2870    return 1;
2871  if (($2) < 0)
2872    {
2873      long int i = longval ();
2874      if (i != ($2))
2875	return 1;
2876      fprintf (f, "%ld", i);
2877    }
2878  else
2879    {
2880      unsigned long int i = ulongval ();
2881      if (i != ($2))
2882	return 1;
2883      fprintf (f, "%lu", i);
2884    }
2885  /* Do not output a trailing newline, as this causes \r\n confusion
2886     on some platforms.  */
2887  return ferror (f) || fclose (f) != 0;
2888
2889  ;
2890  return 0;
2891}
2892_ACEOF
2893if ac_fn_cxx_try_run "$LINENO"; then :
2894  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2895else
2896  ac_retval=1
2897fi
2898rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2899  conftest.$ac_objext conftest.beam conftest.$ac_ext
2900rm -f conftest.val
2901
2902  fi
2903  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2904  as_fn_set_status $ac_retval
2905
2906} # ac_fn_cxx_compute_int
2907
2908# ac_fn_cxx_try_link LINENO
2909# -------------------------
2910# Try to link conftest.$ac_ext, and return whether this succeeded.
2911ac_fn_cxx_try_link ()
2912{
2913  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2914  rm -f conftest.$ac_objext conftest$ac_exeext
2915  if { { ac_try="$ac_link"
2916case "(($ac_try" in
2917  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2918  *) ac_try_echo=$ac_try;;
2919esac
2920eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2921$as_echo "$ac_try_echo"; } >&5
2922  (eval "$ac_link") 2>conftest.err
2923  ac_status=$?
2924  if test -s conftest.err; then
2925    grep -v '^ *+' conftest.err >conftest.er1
2926    cat conftest.er1 >&5
2927    mv -f conftest.er1 conftest.err
2928  fi
2929  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2930  test $ac_status = 0; } && {
2931	 test -z "$ac_cxx_werror_flag" ||
2932	 test ! -s conftest.err
2933       } && test -s conftest$ac_exeext && {
2934	 test "$cross_compiling" = yes ||
2935	 test -x conftest$ac_exeext
2936       }; then :
2937  ac_retval=0
2938else
2939  $as_echo "$as_me: failed program was:" >&5
2940sed 's/^/| /' conftest.$ac_ext >&5
2941
2942	ac_retval=1
2943fi
2944  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2945  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2946  # interfere with the next link command; also delete a directory that is
2947  # left behind by Apple's compiler.  We do this before executing the actions.
2948  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2949  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2950  as_fn_set_status $ac_retval
2951
2952} # ac_fn_cxx_try_link
2953
2954# ac_fn_cxx_check_func LINENO FUNC VAR
2955# ------------------------------------
2956# Tests whether FUNC exists, setting the cache variable VAR accordingly
2957ac_fn_cxx_check_func ()
2958{
2959  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2960  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2961$as_echo_n "checking for $2... " >&6; }
2962if eval \${$3+:} false; then :
2963  $as_echo_n "(cached) " >&6
2964else
2965  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2966/* end confdefs.h.  */
2967/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2968   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2969#define $2 innocuous_$2
2970
2971/* System header to define __stub macros and hopefully few prototypes,
2972    which can conflict with char $2 (); below.
2973    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2974    <limits.h> exists even on freestanding compilers.  */
2975
2976#ifdef __STDC__
2977# include <limits.h>
2978#else
2979# include <assert.h>
2980#endif
2981
2982#undef $2
2983
2984/* Override any GCC internal prototype to avoid an error.
2985   Use char because int might match the return type of a GCC
2986   builtin and then its argument prototype would still apply.  */
2987#ifdef __cplusplus
2988extern "C"
2989#endif
2990char $2 ();
2991/* The GNU C library defines this for functions which it implements
2992    to always fail with ENOSYS.  Some functions are actually named
2993    something starting with __ and the normal name is an alias.  */
2994#if defined __stub_$2 || defined __stub___$2
2995choke me
2996#endif
2997
2998int
2999main ()
3000{
3001return $2 ();
3002  ;
3003  return 0;
3004}
3005_ACEOF
3006if ac_fn_cxx_try_link "$LINENO"; then :
3007  eval "$3=yes"
3008else
3009  eval "$3=no"
3010fi
3011rm -f core conftest.err conftest.$ac_objext \
3012    conftest$ac_exeext conftest.$ac_ext
3013fi
3014eval ac_res=\$$3
3015	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3016$as_echo "$ac_res" >&6; }
3017  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3018
3019} # ac_fn_cxx_check_func
3020
3021# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3022# -------------------------------------------------------
3023# Tests whether HEADER exists and can be compiled using the include files in
3024# INCLUDES, setting the cache variable VAR accordingly.
3025ac_fn_c_check_header_compile ()
3026{
3027  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3028  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3029$as_echo_n "checking for $2... " >&6; }
3030if eval \${$3+:} false; then :
3031  $as_echo_n "(cached) " >&6
3032else
3033  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3034/* end confdefs.h.  */
3035$4
3036#include <$2>
3037_ACEOF
3038if ac_fn_c_try_compile "$LINENO"; then :
3039  eval "$3=yes"
3040else
3041  eval "$3=no"
3042fi
3043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3044fi
3045eval ac_res=\$$3
3046	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3047$as_echo "$ac_res" >&6; }
3048  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3049
3050} # ac_fn_c_check_header_compile
3051cat >config.log <<_ACEOF
3052This file contains any messages produced by compilers while
3053running configure, to aid debugging if configure makes a mistake.
3054
3055It was created by OpenJDK $as_me jdk9, which was
3056generated by GNU Autoconf 2.69.  Invocation command line was
3057
3058  $ $0 $@
3059
3060_ACEOF
3061exec 5>>config.log
3062{
3063cat <<_ASUNAME
3064## --------- ##
3065## Platform. ##
3066## --------- ##
3067
3068hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3069uname -m = `(uname -m) 2>/dev/null || echo unknown`
3070uname -r = `(uname -r) 2>/dev/null || echo unknown`
3071uname -s = `(uname -s) 2>/dev/null || echo unknown`
3072uname -v = `(uname -v) 2>/dev/null || echo unknown`
3073
3074/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3075/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3076
3077/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3078/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3079/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3080/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3081/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3082/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3083/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3084
3085_ASUNAME
3086
3087as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3088for as_dir in $PATH
3089do
3090  IFS=$as_save_IFS
3091  test -z "$as_dir" && as_dir=.
3092    $as_echo "PATH: $as_dir"
3093  done
3094IFS=$as_save_IFS
3095
3096} >&5
3097
3098cat >&5 <<_ACEOF
3099
3100
3101## ----------- ##
3102## Core tests. ##
3103## ----------- ##
3104
3105_ACEOF
3106
3107
3108# Keep a trace of the command line.
3109# Strip out --no-create and --no-recursion so they do not pile up.
3110# Strip out --silent because we don't want to record it for future runs.
3111# Also quote any args containing shell meta-characters.
3112# Make two passes to allow for proper duplicate-argument suppression.
3113ac_configure_args=
3114ac_configure_args0=
3115ac_configure_args1=
3116ac_must_keep_next=false
3117for ac_pass in 1 2
3118do
3119  for ac_arg
3120  do
3121    case $ac_arg in
3122    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3123    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3124    | -silent | --silent | --silen | --sile | --sil)
3125      continue ;;
3126    *\'*)
3127      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3128    esac
3129    case $ac_pass in
3130    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3131    2)
3132      as_fn_append ac_configure_args1 " '$ac_arg'"
3133      if test $ac_must_keep_next = true; then
3134	ac_must_keep_next=false # Got value, back to normal.
3135      else
3136	case $ac_arg in
3137	  *=* | --config-cache | -C | -disable-* | --disable-* \
3138	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3139	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3140	  | -with-* | --with-* | -without-* | --without-* | --x)
3141	    case "$ac_configure_args0 " in
3142	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3143	    esac
3144	    ;;
3145	  -* ) ac_must_keep_next=true ;;
3146	esac
3147      fi
3148      as_fn_append ac_configure_args " '$ac_arg'"
3149      ;;
3150    esac
3151  done
3152done
3153{ ac_configure_args0=; unset ac_configure_args0;}
3154{ ac_configure_args1=; unset ac_configure_args1;}
3155
3156# When interrupted or exit'd, cleanup temporary files, and complete
3157# config.log.  We remove comments because anyway the quotes in there
3158# would cause problems or look ugly.
3159# WARNING: Use '\'' to represent an apostrophe within the trap.
3160# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3161trap 'exit_status=$?
3162  # Save into config.log some information that might help in debugging.
3163  {
3164    echo
3165
3166    $as_echo "## ---------------- ##
3167## Cache variables. ##
3168## ---------------- ##"
3169    echo
3170    # The following way of writing the cache mishandles newlines in values,
3171(
3172  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3173    eval ac_val=\$$ac_var
3174    case $ac_val in #(
3175    *${as_nl}*)
3176      case $ac_var in #(
3177      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3178$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3179      esac
3180      case $ac_var in #(
3181      _ | IFS | as_nl) ;; #(
3182      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3183      *) { eval $ac_var=; unset $ac_var;} ;;
3184      esac ;;
3185    esac
3186  done
3187  (set) 2>&1 |
3188    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3189    *${as_nl}ac_space=\ *)
3190      sed -n \
3191	"s/'\''/'\''\\\\'\'''\''/g;
3192	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3193      ;; #(
3194    *)
3195      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3196      ;;
3197    esac |
3198    sort
3199)
3200    echo
3201
3202    $as_echo "## ----------------- ##
3203## Output variables. ##
3204## ----------------- ##"
3205    echo
3206    for ac_var in $ac_subst_vars
3207    do
3208      eval ac_val=\$$ac_var
3209      case $ac_val in
3210      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3211      esac
3212      $as_echo "$ac_var='\''$ac_val'\''"
3213    done | sort
3214    echo
3215
3216    if test -n "$ac_subst_files"; then
3217      $as_echo "## ------------------- ##
3218## File substitutions. ##
3219## ------------------- ##"
3220      echo
3221      for ac_var in $ac_subst_files
3222      do
3223	eval ac_val=\$$ac_var
3224	case $ac_val in
3225	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3226	esac
3227	$as_echo "$ac_var='\''$ac_val'\''"
3228      done | sort
3229      echo
3230    fi
3231
3232    if test -s confdefs.h; then
3233      $as_echo "## ----------- ##
3234## confdefs.h. ##
3235## ----------- ##"
3236      echo
3237      cat confdefs.h
3238      echo
3239    fi
3240    test "$ac_signal" != 0 &&
3241      $as_echo "$as_me: caught signal $ac_signal"
3242    $as_echo "$as_me: exit $exit_status"
3243  } >&5
3244  rm -f core *.core core.conftest.* &&
3245    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3246    exit $exit_status
3247' 0
3248for ac_signal in 1 2 13 15; do
3249  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3250done
3251ac_signal=0
3252
3253# confdefs.h avoids OS command line length limits that DEFS can exceed.
3254rm -f -r conftest* confdefs.h
3255
3256$as_echo "/* confdefs.h */" > confdefs.h
3257
3258# Predefined preprocessor variables.
3259
3260cat >>confdefs.h <<_ACEOF
3261#define PACKAGE_NAME "$PACKAGE_NAME"
3262_ACEOF
3263
3264cat >>confdefs.h <<_ACEOF
3265#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3266_ACEOF
3267
3268cat >>confdefs.h <<_ACEOF
3269#define PACKAGE_VERSION "$PACKAGE_VERSION"
3270_ACEOF
3271
3272cat >>confdefs.h <<_ACEOF
3273#define PACKAGE_STRING "$PACKAGE_STRING"
3274_ACEOF
3275
3276cat >>confdefs.h <<_ACEOF
3277#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3278_ACEOF
3279
3280cat >>confdefs.h <<_ACEOF
3281#define PACKAGE_URL "$PACKAGE_URL"
3282_ACEOF
3283
3284
3285# Let the site file select an alternate cache file if it wants to.
3286# Prefer an explicitly selected file to automatically selected ones.
3287ac_site_file1=NONE
3288ac_site_file2=NONE
3289if test -n "$CONFIG_SITE"; then
3290  # We do not want a PATH search for config.site.
3291  case $CONFIG_SITE in #((
3292    -*)  ac_site_file1=./$CONFIG_SITE;;
3293    */*) ac_site_file1=$CONFIG_SITE;;
3294    *)   ac_site_file1=./$CONFIG_SITE;;
3295  esac
3296elif test "x$prefix" != xNONE; then
3297  ac_site_file1=$prefix/share/config.site
3298  ac_site_file2=$prefix/etc/config.site
3299else
3300  ac_site_file1=$ac_default_prefix/share/config.site
3301  ac_site_file2=$ac_default_prefix/etc/config.site
3302fi
3303for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3304do
3305  test "x$ac_site_file" = xNONE && continue
3306  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3307    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3308$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3309    sed 's/^/| /' "$ac_site_file" >&5
3310    . "$ac_site_file" \
3311      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3312$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3313as_fn_error $? "failed to load site script $ac_site_file
3314See \`config.log' for more details" "$LINENO" 5; }
3315  fi
3316done
3317
3318if test -r "$cache_file"; then
3319  # Some versions of bash will fail to source /dev/null (special files
3320  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3321  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3322    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3323$as_echo "$as_me: loading cache $cache_file" >&6;}
3324    case $cache_file in
3325      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3326      *)                      . "./$cache_file";;
3327    esac
3328  fi
3329else
3330  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3331$as_echo "$as_me: creating cache $cache_file" >&6;}
3332  >$cache_file
3333fi
3334
3335# Check that the precious variables saved in the cache have kept the same
3336# value.
3337ac_cache_corrupted=false
3338for ac_var in $ac_precious_vars; do
3339  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3340  eval ac_new_set=\$ac_env_${ac_var}_set
3341  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3342  eval ac_new_val=\$ac_env_${ac_var}_value
3343  case $ac_old_set,$ac_new_set in
3344    set,)
3345      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3346$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3347      ac_cache_corrupted=: ;;
3348    ,set)
3349      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3350$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3351      ac_cache_corrupted=: ;;
3352    ,);;
3353    *)
3354      if test "x$ac_old_val" != "x$ac_new_val"; then
3355	# differences in whitespace do not lead to failure.
3356	ac_old_val_w=`echo x $ac_old_val`
3357	ac_new_val_w=`echo x $ac_new_val`
3358	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3359	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3360$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3361	  ac_cache_corrupted=:
3362	else
3363	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3364$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3365	  eval $ac_var=\$ac_old_val
3366	fi
3367	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3368$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3369	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3370$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3371      fi;;
3372  esac
3373  # Pass precious variables to config.status.
3374  if test "$ac_new_set" = set; then
3375    case $ac_new_val in
3376    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3377    *) ac_arg=$ac_var=$ac_new_val ;;
3378    esac
3379    case " $ac_configure_args " in
3380      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3381      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3382    esac
3383  fi
3384done
3385if $ac_cache_corrupted; then
3386  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3387$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3388  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3389$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3390  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3391fi
3392## -------------------- ##
3393## Main body of script. ##
3394## -------------------- ##
3395
3396ac_ext=c
3397ac_cpp='$CPP $CPPFLAGS'
3398ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3399ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3400ac_compiler_gnu=$ac_cv_c_compiler_gnu
3401
3402
3403
3404ac_aux_dir=
3405for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3406  if test -f "$ac_dir/install-sh"; then
3407    ac_aux_dir=$ac_dir
3408    ac_install_sh="$ac_aux_dir/install-sh -c"
3409    break
3410  elif test -f "$ac_dir/install.sh"; then
3411    ac_aux_dir=$ac_dir
3412    ac_install_sh="$ac_aux_dir/install.sh -c"
3413    break
3414  elif test -f "$ac_dir/shtool"; then
3415    ac_aux_dir=$ac_dir
3416    ac_install_sh="$ac_aux_dir/shtool install -c"
3417    break
3418  fi
3419done
3420if test -z "$ac_aux_dir"; then
3421  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
3422fi
3423
3424# These three variables are undocumented and unsupported,
3425# and are intended to be withdrawn in a future Autoconf release.
3426# They can cause serious problems if a builder's source tree is in a directory
3427# whose full name contains unusual characters.
3428ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3429ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3430ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3431
3432
3433# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3434
3435#
3436# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3437# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3438#
3439# This code is free software; you can redistribute it and/or modify it
3440# under the terms of the GNU General Public License version 2 only, as
3441# published by the Free Software Foundation.  Oracle designates this
3442# particular file as subject to the "Classpath" exception as provided
3443# by Oracle in the LICENSE file that accompanied this code.
3444#
3445# This code is distributed in the hope that it will be useful, but WITHOUT
3446# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3447# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3448# version 2 for more details (a copy is included in the LICENSE file that
3449# accompanied this code).
3450#
3451# You should have received a copy of the GNU General Public License version
3452# 2 along with this work; if not, write to the Free Software Foundation,
3453# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3454#
3455# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3456# or visit www.oracle.com if you need additional information or have any
3457# questions.
3458#
3459
3460#
3461# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3462#
3463# This program is free software; you can redistribute it and/or modify
3464# it under the terms of the GNU General Public License as published by
3465# the Free Software Foundation; either version 2 of the License, or
3466# (at your option) any later version.
3467#
3468# This program is distributed in the hope that it will be useful, but
3469# WITHOUT ANY WARRANTY; without even the implied warranty of
3470# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3471# General Public License for more details.
3472#
3473# You should have received a copy of the GNU General Public License
3474# along with this program; if not, write to the Free Software
3475# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3476#
3477# As a special exception to the GNU General Public License, if you
3478# distribute this file as part of a program that contains a
3479# configuration script generated by Autoconf, you may include it under
3480# the same distribution terms that you use for the rest of that program.
3481
3482# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3483# ----------------------------------
3484# PKG_PROG_PKG_CONFIG
3485
3486# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3487#
3488# Check to see whether a particular set of modules exists.  Similar
3489# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3490#
3491#
3492# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3493# this or PKG_CHECK_MODULES is called, or make sure to call
3494# PKG_CHECK_EXISTS manually
3495# --------------------------------------------------------------
3496
3497
3498
3499# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3500# ---------------------------------------------
3501# _PKG_CONFIG
3502
3503# _PKG_SHORT_ERRORS_SUPPORTED
3504# -----------------------------
3505# _PKG_SHORT_ERRORS_SUPPORTED
3506
3507
3508# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3509# [ACTION-IF-NOT-FOUND])
3510#
3511#
3512# Note that if there is a possibility the first call to
3513# PKG_CHECK_MODULES might not happen, you should be sure to include an
3514# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3515#
3516#
3517# --------------------------------------------------------------
3518# PKG_CHECK_MODULES
3519
3520
3521# Include these first...
3522#
3523# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3524# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3525#
3526# This code is free software; you can redistribute it and/or modify it
3527# under the terms of the GNU General Public License version 2 only, as
3528# published by the Free Software Foundation.  Oracle designates this
3529# particular file as subject to the "Classpath" exception as provided
3530# by Oracle in the LICENSE file that accompanied this code.
3531#
3532# This code is distributed in the hope that it will be useful, but WITHOUT
3533# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3534# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3535# version 2 for more details (a copy is included in the LICENSE file that
3536# accompanied this code).
3537#
3538# You should have received a copy of the GNU General Public License version
3539# 2 along with this work; if not, write to the Free Software Foundation,
3540# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3541#
3542# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3543# or visit www.oracle.com if you need additional information or have any
3544# questions.
3545#
3546
3547# Create a function/macro that takes a series of named arguments. The call is
3548# similar to AC_DEFUN, but the setup of the function looks like this:
3549# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3550# ... do something
3551#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3552# ])
3553# A star (*) in front of a named argument means that it is required and it's
3554# presence will be verified. To pass e.g. the first value as a normal indexed
3555# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3556# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3557# "ARG_FOO".
3558#
3559# The generated function can be called like this:
3560# MYFUNC(FOO: [foo-val],
3561#     BAR: [
3562#         $ECHO hello world
3563#     ])
3564# Note that the argument value must start on the same line as the argument name.
3565#
3566# Argument 1: Name of the function to define
3567# Argument 2: List of legal named arguments, with a * prefix for required arguments
3568# Argument 3: Argument array to treat as named, typically $@
3569# Argument 4: The main function body
3570
3571
3572# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3573# If so, then append $1 to $2 \
3574# Also set JVM_ARG_OK to true/false depending on outcome.
3575
3576
3577# Appends a string to a path variable, only adding the : when needed.
3578
3579
3580# Prepends a string to a path variable, only adding the : when needed.
3581
3582
3583# This will make sure the given variable points to a full and proper
3584# path. This means:
3585# 1) There will be no spaces in the path. On unix platforms,
3586#    spaces in the path will result in an error. On Windows,
3587#    the path will be rewritten using short-style to be space-free.
3588# 2) The path will be absolute, and it will be in unix-style (on
3589#     cygwin).
3590# $1: The name of the variable to fix
3591
3592
3593# This will make sure the given variable points to a executable
3594# with a full and proper path. This means:
3595# 1) There will be no spaces in the path. On unix platforms,
3596#    spaces in the path will result in an error. On Windows,
3597#    the path will be rewritten using short-style to be space-free.
3598# 2) The path will be absolute, and it will be in unix-style (on
3599#     cygwin).
3600# Any arguments given to the executable is preserved.
3601# If the input variable does not have a directory specification, then
3602# it need to be in the PATH.
3603# $1: The name of the variable to fix
3604
3605
3606
3607
3608# Register a --with argument but mark it as deprecated
3609# $1: The name of the with argument to deprecate, not including --with-
3610
3611
3612# Register a --enable argument but mark it as deprecated
3613# $1: The name of the with argument to deprecate, not including --enable-
3614# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3615# $3: Messages to user.
3616
3617
3618
3619
3620# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3621# $1: variable to check
3622
3623
3624# Check that there are no unprocessed overridden variables left.
3625# If so, they are an incorrect argument and we will exit with an error.
3626
3627
3628# Setup a tool for the given variable. If correctly specified by the user,
3629# use that value, otherwise search for the tool using the supplied code snippet.
3630# $1: variable to set
3631# $2: code snippet to call to look for the tool
3632# $3: code snippet to call if variable was used to find tool
3633
3634
3635# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3636# $1: variable to set
3637# $2: executable name (or list of names) to look for
3638
3639
3640# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3641# $1: variable to set
3642# $2: executable name (or list of names) to look for
3643
3644
3645# Like BASIC_PATH_PROGS but fails if no tool was found.
3646# $1: variable to set
3647# $2: executable name (or list of names) to look for
3648
3649
3650# Like BASIC_SETUP_TOOL but fails if no tool was found.
3651# $1: variable to set
3652# $2: autoconf macro to call to look for the special tool
3653
3654
3655# Setup the most fundamental tools that relies on not much else to set up,
3656# but is used by much of the early bootstrap code.
3657
3658
3659# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3660
3661
3662# Evaluates platform specific overrides for devkit variables.
3663# $1: Name of variable
3664
3665
3666
3667
3668
3669
3670#%%% Simple tools %%%
3671
3672# Check if we have found a usable version of make
3673# $1: the path to a potential make binary (or empty)
3674# $2: the description on how we found this
3675
3676
3677
3678
3679# Goes looking for a usable version of GNU make.
3680
3681
3682
3683
3684
3685
3686# Check if build directory is on local disk. If not possible to determine,
3687# we prefer to claim it's local.
3688# Argument 1: directory to test
3689# Argument 2: what to do if it is on local disk
3690# Argument 3: what to do otherwise (remote disk or failure)
3691
3692
3693# Check that source files have basic read permissions set. This might
3694# not be the case in cygwin in certain conditions.
3695
3696
3697
3698
3699# Check for support for specific options in bash
3700
3701
3702################################################################################
3703#
3704# Default make target
3705#
3706
3707
3708# Code to run after AC_OUTPUT
3709
3710
3711#
3712# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3713# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3714#
3715# This code is free software; you can redistribute it and/or modify it
3716# under the terms of the GNU General Public License version 2 only, as
3717# published by the Free Software Foundation.  Oracle designates this
3718# particular file as subject to the "Classpath" exception as provided
3719# by Oracle in the LICENSE file that accompanied this code.
3720#
3721# This code is distributed in the hope that it will be useful, but WITHOUT
3722# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3723# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3724# version 2 for more details (a copy is included in the LICENSE file that
3725# accompanied this code).
3726#
3727# You should have received a copy of the GNU General Public License version
3728# 2 along with this work; if not, write to the Free Software Foundation,
3729# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3730#
3731# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3732# or visit www.oracle.com if you need additional information or have any
3733# questions.
3734#
3735
3736
3737
3738
3739
3740# Helper function which possibly converts a path using DOS-style short mode.
3741# If so, the updated path is stored in $new_path.
3742# $1: The path to check
3743
3744
3745# Helper function which possibly converts a path using DOS-style short mode.
3746# If so, the updated path is stored in $new_path.
3747# $1: The path to check
3748
3749
3750# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3751# and could probably be heavily simplified. However, all changes in this
3752# area tend to need lot of testing in different scenarios, and in lack of
3753# proper unit testing, cleaning this up has not been deemed worth the effort
3754# at the moment.
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3765
3766
3767
3768
3769# ... then the rest
3770#
3771# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3772# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3773#
3774# This code is free software; you can redistribute it and/or modify it
3775# under the terms of the GNU General Public License version 2 only, as
3776# published by the Free Software Foundation.  Oracle designates this
3777# particular file as subject to the "Classpath" exception as provided
3778# by Oracle in the LICENSE file that accompanied this code.
3779#
3780# This code is distributed in the hope that it will be useful, but WITHOUT
3781# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3782# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3783# version 2 for more details (a copy is included in the LICENSE file that
3784# accompanied this code).
3785#
3786# You should have received a copy of the GNU General Public License version
3787# 2 along with this work; if not, write to the Free Software Foundation,
3788# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3789#
3790# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3791# or visit www.oracle.com if you need additional information or have any
3792# questions.
3793#
3794
3795########################################################################
3796# This file handles detection of the Boot JDK. The Boot JDK detection
3797# process has been developed as a response to solve a complex real-world
3798# problem. Initially, it was simple, but it has grown as platform after
3799# platform, idiosyncracy after idiosyncracy has been supported.
3800#
3801# The basic idea is this:
3802# 1) You need an acceptable *) JDK to use as a Boot JDK
3803# 2) There are several ways to locate a JDK, that are mostly platform
3804#    dependent **)
3805# 3) You can have multiple JDKs installed
3806# 4) If possible, configure should try to dig out an acceptable JDK
3807#    automatically, without having to resort to command-line options
3808#
3809# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3810#     javac) and not a JRE, etc.
3811#
3812# **) On Windows we typically use a well-known path.
3813#     On MacOSX we typically use the tool java_home.
3814#     On Linux we typically find javac in the $PATH, and then follow a
3815#     chain of symlinks that often ends up in a real JDK.
3816#
3817# This leads to the code where we check in different ways to locate a
3818# JDK, and if one is found, check if it is acceptable. If not, we print
3819# our reasons for rejecting it (useful when debugging non-working
3820# configure situations) and continue checking the next one.
3821########################################################################
3822
3823# Execute the check given as argument, and verify the result
3824# If the Boot JDK was previously found, do nothing
3825# $1 A command line (typically autoconf macro) to execute
3826
3827
3828# Test: Is bootjdk explicitely set by command line arguments?
3829
3830
3831# Test: Is $JAVA_HOME set?
3832
3833
3834# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3835
3836
3837# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3838# $1: Argument to the java_home binary (optional)
3839
3840
3841# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3842
3843
3844# Look for a jdk in the given path. If there are multiple, try to select the newest.
3845# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3846# $1 = Path to directory containing jdk installations.
3847# $2 = String to append to the found JDK directory to get the proper JDK home
3848
3849
3850# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3851# environmental variable as base for where to look.
3852# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3853
3854
3855# Test: Is there a JDK installed in default, well-known locations?
3856
3857
3858# Check that a command-line tool in the Boot JDK is correct
3859# $1 = name of variable to assign
3860# $2 = name of binary
3861
3862
3863###############################################################################
3864#
3865# We need a Boot JDK to bootstrap the build.
3866#
3867
3868
3869
3870
3871
3872# BUILD_JDK: the location of the latest JDK that can run
3873#   on the host system and supports the target class file version
3874#   generated in this JDK build.  This variable should only be
3875#   used after the launchers are built.
3876#
3877
3878# Execute the check given as argument, and verify the result.
3879# If the JDK was previously found, do nothing.
3880# $1 A command line (typically autoconf macro) to execute
3881
3882
3883# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3884# is different than the host system doing the build (e.g. cross-compilation),
3885# a special BUILD_JDK is built as part of the build process.  An external
3886# prebuilt BUILD_JDK can also be supplied.
3887
3888
3889#
3890# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3891# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3892#
3893# This code is free software; you can redistribute it and/or modify it
3894# under the terms of the GNU General Public License version 2 only, as
3895# published by the Free Software Foundation.  Oracle designates this
3896# particular file as subject to the "Classpath" exception as provided
3897# by Oracle in the LICENSE file that accompanied this code.
3898#
3899# This code is distributed in the hope that it will be useful, but WITHOUT
3900# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3901# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3902# version 2 for more details (a copy is included in the LICENSE file that
3903# accompanied this code).
3904#
3905# You should have received a copy of the GNU General Public License version
3906# 2 along with this work; if not, write to the Free Software Foundation,
3907# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3908#
3909# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3910# or visit www.oracle.com if you need additional information or have any
3911# questions.
3912#
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930################################################################################
3931#
3932# Runs icecc-create-env once and prints the error if it fails
3933#
3934# $1: arguments to icecc-create-env
3935# $2: log file
3936#
3937
3938
3939################################################################################
3940#
3941# Optionally enable distributed compilation of native code using icecc/icecream
3942#
3943
3944
3945
3946
3947
3948
3949
3950#
3951# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3952# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3953#
3954# This code is free software; you can redistribute it and/or modify it
3955# under the terms of the GNU General Public License version 2 only, as
3956# published by the Free Software Foundation.  Oracle designates this
3957# particular file as subject to the "Classpath" exception as provided
3958# by Oracle in the LICENSE file that accompanied this code.
3959#
3960# This code is distributed in the hope that it will be useful, but WITHOUT
3961# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3962# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3963# version 2 for more details (a copy is included in the LICENSE file that
3964# accompanied this code).
3965#
3966# You should have received a copy of the GNU General Public License version
3967# 2 along with this work; if not, write to the Free Software Foundation,
3968# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3969#
3970# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3971# or visit www.oracle.com if you need additional information or have any
3972# questions.
3973#
3974
3975# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3976# corresponding configure arguments instead
3977
3978
3979# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3980# that configure can use them while detecting compilers.
3981# TOOLCHAIN_TYPE is available here.
3982# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3983
3984
3985
3986
3987
3988
3989# Documentation on common flags used for solstudio in HIGHEST.
3990#
3991# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3992#          done with care, there are some assumptions below that need to
3993#          be understood about the use of pointers, and IEEE behavior.
3994#
3995# -fns: Use non-standard floating point mode (not IEEE 754)
3996# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3997# -fsingle: Use single precision floating point with 'float'
3998# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3999#   (Source with excessing pointer casting and data access with mixed
4000#    pointer types are not recommended)
4001# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4002#   (If you expect perfect errno behavior, do not use this)
4003# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4004# -xrestrict: Pointer parameters to functions do not overlap
4005#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4006#    If you pass in multiple pointers to the same data, do not use this)
4007# -xlibmil: Inline some library routines
4008#   (If you expect perfect errno behavior, do not use this)
4009# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4010#   (If you expect perfect errno behavior, do not use this)
4011#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4012
4013    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4014    # Bug?
4015    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4016    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4017    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4018    #fi
4019
4020
4021
4022
4023
4024
4025################################################################################
4026# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4027#      conditionals against.
4028# $2 - Optional prefix for each variable defined.
4029
4030
4031# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4032#                                  IF_FALSE: [RUN-IF-FALSE])
4033# ------------------------------------------------------------
4034# Check that the C compiler supports an argument
4035
4036
4037
4038
4039# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4040#                                    IF_FALSE: [RUN-IF-FALSE])
4041# ------------------------------------------------------------
4042# Check that the C++ compiler supports an argument
4043
4044
4045
4046
4047# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4048#                                IF_FALSE: [RUN-IF-FALSE])
4049# ------------------------------------------------------------
4050# Check that the C and C++ compilers support an argument
4051
4052
4053
4054
4055# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4056#                                   IF_FALSE: [RUN-IF-FALSE])
4057# ------------------------------------------------------------
4058# Check that the linker support an argument
4059
4060
4061
4062
4063
4064
4065
4066
4067#
4068# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4069# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4070#
4071# This code is free software; you can redistribute it and/or modify it
4072# under the terms of the GNU General Public License version 2 only, as
4073# published by the Free Software Foundation.  Oracle designates this
4074# particular file as subject to the "Classpath" exception as provided
4075# by Oracle in the LICENSE file that accompanied this code.
4076#
4077# This code is distributed in the hope that it will be useful, but WITHOUT
4078# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4079# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4080# version 2 for more details (a copy is included in the LICENSE file that
4081# accompanied this code).
4082#
4083# You should have received a copy of the GNU General Public License version
4084# 2 along with this work; if not, write to the Free Software Foundation,
4085# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4086#
4087# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4088# or visit www.oracle.com if you need additional information or have any
4089# questions.
4090#
4091
4092
4093
4094
4095
4096cygwin_help() {
4097  case $1 in
4098    unzip)
4099      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4100      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4101      ;;
4102    zip)
4103      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4104      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4105      ;;
4106    make)
4107      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4108      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4109      ;;
4110    freetype)
4111      HELP_MSG="
4112The freetype library can now be build during the configure process.
4113Download the freetype sources and unpack them into an arbitrary directory:
4114
4115wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4116tar -xzf freetype-2.5.3.tar.gz
4117
4118Then run configure with '--with-freetype-src=<freetype_src>'. This will
4119automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4120builds or into '<freetype_src>/lib32' for 32-bit builds.
4121Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4122and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4123
4124Alternatively you can unpack the sources like this to use the default directory:
4125
4126tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4127      ;;
4128  esac
4129}
4130
4131msys_help() {
4132  PKGHANDLER_COMMAND=""
4133}
4134
4135apt_help() {
4136  case $1 in
4137    reduced)
4138      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4139    devkit)
4140      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4141    openjdk)
4142      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4143    alsa)
4144      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4145    cups)
4146      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4147    freetype)
4148      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4149    ffi)
4150      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4151    x11)
4152      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4153    ccache)
4154      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4155    dtrace)
4156      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4157  esac
4158}
4159
4160yum_help() {
4161  case $1 in
4162    devkit)
4163      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4164    openjdk)
4165      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4166    alsa)
4167      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4168    cups)
4169      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4170    freetype)
4171      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4172    x11)
4173      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4174    ccache)
4175      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4176  esac
4177}
4178
4179port_help() {
4180  PKGHANDLER_COMMAND=""
4181}
4182
4183pkgutil_help() {
4184  PKGHANDLER_COMMAND=""
4185}
4186
4187pkgadd_help() {
4188  PKGHANDLER_COMMAND=""
4189}
4190
4191# This function will check if we're called from the "configure" wrapper while
4192# printing --help. If so, we will print out additional information that can
4193# only be extracted within the autoconf script, and then exit. This must be
4194# called at the very beginning in configure.ac.
4195
4196
4197
4198
4199
4200
4201#
4202# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4203# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4204#
4205# This code is free software; you can redistribute it and/or modify it
4206# under the terms of the GNU General Public License version 2 only, as
4207# published by the Free Software Foundation.  Oracle designates this
4208# particular file as subject to the "Classpath" exception as provided
4209# by Oracle in the LICENSE file that accompanied this code.
4210#
4211# This code is distributed in the hope that it will be useful, but WITHOUT
4212# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4213# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4214# version 2 for more details (a copy is included in the LICENSE file that
4215# accompanied this code).
4216#
4217# You should have received a copy of the GNU General Public License version
4218# 2 along with this work; if not, write to the Free Software Foundation,
4219# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4220#
4221# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4222# or visit www.oracle.com if you need additional information or have any
4223# questions.
4224#
4225
4226# All valid JVM features, regardless of platform
4227VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4228    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4229
4230# All valid JVM variants
4231VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4232
4233###############################################################################
4234# Check if the specified JVM variant should be built. To be used in shell if
4235# constructs, like this:
4236# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4237#
4238# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4239
4240# Definition kept in one line to allow inlining in if statements.
4241# Additional [] needed to keep m4 from mangling shell constructs.
4242
4243
4244###############################################################################
4245# Check if the specified JVM features are explicitly enabled. To be used in
4246# shell if constructs, like this:
4247# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4248#
4249# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4250
4251# Definition kept in one line to allow inlining in if statements.
4252# Additional [] needed to keep m4 from mangling shell constructs.
4253
4254
4255###############################################################################
4256# Check which variants of the JVM that we want to build. Available variants are:
4257#   server: normal interpreter, and a tiered C1/C2 compiler
4258#   client: normal interpreter, and C1 (no C2 compiler)
4259#   minimal: reduced form of client with optional features stripped out
4260#   core: normal interpreter only, no compiler
4261#   zero: C++ based interpreter only, no compiler
4262#   zeroshark: C++ based interpreter, and a llvm-based compiler
4263#   custom: baseline JVM with no default features
4264#
4265
4266
4267###############################################################################
4268# Check if dtrace should be enabled and has all prerequisites present.
4269#
4270
4271
4272###############################################################################
4273# Set up all JVM features for each JVM variant.
4274#
4275
4276
4277###############################################################################
4278# Validate JVM features once all setup is complete, including custom setup.
4279#
4280
4281
4282#
4283# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4284# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4285#
4286# This code is free software; you can redistribute it and/or modify it
4287# under the terms of the GNU General Public License version 2 only, as
4288# published by the Free Software Foundation.  Oracle designates this
4289# particular file as subject to the "Classpath" exception as provided
4290# by Oracle in the LICENSE file that accompanied this code.
4291#
4292# This code is distributed in the hope that it will be useful, but WITHOUT
4293# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4294# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4295# version 2 for more details (a copy is included in the LICENSE file that
4296# accompanied this code).
4297#
4298# You should have received a copy of the GNU General Public License version
4299# 2 along with this work; if not, write to the Free Software Foundation,
4300# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4301#
4302# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4303# or visit www.oracle.com if you need additional information or have any
4304# questions.
4305#
4306
4307###############################################################################
4308# Check which variant of the JDK that we want to build.
4309# Currently we have:
4310#    normal:   standard edition
4311# but the custom make system may add other variants
4312#
4313# Effectively the JDK variant gives a name to a specific set of
4314# modules to compile into the JDK.
4315
4316
4317###############################################################################
4318# Set the debug level
4319#    release: no debug information, all optimizations, no asserts.
4320#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4321#    fastdebug: debug information (-g), all optimizations, all asserts
4322#    slowdebug: debug information (-g), no optimizations, all asserts
4323
4324
4325###############################################################################
4326#
4327# Should we build only OpenJDK even if closed sources are present?
4328#
4329
4330
4331
4332
4333###############################################################################
4334#
4335# Enable or disable the elliptic curve crypto implementation
4336#
4337
4338
4339
4340
4341################################################################################
4342#
4343# Gcov coverage data for hotspot
4344#
4345
4346
4347################################################################################
4348#
4349# Static build support.  When enabled will generate static
4350# libraries instead of shared libraries for all JDK libs.
4351#
4352
4353
4354################################################################################
4355#
4356# jlink options.
4357# We always keep packaged modules in JDK image.
4358#
4359
4360
4361################################################################################
4362#
4363# Check if building of the jtreg failure handler should be enabled.
4364#
4365
4366
4367#
4368# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4369# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4370#
4371# This code is free software; you can redistribute it and/or modify it
4372# under the terms of the GNU General Public License version 2 only, as
4373# published by the Free Software Foundation.  Oracle designates this
4374# particular file as subject to the "Classpath" exception as provided
4375# by Oracle in the LICENSE file that accompanied this code.
4376#
4377# This code is distributed in the hope that it will be useful, but WITHOUT
4378# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4379# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4380# version 2 for more details (a copy is included in the LICENSE file that
4381# accompanied this code).
4382#
4383# You should have received a copy of the GNU General Public License version
4384# 2 along with this work; if not, write to the Free Software Foundation,
4385# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4386#
4387# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4388# or visit www.oracle.com if you need additional information or have any
4389# questions.
4390#
4391
4392###############################################################################
4393#
4394# Setup version numbers
4395#
4396
4397# Verify that a given string represents a valid version number, and assign it
4398# to a variable.
4399
4400# Argument 1: the variable to assign to
4401# Argument 2: the value given by the user
4402
4403
4404
4405
4406#
4407# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4408# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4409#
4410# This code is free software; you can redistribute it and/or modify it
4411# under the terms of the GNU General Public License version 2 only, as
4412# published by the Free Software Foundation.  Oracle designates this
4413# particular file as subject to the "Classpath" exception as provided
4414# by Oracle in the LICENSE file that accompanied this code.
4415#
4416# This code is distributed in the hope that it will be useful, but WITHOUT
4417# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4418# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4419# version 2 for more details (a copy is included in the LICENSE file that
4420# accompanied this code).
4421#
4422# You should have received a copy of the GNU General Public License version
4423# 2 along with this work; if not, write to the Free Software Foundation,
4424# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4425#
4426# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4427# or visit www.oracle.com if you need additional information or have any
4428# questions.
4429#
4430
4431# Major library component reside in separate files.
4432#
4433# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4434# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4435#
4436# This code is free software; you can redistribute it and/or modify it
4437# under the terms of the GNU General Public License version 2 only, as
4438# published by the Free Software Foundation.  Oracle designates this
4439# particular file as subject to the "Classpath" exception as provided
4440# by Oracle in the LICENSE file that accompanied this code.
4441#
4442# This code is distributed in the hope that it will be useful, but WITHOUT
4443# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4444# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4445# version 2 for more details (a copy is included in the LICENSE file that
4446# accompanied this code).
4447#
4448# You should have received a copy of the GNU General Public License version
4449# 2 along with this work; if not, write to the Free Software Foundation,
4450# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4451#
4452# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4453# or visit www.oracle.com if you need additional information or have any
4454# questions.
4455#
4456
4457################################################################################
4458# Setup alsa (Advanced Linux Sound Architecture)
4459################################################################################
4460
4461
4462#
4463# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4464# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4465#
4466# This code is free software; you can redistribute it and/or modify it
4467# under the terms of the GNU General Public License version 2 only, as
4468# published by the Free Software Foundation.  Oracle designates this
4469# particular file as subject to the "Classpath" exception as provided
4470# by Oracle in the LICENSE file that accompanied this code.
4471#
4472# This code is distributed in the hope that it will be useful, but WITHOUT
4473# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4474# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4475# version 2 for more details (a copy is included in the LICENSE file that
4476# accompanied this code).
4477#
4478# You should have received a copy of the GNU General Public License version
4479# 2 along with this work; if not, write to the Free Software Foundation,
4480# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4481#
4482# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4483# or visit www.oracle.com if you need additional information or have any
4484# questions.
4485#
4486
4487################################################################################
4488# Setup bundled libraries.
4489#
4490# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4491# OpenJDK repository. Default is to use these libraries as bundled, but they
4492# might be replaced by en external version by the user.
4493################################################################################
4494
4495
4496################################################################################
4497# Setup libjpeg
4498################################################################################
4499
4500
4501################################################################################
4502# Setup giflib
4503################################################################################
4504
4505
4506################################################################################
4507# Setup libpng
4508################################################################################
4509
4510
4511################################################################################
4512# Setup zlib
4513################################################################################
4514
4515
4516################################################################################
4517# Setup lcms (Little CMS)
4518################################################################################
4519
4520
4521#
4522# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4523# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4524#
4525# This code is free software; you can redistribute it and/or modify it
4526# under the terms of the GNU General Public License version 2 only, as
4527# published by the Free Software Foundation.  Oracle designates this
4528# particular file as subject to the "Classpath" exception as provided
4529# by Oracle in the LICENSE file that accompanied this code.
4530#
4531# This code is distributed in the hope that it will be useful, but WITHOUT
4532# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4533# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4534# version 2 for more details (a copy is included in the LICENSE file that
4535# accompanied this code).
4536#
4537# You should have received a copy of the GNU General Public License version
4538# 2 along with this work; if not, write to the Free Software Foundation,
4539# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4540#
4541# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4542# or visit www.oracle.com if you need additional information or have any
4543# questions.
4544#
4545
4546################################################################################
4547# Setup cups (Common Unix Printing System)
4548################################################################################
4549
4550
4551#
4552# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4553# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4554#
4555# This code is free software; you can redistribute it and/or modify it
4556# under the terms of the GNU General Public License version 2 only, as
4557# published by the Free Software Foundation.  Oracle designates this
4558# particular file as subject to the "Classpath" exception as provided
4559# by Oracle in the LICENSE file that accompanied this code.
4560#
4561# This code is distributed in the hope that it will be useful, but WITHOUT
4562# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4563# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4564# version 2 for more details (a copy is included in the LICENSE file that
4565# accompanied this code).
4566#
4567# You should have received a copy of the GNU General Public License version
4568# 2 along with this work; if not, write to the Free Software Foundation,
4569# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4570#
4571# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4572# or visit www.oracle.com if you need additional information or have any
4573# questions.
4574#
4575
4576################################################################################
4577# Setup libffi (Foreign Function Interface)
4578################################################################################
4579
4580
4581#
4582# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4583# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4584#
4585# This code is free software; you can redistribute it and/or modify it
4586# under the terms of the GNU General Public License version 2 only, as
4587# published by the Free Software Foundation.  Oracle designates this
4588# particular file as subject to the "Classpath" exception as provided
4589# by Oracle in the LICENSE file that accompanied this code.
4590#
4591# This code is distributed in the hope that it will be useful, but WITHOUT
4592# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4593# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4594# version 2 for more details (a copy is included in the LICENSE file that
4595# accompanied this code).
4596#
4597# You should have received a copy of the GNU General Public License version
4598# 2 along with this work; if not, write to the Free Software Foundation,
4599# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4600#
4601# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4602# or visit www.oracle.com if you need additional information or have any
4603# questions.
4604#
4605
4606################################################################################
4607# Build the freetype lib from source
4608################################################################################
4609
4610
4611################################################################################
4612# Check if a potential freeype library match is correct and usable
4613################################################################################
4614
4615
4616################################################################################
4617# Setup freetype (The FreeType2 font rendering library)
4618################################################################################
4619
4620
4621#
4622# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4623# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4624#
4625# This code is free software; you can redistribute it and/or modify it
4626# under the terms of the GNU General Public License version 2 only, as
4627# published by the Free Software Foundation.  Oracle designates this
4628# particular file as subject to the "Classpath" exception as provided
4629# by Oracle in the LICENSE file that accompanied this code.
4630#
4631# This code is distributed in the hope that it will be useful, but WITHOUT
4632# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4633# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4634# version 2 for more details (a copy is included in the LICENSE file that
4635# accompanied this code).
4636#
4637# You should have received a copy of the GNU General Public License version
4638# 2 along with this work; if not, write to the Free Software Foundation,
4639# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4640#
4641# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4642# or visit www.oracle.com if you need additional information or have any
4643# questions.
4644#
4645
4646################################################################################
4647# Setup the standard C/C++ runtime libraries.
4648#
4649# Most importantly, determine if stdc++ should be linked statically or
4650# dynamically.
4651################################################################################
4652
4653
4654#
4655# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4656# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4657#
4658# This code is free software; you can redistribute it and/or modify it
4659# under the terms of the GNU General Public License version 2 only, as
4660# published by the Free Software Foundation.  Oracle designates this
4661# particular file as subject to the "Classpath" exception as provided
4662# by Oracle in the LICENSE file that accompanied this code.
4663#
4664# This code is distributed in the hope that it will be useful, but WITHOUT
4665# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4666# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4667# version 2 for more details (a copy is included in the LICENSE file that
4668# accompanied this code).
4669#
4670# You should have received a copy of the GNU General Public License version
4671# 2 along with this work; if not, write to the Free Software Foundation,
4672# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4673#
4674# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4675# or visit www.oracle.com if you need additional information or have any
4676# questions.
4677#
4678
4679################################################################################
4680# Setup X11 Windows system
4681################################################################################
4682
4683
4684
4685################################################################################
4686# Determine which libraries are needed for this configuration
4687################################################################################
4688
4689
4690################################################################################
4691# Parse library options, and setup needed libraries
4692################################################################################
4693
4694
4695################################################################################
4696# Setup llvm (Low-Level VM)
4697################################################################################
4698
4699
4700################################################################################
4701# Setup various libraries, typically small system libraries
4702################################################################################
4703
4704
4705################################################################################
4706# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4707# redistribute it in the test image.
4708################################################################################
4709
4710
4711
4712#
4713# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4714# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4715#
4716# This code is free software; you can redistribute it and/or modify it
4717# under the terms of the GNU General Public License version 2 only, as
4718# published by the Free Software Foundation.  Oracle designates this
4719# particular file as subject to the "Classpath" exception as provided
4720# by Oracle in the LICENSE file that accompanied this code.
4721#
4722# This code is distributed in the hope that it will be useful, but WITHOUT
4723# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4724# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4725# version 2 for more details (a copy is included in the LICENSE file that
4726# accompanied this code).
4727#
4728# You should have received a copy of the GNU General Public License version
4729# 2 along with this work; if not, write to the Free Software Foundation,
4730# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4731#
4732# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4733# or visit www.oracle.com if you need additional information or have any
4734# questions.
4735#
4736
4737# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4738# Converts autoconf style CPU name to OpenJDK style, into
4739# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4740
4741
4742# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4743# Converts autoconf style OS name to OpenJDK style, into
4744# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4745
4746
4747# Expects $host_os $host_cpu $build_os and $build_cpu
4748# and $with_target_bits to have been setup!
4749#
4750# Translate the standard triplet(quadruplet) definition
4751# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4752# OPENJDK_BUILD_OS, etc.
4753
4754
4755# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4756# accordingly. Must be done after setting up build and target system, but before
4757# doing anything else with these values.
4758
4759
4760# Setup the legacy variables, for controlling the old makefiles.
4761#
4762
4763
4764# $1 - Either TARGET or BUILD to setup the variables for.
4765
4766
4767
4768
4769#%%% Build and target systems %%%
4770
4771
4772
4773
4774# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4775# Add -mX to various FLAGS variables.
4776
4777
4778
4779
4780
4781
4782#
4783# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4784# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4785#
4786# This code is free software; you can redistribute it and/or modify it
4787# under the terms of the GNU General Public License version 2 only, as
4788# published by the Free Software Foundation.  Oracle designates this
4789# particular file as subject to the "Classpath" exception as provided
4790# by Oracle in the LICENSE file that accompanied this code.
4791#
4792# This code is distributed in the hope that it will be useful, but WITHOUT
4793# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4794# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4795# version 2 for more details (a copy is included in the LICENSE file that
4796# accompanied this code).
4797#
4798# You should have received a copy of the GNU General Public License version
4799# 2 along with this work; if not, write to the Free Software Foundation,
4800# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4801#
4802# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4803# or visit www.oracle.com if you need additional information or have any
4804# questions.
4805#
4806
4807
4808
4809
4810
4811
4812
4813################################################################################
4814# Define a mechanism for importing extra prebuilt modules
4815#
4816
4817
4818
4819#
4820# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4821# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4822#
4823# This code is free software; you can redistribute it and/or modify it
4824# under the terms of the GNU General Public License version 2 only, as
4825# published by the Free Software Foundation.  Oracle designates this
4826# particular file as subject to the "Classpath" exception as provided
4827# by Oracle in the LICENSE file that accompanied this code.
4828#
4829# This code is distributed in the hope that it will be useful, but WITHOUT
4830# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4831# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4832# version 2 for more details (a copy is included in the LICENSE file that
4833# accompanied this code).
4834#
4835# You should have received a copy of the GNU General Public License version
4836# 2 along with this work; if not, write to the Free Software Foundation,
4837# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4838#
4839# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4840# or visit www.oracle.com if you need additional information or have any
4841# questions.
4842#
4843
4844########################################################################
4845# This file is responsible for detecting, verifying and setting up the
4846# toolchain, i.e. the compiler, linker and related utilities. It will setup
4847# proper paths to the binaries, but it will not setup any flags.
4848#
4849# The binaries used is determined by the toolchain type, which is the family of
4850# compilers and related tools that are used.
4851########################################################################
4852
4853
4854# All valid toolchains, regardless of platform (used by help.m4)
4855VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4856
4857# These toolchains are valid on different platforms
4858VALID_TOOLCHAINS_linux="gcc clang"
4859VALID_TOOLCHAINS_solaris="solstudio"
4860VALID_TOOLCHAINS_macosx="gcc clang"
4861VALID_TOOLCHAINS_aix="xlc"
4862VALID_TOOLCHAINS_windows="microsoft"
4863
4864# Toolchain descriptions
4865TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4866TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4867TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4868TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4869TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4870
4871# Minimum supported versions, empty means unspecified
4872TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4873TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4874TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4875TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4876TOOLCHAIN_MINIMUM_VERSION_xlc=""
4877
4878# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4879# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4880
4881
4882# Check if the configured compiler (C and C++) is of a specific version or
4883# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4884#
4885# Arguments:
4886#   VERSION:   The version string to check against the found version
4887#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4888#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4889
4890
4891
4892
4893# Setup a number of variables describing how native output files are
4894# named on this platform/toolchain.
4895
4896
4897# Determine which toolchain type to use, and make sure it is valid for this
4898# platform. Setup various information about the selected toolchain.
4899
4900
4901# Before we start detecting the toolchain executables, we might need some
4902# special setup, e.g. additional paths etc.
4903
4904
4905# Restore path, etc
4906
4907
4908# Check if a compiler is of the toolchain type we expect, and save the version
4909# information from it. If the compiler does not match the expected type,
4910# this function will abort using AC_MSG_ERROR. If it matches, the version will
4911# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4912# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4913#
4914# $1 = compiler to test (CC or CXX)
4915# $2 = human readable name of compiler (C or C++)
4916
4917
4918# Try to locate the given C or C++ compiler in the path, or otherwise.
4919#
4920# $1 = compiler to test (CC or CXX)
4921# $2 = human readable name of compiler (C or C++)
4922# $3 = list of compiler names to search for
4923
4924
4925# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4926# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4927# archiver (AR). Verify that the compilers are correct according to the
4928# toolchain type.
4929
4930
4931# Setup additional tools that is considered a part of the toolchain, but not the
4932# core part. Many of these are highly platform-specific and do not exist,
4933# and/or are not needed on all platforms.
4934
4935
4936# Setup the build tools (i.e, the compiler and linker used to build programs
4937# that should be run on the build platform, not the target platform, as a build
4938# helper). Since the non-cross-compile case uses the normal, target compilers
4939# for this, we can only do this after these have been setup.
4940
4941
4942# Setup legacy variables that are still needed as alternative ways to refer to
4943# parts of the toolchain.
4944
4945
4946# Do some additional checks on the detected tools.
4947
4948
4949# Setup the JTReg Regression Test Harness.
4950
4951
4952#
4953# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4954# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4955#
4956# This code is free software; you can redistribute it and/or modify it
4957# under the terms of the GNU General Public License version 2 only, as
4958# published by the Free Software Foundation.  Oracle designates this
4959# particular file as subject to the "Classpath" exception as provided
4960# by Oracle in the LICENSE file that accompanied this code.
4961#
4962# This code is distributed in the hope that it will be useful, but WITHOUT
4963# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4964# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4965# version 2 for more details (a copy is included in the LICENSE file that
4966# accompanied this code).
4967#
4968# You should have received a copy of the GNU General Public License version
4969# 2 along with this work; if not, write to the Free Software Foundation,
4970# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4971#
4972# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4973# or visit www.oracle.com if you need additional information or have any
4974# questions.
4975#
4976
4977################################################################################
4978# The order of these defines the priority by which we try to find them.
4979VALID_VS_VERSIONS="2013 2012 2010"
4980
4981VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4982VS_VERSION_INTERNAL_2010=100
4983VS_MSVCR_2010=msvcr100.dll
4984# We don't use msvcp on Visual Studio 2010
4985#VS_MSVCP_2010=msvcp100.dll
4986VS_ENVVAR_2010="VS100COMNTOOLS"
4987VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4988VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4989VS_VS_PLATFORM_NAME_2010="v100"
4990VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4991
4992VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4993VS_VERSION_INTERNAL_2012=110
4994VS_MSVCR_2012=msvcr110.dll
4995VS_MSVCP_2012=msvcp110.dll
4996VS_ENVVAR_2012="VS110COMNTOOLS"
4997VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4998VS_SDK_INSTALLDIR_2012=
4999VS_VS_PLATFORM_NAME_2012="v110"
5000VS_SDK_PLATFORM_NAME_2012=
5001
5002VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5003VS_VERSION_INTERNAL_2013=120
5004VS_MSVCR_2013=msvcr120.dll
5005VS_MSVCP_2013=msvcp120.dll
5006VS_ENVVAR_2013="VS120COMNTOOLS"
5007VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5008VS_SDK_INSTALLDIR_2013=
5009VS_VS_PLATFORM_NAME_2013="v120"
5010VS_SDK_PLATFORM_NAME_2013=
5011
5012################################################################################
5013
5014
5015
5016################################################################################
5017
5018
5019
5020################################################################################
5021# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5022# build environment and assigns it to VS_ENV_CMD
5023
5024
5025################################################################################
5026
5027
5028
5029################################################################################
5030# Check if the VS env variables were setup prior to running configure.
5031# If not, then find vcvarsall.bat and run it automatically, and integrate
5032# the set env variables into the spec file.
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047# This line needs to be here, verbatim, after all includes and the dummy hook
5048# definitions. It is replaced with custom functionality when building
5049# custom sources.
5050#CUSTOM_AUTOCONF_INCLUDE
5051
5052# Do not change or remove the following line, it is needed for consistency checks:
5053DATE_WHEN_GENERATED=1463011468
5054
5055###############################################################################
5056#
5057# Initialization / Boot-strapping
5058#
5059# The bootstrapping process needs to solve the "chicken or the egg" problem,
5060# thus it jumps back and forth, each time gaining something needed later on.
5061#
5062###############################################################################
5063
5064# If we are requested to print additional help, do that and then exit.
5065# This must be the very first call.
5066
5067  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5068
5069    # Print available toolchains
5070    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5071    $PRINTF "Which are valid to use depends on the build platform.\n"
5072    for toolchain in $VALID_TOOLCHAINS_all; do
5073      # Use indirect variable referencing
5074      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5075      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5076      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5077    done
5078    $PRINTF "\n"
5079
5080    # Print available jvm features
5081    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5082    $PRINTF "Which are valid to use depends on the target platform.\n  "
5083    $PRINTF "%s " $VALID_JVM_FEATURES
5084    $PRINTF "\n"
5085
5086    # And now exit directly
5087    exit 0
5088  fi
5089
5090
5091# Basic initialization that must happen first of all in the normal process.
5092
5093  # Save the original command line. This is passed to us by the wrapper configure script.
5094
5095  # Save the path variable before it gets changed
5096  ORIGINAL_PATH="$PATH"
5097
5098  DATE_WHEN_CONFIGURED=`LANG=C date`
5099
5100  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5101$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5102  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5103$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5104
5105
5106  # Start with tools that do not need have cross compilation support
5107  # and can be expected to be found in the default PATH. These tools are
5108  # used by configure.
5109
5110  # First are all the simple required tools.
5111
5112
5113
5114  # Publish this variable in the help.
5115
5116
5117  if [ -z "${BASENAME+x}" ]; then
5118    # The variable is not set by user, try to locate tool using the code snippet
5119    for ac_prog in basename
5120do
5121  # Extract the first word of "$ac_prog", so it can be a program name with args.
5122set dummy $ac_prog; ac_word=$2
5123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5124$as_echo_n "checking for $ac_word... " >&6; }
5125if ${ac_cv_path_BASENAME+:} false; then :
5126  $as_echo_n "(cached) " >&6
5127else
5128  case $BASENAME in
5129  [\\/]* | ?:[\\/]*)
5130  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5131  ;;
5132  *)
5133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5134for as_dir in $PATH
5135do
5136  IFS=$as_save_IFS
5137  test -z "$as_dir" && as_dir=.
5138    for ac_exec_ext in '' $ac_executable_extensions; do
5139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5140    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5142    break 2
5143  fi
5144done
5145  done
5146IFS=$as_save_IFS
5147
5148  ;;
5149esac
5150fi
5151BASENAME=$ac_cv_path_BASENAME
5152if test -n "$BASENAME"; then
5153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5154$as_echo "$BASENAME" >&6; }
5155else
5156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5157$as_echo "no" >&6; }
5158fi
5159
5160
5161  test -n "$BASENAME" && break
5162done
5163
5164  else
5165    # The variable is set, but is it from the command line or the environment?
5166
5167    # Try to remove the string !BASENAME! from our list.
5168    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5169    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5170      # If it failed, the variable was not from the command line. Ignore it,
5171      # but warn the user (except for BASH, which is always set by the calling BASH).
5172      if test "xBASENAME" != xBASH; then
5173        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5174$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5175      fi
5176      # Try to locate tool using the code snippet
5177      for ac_prog in basename
5178do
5179  # Extract the first word of "$ac_prog", so it can be a program name with args.
5180set dummy $ac_prog; ac_word=$2
5181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5182$as_echo_n "checking for $ac_word... " >&6; }
5183if ${ac_cv_path_BASENAME+:} false; then :
5184  $as_echo_n "(cached) " >&6
5185else
5186  case $BASENAME in
5187  [\\/]* | ?:[\\/]*)
5188  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5189  ;;
5190  *)
5191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5192for as_dir in $PATH
5193do
5194  IFS=$as_save_IFS
5195  test -z "$as_dir" && as_dir=.
5196    for ac_exec_ext in '' $ac_executable_extensions; do
5197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5198    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5200    break 2
5201  fi
5202done
5203  done
5204IFS=$as_save_IFS
5205
5206  ;;
5207esac
5208fi
5209BASENAME=$ac_cv_path_BASENAME
5210if test -n "$BASENAME"; then
5211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5212$as_echo "$BASENAME" >&6; }
5213else
5214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5215$as_echo "no" >&6; }
5216fi
5217
5218
5219  test -n "$BASENAME" && break
5220done
5221
5222    else
5223      # If it succeeded, then it was overridden by the user. We will use it
5224      # for the tool.
5225
5226      # First remove it from the list of overridden variables, so we can test
5227      # for unknown variables in the end.
5228      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5229
5230      # Check if we try to supply an empty value
5231      if test "x$BASENAME" = x; then
5232        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5233$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5234        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5235$as_echo_n "checking for BASENAME... " >&6; }
5236        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5237$as_echo "disabled" >&6; }
5238      else
5239        # Check if the provided tool contains a complete path.
5240        tool_specified="$BASENAME"
5241        tool_basename="${tool_specified##*/}"
5242        if test "x$tool_basename" = "x$tool_specified"; then
5243          # A command without a complete path is provided, search $PATH.
5244          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5245$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5246          # Extract the first word of "$tool_basename", so it can be a program name with args.
5247set dummy $tool_basename; ac_word=$2
5248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5249$as_echo_n "checking for $ac_word... " >&6; }
5250if ${ac_cv_path_BASENAME+:} false; then :
5251  $as_echo_n "(cached) " >&6
5252else
5253  case $BASENAME in
5254  [\\/]* | ?:[\\/]*)
5255  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5256  ;;
5257  *)
5258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5259for as_dir in $PATH
5260do
5261  IFS=$as_save_IFS
5262  test -z "$as_dir" && as_dir=.
5263    for ac_exec_ext in '' $ac_executable_extensions; do
5264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5265    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5267    break 2
5268  fi
5269done
5270  done
5271IFS=$as_save_IFS
5272
5273  ;;
5274esac
5275fi
5276BASENAME=$ac_cv_path_BASENAME
5277if test -n "$BASENAME"; then
5278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5279$as_echo "$BASENAME" >&6; }
5280else
5281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5282$as_echo "no" >&6; }
5283fi
5284
5285
5286          if test "x$BASENAME" = x; then
5287            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5288          fi
5289        else
5290          # Otherwise we believe it is a complete path. Use it as it is.
5291          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5292$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5293          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5294$as_echo_n "checking for BASENAME... " >&6; }
5295          if test ! -x "$tool_specified"; then
5296            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5297$as_echo "not found" >&6; }
5298            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5299          fi
5300          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5301$as_echo "$tool_specified" >&6; }
5302        fi
5303      fi
5304    fi
5305
5306  fi
5307
5308
5309
5310  if test "x$BASENAME" = x; then
5311    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5312  fi
5313
5314
5315
5316
5317
5318  # Publish this variable in the help.
5319
5320
5321  if [ -z "${BASH+x}" ]; then
5322    # The variable is not set by user, try to locate tool using the code snippet
5323    for ac_prog in bash
5324do
5325  # Extract the first word of "$ac_prog", so it can be a program name with args.
5326set dummy $ac_prog; ac_word=$2
5327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5328$as_echo_n "checking for $ac_word... " >&6; }
5329if ${ac_cv_path_BASH+:} false; then :
5330  $as_echo_n "(cached) " >&6
5331else
5332  case $BASH in
5333  [\\/]* | ?:[\\/]*)
5334  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5335  ;;
5336  *)
5337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5338for as_dir in $PATH
5339do
5340  IFS=$as_save_IFS
5341  test -z "$as_dir" && as_dir=.
5342    for ac_exec_ext in '' $ac_executable_extensions; do
5343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5344    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5346    break 2
5347  fi
5348done
5349  done
5350IFS=$as_save_IFS
5351
5352  ;;
5353esac
5354fi
5355BASH=$ac_cv_path_BASH
5356if test -n "$BASH"; then
5357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5358$as_echo "$BASH" >&6; }
5359else
5360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5361$as_echo "no" >&6; }
5362fi
5363
5364
5365  test -n "$BASH" && break
5366done
5367
5368  else
5369    # The variable is set, but is it from the command line or the environment?
5370
5371    # Try to remove the string !BASH! from our list.
5372    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5373    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5374      # If it failed, the variable was not from the command line. Ignore it,
5375      # but warn the user (except for BASH, which is always set by the calling BASH).
5376      if test "xBASH" != xBASH; then
5377        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5378$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5379      fi
5380      # Try to locate tool using the code snippet
5381      for ac_prog in bash
5382do
5383  # Extract the first word of "$ac_prog", so it can be a program name with args.
5384set dummy $ac_prog; ac_word=$2
5385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5386$as_echo_n "checking for $ac_word... " >&6; }
5387if ${ac_cv_path_BASH+:} false; then :
5388  $as_echo_n "(cached) " >&6
5389else
5390  case $BASH in
5391  [\\/]* | ?:[\\/]*)
5392  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5393  ;;
5394  *)
5395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5396for as_dir in $PATH
5397do
5398  IFS=$as_save_IFS
5399  test -z "$as_dir" && as_dir=.
5400    for ac_exec_ext in '' $ac_executable_extensions; do
5401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5402    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5404    break 2
5405  fi
5406done
5407  done
5408IFS=$as_save_IFS
5409
5410  ;;
5411esac
5412fi
5413BASH=$ac_cv_path_BASH
5414if test -n "$BASH"; then
5415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5416$as_echo "$BASH" >&6; }
5417else
5418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5419$as_echo "no" >&6; }
5420fi
5421
5422
5423  test -n "$BASH" && break
5424done
5425
5426    else
5427      # If it succeeded, then it was overridden by the user. We will use it
5428      # for the tool.
5429
5430      # First remove it from the list of overridden variables, so we can test
5431      # for unknown variables in the end.
5432      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5433
5434      # Check if we try to supply an empty value
5435      if test "x$BASH" = x; then
5436        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5437$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5438        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5439$as_echo_n "checking for BASH... " >&6; }
5440        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5441$as_echo "disabled" >&6; }
5442      else
5443        # Check if the provided tool contains a complete path.
5444        tool_specified="$BASH"
5445        tool_basename="${tool_specified##*/}"
5446        if test "x$tool_basename" = "x$tool_specified"; then
5447          # A command without a complete path is provided, search $PATH.
5448          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5449$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5450          # Extract the first word of "$tool_basename", so it can be a program name with args.
5451set dummy $tool_basename; ac_word=$2
5452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5453$as_echo_n "checking for $ac_word... " >&6; }
5454if ${ac_cv_path_BASH+:} false; then :
5455  $as_echo_n "(cached) " >&6
5456else
5457  case $BASH in
5458  [\\/]* | ?:[\\/]*)
5459  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5460  ;;
5461  *)
5462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5463for as_dir in $PATH
5464do
5465  IFS=$as_save_IFS
5466  test -z "$as_dir" && as_dir=.
5467    for ac_exec_ext in '' $ac_executable_extensions; do
5468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5469    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5471    break 2
5472  fi
5473done
5474  done
5475IFS=$as_save_IFS
5476
5477  ;;
5478esac
5479fi
5480BASH=$ac_cv_path_BASH
5481if test -n "$BASH"; then
5482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5483$as_echo "$BASH" >&6; }
5484else
5485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5486$as_echo "no" >&6; }
5487fi
5488
5489
5490          if test "x$BASH" = x; then
5491            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5492          fi
5493        else
5494          # Otherwise we believe it is a complete path. Use it as it is.
5495          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5496$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5497          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5498$as_echo_n "checking for BASH... " >&6; }
5499          if test ! -x "$tool_specified"; then
5500            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5501$as_echo "not found" >&6; }
5502            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5503          fi
5504          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5505$as_echo "$tool_specified" >&6; }
5506        fi
5507      fi
5508    fi
5509
5510  fi
5511
5512
5513
5514  if test "x$BASH" = x; then
5515    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5516  fi
5517
5518
5519
5520
5521
5522  # Publish this variable in the help.
5523
5524
5525  if [ -z "${CAT+x}" ]; then
5526    # The variable is not set by user, try to locate tool using the code snippet
5527    for ac_prog in cat
5528do
5529  # Extract the first word of "$ac_prog", so it can be a program name with args.
5530set dummy $ac_prog; ac_word=$2
5531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5532$as_echo_n "checking for $ac_word... " >&6; }
5533if ${ac_cv_path_CAT+:} false; then :
5534  $as_echo_n "(cached) " >&6
5535else
5536  case $CAT in
5537  [\\/]* | ?:[\\/]*)
5538  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5539  ;;
5540  *)
5541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5542for as_dir in $PATH
5543do
5544  IFS=$as_save_IFS
5545  test -z "$as_dir" && as_dir=.
5546    for ac_exec_ext in '' $ac_executable_extensions; do
5547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5548    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5550    break 2
5551  fi
5552done
5553  done
5554IFS=$as_save_IFS
5555
5556  ;;
5557esac
5558fi
5559CAT=$ac_cv_path_CAT
5560if test -n "$CAT"; then
5561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5562$as_echo "$CAT" >&6; }
5563else
5564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5565$as_echo "no" >&6; }
5566fi
5567
5568
5569  test -n "$CAT" && break
5570done
5571
5572  else
5573    # The variable is set, but is it from the command line or the environment?
5574
5575    # Try to remove the string !CAT! from our list.
5576    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5577    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5578      # If it failed, the variable was not from the command line. Ignore it,
5579      # but warn the user (except for BASH, which is always set by the calling BASH).
5580      if test "xCAT" != xBASH; then
5581        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5582$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5583      fi
5584      # Try to locate tool using the code snippet
5585      for ac_prog in cat
5586do
5587  # Extract the first word of "$ac_prog", so it can be a program name with args.
5588set dummy $ac_prog; ac_word=$2
5589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5590$as_echo_n "checking for $ac_word... " >&6; }
5591if ${ac_cv_path_CAT+:} false; then :
5592  $as_echo_n "(cached) " >&6
5593else
5594  case $CAT in
5595  [\\/]* | ?:[\\/]*)
5596  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5597  ;;
5598  *)
5599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5600for as_dir in $PATH
5601do
5602  IFS=$as_save_IFS
5603  test -z "$as_dir" && as_dir=.
5604    for ac_exec_ext in '' $ac_executable_extensions; do
5605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5606    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5608    break 2
5609  fi
5610done
5611  done
5612IFS=$as_save_IFS
5613
5614  ;;
5615esac
5616fi
5617CAT=$ac_cv_path_CAT
5618if test -n "$CAT"; then
5619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5620$as_echo "$CAT" >&6; }
5621else
5622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5623$as_echo "no" >&6; }
5624fi
5625
5626
5627  test -n "$CAT" && break
5628done
5629
5630    else
5631      # If it succeeded, then it was overridden by the user. We will use it
5632      # for the tool.
5633
5634      # First remove it from the list of overridden variables, so we can test
5635      # for unknown variables in the end.
5636      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5637
5638      # Check if we try to supply an empty value
5639      if test "x$CAT" = x; then
5640        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5641$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5642        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5643$as_echo_n "checking for CAT... " >&6; }
5644        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5645$as_echo "disabled" >&6; }
5646      else
5647        # Check if the provided tool contains a complete path.
5648        tool_specified="$CAT"
5649        tool_basename="${tool_specified##*/}"
5650        if test "x$tool_basename" = "x$tool_specified"; then
5651          # A command without a complete path is provided, search $PATH.
5652          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5653$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5654          # Extract the first word of "$tool_basename", so it can be a program name with args.
5655set dummy $tool_basename; ac_word=$2
5656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5657$as_echo_n "checking for $ac_word... " >&6; }
5658if ${ac_cv_path_CAT+:} false; then :
5659  $as_echo_n "(cached) " >&6
5660else
5661  case $CAT in
5662  [\\/]* | ?:[\\/]*)
5663  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5664  ;;
5665  *)
5666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5667for as_dir in $PATH
5668do
5669  IFS=$as_save_IFS
5670  test -z "$as_dir" && as_dir=.
5671    for ac_exec_ext in '' $ac_executable_extensions; do
5672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5673    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5675    break 2
5676  fi
5677done
5678  done
5679IFS=$as_save_IFS
5680
5681  ;;
5682esac
5683fi
5684CAT=$ac_cv_path_CAT
5685if test -n "$CAT"; then
5686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5687$as_echo "$CAT" >&6; }
5688else
5689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5690$as_echo "no" >&6; }
5691fi
5692
5693
5694          if test "x$CAT" = x; then
5695            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5696          fi
5697        else
5698          # Otherwise we believe it is a complete path. Use it as it is.
5699          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5700$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5701          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5702$as_echo_n "checking for CAT... " >&6; }
5703          if test ! -x "$tool_specified"; then
5704            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5705$as_echo "not found" >&6; }
5706            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5707          fi
5708          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5709$as_echo "$tool_specified" >&6; }
5710        fi
5711      fi
5712    fi
5713
5714  fi
5715
5716
5717
5718  if test "x$CAT" = x; then
5719    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5720  fi
5721
5722
5723
5724
5725
5726  # Publish this variable in the help.
5727
5728
5729  if [ -z "${CHMOD+x}" ]; then
5730    # The variable is not set by user, try to locate tool using the code snippet
5731    for ac_prog in chmod
5732do
5733  # Extract the first word of "$ac_prog", so it can be a program name with args.
5734set dummy $ac_prog; ac_word=$2
5735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5736$as_echo_n "checking for $ac_word... " >&6; }
5737if ${ac_cv_path_CHMOD+:} false; then :
5738  $as_echo_n "(cached) " >&6
5739else
5740  case $CHMOD in
5741  [\\/]* | ?:[\\/]*)
5742  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5743  ;;
5744  *)
5745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5746for as_dir in $PATH
5747do
5748  IFS=$as_save_IFS
5749  test -z "$as_dir" && as_dir=.
5750    for ac_exec_ext in '' $ac_executable_extensions; do
5751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5752    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5754    break 2
5755  fi
5756done
5757  done
5758IFS=$as_save_IFS
5759
5760  ;;
5761esac
5762fi
5763CHMOD=$ac_cv_path_CHMOD
5764if test -n "$CHMOD"; then
5765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5766$as_echo "$CHMOD" >&6; }
5767else
5768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5769$as_echo "no" >&6; }
5770fi
5771
5772
5773  test -n "$CHMOD" && break
5774done
5775
5776  else
5777    # The variable is set, but is it from the command line or the environment?
5778
5779    # Try to remove the string !CHMOD! from our list.
5780    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5781    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5782      # If it failed, the variable was not from the command line. Ignore it,
5783      # but warn the user (except for BASH, which is always set by the calling BASH).
5784      if test "xCHMOD" != xBASH; then
5785        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5786$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5787      fi
5788      # Try to locate tool using the code snippet
5789      for ac_prog in chmod
5790do
5791  # Extract the first word of "$ac_prog", so it can be a program name with args.
5792set dummy $ac_prog; ac_word=$2
5793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5794$as_echo_n "checking for $ac_word... " >&6; }
5795if ${ac_cv_path_CHMOD+:} false; then :
5796  $as_echo_n "(cached) " >&6
5797else
5798  case $CHMOD in
5799  [\\/]* | ?:[\\/]*)
5800  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5801  ;;
5802  *)
5803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5804for as_dir in $PATH
5805do
5806  IFS=$as_save_IFS
5807  test -z "$as_dir" && as_dir=.
5808    for ac_exec_ext in '' $ac_executable_extensions; do
5809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5810    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5812    break 2
5813  fi
5814done
5815  done
5816IFS=$as_save_IFS
5817
5818  ;;
5819esac
5820fi
5821CHMOD=$ac_cv_path_CHMOD
5822if test -n "$CHMOD"; then
5823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5824$as_echo "$CHMOD" >&6; }
5825else
5826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5827$as_echo "no" >&6; }
5828fi
5829
5830
5831  test -n "$CHMOD" && break
5832done
5833
5834    else
5835      # If it succeeded, then it was overridden by the user. We will use it
5836      # for the tool.
5837
5838      # First remove it from the list of overridden variables, so we can test
5839      # for unknown variables in the end.
5840      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5841
5842      # Check if we try to supply an empty value
5843      if test "x$CHMOD" = x; then
5844        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5845$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5846        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5847$as_echo_n "checking for CHMOD... " >&6; }
5848        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5849$as_echo "disabled" >&6; }
5850      else
5851        # Check if the provided tool contains a complete path.
5852        tool_specified="$CHMOD"
5853        tool_basename="${tool_specified##*/}"
5854        if test "x$tool_basename" = "x$tool_specified"; then
5855          # A command without a complete path is provided, search $PATH.
5856          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5857$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5858          # Extract the first word of "$tool_basename", so it can be a program name with args.
5859set dummy $tool_basename; ac_word=$2
5860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5861$as_echo_n "checking for $ac_word... " >&6; }
5862if ${ac_cv_path_CHMOD+:} false; then :
5863  $as_echo_n "(cached) " >&6
5864else
5865  case $CHMOD in
5866  [\\/]* | ?:[\\/]*)
5867  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5868  ;;
5869  *)
5870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5871for as_dir in $PATH
5872do
5873  IFS=$as_save_IFS
5874  test -z "$as_dir" && as_dir=.
5875    for ac_exec_ext in '' $ac_executable_extensions; do
5876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5877    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5879    break 2
5880  fi
5881done
5882  done
5883IFS=$as_save_IFS
5884
5885  ;;
5886esac
5887fi
5888CHMOD=$ac_cv_path_CHMOD
5889if test -n "$CHMOD"; then
5890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5891$as_echo "$CHMOD" >&6; }
5892else
5893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5894$as_echo "no" >&6; }
5895fi
5896
5897
5898          if test "x$CHMOD" = x; then
5899            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5900          fi
5901        else
5902          # Otherwise we believe it is a complete path. Use it as it is.
5903          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5904$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5905          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5906$as_echo_n "checking for CHMOD... " >&6; }
5907          if test ! -x "$tool_specified"; then
5908            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5909$as_echo "not found" >&6; }
5910            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5911          fi
5912          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5913$as_echo "$tool_specified" >&6; }
5914        fi
5915      fi
5916    fi
5917
5918  fi
5919
5920
5921
5922  if test "x$CHMOD" = x; then
5923    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5924  fi
5925
5926
5927
5928
5929
5930  # Publish this variable in the help.
5931
5932
5933  if [ -z "${CMP+x}" ]; then
5934    # The variable is not set by user, try to locate tool using the code snippet
5935    for ac_prog in cmp
5936do
5937  # Extract the first word of "$ac_prog", so it can be a program name with args.
5938set dummy $ac_prog; ac_word=$2
5939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5940$as_echo_n "checking for $ac_word... " >&6; }
5941if ${ac_cv_path_CMP+:} false; then :
5942  $as_echo_n "(cached) " >&6
5943else
5944  case $CMP in
5945  [\\/]* | ?:[\\/]*)
5946  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5947  ;;
5948  *)
5949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5950for as_dir in $PATH
5951do
5952  IFS=$as_save_IFS
5953  test -z "$as_dir" && as_dir=.
5954    for ac_exec_ext in '' $ac_executable_extensions; do
5955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5956    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5958    break 2
5959  fi
5960done
5961  done
5962IFS=$as_save_IFS
5963
5964  ;;
5965esac
5966fi
5967CMP=$ac_cv_path_CMP
5968if test -n "$CMP"; then
5969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5970$as_echo "$CMP" >&6; }
5971else
5972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5973$as_echo "no" >&6; }
5974fi
5975
5976
5977  test -n "$CMP" && break
5978done
5979
5980  else
5981    # The variable is set, but is it from the command line or the environment?
5982
5983    # Try to remove the string !CMP! from our list.
5984    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5985    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5986      # If it failed, the variable was not from the command line. Ignore it,
5987      # but warn the user (except for BASH, which is always set by the calling BASH).
5988      if test "xCMP" != xBASH; then
5989        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5990$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5991      fi
5992      # Try to locate tool using the code snippet
5993      for ac_prog in cmp
5994do
5995  # Extract the first word of "$ac_prog", so it can be a program name with args.
5996set dummy $ac_prog; ac_word=$2
5997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5998$as_echo_n "checking for $ac_word... " >&6; }
5999if ${ac_cv_path_CMP+:} false; then :
6000  $as_echo_n "(cached) " >&6
6001else
6002  case $CMP in
6003  [\\/]* | ?:[\\/]*)
6004  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6005  ;;
6006  *)
6007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6008for as_dir in $PATH
6009do
6010  IFS=$as_save_IFS
6011  test -z "$as_dir" && as_dir=.
6012    for ac_exec_ext in '' $ac_executable_extensions; do
6013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6014    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6016    break 2
6017  fi
6018done
6019  done
6020IFS=$as_save_IFS
6021
6022  ;;
6023esac
6024fi
6025CMP=$ac_cv_path_CMP
6026if test -n "$CMP"; then
6027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6028$as_echo "$CMP" >&6; }
6029else
6030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6031$as_echo "no" >&6; }
6032fi
6033
6034
6035  test -n "$CMP" && break
6036done
6037
6038    else
6039      # If it succeeded, then it was overridden by the user. We will use it
6040      # for the tool.
6041
6042      # First remove it from the list of overridden variables, so we can test
6043      # for unknown variables in the end.
6044      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6045
6046      # Check if we try to supply an empty value
6047      if test "x$CMP" = x; then
6048        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6049$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6050        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6051$as_echo_n "checking for CMP... " >&6; }
6052        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6053$as_echo "disabled" >&6; }
6054      else
6055        # Check if the provided tool contains a complete path.
6056        tool_specified="$CMP"
6057        tool_basename="${tool_specified##*/}"
6058        if test "x$tool_basename" = "x$tool_specified"; then
6059          # A command without a complete path is provided, search $PATH.
6060          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6061$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6062          # Extract the first word of "$tool_basename", so it can be a program name with args.
6063set dummy $tool_basename; ac_word=$2
6064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6065$as_echo_n "checking for $ac_word... " >&6; }
6066if ${ac_cv_path_CMP+:} false; then :
6067  $as_echo_n "(cached) " >&6
6068else
6069  case $CMP in
6070  [\\/]* | ?:[\\/]*)
6071  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6072  ;;
6073  *)
6074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6075for as_dir in $PATH
6076do
6077  IFS=$as_save_IFS
6078  test -z "$as_dir" && as_dir=.
6079    for ac_exec_ext in '' $ac_executable_extensions; do
6080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6081    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6083    break 2
6084  fi
6085done
6086  done
6087IFS=$as_save_IFS
6088
6089  ;;
6090esac
6091fi
6092CMP=$ac_cv_path_CMP
6093if test -n "$CMP"; then
6094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6095$as_echo "$CMP" >&6; }
6096else
6097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6098$as_echo "no" >&6; }
6099fi
6100
6101
6102          if test "x$CMP" = x; then
6103            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6104          fi
6105        else
6106          # Otherwise we believe it is a complete path. Use it as it is.
6107          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6108$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6109          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6110$as_echo_n "checking for CMP... " >&6; }
6111          if test ! -x "$tool_specified"; then
6112            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6113$as_echo "not found" >&6; }
6114            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6115          fi
6116          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6117$as_echo "$tool_specified" >&6; }
6118        fi
6119      fi
6120    fi
6121
6122  fi
6123
6124
6125
6126  if test "x$CMP" = x; then
6127    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6128  fi
6129
6130
6131
6132
6133
6134  # Publish this variable in the help.
6135
6136
6137  if [ -z "${COMM+x}" ]; then
6138    # The variable is not set by user, try to locate tool using the code snippet
6139    for ac_prog in comm
6140do
6141  # Extract the first word of "$ac_prog", so it can be a program name with args.
6142set dummy $ac_prog; ac_word=$2
6143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6144$as_echo_n "checking for $ac_word... " >&6; }
6145if ${ac_cv_path_COMM+:} false; then :
6146  $as_echo_n "(cached) " >&6
6147else
6148  case $COMM in
6149  [\\/]* | ?:[\\/]*)
6150  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6151  ;;
6152  *)
6153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6154for as_dir in $PATH
6155do
6156  IFS=$as_save_IFS
6157  test -z "$as_dir" && as_dir=.
6158    for ac_exec_ext in '' $ac_executable_extensions; do
6159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6160    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6162    break 2
6163  fi
6164done
6165  done
6166IFS=$as_save_IFS
6167
6168  ;;
6169esac
6170fi
6171COMM=$ac_cv_path_COMM
6172if test -n "$COMM"; then
6173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6174$as_echo "$COMM" >&6; }
6175else
6176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6177$as_echo "no" >&6; }
6178fi
6179
6180
6181  test -n "$COMM" && break
6182done
6183
6184  else
6185    # The variable is set, but is it from the command line or the environment?
6186
6187    # Try to remove the string !COMM! from our list.
6188    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6189    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6190      # If it failed, the variable was not from the command line. Ignore it,
6191      # but warn the user (except for BASH, which is always set by the calling BASH).
6192      if test "xCOMM" != xBASH; then
6193        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6194$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6195      fi
6196      # Try to locate tool using the code snippet
6197      for ac_prog in comm
6198do
6199  # Extract the first word of "$ac_prog", so it can be a program name with args.
6200set dummy $ac_prog; ac_word=$2
6201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6202$as_echo_n "checking for $ac_word... " >&6; }
6203if ${ac_cv_path_COMM+:} false; then :
6204  $as_echo_n "(cached) " >&6
6205else
6206  case $COMM in
6207  [\\/]* | ?:[\\/]*)
6208  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6209  ;;
6210  *)
6211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6212for as_dir in $PATH
6213do
6214  IFS=$as_save_IFS
6215  test -z "$as_dir" && as_dir=.
6216    for ac_exec_ext in '' $ac_executable_extensions; do
6217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6218    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6220    break 2
6221  fi
6222done
6223  done
6224IFS=$as_save_IFS
6225
6226  ;;
6227esac
6228fi
6229COMM=$ac_cv_path_COMM
6230if test -n "$COMM"; then
6231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6232$as_echo "$COMM" >&6; }
6233else
6234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6235$as_echo "no" >&6; }
6236fi
6237
6238
6239  test -n "$COMM" && break
6240done
6241
6242    else
6243      # If it succeeded, then it was overridden by the user. We will use it
6244      # for the tool.
6245
6246      # First remove it from the list of overridden variables, so we can test
6247      # for unknown variables in the end.
6248      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6249
6250      # Check if we try to supply an empty value
6251      if test "x$COMM" = x; then
6252        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6253$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6254        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6255$as_echo_n "checking for COMM... " >&6; }
6256        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6257$as_echo "disabled" >&6; }
6258      else
6259        # Check if the provided tool contains a complete path.
6260        tool_specified="$COMM"
6261        tool_basename="${tool_specified##*/}"
6262        if test "x$tool_basename" = "x$tool_specified"; then
6263          # A command without a complete path is provided, search $PATH.
6264          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6265$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6266          # Extract the first word of "$tool_basename", so it can be a program name with args.
6267set dummy $tool_basename; ac_word=$2
6268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6269$as_echo_n "checking for $ac_word... " >&6; }
6270if ${ac_cv_path_COMM+:} false; then :
6271  $as_echo_n "(cached) " >&6
6272else
6273  case $COMM in
6274  [\\/]* | ?:[\\/]*)
6275  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6276  ;;
6277  *)
6278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6279for as_dir in $PATH
6280do
6281  IFS=$as_save_IFS
6282  test -z "$as_dir" && as_dir=.
6283    for ac_exec_ext in '' $ac_executable_extensions; do
6284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6285    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6287    break 2
6288  fi
6289done
6290  done
6291IFS=$as_save_IFS
6292
6293  ;;
6294esac
6295fi
6296COMM=$ac_cv_path_COMM
6297if test -n "$COMM"; then
6298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6299$as_echo "$COMM" >&6; }
6300else
6301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6302$as_echo "no" >&6; }
6303fi
6304
6305
6306          if test "x$COMM" = x; then
6307            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6308          fi
6309        else
6310          # Otherwise we believe it is a complete path. Use it as it is.
6311          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6312$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6313          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6314$as_echo_n "checking for COMM... " >&6; }
6315          if test ! -x "$tool_specified"; then
6316            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6317$as_echo "not found" >&6; }
6318            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6319          fi
6320          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6321$as_echo "$tool_specified" >&6; }
6322        fi
6323      fi
6324    fi
6325
6326  fi
6327
6328
6329
6330  if test "x$COMM" = x; then
6331    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6332  fi
6333
6334
6335
6336
6337
6338  # Publish this variable in the help.
6339
6340
6341  if [ -z "${CP+x}" ]; then
6342    # The variable is not set by user, try to locate tool using the code snippet
6343    for ac_prog in cp
6344do
6345  # Extract the first word of "$ac_prog", so it can be a program name with args.
6346set dummy $ac_prog; ac_word=$2
6347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6348$as_echo_n "checking for $ac_word... " >&6; }
6349if ${ac_cv_path_CP+:} false; then :
6350  $as_echo_n "(cached) " >&6
6351else
6352  case $CP in
6353  [\\/]* | ?:[\\/]*)
6354  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6355  ;;
6356  *)
6357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6358for as_dir in $PATH
6359do
6360  IFS=$as_save_IFS
6361  test -z "$as_dir" && as_dir=.
6362    for ac_exec_ext in '' $ac_executable_extensions; do
6363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6364    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6366    break 2
6367  fi
6368done
6369  done
6370IFS=$as_save_IFS
6371
6372  ;;
6373esac
6374fi
6375CP=$ac_cv_path_CP
6376if test -n "$CP"; then
6377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6378$as_echo "$CP" >&6; }
6379else
6380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6381$as_echo "no" >&6; }
6382fi
6383
6384
6385  test -n "$CP" && break
6386done
6387
6388  else
6389    # The variable is set, but is it from the command line or the environment?
6390
6391    # Try to remove the string !CP! from our list.
6392    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6393    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6394      # If it failed, the variable was not from the command line. Ignore it,
6395      # but warn the user (except for BASH, which is always set by the calling BASH).
6396      if test "xCP" != xBASH; then
6397        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6398$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6399      fi
6400      # Try to locate tool using the code snippet
6401      for ac_prog in cp
6402do
6403  # Extract the first word of "$ac_prog", so it can be a program name with args.
6404set dummy $ac_prog; ac_word=$2
6405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6406$as_echo_n "checking for $ac_word... " >&6; }
6407if ${ac_cv_path_CP+:} false; then :
6408  $as_echo_n "(cached) " >&6
6409else
6410  case $CP in
6411  [\\/]* | ?:[\\/]*)
6412  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6413  ;;
6414  *)
6415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6416for as_dir in $PATH
6417do
6418  IFS=$as_save_IFS
6419  test -z "$as_dir" && as_dir=.
6420    for ac_exec_ext in '' $ac_executable_extensions; do
6421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6422    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6424    break 2
6425  fi
6426done
6427  done
6428IFS=$as_save_IFS
6429
6430  ;;
6431esac
6432fi
6433CP=$ac_cv_path_CP
6434if test -n "$CP"; then
6435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6436$as_echo "$CP" >&6; }
6437else
6438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6439$as_echo "no" >&6; }
6440fi
6441
6442
6443  test -n "$CP" && break
6444done
6445
6446    else
6447      # If it succeeded, then it was overridden by the user. We will use it
6448      # for the tool.
6449
6450      # First remove it from the list of overridden variables, so we can test
6451      # for unknown variables in the end.
6452      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6453
6454      # Check if we try to supply an empty value
6455      if test "x$CP" = x; then
6456        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6457$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6458        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6459$as_echo_n "checking for CP... " >&6; }
6460        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6461$as_echo "disabled" >&6; }
6462      else
6463        # Check if the provided tool contains a complete path.
6464        tool_specified="$CP"
6465        tool_basename="${tool_specified##*/}"
6466        if test "x$tool_basename" = "x$tool_specified"; then
6467          # A command without a complete path is provided, search $PATH.
6468          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6469$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6470          # Extract the first word of "$tool_basename", so it can be a program name with args.
6471set dummy $tool_basename; ac_word=$2
6472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6473$as_echo_n "checking for $ac_word... " >&6; }
6474if ${ac_cv_path_CP+:} false; then :
6475  $as_echo_n "(cached) " >&6
6476else
6477  case $CP in
6478  [\\/]* | ?:[\\/]*)
6479  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6480  ;;
6481  *)
6482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6483for as_dir in $PATH
6484do
6485  IFS=$as_save_IFS
6486  test -z "$as_dir" && as_dir=.
6487    for ac_exec_ext in '' $ac_executable_extensions; do
6488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6489    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6491    break 2
6492  fi
6493done
6494  done
6495IFS=$as_save_IFS
6496
6497  ;;
6498esac
6499fi
6500CP=$ac_cv_path_CP
6501if test -n "$CP"; then
6502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6503$as_echo "$CP" >&6; }
6504else
6505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6506$as_echo "no" >&6; }
6507fi
6508
6509
6510          if test "x$CP" = x; then
6511            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6512          fi
6513        else
6514          # Otherwise we believe it is a complete path. Use it as it is.
6515          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6516$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6517          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6518$as_echo_n "checking for CP... " >&6; }
6519          if test ! -x "$tool_specified"; then
6520            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6521$as_echo "not found" >&6; }
6522            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6523          fi
6524          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6525$as_echo "$tool_specified" >&6; }
6526        fi
6527      fi
6528    fi
6529
6530  fi
6531
6532
6533
6534  if test "x$CP" = x; then
6535    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6536  fi
6537
6538
6539
6540
6541
6542  # Publish this variable in the help.
6543
6544
6545  if [ -z "${CUT+x}" ]; then
6546    # The variable is not set by user, try to locate tool using the code snippet
6547    for ac_prog in cut
6548do
6549  # Extract the first word of "$ac_prog", so it can be a program name with args.
6550set dummy $ac_prog; ac_word=$2
6551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6552$as_echo_n "checking for $ac_word... " >&6; }
6553if ${ac_cv_path_CUT+:} false; then :
6554  $as_echo_n "(cached) " >&6
6555else
6556  case $CUT in
6557  [\\/]* | ?:[\\/]*)
6558  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6559  ;;
6560  *)
6561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6562for as_dir in $PATH
6563do
6564  IFS=$as_save_IFS
6565  test -z "$as_dir" && as_dir=.
6566    for ac_exec_ext in '' $ac_executable_extensions; do
6567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6568    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6570    break 2
6571  fi
6572done
6573  done
6574IFS=$as_save_IFS
6575
6576  ;;
6577esac
6578fi
6579CUT=$ac_cv_path_CUT
6580if test -n "$CUT"; then
6581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6582$as_echo "$CUT" >&6; }
6583else
6584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6585$as_echo "no" >&6; }
6586fi
6587
6588
6589  test -n "$CUT" && break
6590done
6591
6592  else
6593    # The variable is set, but is it from the command line or the environment?
6594
6595    # Try to remove the string !CUT! from our list.
6596    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6597    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6598      # If it failed, the variable was not from the command line. Ignore it,
6599      # but warn the user (except for BASH, which is always set by the calling BASH).
6600      if test "xCUT" != xBASH; then
6601        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6602$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6603      fi
6604      # Try to locate tool using the code snippet
6605      for ac_prog in cut
6606do
6607  # Extract the first word of "$ac_prog", so it can be a program name with args.
6608set dummy $ac_prog; ac_word=$2
6609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6610$as_echo_n "checking for $ac_word... " >&6; }
6611if ${ac_cv_path_CUT+:} false; then :
6612  $as_echo_n "(cached) " >&6
6613else
6614  case $CUT in
6615  [\\/]* | ?:[\\/]*)
6616  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6617  ;;
6618  *)
6619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6620for as_dir in $PATH
6621do
6622  IFS=$as_save_IFS
6623  test -z "$as_dir" && as_dir=.
6624    for ac_exec_ext in '' $ac_executable_extensions; do
6625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6626    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6628    break 2
6629  fi
6630done
6631  done
6632IFS=$as_save_IFS
6633
6634  ;;
6635esac
6636fi
6637CUT=$ac_cv_path_CUT
6638if test -n "$CUT"; then
6639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6640$as_echo "$CUT" >&6; }
6641else
6642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6643$as_echo "no" >&6; }
6644fi
6645
6646
6647  test -n "$CUT" && break
6648done
6649
6650    else
6651      # If it succeeded, then it was overridden by the user. We will use it
6652      # for the tool.
6653
6654      # First remove it from the list of overridden variables, so we can test
6655      # for unknown variables in the end.
6656      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6657
6658      # Check if we try to supply an empty value
6659      if test "x$CUT" = x; then
6660        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6661$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6662        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6663$as_echo_n "checking for CUT... " >&6; }
6664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6665$as_echo "disabled" >&6; }
6666      else
6667        # Check if the provided tool contains a complete path.
6668        tool_specified="$CUT"
6669        tool_basename="${tool_specified##*/}"
6670        if test "x$tool_basename" = "x$tool_specified"; then
6671          # A command without a complete path is provided, search $PATH.
6672          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6673$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6674          # Extract the first word of "$tool_basename", so it can be a program name with args.
6675set dummy $tool_basename; ac_word=$2
6676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6677$as_echo_n "checking for $ac_word... " >&6; }
6678if ${ac_cv_path_CUT+:} false; then :
6679  $as_echo_n "(cached) " >&6
6680else
6681  case $CUT in
6682  [\\/]* | ?:[\\/]*)
6683  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6684  ;;
6685  *)
6686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6687for as_dir in $PATH
6688do
6689  IFS=$as_save_IFS
6690  test -z "$as_dir" && as_dir=.
6691    for ac_exec_ext in '' $ac_executable_extensions; do
6692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6693    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6695    break 2
6696  fi
6697done
6698  done
6699IFS=$as_save_IFS
6700
6701  ;;
6702esac
6703fi
6704CUT=$ac_cv_path_CUT
6705if test -n "$CUT"; then
6706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6707$as_echo "$CUT" >&6; }
6708else
6709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6710$as_echo "no" >&6; }
6711fi
6712
6713
6714          if test "x$CUT" = x; then
6715            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6716          fi
6717        else
6718          # Otherwise we believe it is a complete path. Use it as it is.
6719          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6720$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6721          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6722$as_echo_n "checking for CUT... " >&6; }
6723          if test ! -x "$tool_specified"; then
6724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6725$as_echo "not found" >&6; }
6726            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6727          fi
6728          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6729$as_echo "$tool_specified" >&6; }
6730        fi
6731      fi
6732    fi
6733
6734  fi
6735
6736
6737
6738  if test "x$CUT" = x; then
6739    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6740  fi
6741
6742
6743
6744
6745
6746  # Publish this variable in the help.
6747
6748
6749  if [ -z "${DATE+x}" ]; then
6750    # The variable is not set by user, try to locate tool using the code snippet
6751    for ac_prog in date
6752do
6753  # Extract the first word of "$ac_prog", so it can be a program name with args.
6754set dummy $ac_prog; ac_word=$2
6755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6756$as_echo_n "checking for $ac_word... " >&6; }
6757if ${ac_cv_path_DATE+:} false; then :
6758  $as_echo_n "(cached) " >&6
6759else
6760  case $DATE in
6761  [\\/]* | ?:[\\/]*)
6762  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6763  ;;
6764  *)
6765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6766for as_dir in $PATH
6767do
6768  IFS=$as_save_IFS
6769  test -z "$as_dir" && as_dir=.
6770    for ac_exec_ext in '' $ac_executable_extensions; do
6771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6772    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6774    break 2
6775  fi
6776done
6777  done
6778IFS=$as_save_IFS
6779
6780  ;;
6781esac
6782fi
6783DATE=$ac_cv_path_DATE
6784if test -n "$DATE"; then
6785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6786$as_echo "$DATE" >&6; }
6787else
6788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6789$as_echo "no" >&6; }
6790fi
6791
6792
6793  test -n "$DATE" && break
6794done
6795
6796  else
6797    # The variable is set, but is it from the command line or the environment?
6798
6799    # Try to remove the string !DATE! from our list.
6800    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6801    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6802      # If it failed, the variable was not from the command line. Ignore it,
6803      # but warn the user (except for BASH, which is always set by the calling BASH).
6804      if test "xDATE" != xBASH; then
6805        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6806$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6807      fi
6808      # Try to locate tool using the code snippet
6809      for ac_prog in date
6810do
6811  # Extract the first word of "$ac_prog", so it can be a program name with args.
6812set dummy $ac_prog; ac_word=$2
6813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6814$as_echo_n "checking for $ac_word... " >&6; }
6815if ${ac_cv_path_DATE+:} false; then :
6816  $as_echo_n "(cached) " >&6
6817else
6818  case $DATE in
6819  [\\/]* | ?:[\\/]*)
6820  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6821  ;;
6822  *)
6823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6824for as_dir in $PATH
6825do
6826  IFS=$as_save_IFS
6827  test -z "$as_dir" && as_dir=.
6828    for ac_exec_ext in '' $ac_executable_extensions; do
6829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6830    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6832    break 2
6833  fi
6834done
6835  done
6836IFS=$as_save_IFS
6837
6838  ;;
6839esac
6840fi
6841DATE=$ac_cv_path_DATE
6842if test -n "$DATE"; then
6843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6844$as_echo "$DATE" >&6; }
6845else
6846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6847$as_echo "no" >&6; }
6848fi
6849
6850
6851  test -n "$DATE" && break
6852done
6853
6854    else
6855      # If it succeeded, then it was overridden by the user. We will use it
6856      # for the tool.
6857
6858      # First remove it from the list of overridden variables, so we can test
6859      # for unknown variables in the end.
6860      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6861
6862      # Check if we try to supply an empty value
6863      if test "x$DATE" = x; then
6864        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6865$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6866        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6867$as_echo_n "checking for DATE... " >&6; }
6868        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6869$as_echo "disabled" >&6; }
6870      else
6871        # Check if the provided tool contains a complete path.
6872        tool_specified="$DATE"
6873        tool_basename="${tool_specified##*/}"
6874        if test "x$tool_basename" = "x$tool_specified"; then
6875          # A command without a complete path is provided, search $PATH.
6876          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6877$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6878          # Extract the first word of "$tool_basename", so it can be a program name with args.
6879set dummy $tool_basename; ac_word=$2
6880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6881$as_echo_n "checking for $ac_word... " >&6; }
6882if ${ac_cv_path_DATE+:} false; then :
6883  $as_echo_n "(cached) " >&6
6884else
6885  case $DATE in
6886  [\\/]* | ?:[\\/]*)
6887  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6888  ;;
6889  *)
6890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6891for as_dir in $PATH
6892do
6893  IFS=$as_save_IFS
6894  test -z "$as_dir" && as_dir=.
6895    for ac_exec_ext in '' $ac_executable_extensions; do
6896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6897    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6899    break 2
6900  fi
6901done
6902  done
6903IFS=$as_save_IFS
6904
6905  ;;
6906esac
6907fi
6908DATE=$ac_cv_path_DATE
6909if test -n "$DATE"; then
6910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6911$as_echo "$DATE" >&6; }
6912else
6913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6914$as_echo "no" >&6; }
6915fi
6916
6917
6918          if test "x$DATE" = x; then
6919            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6920          fi
6921        else
6922          # Otherwise we believe it is a complete path. Use it as it is.
6923          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6924$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6925          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6926$as_echo_n "checking for DATE... " >&6; }
6927          if test ! -x "$tool_specified"; then
6928            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6929$as_echo "not found" >&6; }
6930            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6931          fi
6932          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6933$as_echo "$tool_specified" >&6; }
6934        fi
6935      fi
6936    fi
6937
6938  fi
6939
6940
6941
6942  if test "x$DATE" = x; then
6943    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6944  fi
6945
6946
6947
6948
6949
6950  # Publish this variable in the help.
6951
6952
6953  if [ -z "${DIFF+x}" ]; then
6954    # The variable is not set by user, try to locate tool using the code snippet
6955    for ac_prog in gdiff diff
6956do
6957  # Extract the first word of "$ac_prog", so it can be a program name with args.
6958set dummy $ac_prog; ac_word=$2
6959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6960$as_echo_n "checking for $ac_word... " >&6; }
6961if ${ac_cv_path_DIFF+:} false; then :
6962  $as_echo_n "(cached) " >&6
6963else
6964  case $DIFF in
6965  [\\/]* | ?:[\\/]*)
6966  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6967  ;;
6968  *)
6969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6970for as_dir in $PATH
6971do
6972  IFS=$as_save_IFS
6973  test -z "$as_dir" && as_dir=.
6974    for ac_exec_ext in '' $ac_executable_extensions; do
6975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6976    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6978    break 2
6979  fi
6980done
6981  done
6982IFS=$as_save_IFS
6983
6984  ;;
6985esac
6986fi
6987DIFF=$ac_cv_path_DIFF
6988if test -n "$DIFF"; then
6989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6990$as_echo "$DIFF" >&6; }
6991else
6992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6993$as_echo "no" >&6; }
6994fi
6995
6996
6997  test -n "$DIFF" && break
6998done
6999
7000  else
7001    # The variable is set, but is it from the command line or the environment?
7002
7003    # Try to remove the string !DIFF! from our list.
7004    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7005    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7006      # If it failed, the variable was not from the command line. Ignore it,
7007      # but warn the user (except for BASH, which is always set by the calling BASH).
7008      if test "xDIFF" != xBASH; then
7009        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7010$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7011      fi
7012      # Try to locate tool using the code snippet
7013      for ac_prog in gdiff diff
7014do
7015  # Extract the first word of "$ac_prog", so it can be a program name with args.
7016set dummy $ac_prog; ac_word=$2
7017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7018$as_echo_n "checking for $ac_word... " >&6; }
7019if ${ac_cv_path_DIFF+:} false; then :
7020  $as_echo_n "(cached) " >&6
7021else
7022  case $DIFF in
7023  [\\/]* | ?:[\\/]*)
7024  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7025  ;;
7026  *)
7027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7028for as_dir in $PATH
7029do
7030  IFS=$as_save_IFS
7031  test -z "$as_dir" && as_dir=.
7032    for ac_exec_ext in '' $ac_executable_extensions; do
7033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7034    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7036    break 2
7037  fi
7038done
7039  done
7040IFS=$as_save_IFS
7041
7042  ;;
7043esac
7044fi
7045DIFF=$ac_cv_path_DIFF
7046if test -n "$DIFF"; then
7047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7048$as_echo "$DIFF" >&6; }
7049else
7050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7051$as_echo "no" >&6; }
7052fi
7053
7054
7055  test -n "$DIFF" && break
7056done
7057
7058    else
7059      # If it succeeded, then it was overridden by the user. We will use it
7060      # for the tool.
7061
7062      # First remove it from the list of overridden variables, so we can test
7063      # for unknown variables in the end.
7064      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7065
7066      # Check if we try to supply an empty value
7067      if test "x$DIFF" = x; then
7068        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7069$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7070        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7071$as_echo_n "checking for DIFF... " >&6; }
7072        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7073$as_echo "disabled" >&6; }
7074      else
7075        # Check if the provided tool contains a complete path.
7076        tool_specified="$DIFF"
7077        tool_basename="${tool_specified##*/}"
7078        if test "x$tool_basename" = "x$tool_specified"; then
7079          # A command without a complete path is provided, search $PATH.
7080          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7081$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7082          # Extract the first word of "$tool_basename", so it can be a program name with args.
7083set dummy $tool_basename; ac_word=$2
7084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7085$as_echo_n "checking for $ac_word... " >&6; }
7086if ${ac_cv_path_DIFF+:} false; then :
7087  $as_echo_n "(cached) " >&6
7088else
7089  case $DIFF in
7090  [\\/]* | ?:[\\/]*)
7091  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7092  ;;
7093  *)
7094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7095for as_dir in $PATH
7096do
7097  IFS=$as_save_IFS
7098  test -z "$as_dir" && as_dir=.
7099    for ac_exec_ext in '' $ac_executable_extensions; do
7100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7101    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7103    break 2
7104  fi
7105done
7106  done
7107IFS=$as_save_IFS
7108
7109  ;;
7110esac
7111fi
7112DIFF=$ac_cv_path_DIFF
7113if test -n "$DIFF"; then
7114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7115$as_echo "$DIFF" >&6; }
7116else
7117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7118$as_echo "no" >&6; }
7119fi
7120
7121
7122          if test "x$DIFF" = x; then
7123            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7124          fi
7125        else
7126          # Otherwise we believe it is a complete path. Use it as it is.
7127          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7128$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7129          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7130$as_echo_n "checking for DIFF... " >&6; }
7131          if test ! -x "$tool_specified"; then
7132            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7133$as_echo "not found" >&6; }
7134            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7135          fi
7136          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7137$as_echo "$tool_specified" >&6; }
7138        fi
7139      fi
7140    fi
7141
7142  fi
7143
7144
7145
7146  if test "x$DIFF" = x; then
7147    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7148  fi
7149
7150
7151
7152
7153
7154  # Publish this variable in the help.
7155
7156
7157  if [ -z "${DIRNAME+x}" ]; then
7158    # The variable is not set by user, try to locate tool using the code snippet
7159    for ac_prog in dirname
7160do
7161  # Extract the first word of "$ac_prog", so it can be a program name with args.
7162set dummy $ac_prog; ac_word=$2
7163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7164$as_echo_n "checking for $ac_word... " >&6; }
7165if ${ac_cv_path_DIRNAME+:} false; then :
7166  $as_echo_n "(cached) " >&6
7167else
7168  case $DIRNAME in
7169  [\\/]* | ?:[\\/]*)
7170  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7171  ;;
7172  *)
7173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7174for as_dir in $PATH
7175do
7176  IFS=$as_save_IFS
7177  test -z "$as_dir" && as_dir=.
7178    for ac_exec_ext in '' $ac_executable_extensions; do
7179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7180    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7182    break 2
7183  fi
7184done
7185  done
7186IFS=$as_save_IFS
7187
7188  ;;
7189esac
7190fi
7191DIRNAME=$ac_cv_path_DIRNAME
7192if test -n "$DIRNAME"; then
7193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7194$as_echo "$DIRNAME" >&6; }
7195else
7196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7197$as_echo "no" >&6; }
7198fi
7199
7200
7201  test -n "$DIRNAME" && break
7202done
7203
7204  else
7205    # The variable is set, but is it from the command line or the environment?
7206
7207    # Try to remove the string !DIRNAME! from our list.
7208    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7209    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7210      # If it failed, the variable was not from the command line. Ignore it,
7211      # but warn the user (except for BASH, which is always set by the calling BASH).
7212      if test "xDIRNAME" != xBASH; then
7213        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7214$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7215      fi
7216      # Try to locate tool using the code snippet
7217      for ac_prog in dirname
7218do
7219  # Extract the first word of "$ac_prog", so it can be a program name with args.
7220set dummy $ac_prog; ac_word=$2
7221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7222$as_echo_n "checking for $ac_word... " >&6; }
7223if ${ac_cv_path_DIRNAME+:} false; then :
7224  $as_echo_n "(cached) " >&6
7225else
7226  case $DIRNAME in
7227  [\\/]* | ?:[\\/]*)
7228  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7229  ;;
7230  *)
7231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7232for as_dir in $PATH
7233do
7234  IFS=$as_save_IFS
7235  test -z "$as_dir" && as_dir=.
7236    for ac_exec_ext in '' $ac_executable_extensions; do
7237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7238    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7240    break 2
7241  fi
7242done
7243  done
7244IFS=$as_save_IFS
7245
7246  ;;
7247esac
7248fi
7249DIRNAME=$ac_cv_path_DIRNAME
7250if test -n "$DIRNAME"; then
7251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7252$as_echo "$DIRNAME" >&6; }
7253else
7254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7255$as_echo "no" >&6; }
7256fi
7257
7258
7259  test -n "$DIRNAME" && break
7260done
7261
7262    else
7263      # If it succeeded, then it was overridden by the user. We will use it
7264      # for the tool.
7265
7266      # First remove it from the list of overridden variables, so we can test
7267      # for unknown variables in the end.
7268      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7269
7270      # Check if we try to supply an empty value
7271      if test "x$DIRNAME" = x; then
7272        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7273$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7274        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7275$as_echo_n "checking for DIRNAME... " >&6; }
7276        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7277$as_echo "disabled" >&6; }
7278      else
7279        # Check if the provided tool contains a complete path.
7280        tool_specified="$DIRNAME"
7281        tool_basename="${tool_specified##*/}"
7282        if test "x$tool_basename" = "x$tool_specified"; then
7283          # A command without a complete path is provided, search $PATH.
7284          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7285$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7286          # Extract the first word of "$tool_basename", so it can be a program name with args.
7287set dummy $tool_basename; ac_word=$2
7288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7289$as_echo_n "checking for $ac_word... " >&6; }
7290if ${ac_cv_path_DIRNAME+:} false; then :
7291  $as_echo_n "(cached) " >&6
7292else
7293  case $DIRNAME in
7294  [\\/]* | ?:[\\/]*)
7295  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7296  ;;
7297  *)
7298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7299for as_dir in $PATH
7300do
7301  IFS=$as_save_IFS
7302  test -z "$as_dir" && as_dir=.
7303    for ac_exec_ext in '' $ac_executable_extensions; do
7304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7305    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7307    break 2
7308  fi
7309done
7310  done
7311IFS=$as_save_IFS
7312
7313  ;;
7314esac
7315fi
7316DIRNAME=$ac_cv_path_DIRNAME
7317if test -n "$DIRNAME"; then
7318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7319$as_echo "$DIRNAME" >&6; }
7320else
7321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7322$as_echo "no" >&6; }
7323fi
7324
7325
7326          if test "x$DIRNAME" = x; then
7327            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7328          fi
7329        else
7330          # Otherwise we believe it is a complete path. Use it as it is.
7331          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7332$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7333          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7334$as_echo_n "checking for DIRNAME... " >&6; }
7335          if test ! -x "$tool_specified"; then
7336            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7337$as_echo "not found" >&6; }
7338            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7339          fi
7340          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7341$as_echo "$tool_specified" >&6; }
7342        fi
7343      fi
7344    fi
7345
7346  fi
7347
7348
7349
7350  if test "x$DIRNAME" = x; then
7351    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7352  fi
7353
7354
7355
7356
7357
7358  # Publish this variable in the help.
7359
7360
7361  if [ -z "${ECHO+x}" ]; then
7362    # The variable is not set by user, try to locate tool using the code snippet
7363    for ac_prog in echo
7364do
7365  # Extract the first word of "$ac_prog", so it can be a program name with args.
7366set dummy $ac_prog; ac_word=$2
7367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7368$as_echo_n "checking for $ac_word... " >&6; }
7369if ${ac_cv_path_ECHO+:} false; then :
7370  $as_echo_n "(cached) " >&6
7371else
7372  case $ECHO in
7373  [\\/]* | ?:[\\/]*)
7374  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7375  ;;
7376  *)
7377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7378for as_dir in $PATH
7379do
7380  IFS=$as_save_IFS
7381  test -z "$as_dir" && as_dir=.
7382    for ac_exec_ext in '' $ac_executable_extensions; do
7383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7384    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7386    break 2
7387  fi
7388done
7389  done
7390IFS=$as_save_IFS
7391
7392  ;;
7393esac
7394fi
7395ECHO=$ac_cv_path_ECHO
7396if test -n "$ECHO"; then
7397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7398$as_echo "$ECHO" >&6; }
7399else
7400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7401$as_echo "no" >&6; }
7402fi
7403
7404
7405  test -n "$ECHO" && break
7406done
7407
7408  else
7409    # The variable is set, but is it from the command line or the environment?
7410
7411    # Try to remove the string !ECHO! from our list.
7412    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7413    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7414      # If it failed, the variable was not from the command line. Ignore it,
7415      # but warn the user (except for BASH, which is always set by the calling BASH).
7416      if test "xECHO" != xBASH; then
7417        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7418$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7419      fi
7420      # Try to locate tool using the code snippet
7421      for ac_prog in echo
7422do
7423  # Extract the first word of "$ac_prog", so it can be a program name with args.
7424set dummy $ac_prog; ac_word=$2
7425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7426$as_echo_n "checking for $ac_word... " >&6; }
7427if ${ac_cv_path_ECHO+:} false; then :
7428  $as_echo_n "(cached) " >&6
7429else
7430  case $ECHO in
7431  [\\/]* | ?:[\\/]*)
7432  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7433  ;;
7434  *)
7435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7436for as_dir in $PATH
7437do
7438  IFS=$as_save_IFS
7439  test -z "$as_dir" && as_dir=.
7440    for ac_exec_ext in '' $ac_executable_extensions; do
7441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7442    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7444    break 2
7445  fi
7446done
7447  done
7448IFS=$as_save_IFS
7449
7450  ;;
7451esac
7452fi
7453ECHO=$ac_cv_path_ECHO
7454if test -n "$ECHO"; then
7455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7456$as_echo "$ECHO" >&6; }
7457else
7458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7459$as_echo "no" >&6; }
7460fi
7461
7462
7463  test -n "$ECHO" && break
7464done
7465
7466    else
7467      # If it succeeded, then it was overridden by the user. We will use it
7468      # for the tool.
7469
7470      # First remove it from the list of overridden variables, so we can test
7471      # for unknown variables in the end.
7472      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7473
7474      # Check if we try to supply an empty value
7475      if test "x$ECHO" = x; then
7476        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7477$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7478        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7479$as_echo_n "checking for ECHO... " >&6; }
7480        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7481$as_echo "disabled" >&6; }
7482      else
7483        # Check if the provided tool contains a complete path.
7484        tool_specified="$ECHO"
7485        tool_basename="${tool_specified##*/}"
7486        if test "x$tool_basename" = "x$tool_specified"; then
7487          # A command without a complete path is provided, search $PATH.
7488          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7489$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7490          # Extract the first word of "$tool_basename", so it can be a program name with args.
7491set dummy $tool_basename; ac_word=$2
7492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7493$as_echo_n "checking for $ac_word... " >&6; }
7494if ${ac_cv_path_ECHO+:} false; then :
7495  $as_echo_n "(cached) " >&6
7496else
7497  case $ECHO in
7498  [\\/]* | ?:[\\/]*)
7499  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7500  ;;
7501  *)
7502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7503for as_dir in $PATH
7504do
7505  IFS=$as_save_IFS
7506  test -z "$as_dir" && as_dir=.
7507    for ac_exec_ext in '' $ac_executable_extensions; do
7508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7509    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7511    break 2
7512  fi
7513done
7514  done
7515IFS=$as_save_IFS
7516
7517  ;;
7518esac
7519fi
7520ECHO=$ac_cv_path_ECHO
7521if test -n "$ECHO"; then
7522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7523$as_echo "$ECHO" >&6; }
7524else
7525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7526$as_echo "no" >&6; }
7527fi
7528
7529
7530          if test "x$ECHO" = x; then
7531            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7532          fi
7533        else
7534          # Otherwise we believe it is a complete path. Use it as it is.
7535          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7536$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7537          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7538$as_echo_n "checking for ECHO... " >&6; }
7539          if test ! -x "$tool_specified"; then
7540            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7541$as_echo "not found" >&6; }
7542            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7543          fi
7544          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7545$as_echo "$tool_specified" >&6; }
7546        fi
7547      fi
7548    fi
7549
7550  fi
7551
7552
7553
7554  if test "x$ECHO" = x; then
7555    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7556  fi
7557
7558
7559
7560
7561
7562  # Publish this variable in the help.
7563
7564
7565  if [ -z "${EXPR+x}" ]; then
7566    # The variable is not set by user, try to locate tool using the code snippet
7567    for ac_prog in expr
7568do
7569  # Extract the first word of "$ac_prog", so it can be a program name with args.
7570set dummy $ac_prog; ac_word=$2
7571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7572$as_echo_n "checking for $ac_word... " >&6; }
7573if ${ac_cv_path_EXPR+:} false; then :
7574  $as_echo_n "(cached) " >&6
7575else
7576  case $EXPR in
7577  [\\/]* | ?:[\\/]*)
7578  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7579  ;;
7580  *)
7581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7582for as_dir in $PATH
7583do
7584  IFS=$as_save_IFS
7585  test -z "$as_dir" && as_dir=.
7586    for ac_exec_ext in '' $ac_executable_extensions; do
7587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7588    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7590    break 2
7591  fi
7592done
7593  done
7594IFS=$as_save_IFS
7595
7596  ;;
7597esac
7598fi
7599EXPR=$ac_cv_path_EXPR
7600if test -n "$EXPR"; then
7601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7602$as_echo "$EXPR" >&6; }
7603else
7604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7605$as_echo "no" >&6; }
7606fi
7607
7608
7609  test -n "$EXPR" && break
7610done
7611
7612  else
7613    # The variable is set, but is it from the command line or the environment?
7614
7615    # Try to remove the string !EXPR! from our list.
7616    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7617    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7618      # If it failed, the variable was not from the command line. Ignore it,
7619      # but warn the user (except for BASH, which is always set by the calling BASH).
7620      if test "xEXPR" != xBASH; then
7621        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7622$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7623      fi
7624      # Try to locate tool using the code snippet
7625      for ac_prog in expr
7626do
7627  # Extract the first word of "$ac_prog", so it can be a program name with args.
7628set dummy $ac_prog; ac_word=$2
7629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7630$as_echo_n "checking for $ac_word... " >&6; }
7631if ${ac_cv_path_EXPR+:} false; then :
7632  $as_echo_n "(cached) " >&6
7633else
7634  case $EXPR in
7635  [\\/]* | ?:[\\/]*)
7636  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7637  ;;
7638  *)
7639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7640for as_dir in $PATH
7641do
7642  IFS=$as_save_IFS
7643  test -z "$as_dir" && as_dir=.
7644    for ac_exec_ext in '' $ac_executable_extensions; do
7645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7646    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7648    break 2
7649  fi
7650done
7651  done
7652IFS=$as_save_IFS
7653
7654  ;;
7655esac
7656fi
7657EXPR=$ac_cv_path_EXPR
7658if test -n "$EXPR"; then
7659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7660$as_echo "$EXPR" >&6; }
7661else
7662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7663$as_echo "no" >&6; }
7664fi
7665
7666
7667  test -n "$EXPR" && break
7668done
7669
7670    else
7671      # If it succeeded, then it was overridden by the user. We will use it
7672      # for the tool.
7673
7674      # First remove it from the list of overridden variables, so we can test
7675      # for unknown variables in the end.
7676      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7677
7678      # Check if we try to supply an empty value
7679      if test "x$EXPR" = x; then
7680        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7681$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7682        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7683$as_echo_n "checking for EXPR... " >&6; }
7684        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7685$as_echo "disabled" >&6; }
7686      else
7687        # Check if the provided tool contains a complete path.
7688        tool_specified="$EXPR"
7689        tool_basename="${tool_specified##*/}"
7690        if test "x$tool_basename" = "x$tool_specified"; then
7691          # A command without a complete path is provided, search $PATH.
7692          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7693$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7694          # Extract the first word of "$tool_basename", so it can be a program name with args.
7695set dummy $tool_basename; ac_word=$2
7696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7697$as_echo_n "checking for $ac_word... " >&6; }
7698if ${ac_cv_path_EXPR+:} false; then :
7699  $as_echo_n "(cached) " >&6
7700else
7701  case $EXPR in
7702  [\\/]* | ?:[\\/]*)
7703  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7704  ;;
7705  *)
7706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7707for as_dir in $PATH
7708do
7709  IFS=$as_save_IFS
7710  test -z "$as_dir" && as_dir=.
7711    for ac_exec_ext in '' $ac_executable_extensions; do
7712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7713    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7715    break 2
7716  fi
7717done
7718  done
7719IFS=$as_save_IFS
7720
7721  ;;
7722esac
7723fi
7724EXPR=$ac_cv_path_EXPR
7725if test -n "$EXPR"; then
7726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7727$as_echo "$EXPR" >&6; }
7728else
7729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7730$as_echo "no" >&6; }
7731fi
7732
7733
7734          if test "x$EXPR" = x; then
7735            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7736          fi
7737        else
7738          # Otherwise we believe it is a complete path. Use it as it is.
7739          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7740$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7741          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7742$as_echo_n "checking for EXPR... " >&6; }
7743          if test ! -x "$tool_specified"; then
7744            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7745$as_echo "not found" >&6; }
7746            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7747          fi
7748          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7749$as_echo "$tool_specified" >&6; }
7750        fi
7751      fi
7752    fi
7753
7754  fi
7755
7756
7757
7758  if test "x$EXPR" = x; then
7759    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7760  fi
7761
7762
7763
7764
7765
7766  # Publish this variable in the help.
7767
7768
7769  if [ -z "${FILE+x}" ]; then
7770    # The variable is not set by user, try to locate tool using the code snippet
7771    for ac_prog in file
7772do
7773  # Extract the first word of "$ac_prog", so it can be a program name with args.
7774set dummy $ac_prog; ac_word=$2
7775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7776$as_echo_n "checking for $ac_word... " >&6; }
7777if ${ac_cv_path_FILE+:} false; then :
7778  $as_echo_n "(cached) " >&6
7779else
7780  case $FILE in
7781  [\\/]* | ?:[\\/]*)
7782  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7783  ;;
7784  *)
7785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7786for as_dir in $PATH
7787do
7788  IFS=$as_save_IFS
7789  test -z "$as_dir" && as_dir=.
7790    for ac_exec_ext in '' $ac_executable_extensions; do
7791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7792    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7794    break 2
7795  fi
7796done
7797  done
7798IFS=$as_save_IFS
7799
7800  ;;
7801esac
7802fi
7803FILE=$ac_cv_path_FILE
7804if test -n "$FILE"; then
7805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7806$as_echo "$FILE" >&6; }
7807else
7808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7809$as_echo "no" >&6; }
7810fi
7811
7812
7813  test -n "$FILE" && break
7814done
7815
7816  else
7817    # The variable is set, but is it from the command line or the environment?
7818
7819    # Try to remove the string !FILE! from our list.
7820    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7821    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7822      # If it failed, the variable was not from the command line. Ignore it,
7823      # but warn the user (except for BASH, which is always set by the calling BASH).
7824      if test "xFILE" != xBASH; then
7825        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7826$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7827      fi
7828      # Try to locate tool using the code snippet
7829      for ac_prog in file
7830do
7831  # Extract the first word of "$ac_prog", so it can be a program name with args.
7832set dummy $ac_prog; ac_word=$2
7833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7834$as_echo_n "checking for $ac_word... " >&6; }
7835if ${ac_cv_path_FILE+:} false; then :
7836  $as_echo_n "(cached) " >&6
7837else
7838  case $FILE in
7839  [\\/]* | ?:[\\/]*)
7840  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7841  ;;
7842  *)
7843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7844for as_dir in $PATH
7845do
7846  IFS=$as_save_IFS
7847  test -z "$as_dir" && as_dir=.
7848    for ac_exec_ext in '' $ac_executable_extensions; do
7849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7850    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7852    break 2
7853  fi
7854done
7855  done
7856IFS=$as_save_IFS
7857
7858  ;;
7859esac
7860fi
7861FILE=$ac_cv_path_FILE
7862if test -n "$FILE"; then
7863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7864$as_echo "$FILE" >&6; }
7865else
7866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7867$as_echo "no" >&6; }
7868fi
7869
7870
7871  test -n "$FILE" && break
7872done
7873
7874    else
7875      # If it succeeded, then it was overridden by the user. We will use it
7876      # for the tool.
7877
7878      # First remove it from the list of overridden variables, so we can test
7879      # for unknown variables in the end.
7880      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7881
7882      # Check if we try to supply an empty value
7883      if test "x$FILE" = x; then
7884        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7885$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7886        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7887$as_echo_n "checking for FILE... " >&6; }
7888        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7889$as_echo "disabled" >&6; }
7890      else
7891        # Check if the provided tool contains a complete path.
7892        tool_specified="$FILE"
7893        tool_basename="${tool_specified##*/}"
7894        if test "x$tool_basename" = "x$tool_specified"; then
7895          # A command without a complete path is provided, search $PATH.
7896          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7897$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7898          # Extract the first word of "$tool_basename", so it can be a program name with args.
7899set dummy $tool_basename; ac_word=$2
7900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7901$as_echo_n "checking for $ac_word... " >&6; }
7902if ${ac_cv_path_FILE+:} false; then :
7903  $as_echo_n "(cached) " >&6
7904else
7905  case $FILE in
7906  [\\/]* | ?:[\\/]*)
7907  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7908  ;;
7909  *)
7910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7911for as_dir in $PATH
7912do
7913  IFS=$as_save_IFS
7914  test -z "$as_dir" && as_dir=.
7915    for ac_exec_ext in '' $ac_executable_extensions; do
7916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7917    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7919    break 2
7920  fi
7921done
7922  done
7923IFS=$as_save_IFS
7924
7925  ;;
7926esac
7927fi
7928FILE=$ac_cv_path_FILE
7929if test -n "$FILE"; then
7930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7931$as_echo "$FILE" >&6; }
7932else
7933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7934$as_echo "no" >&6; }
7935fi
7936
7937
7938          if test "x$FILE" = x; then
7939            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7940          fi
7941        else
7942          # Otherwise we believe it is a complete path. Use it as it is.
7943          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7944$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7945          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7946$as_echo_n "checking for FILE... " >&6; }
7947          if test ! -x "$tool_specified"; then
7948            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7949$as_echo "not found" >&6; }
7950            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7951          fi
7952          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7953$as_echo "$tool_specified" >&6; }
7954        fi
7955      fi
7956    fi
7957
7958  fi
7959
7960
7961
7962  if test "x$FILE" = x; then
7963    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7964  fi
7965
7966
7967
7968
7969
7970  # Publish this variable in the help.
7971
7972
7973  if [ -z "${FIND+x}" ]; then
7974    # The variable is not set by user, try to locate tool using the code snippet
7975    for ac_prog in find
7976do
7977  # Extract the first word of "$ac_prog", so it can be a program name with args.
7978set dummy $ac_prog; ac_word=$2
7979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7980$as_echo_n "checking for $ac_word... " >&6; }
7981if ${ac_cv_path_FIND+:} false; then :
7982  $as_echo_n "(cached) " >&6
7983else
7984  case $FIND in
7985  [\\/]* | ?:[\\/]*)
7986  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7987  ;;
7988  *)
7989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7990for as_dir in $PATH
7991do
7992  IFS=$as_save_IFS
7993  test -z "$as_dir" && as_dir=.
7994    for ac_exec_ext in '' $ac_executable_extensions; do
7995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7996    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7998    break 2
7999  fi
8000done
8001  done
8002IFS=$as_save_IFS
8003
8004  ;;
8005esac
8006fi
8007FIND=$ac_cv_path_FIND
8008if test -n "$FIND"; then
8009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8010$as_echo "$FIND" >&6; }
8011else
8012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8013$as_echo "no" >&6; }
8014fi
8015
8016
8017  test -n "$FIND" && break
8018done
8019
8020  else
8021    # The variable is set, but is it from the command line or the environment?
8022
8023    # Try to remove the string !FIND! from our list.
8024    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8025    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8026      # If it failed, the variable was not from the command line. Ignore it,
8027      # but warn the user (except for BASH, which is always set by the calling BASH).
8028      if test "xFIND" != xBASH; then
8029        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8030$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8031      fi
8032      # Try to locate tool using the code snippet
8033      for ac_prog in find
8034do
8035  # Extract the first word of "$ac_prog", so it can be a program name with args.
8036set dummy $ac_prog; ac_word=$2
8037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8038$as_echo_n "checking for $ac_word... " >&6; }
8039if ${ac_cv_path_FIND+:} false; then :
8040  $as_echo_n "(cached) " >&6
8041else
8042  case $FIND in
8043  [\\/]* | ?:[\\/]*)
8044  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8045  ;;
8046  *)
8047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8048for as_dir in $PATH
8049do
8050  IFS=$as_save_IFS
8051  test -z "$as_dir" && as_dir=.
8052    for ac_exec_ext in '' $ac_executable_extensions; do
8053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8054    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8056    break 2
8057  fi
8058done
8059  done
8060IFS=$as_save_IFS
8061
8062  ;;
8063esac
8064fi
8065FIND=$ac_cv_path_FIND
8066if test -n "$FIND"; then
8067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8068$as_echo "$FIND" >&6; }
8069else
8070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8071$as_echo "no" >&6; }
8072fi
8073
8074
8075  test -n "$FIND" && break
8076done
8077
8078    else
8079      # If it succeeded, then it was overridden by the user. We will use it
8080      # for the tool.
8081
8082      # First remove it from the list of overridden variables, so we can test
8083      # for unknown variables in the end.
8084      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8085
8086      # Check if we try to supply an empty value
8087      if test "x$FIND" = x; then
8088        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8089$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8090        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8091$as_echo_n "checking for FIND... " >&6; }
8092        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8093$as_echo "disabled" >&6; }
8094      else
8095        # Check if the provided tool contains a complete path.
8096        tool_specified="$FIND"
8097        tool_basename="${tool_specified##*/}"
8098        if test "x$tool_basename" = "x$tool_specified"; then
8099          # A command without a complete path is provided, search $PATH.
8100          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8101$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8102          # Extract the first word of "$tool_basename", so it can be a program name with args.
8103set dummy $tool_basename; ac_word=$2
8104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8105$as_echo_n "checking for $ac_word... " >&6; }
8106if ${ac_cv_path_FIND+:} false; then :
8107  $as_echo_n "(cached) " >&6
8108else
8109  case $FIND in
8110  [\\/]* | ?:[\\/]*)
8111  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8112  ;;
8113  *)
8114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8115for as_dir in $PATH
8116do
8117  IFS=$as_save_IFS
8118  test -z "$as_dir" && as_dir=.
8119    for ac_exec_ext in '' $ac_executable_extensions; do
8120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8121    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8123    break 2
8124  fi
8125done
8126  done
8127IFS=$as_save_IFS
8128
8129  ;;
8130esac
8131fi
8132FIND=$ac_cv_path_FIND
8133if test -n "$FIND"; then
8134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8135$as_echo "$FIND" >&6; }
8136else
8137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8138$as_echo "no" >&6; }
8139fi
8140
8141
8142          if test "x$FIND" = x; then
8143            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8144          fi
8145        else
8146          # Otherwise we believe it is a complete path. Use it as it is.
8147          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8148$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8149          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8150$as_echo_n "checking for FIND... " >&6; }
8151          if test ! -x "$tool_specified"; then
8152            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8153$as_echo "not found" >&6; }
8154            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8155          fi
8156          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8157$as_echo "$tool_specified" >&6; }
8158        fi
8159      fi
8160    fi
8161
8162  fi
8163
8164
8165
8166  if test "x$FIND" = x; then
8167    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8168  fi
8169
8170
8171
8172
8173
8174  # Publish this variable in the help.
8175
8176
8177  if [ -z "${HEAD+x}" ]; then
8178    # The variable is not set by user, try to locate tool using the code snippet
8179    for ac_prog in head
8180do
8181  # Extract the first word of "$ac_prog", so it can be a program name with args.
8182set dummy $ac_prog; ac_word=$2
8183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8184$as_echo_n "checking for $ac_word... " >&6; }
8185if ${ac_cv_path_HEAD+:} false; then :
8186  $as_echo_n "(cached) " >&6
8187else
8188  case $HEAD in
8189  [\\/]* | ?:[\\/]*)
8190  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8191  ;;
8192  *)
8193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8194for as_dir in $PATH
8195do
8196  IFS=$as_save_IFS
8197  test -z "$as_dir" && as_dir=.
8198    for ac_exec_ext in '' $ac_executable_extensions; do
8199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8200    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8202    break 2
8203  fi
8204done
8205  done
8206IFS=$as_save_IFS
8207
8208  ;;
8209esac
8210fi
8211HEAD=$ac_cv_path_HEAD
8212if test -n "$HEAD"; then
8213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8214$as_echo "$HEAD" >&6; }
8215else
8216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8217$as_echo "no" >&6; }
8218fi
8219
8220
8221  test -n "$HEAD" && break
8222done
8223
8224  else
8225    # The variable is set, but is it from the command line or the environment?
8226
8227    # Try to remove the string !HEAD! from our list.
8228    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8229    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8230      # If it failed, the variable was not from the command line. Ignore it,
8231      # but warn the user (except for BASH, which is always set by the calling BASH).
8232      if test "xHEAD" != xBASH; then
8233        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8234$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8235      fi
8236      # Try to locate tool using the code snippet
8237      for ac_prog in head
8238do
8239  # Extract the first word of "$ac_prog", so it can be a program name with args.
8240set dummy $ac_prog; ac_word=$2
8241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8242$as_echo_n "checking for $ac_word... " >&6; }
8243if ${ac_cv_path_HEAD+:} false; then :
8244  $as_echo_n "(cached) " >&6
8245else
8246  case $HEAD in
8247  [\\/]* | ?:[\\/]*)
8248  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8249  ;;
8250  *)
8251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8252for as_dir in $PATH
8253do
8254  IFS=$as_save_IFS
8255  test -z "$as_dir" && as_dir=.
8256    for ac_exec_ext in '' $ac_executable_extensions; do
8257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8258    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8260    break 2
8261  fi
8262done
8263  done
8264IFS=$as_save_IFS
8265
8266  ;;
8267esac
8268fi
8269HEAD=$ac_cv_path_HEAD
8270if test -n "$HEAD"; then
8271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8272$as_echo "$HEAD" >&6; }
8273else
8274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8275$as_echo "no" >&6; }
8276fi
8277
8278
8279  test -n "$HEAD" && break
8280done
8281
8282    else
8283      # If it succeeded, then it was overridden by the user. We will use it
8284      # for the tool.
8285
8286      # First remove it from the list of overridden variables, so we can test
8287      # for unknown variables in the end.
8288      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8289
8290      # Check if we try to supply an empty value
8291      if test "x$HEAD" = x; then
8292        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8293$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8294        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8295$as_echo_n "checking for HEAD... " >&6; }
8296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8297$as_echo "disabled" >&6; }
8298      else
8299        # Check if the provided tool contains a complete path.
8300        tool_specified="$HEAD"
8301        tool_basename="${tool_specified##*/}"
8302        if test "x$tool_basename" = "x$tool_specified"; then
8303          # A command without a complete path is provided, search $PATH.
8304          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8305$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8306          # Extract the first word of "$tool_basename", so it can be a program name with args.
8307set dummy $tool_basename; ac_word=$2
8308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8309$as_echo_n "checking for $ac_word... " >&6; }
8310if ${ac_cv_path_HEAD+:} false; then :
8311  $as_echo_n "(cached) " >&6
8312else
8313  case $HEAD in
8314  [\\/]* | ?:[\\/]*)
8315  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8316  ;;
8317  *)
8318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8319for as_dir in $PATH
8320do
8321  IFS=$as_save_IFS
8322  test -z "$as_dir" && as_dir=.
8323    for ac_exec_ext in '' $ac_executable_extensions; do
8324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8325    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8327    break 2
8328  fi
8329done
8330  done
8331IFS=$as_save_IFS
8332
8333  ;;
8334esac
8335fi
8336HEAD=$ac_cv_path_HEAD
8337if test -n "$HEAD"; then
8338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8339$as_echo "$HEAD" >&6; }
8340else
8341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8342$as_echo "no" >&6; }
8343fi
8344
8345
8346          if test "x$HEAD" = x; then
8347            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8348          fi
8349        else
8350          # Otherwise we believe it is a complete path. Use it as it is.
8351          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8352$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8353          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8354$as_echo_n "checking for HEAD... " >&6; }
8355          if test ! -x "$tool_specified"; then
8356            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8357$as_echo "not found" >&6; }
8358            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8359          fi
8360          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8361$as_echo "$tool_specified" >&6; }
8362        fi
8363      fi
8364    fi
8365
8366  fi
8367
8368
8369
8370  if test "x$HEAD" = x; then
8371    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8372  fi
8373
8374
8375
8376
8377
8378  # Publish this variable in the help.
8379
8380
8381  if [ -z "${LN+x}" ]; then
8382    # The variable is not set by user, try to locate tool using the code snippet
8383    for ac_prog in ln
8384do
8385  # Extract the first word of "$ac_prog", so it can be a program name with args.
8386set dummy $ac_prog; ac_word=$2
8387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8388$as_echo_n "checking for $ac_word... " >&6; }
8389if ${ac_cv_path_LN+:} false; then :
8390  $as_echo_n "(cached) " >&6
8391else
8392  case $LN in
8393  [\\/]* | ?:[\\/]*)
8394  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8395  ;;
8396  *)
8397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8398for as_dir in $PATH
8399do
8400  IFS=$as_save_IFS
8401  test -z "$as_dir" && as_dir=.
8402    for ac_exec_ext in '' $ac_executable_extensions; do
8403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8404    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8406    break 2
8407  fi
8408done
8409  done
8410IFS=$as_save_IFS
8411
8412  ;;
8413esac
8414fi
8415LN=$ac_cv_path_LN
8416if test -n "$LN"; then
8417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8418$as_echo "$LN" >&6; }
8419else
8420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8421$as_echo "no" >&6; }
8422fi
8423
8424
8425  test -n "$LN" && break
8426done
8427
8428  else
8429    # The variable is set, but is it from the command line or the environment?
8430
8431    # Try to remove the string !LN! from our list.
8432    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8433    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8434      # If it failed, the variable was not from the command line. Ignore it,
8435      # but warn the user (except for BASH, which is always set by the calling BASH).
8436      if test "xLN" != xBASH; then
8437        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8438$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8439      fi
8440      # Try to locate tool using the code snippet
8441      for ac_prog in ln
8442do
8443  # Extract the first word of "$ac_prog", so it can be a program name with args.
8444set dummy $ac_prog; ac_word=$2
8445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8446$as_echo_n "checking for $ac_word... " >&6; }
8447if ${ac_cv_path_LN+:} false; then :
8448  $as_echo_n "(cached) " >&6
8449else
8450  case $LN in
8451  [\\/]* | ?:[\\/]*)
8452  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8453  ;;
8454  *)
8455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8456for as_dir in $PATH
8457do
8458  IFS=$as_save_IFS
8459  test -z "$as_dir" && as_dir=.
8460    for ac_exec_ext in '' $ac_executable_extensions; do
8461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8462    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8464    break 2
8465  fi
8466done
8467  done
8468IFS=$as_save_IFS
8469
8470  ;;
8471esac
8472fi
8473LN=$ac_cv_path_LN
8474if test -n "$LN"; then
8475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8476$as_echo "$LN" >&6; }
8477else
8478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8479$as_echo "no" >&6; }
8480fi
8481
8482
8483  test -n "$LN" && break
8484done
8485
8486    else
8487      # If it succeeded, then it was overridden by the user. We will use it
8488      # for the tool.
8489
8490      # First remove it from the list of overridden variables, so we can test
8491      # for unknown variables in the end.
8492      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8493
8494      # Check if we try to supply an empty value
8495      if test "x$LN" = x; then
8496        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8497$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8498        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8499$as_echo_n "checking for LN... " >&6; }
8500        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8501$as_echo "disabled" >&6; }
8502      else
8503        # Check if the provided tool contains a complete path.
8504        tool_specified="$LN"
8505        tool_basename="${tool_specified##*/}"
8506        if test "x$tool_basename" = "x$tool_specified"; then
8507          # A command without a complete path is provided, search $PATH.
8508          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8509$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8510          # Extract the first word of "$tool_basename", so it can be a program name with args.
8511set dummy $tool_basename; ac_word=$2
8512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8513$as_echo_n "checking for $ac_word... " >&6; }
8514if ${ac_cv_path_LN+:} false; then :
8515  $as_echo_n "(cached) " >&6
8516else
8517  case $LN in
8518  [\\/]* | ?:[\\/]*)
8519  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8520  ;;
8521  *)
8522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8523for as_dir in $PATH
8524do
8525  IFS=$as_save_IFS
8526  test -z "$as_dir" && as_dir=.
8527    for ac_exec_ext in '' $ac_executable_extensions; do
8528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8529    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8531    break 2
8532  fi
8533done
8534  done
8535IFS=$as_save_IFS
8536
8537  ;;
8538esac
8539fi
8540LN=$ac_cv_path_LN
8541if test -n "$LN"; then
8542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8543$as_echo "$LN" >&6; }
8544else
8545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8546$as_echo "no" >&6; }
8547fi
8548
8549
8550          if test "x$LN" = x; then
8551            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8552          fi
8553        else
8554          # Otherwise we believe it is a complete path. Use it as it is.
8555          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8556$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8557          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8558$as_echo_n "checking for LN... " >&6; }
8559          if test ! -x "$tool_specified"; then
8560            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8561$as_echo "not found" >&6; }
8562            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8563          fi
8564          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8565$as_echo "$tool_specified" >&6; }
8566        fi
8567      fi
8568    fi
8569
8570  fi
8571
8572
8573
8574  if test "x$LN" = x; then
8575    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8576  fi
8577
8578
8579
8580
8581
8582  # Publish this variable in the help.
8583
8584
8585  if [ -z "${LS+x}" ]; then
8586    # The variable is not set by user, try to locate tool using the code snippet
8587    for ac_prog in ls
8588do
8589  # Extract the first word of "$ac_prog", so it can be a program name with args.
8590set dummy $ac_prog; ac_word=$2
8591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8592$as_echo_n "checking for $ac_word... " >&6; }
8593if ${ac_cv_path_LS+:} false; then :
8594  $as_echo_n "(cached) " >&6
8595else
8596  case $LS in
8597  [\\/]* | ?:[\\/]*)
8598  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8599  ;;
8600  *)
8601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8602for as_dir in $PATH
8603do
8604  IFS=$as_save_IFS
8605  test -z "$as_dir" && as_dir=.
8606    for ac_exec_ext in '' $ac_executable_extensions; do
8607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8608    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8610    break 2
8611  fi
8612done
8613  done
8614IFS=$as_save_IFS
8615
8616  ;;
8617esac
8618fi
8619LS=$ac_cv_path_LS
8620if test -n "$LS"; then
8621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8622$as_echo "$LS" >&6; }
8623else
8624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8625$as_echo "no" >&6; }
8626fi
8627
8628
8629  test -n "$LS" && break
8630done
8631
8632  else
8633    # The variable is set, but is it from the command line or the environment?
8634
8635    # Try to remove the string !LS! from our list.
8636    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8637    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8638      # If it failed, the variable was not from the command line. Ignore it,
8639      # but warn the user (except for BASH, which is always set by the calling BASH).
8640      if test "xLS" != xBASH; then
8641        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8642$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8643      fi
8644      # Try to locate tool using the code snippet
8645      for ac_prog in ls
8646do
8647  # Extract the first word of "$ac_prog", so it can be a program name with args.
8648set dummy $ac_prog; ac_word=$2
8649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8650$as_echo_n "checking for $ac_word... " >&6; }
8651if ${ac_cv_path_LS+:} false; then :
8652  $as_echo_n "(cached) " >&6
8653else
8654  case $LS in
8655  [\\/]* | ?:[\\/]*)
8656  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8657  ;;
8658  *)
8659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8660for as_dir in $PATH
8661do
8662  IFS=$as_save_IFS
8663  test -z "$as_dir" && as_dir=.
8664    for ac_exec_ext in '' $ac_executable_extensions; do
8665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8666    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8668    break 2
8669  fi
8670done
8671  done
8672IFS=$as_save_IFS
8673
8674  ;;
8675esac
8676fi
8677LS=$ac_cv_path_LS
8678if test -n "$LS"; then
8679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8680$as_echo "$LS" >&6; }
8681else
8682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8683$as_echo "no" >&6; }
8684fi
8685
8686
8687  test -n "$LS" && break
8688done
8689
8690    else
8691      # If it succeeded, then it was overridden by the user. We will use it
8692      # for the tool.
8693
8694      # First remove it from the list of overridden variables, so we can test
8695      # for unknown variables in the end.
8696      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8697
8698      # Check if we try to supply an empty value
8699      if test "x$LS" = x; then
8700        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8701$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8702        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8703$as_echo_n "checking for LS... " >&6; }
8704        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8705$as_echo "disabled" >&6; }
8706      else
8707        # Check if the provided tool contains a complete path.
8708        tool_specified="$LS"
8709        tool_basename="${tool_specified##*/}"
8710        if test "x$tool_basename" = "x$tool_specified"; then
8711          # A command without a complete path is provided, search $PATH.
8712          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8713$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8714          # Extract the first word of "$tool_basename", so it can be a program name with args.
8715set dummy $tool_basename; ac_word=$2
8716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8717$as_echo_n "checking for $ac_word... " >&6; }
8718if ${ac_cv_path_LS+:} false; then :
8719  $as_echo_n "(cached) " >&6
8720else
8721  case $LS in
8722  [\\/]* | ?:[\\/]*)
8723  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8724  ;;
8725  *)
8726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8727for as_dir in $PATH
8728do
8729  IFS=$as_save_IFS
8730  test -z "$as_dir" && as_dir=.
8731    for ac_exec_ext in '' $ac_executable_extensions; do
8732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8733    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8735    break 2
8736  fi
8737done
8738  done
8739IFS=$as_save_IFS
8740
8741  ;;
8742esac
8743fi
8744LS=$ac_cv_path_LS
8745if test -n "$LS"; then
8746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8747$as_echo "$LS" >&6; }
8748else
8749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8750$as_echo "no" >&6; }
8751fi
8752
8753
8754          if test "x$LS" = x; then
8755            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8756          fi
8757        else
8758          # Otherwise we believe it is a complete path. Use it as it is.
8759          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8760$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8761          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8762$as_echo_n "checking for LS... " >&6; }
8763          if test ! -x "$tool_specified"; then
8764            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8765$as_echo "not found" >&6; }
8766            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8767          fi
8768          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8769$as_echo "$tool_specified" >&6; }
8770        fi
8771      fi
8772    fi
8773
8774  fi
8775
8776
8777
8778  if test "x$LS" = x; then
8779    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8780  fi
8781
8782
8783
8784
8785
8786  # Publish this variable in the help.
8787
8788
8789  if [ -z "${MKDIR+x}" ]; then
8790    # The variable is not set by user, try to locate tool using the code snippet
8791    for ac_prog in mkdir
8792do
8793  # Extract the first word of "$ac_prog", so it can be a program name with args.
8794set dummy $ac_prog; ac_word=$2
8795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8796$as_echo_n "checking for $ac_word... " >&6; }
8797if ${ac_cv_path_MKDIR+:} false; then :
8798  $as_echo_n "(cached) " >&6
8799else
8800  case $MKDIR in
8801  [\\/]* | ?:[\\/]*)
8802  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8803  ;;
8804  *)
8805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8806for as_dir in $PATH
8807do
8808  IFS=$as_save_IFS
8809  test -z "$as_dir" && as_dir=.
8810    for ac_exec_ext in '' $ac_executable_extensions; do
8811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8812    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8814    break 2
8815  fi
8816done
8817  done
8818IFS=$as_save_IFS
8819
8820  ;;
8821esac
8822fi
8823MKDIR=$ac_cv_path_MKDIR
8824if test -n "$MKDIR"; then
8825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8826$as_echo "$MKDIR" >&6; }
8827else
8828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8829$as_echo "no" >&6; }
8830fi
8831
8832
8833  test -n "$MKDIR" && break
8834done
8835
8836  else
8837    # The variable is set, but is it from the command line or the environment?
8838
8839    # Try to remove the string !MKDIR! from our list.
8840    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8841    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8842      # If it failed, the variable was not from the command line. Ignore it,
8843      # but warn the user (except for BASH, which is always set by the calling BASH).
8844      if test "xMKDIR" != xBASH; then
8845        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8846$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8847      fi
8848      # Try to locate tool using the code snippet
8849      for ac_prog in mkdir
8850do
8851  # Extract the first word of "$ac_prog", so it can be a program name with args.
8852set dummy $ac_prog; ac_word=$2
8853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8854$as_echo_n "checking for $ac_word... " >&6; }
8855if ${ac_cv_path_MKDIR+:} false; then :
8856  $as_echo_n "(cached) " >&6
8857else
8858  case $MKDIR in
8859  [\\/]* | ?:[\\/]*)
8860  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8861  ;;
8862  *)
8863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8864for as_dir in $PATH
8865do
8866  IFS=$as_save_IFS
8867  test -z "$as_dir" && as_dir=.
8868    for ac_exec_ext in '' $ac_executable_extensions; do
8869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8870    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8872    break 2
8873  fi
8874done
8875  done
8876IFS=$as_save_IFS
8877
8878  ;;
8879esac
8880fi
8881MKDIR=$ac_cv_path_MKDIR
8882if test -n "$MKDIR"; then
8883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8884$as_echo "$MKDIR" >&6; }
8885else
8886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8887$as_echo "no" >&6; }
8888fi
8889
8890
8891  test -n "$MKDIR" && break
8892done
8893
8894    else
8895      # If it succeeded, then it was overridden by the user. We will use it
8896      # for the tool.
8897
8898      # First remove it from the list of overridden variables, so we can test
8899      # for unknown variables in the end.
8900      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8901
8902      # Check if we try to supply an empty value
8903      if test "x$MKDIR" = x; then
8904        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8905$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8906        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8907$as_echo_n "checking for MKDIR... " >&6; }
8908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8909$as_echo "disabled" >&6; }
8910      else
8911        # Check if the provided tool contains a complete path.
8912        tool_specified="$MKDIR"
8913        tool_basename="${tool_specified##*/}"
8914        if test "x$tool_basename" = "x$tool_specified"; then
8915          # A command without a complete path is provided, search $PATH.
8916          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8917$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8918          # Extract the first word of "$tool_basename", so it can be a program name with args.
8919set dummy $tool_basename; ac_word=$2
8920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8921$as_echo_n "checking for $ac_word... " >&6; }
8922if ${ac_cv_path_MKDIR+:} false; then :
8923  $as_echo_n "(cached) " >&6
8924else
8925  case $MKDIR in
8926  [\\/]* | ?:[\\/]*)
8927  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8928  ;;
8929  *)
8930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8931for as_dir in $PATH
8932do
8933  IFS=$as_save_IFS
8934  test -z "$as_dir" && as_dir=.
8935    for ac_exec_ext in '' $ac_executable_extensions; do
8936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8937    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8939    break 2
8940  fi
8941done
8942  done
8943IFS=$as_save_IFS
8944
8945  ;;
8946esac
8947fi
8948MKDIR=$ac_cv_path_MKDIR
8949if test -n "$MKDIR"; then
8950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8951$as_echo "$MKDIR" >&6; }
8952else
8953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8954$as_echo "no" >&6; }
8955fi
8956
8957
8958          if test "x$MKDIR" = x; then
8959            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8960          fi
8961        else
8962          # Otherwise we believe it is a complete path. Use it as it is.
8963          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8964$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8965          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8966$as_echo_n "checking for MKDIR... " >&6; }
8967          if test ! -x "$tool_specified"; then
8968            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8969$as_echo "not found" >&6; }
8970            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8971          fi
8972          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8973$as_echo "$tool_specified" >&6; }
8974        fi
8975      fi
8976    fi
8977
8978  fi
8979
8980
8981
8982  if test "x$MKDIR" = x; then
8983    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8984  fi
8985
8986
8987
8988
8989
8990  # Publish this variable in the help.
8991
8992
8993  if [ -z "${MKTEMP+x}" ]; then
8994    # The variable is not set by user, try to locate tool using the code snippet
8995    for ac_prog in mktemp
8996do
8997  # Extract the first word of "$ac_prog", so it can be a program name with args.
8998set dummy $ac_prog; ac_word=$2
8999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9000$as_echo_n "checking for $ac_word... " >&6; }
9001if ${ac_cv_path_MKTEMP+:} false; then :
9002  $as_echo_n "(cached) " >&6
9003else
9004  case $MKTEMP in
9005  [\\/]* | ?:[\\/]*)
9006  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9007  ;;
9008  *)
9009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9010for as_dir in $PATH
9011do
9012  IFS=$as_save_IFS
9013  test -z "$as_dir" && as_dir=.
9014    for ac_exec_ext in '' $ac_executable_extensions; do
9015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9016    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9018    break 2
9019  fi
9020done
9021  done
9022IFS=$as_save_IFS
9023
9024  ;;
9025esac
9026fi
9027MKTEMP=$ac_cv_path_MKTEMP
9028if test -n "$MKTEMP"; then
9029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9030$as_echo "$MKTEMP" >&6; }
9031else
9032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9033$as_echo "no" >&6; }
9034fi
9035
9036
9037  test -n "$MKTEMP" && break
9038done
9039
9040  else
9041    # The variable is set, but is it from the command line or the environment?
9042
9043    # Try to remove the string !MKTEMP! from our list.
9044    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9045    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9046      # If it failed, the variable was not from the command line. Ignore it,
9047      # but warn the user (except for BASH, which is always set by the calling BASH).
9048      if test "xMKTEMP" != xBASH; then
9049        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9050$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9051      fi
9052      # Try to locate tool using the code snippet
9053      for ac_prog in mktemp
9054do
9055  # Extract the first word of "$ac_prog", so it can be a program name with args.
9056set dummy $ac_prog; ac_word=$2
9057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9058$as_echo_n "checking for $ac_word... " >&6; }
9059if ${ac_cv_path_MKTEMP+:} false; then :
9060  $as_echo_n "(cached) " >&6
9061else
9062  case $MKTEMP in
9063  [\\/]* | ?:[\\/]*)
9064  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9065  ;;
9066  *)
9067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9068for as_dir in $PATH
9069do
9070  IFS=$as_save_IFS
9071  test -z "$as_dir" && as_dir=.
9072    for ac_exec_ext in '' $ac_executable_extensions; do
9073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9074    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9076    break 2
9077  fi
9078done
9079  done
9080IFS=$as_save_IFS
9081
9082  ;;
9083esac
9084fi
9085MKTEMP=$ac_cv_path_MKTEMP
9086if test -n "$MKTEMP"; then
9087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9088$as_echo "$MKTEMP" >&6; }
9089else
9090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9091$as_echo "no" >&6; }
9092fi
9093
9094
9095  test -n "$MKTEMP" && break
9096done
9097
9098    else
9099      # If it succeeded, then it was overridden by the user. We will use it
9100      # for the tool.
9101
9102      # First remove it from the list of overridden variables, so we can test
9103      # for unknown variables in the end.
9104      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9105
9106      # Check if we try to supply an empty value
9107      if test "x$MKTEMP" = x; then
9108        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9109$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9110        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9111$as_echo_n "checking for MKTEMP... " >&6; }
9112        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9113$as_echo "disabled" >&6; }
9114      else
9115        # Check if the provided tool contains a complete path.
9116        tool_specified="$MKTEMP"
9117        tool_basename="${tool_specified##*/}"
9118        if test "x$tool_basename" = "x$tool_specified"; then
9119          # A command without a complete path is provided, search $PATH.
9120          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9121$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9122          # Extract the first word of "$tool_basename", so it can be a program name with args.
9123set dummy $tool_basename; ac_word=$2
9124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9125$as_echo_n "checking for $ac_word... " >&6; }
9126if ${ac_cv_path_MKTEMP+:} false; then :
9127  $as_echo_n "(cached) " >&6
9128else
9129  case $MKTEMP in
9130  [\\/]* | ?:[\\/]*)
9131  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9132  ;;
9133  *)
9134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9135for as_dir in $PATH
9136do
9137  IFS=$as_save_IFS
9138  test -z "$as_dir" && as_dir=.
9139    for ac_exec_ext in '' $ac_executable_extensions; do
9140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9141    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9143    break 2
9144  fi
9145done
9146  done
9147IFS=$as_save_IFS
9148
9149  ;;
9150esac
9151fi
9152MKTEMP=$ac_cv_path_MKTEMP
9153if test -n "$MKTEMP"; then
9154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9155$as_echo "$MKTEMP" >&6; }
9156else
9157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9158$as_echo "no" >&6; }
9159fi
9160
9161
9162          if test "x$MKTEMP" = x; then
9163            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9164          fi
9165        else
9166          # Otherwise we believe it is a complete path. Use it as it is.
9167          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9168$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9169          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9170$as_echo_n "checking for MKTEMP... " >&6; }
9171          if test ! -x "$tool_specified"; then
9172            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9173$as_echo "not found" >&6; }
9174            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9175          fi
9176          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9177$as_echo "$tool_specified" >&6; }
9178        fi
9179      fi
9180    fi
9181
9182  fi
9183
9184
9185
9186  if test "x$MKTEMP" = x; then
9187    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9188  fi
9189
9190
9191
9192
9193
9194  # Publish this variable in the help.
9195
9196
9197  if [ -z "${MV+x}" ]; then
9198    # The variable is not set by user, try to locate tool using the code snippet
9199    for ac_prog in mv
9200do
9201  # Extract the first word of "$ac_prog", so it can be a program name with args.
9202set dummy $ac_prog; ac_word=$2
9203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9204$as_echo_n "checking for $ac_word... " >&6; }
9205if ${ac_cv_path_MV+:} false; then :
9206  $as_echo_n "(cached) " >&6
9207else
9208  case $MV in
9209  [\\/]* | ?:[\\/]*)
9210  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9211  ;;
9212  *)
9213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9214for as_dir in $PATH
9215do
9216  IFS=$as_save_IFS
9217  test -z "$as_dir" && as_dir=.
9218    for ac_exec_ext in '' $ac_executable_extensions; do
9219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9220    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9222    break 2
9223  fi
9224done
9225  done
9226IFS=$as_save_IFS
9227
9228  ;;
9229esac
9230fi
9231MV=$ac_cv_path_MV
9232if test -n "$MV"; then
9233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9234$as_echo "$MV" >&6; }
9235else
9236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9237$as_echo "no" >&6; }
9238fi
9239
9240
9241  test -n "$MV" && break
9242done
9243
9244  else
9245    # The variable is set, but is it from the command line or the environment?
9246
9247    # Try to remove the string !MV! from our list.
9248    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9249    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9250      # If it failed, the variable was not from the command line. Ignore it,
9251      # but warn the user (except for BASH, which is always set by the calling BASH).
9252      if test "xMV" != xBASH; then
9253        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9254$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9255      fi
9256      # Try to locate tool using the code snippet
9257      for ac_prog in mv
9258do
9259  # Extract the first word of "$ac_prog", so it can be a program name with args.
9260set dummy $ac_prog; ac_word=$2
9261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9262$as_echo_n "checking for $ac_word... " >&6; }
9263if ${ac_cv_path_MV+:} false; then :
9264  $as_echo_n "(cached) " >&6
9265else
9266  case $MV in
9267  [\\/]* | ?:[\\/]*)
9268  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9269  ;;
9270  *)
9271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9272for as_dir in $PATH
9273do
9274  IFS=$as_save_IFS
9275  test -z "$as_dir" && as_dir=.
9276    for ac_exec_ext in '' $ac_executable_extensions; do
9277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9278    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9280    break 2
9281  fi
9282done
9283  done
9284IFS=$as_save_IFS
9285
9286  ;;
9287esac
9288fi
9289MV=$ac_cv_path_MV
9290if test -n "$MV"; then
9291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9292$as_echo "$MV" >&6; }
9293else
9294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9295$as_echo "no" >&6; }
9296fi
9297
9298
9299  test -n "$MV" && break
9300done
9301
9302    else
9303      # If it succeeded, then it was overridden by the user. We will use it
9304      # for the tool.
9305
9306      # First remove it from the list of overridden variables, so we can test
9307      # for unknown variables in the end.
9308      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9309
9310      # Check if we try to supply an empty value
9311      if test "x$MV" = x; then
9312        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9313$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9314        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9315$as_echo_n "checking for MV... " >&6; }
9316        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9317$as_echo "disabled" >&6; }
9318      else
9319        # Check if the provided tool contains a complete path.
9320        tool_specified="$MV"
9321        tool_basename="${tool_specified##*/}"
9322        if test "x$tool_basename" = "x$tool_specified"; then
9323          # A command without a complete path is provided, search $PATH.
9324          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9325$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9326          # Extract the first word of "$tool_basename", so it can be a program name with args.
9327set dummy $tool_basename; ac_word=$2
9328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9329$as_echo_n "checking for $ac_word... " >&6; }
9330if ${ac_cv_path_MV+:} false; then :
9331  $as_echo_n "(cached) " >&6
9332else
9333  case $MV in
9334  [\\/]* | ?:[\\/]*)
9335  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9336  ;;
9337  *)
9338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9339for as_dir in $PATH
9340do
9341  IFS=$as_save_IFS
9342  test -z "$as_dir" && as_dir=.
9343    for ac_exec_ext in '' $ac_executable_extensions; do
9344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9345    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9347    break 2
9348  fi
9349done
9350  done
9351IFS=$as_save_IFS
9352
9353  ;;
9354esac
9355fi
9356MV=$ac_cv_path_MV
9357if test -n "$MV"; then
9358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9359$as_echo "$MV" >&6; }
9360else
9361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9362$as_echo "no" >&6; }
9363fi
9364
9365
9366          if test "x$MV" = x; then
9367            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9368          fi
9369        else
9370          # Otherwise we believe it is a complete path. Use it as it is.
9371          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9372$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9373          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9374$as_echo_n "checking for MV... " >&6; }
9375          if test ! -x "$tool_specified"; then
9376            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9377$as_echo "not found" >&6; }
9378            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9379          fi
9380          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9381$as_echo "$tool_specified" >&6; }
9382        fi
9383      fi
9384    fi
9385
9386  fi
9387
9388
9389
9390  if test "x$MV" = x; then
9391    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9392  fi
9393
9394
9395
9396
9397
9398  # Publish this variable in the help.
9399
9400
9401  if [ -z "${NAWK+x}" ]; then
9402    # The variable is not set by user, try to locate tool using the code snippet
9403    for ac_prog in nawk gawk awk
9404do
9405  # Extract the first word of "$ac_prog", so it can be a program name with args.
9406set dummy $ac_prog; ac_word=$2
9407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9408$as_echo_n "checking for $ac_word... " >&6; }
9409if ${ac_cv_path_NAWK+:} false; then :
9410  $as_echo_n "(cached) " >&6
9411else
9412  case $NAWK in
9413  [\\/]* | ?:[\\/]*)
9414  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9415  ;;
9416  *)
9417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9418for as_dir in $PATH
9419do
9420  IFS=$as_save_IFS
9421  test -z "$as_dir" && as_dir=.
9422    for ac_exec_ext in '' $ac_executable_extensions; do
9423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9424    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9426    break 2
9427  fi
9428done
9429  done
9430IFS=$as_save_IFS
9431
9432  ;;
9433esac
9434fi
9435NAWK=$ac_cv_path_NAWK
9436if test -n "$NAWK"; then
9437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9438$as_echo "$NAWK" >&6; }
9439else
9440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9441$as_echo "no" >&6; }
9442fi
9443
9444
9445  test -n "$NAWK" && break
9446done
9447
9448  else
9449    # The variable is set, but is it from the command line or the environment?
9450
9451    # Try to remove the string !NAWK! from our list.
9452    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9453    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9454      # If it failed, the variable was not from the command line. Ignore it,
9455      # but warn the user (except for BASH, which is always set by the calling BASH).
9456      if test "xNAWK" != xBASH; then
9457        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9458$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9459      fi
9460      # Try to locate tool using the code snippet
9461      for ac_prog in nawk gawk awk
9462do
9463  # Extract the first word of "$ac_prog", so it can be a program name with args.
9464set dummy $ac_prog; ac_word=$2
9465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9466$as_echo_n "checking for $ac_word... " >&6; }
9467if ${ac_cv_path_NAWK+:} false; then :
9468  $as_echo_n "(cached) " >&6
9469else
9470  case $NAWK in
9471  [\\/]* | ?:[\\/]*)
9472  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9473  ;;
9474  *)
9475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9476for as_dir in $PATH
9477do
9478  IFS=$as_save_IFS
9479  test -z "$as_dir" && as_dir=.
9480    for ac_exec_ext in '' $ac_executable_extensions; do
9481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9482    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9484    break 2
9485  fi
9486done
9487  done
9488IFS=$as_save_IFS
9489
9490  ;;
9491esac
9492fi
9493NAWK=$ac_cv_path_NAWK
9494if test -n "$NAWK"; then
9495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9496$as_echo "$NAWK" >&6; }
9497else
9498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9499$as_echo "no" >&6; }
9500fi
9501
9502
9503  test -n "$NAWK" && break
9504done
9505
9506    else
9507      # If it succeeded, then it was overridden by the user. We will use it
9508      # for the tool.
9509
9510      # First remove it from the list of overridden variables, so we can test
9511      # for unknown variables in the end.
9512      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9513
9514      # Check if we try to supply an empty value
9515      if test "x$NAWK" = x; then
9516        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9517$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9518        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9519$as_echo_n "checking for NAWK... " >&6; }
9520        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9521$as_echo "disabled" >&6; }
9522      else
9523        # Check if the provided tool contains a complete path.
9524        tool_specified="$NAWK"
9525        tool_basename="${tool_specified##*/}"
9526        if test "x$tool_basename" = "x$tool_specified"; then
9527          # A command without a complete path is provided, search $PATH.
9528          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9529$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9530          # Extract the first word of "$tool_basename", so it can be a program name with args.
9531set dummy $tool_basename; ac_word=$2
9532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9533$as_echo_n "checking for $ac_word... " >&6; }
9534if ${ac_cv_path_NAWK+:} false; then :
9535  $as_echo_n "(cached) " >&6
9536else
9537  case $NAWK in
9538  [\\/]* | ?:[\\/]*)
9539  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9540  ;;
9541  *)
9542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9543for as_dir in $PATH
9544do
9545  IFS=$as_save_IFS
9546  test -z "$as_dir" && as_dir=.
9547    for ac_exec_ext in '' $ac_executable_extensions; do
9548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9549    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9551    break 2
9552  fi
9553done
9554  done
9555IFS=$as_save_IFS
9556
9557  ;;
9558esac
9559fi
9560NAWK=$ac_cv_path_NAWK
9561if test -n "$NAWK"; then
9562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9563$as_echo "$NAWK" >&6; }
9564else
9565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9566$as_echo "no" >&6; }
9567fi
9568
9569
9570          if test "x$NAWK" = x; then
9571            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9572          fi
9573        else
9574          # Otherwise we believe it is a complete path. Use it as it is.
9575          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9576$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9577          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9578$as_echo_n "checking for NAWK... " >&6; }
9579          if test ! -x "$tool_specified"; then
9580            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9581$as_echo "not found" >&6; }
9582            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9583          fi
9584          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9585$as_echo "$tool_specified" >&6; }
9586        fi
9587      fi
9588    fi
9589
9590  fi
9591
9592
9593
9594  if test "x$NAWK" = x; then
9595    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9596  fi
9597
9598
9599
9600
9601
9602  # Publish this variable in the help.
9603
9604
9605  if [ -z "${PRINTF+x}" ]; then
9606    # The variable is not set by user, try to locate tool using the code snippet
9607    for ac_prog in printf
9608do
9609  # Extract the first word of "$ac_prog", so it can be a program name with args.
9610set dummy $ac_prog; ac_word=$2
9611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9612$as_echo_n "checking for $ac_word... " >&6; }
9613if ${ac_cv_path_PRINTF+:} false; then :
9614  $as_echo_n "(cached) " >&6
9615else
9616  case $PRINTF in
9617  [\\/]* | ?:[\\/]*)
9618  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9619  ;;
9620  *)
9621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9622for as_dir in $PATH
9623do
9624  IFS=$as_save_IFS
9625  test -z "$as_dir" && as_dir=.
9626    for ac_exec_ext in '' $ac_executable_extensions; do
9627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9628    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9630    break 2
9631  fi
9632done
9633  done
9634IFS=$as_save_IFS
9635
9636  ;;
9637esac
9638fi
9639PRINTF=$ac_cv_path_PRINTF
9640if test -n "$PRINTF"; then
9641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9642$as_echo "$PRINTF" >&6; }
9643else
9644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9645$as_echo "no" >&6; }
9646fi
9647
9648
9649  test -n "$PRINTF" && break
9650done
9651
9652  else
9653    # The variable is set, but is it from the command line or the environment?
9654
9655    # Try to remove the string !PRINTF! from our list.
9656    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9657    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9658      # If it failed, the variable was not from the command line. Ignore it,
9659      # but warn the user (except for BASH, which is always set by the calling BASH).
9660      if test "xPRINTF" != xBASH; then
9661        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9662$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9663      fi
9664      # Try to locate tool using the code snippet
9665      for ac_prog in printf
9666do
9667  # Extract the first word of "$ac_prog", so it can be a program name with args.
9668set dummy $ac_prog; ac_word=$2
9669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9670$as_echo_n "checking for $ac_word... " >&6; }
9671if ${ac_cv_path_PRINTF+:} false; then :
9672  $as_echo_n "(cached) " >&6
9673else
9674  case $PRINTF in
9675  [\\/]* | ?:[\\/]*)
9676  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9677  ;;
9678  *)
9679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9680for as_dir in $PATH
9681do
9682  IFS=$as_save_IFS
9683  test -z "$as_dir" && as_dir=.
9684    for ac_exec_ext in '' $ac_executable_extensions; do
9685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9686    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9688    break 2
9689  fi
9690done
9691  done
9692IFS=$as_save_IFS
9693
9694  ;;
9695esac
9696fi
9697PRINTF=$ac_cv_path_PRINTF
9698if test -n "$PRINTF"; then
9699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9700$as_echo "$PRINTF" >&6; }
9701else
9702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9703$as_echo "no" >&6; }
9704fi
9705
9706
9707  test -n "$PRINTF" && break
9708done
9709
9710    else
9711      # If it succeeded, then it was overridden by the user. We will use it
9712      # for the tool.
9713
9714      # First remove it from the list of overridden variables, so we can test
9715      # for unknown variables in the end.
9716      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9717
9718      # Check if we try to supply an empty value
9719      if test "x$PRINTF" = x; then
9720        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9721$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9722        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9723$as_echo_n "checking for PRINTF... " >&6; }
9724        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9725$as_echo "disabled" >&6; }
9726      else
9727        # Check if the provided tool contains a complete path.
9728        tool_specified="$PRINTF"
9729        tool_basename="${tool_specified##*/}"
9730        if test "x$tool_basename" = "x$tool_specified"; then
9731          # A command without a complete path is provided, search $PATH.
9732          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9733$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9734          # Extract the first word of "$tool_basename", so it can be a program name with args.
9735set dummy $tool_basename; ac_word=$2
9736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9737$as_echo_n "checking for $ac_word... " >&6; }
9738if ${ac_cv_path_PRINTF+:} false; then :
9739  $as_echo_n "(cached) " >&6
9740else
9741  case $PRINTF in
9742  [\\/]* | ?:[\\/]*)
9743  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9744  ;;
9745  *)
9746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9747for as_dir in $PATH
9748do
9749  IFS=$as_save_IFS
9750  test -z "$as_dir" && as_dir=.
9751    for ac_exec_ext in '' $ac_executable_extensions; do
9752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9753    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9755    break 2
9756  fi
9757done
9758  done
9759IFS=$as_save_IFS
9760
9761  ;;
9762esac
9763fi
9764PRINTF=$ac_cv_path_PRINTF
9765if test -n "$PRINTF"; then
9766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9767$as_echo "$PRINTF" >&6; }
9768else
9769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9770$as_echo "no" >&6; }
9771fi
9772
9773
9774          if test "x$PRINTF" = x; then
9775            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9776          fi
9777        else
9778          # Otherwise we believe it is a complete path. Use it as it is.
9779          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9780$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9781          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9782$as_echo_n "checking for PRINTF... " >&6; }
9783          if test ! -x "$tool_specified"; then
9784            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9785$as_echo "not found" >&6; }
9786            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9787          fi
9788          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9789$as_echo "$tool_specified" >&6; }
9790        fi
9791      fi
9792    fi
9793
9794  fi
9795
9796
9797
9798  if test "x$PRINTF" = x; then
9799    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9800  fi
9801
9802
9803
9804
9805
9806  # Publish this variable in the help.
9807
9808
9809  if [ -z "${RM+x}" ]; then
9810    # The variable is not set by user, try to locate tool using the code snippet
9811    for ac_prog in rm
9812do
9813  # Extract the first word of "$ac_prog", so it can be a program name with args.
9814set dummy $ac_prog; ac_word=$2
9815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9816$as_echo_n "checking for $ac_word... " >&6; }
9817if ${ac_cv_path_RM+:} false; then :
9818  $as_echo_n "(cached) " >&6
9819else
9820  case $RM in
9821  [\\/]* | ?:[\\/]*)
9822  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9823  ;;
9824  *)
9825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9826for as_dir in $PATH
9827do
9828  IFS=$as_save_IFS
9829  test -z "$as_dir" && as_dir=.
9830    for ac_exec_ext in '' $ac_executable_extensions; do
9831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9832    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9834    break 2
9835  fi
9836done
9837  done
9838IFS=$as_save_IFS
9839
9840  ;;
9841esac
9842fi
9843RM=$ac_cv_path_RM
9844if test -n "$RM"; then
9845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9846$as_echo "$RM" >&6; }
9847else
9848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9849$as_echo "no" >&6; }
9850fi
9851
9852
9853  test -n "$RM" && break
9854done
9855
9856  else
9857    # The variable is set, but is it from the command line or the environment?
9858
9859    # Try to remove the string !RM! from our list.
9860    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9861    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9862      # If it failed, the variable was not from the command line. Ignore it,
9863      # but warn the user (except for BASH, which is always set by the calling BASH).
9864      if test "xRM" != xBASH; then
9865        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9866$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9867      fi
9868      # Try to locate tool using the code snippet
9869      for ac_prog in rm
9870do
9871  # Extract the first word of "$ac_prog", so it can be a program name with args.
9872set dummy $ac_prog; ac_word=$2
9873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9874$as_echo_n "checking for $ac_word... " >&6; }
9875if ${ac_cv_path_RM+:} false; then :
9876  $as_echo_n "(cached) " >&6
9877else
9878  case $RM in
9879  [\\/]* | ?:[\\/]*)
9880  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9881  ;;
9882  *)
9883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9884for as_dir in $PATH
9885do
9886  IFS=$as_save_IFS
9887  test -z "$as_dir" && as_dir=.
9888    for ac_exec_ext in '' $ac_executable_extensions; do
9889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9890    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9892    break 2
9893  fi
9894done
9895  done
9896IFS=$as_save_IFS
9897
9898  ;;
9899esac
9900fi
9901RM=$ac_cv_path_RM
9902if test -n "$RM"; then
9903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9904$as_echo "$RM" >&6; }
9905else
9906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9907$as_echo "no" >&6; }
9908fi
9909
9910
9911  test -n "$RM" && break
9912done
9913
9914    else
9915      # If it succeeded, then it was overridden by the user. We will use it
9916      # for the tool.
9917
9918      # First remove it from the list of overridden variables, so we can test
9919      # for unknown variables in the end.
9920      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9921
9922      # Check if we try to supply an empty value
9923      if test "x$RM" = x; then
9924        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9925$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9926        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9927$as_echo_n "checking for RM... " >&6; }
9928        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9929$as_echo "disabled" >&6; }
9930      else
9931        # Check if the provided tool contains a complete path.
9932        tool_specified="$RM"
9933        tool_basename="${tool_specified##*/}"
9934        if test "x$tool_basename" = "x$tool_specified"; then
9935          # A command without a complete path is provided, search $PATH.
9936          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9937$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9938          # Extract the first word of "$tool_basename", so it can be a program name with args.
9939set dummy $tool_basename; ac_word=$2
9940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9941$as_echo_n "checking for $ac_word... " >&6; }
9942if ${ac_cv_path_RM+:} false; then :
9943  $as_echo_n "(cached) " >&6
9944else
9945  case $RM in
9946  [\\/]* | ?:[\\/]*)
9947  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9948  ;;
9949  *)
9950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9951for as_dir in $PATH
9952do
9953  IFS=$as_save_IFS
9954  test -z "$as_dir" && as_dir=.
9955    for ac_exec_ext in '' $ac_executable_extensions; do
9956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9957    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9959    break 2
9960  fi
9961done
9962  done
9963IFS=$as_save_IFS
9964
9965  ;;
9966esac
9967fi
9968RM=$ac_cv_path_RM
9969if test -n "$RM"; then
9970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9971$as_echo "$RM" >&6; }
9972else
9973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9974$as_echo "no" >&6; }
9975fi
9976
9977
9978          if test "x$RM" = x; then
9979            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9980          fi
9981        else
9982          # Otherwise we believe it is a complete path. Use it as it is.
9983          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9984$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9985          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9986$as_echo_n "checking for RM... " >&6; }
9987          if test ! -x "$tool_specified"; then
9988            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9989$as_echo "not found" >&6; }
9990            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9991          fi
9992          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9993$as_echo "$tool_specified" >&6; }
9994        fi
9995      fi
9996    fi
9997
9998  fi
9999
10000
10001
10002  if test "x$RM" = x; then
10003    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10004  fi
10005
10006
10007
10008
10009
10010  # Publish this variable in the help.
10011
10012
10013  if [ -z "${RMDIR+x}" ]; then
10014    # The variable is not set by user, try to locate tool using the code snippet
10015    for ac_prog in rmdir
10016do
10017  # Extract the first word of "$ac_prog", so it can be a program name with args.
10018set dummy $ac_prog; ac_word=$2
10019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10020$as_echo_n "checking for $ac_word... " >&6; }
10021if ${ac_cv_path_RMDIR+:} false; then :
10022  $as_echo_n "(cached) " >&6
10023else
10024  case $RMDIR in
10025  [\\/]* | ?:[\\/]*)
10026  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10027  ;;
10028  *)
10029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10030for as_dir in $PATH
10031do
10032  IFS=$as_save_IFS
10033  test -z "$as_dir" && as_dir=.
10034    for ac_exec_ext in '' $ac_executable_extensions; do
10035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10036    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10038    break 2
10039  fi
10040done
10041  done
10042IFS=$as_save_IFS
10043
10044  ;;
10045esac
10046fi
10047RMDIR=$ac_cv_path_RMDIR
10048if test -n "$RMDIR"; then
10049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10050$as_echo "$RMDIR" >&6; }
10051else
10052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10053$as_echo "no" >&6; }
10054fi
10055
10056
10057  test -n "$RMDIR" && break
10058done
10059
10060  else
10061    # The variable is set, but is it from the command line or the environment?
10062
10063    # Try to remove the string !RMDIR! from our list.
10064    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10065    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10066      # If it failed, the variable was not from the command line. Ignore it,
10067      # but warn the user (except for BASH, which is always set by the calling BASH).
10068      if test "xRMDIR" != xBASH; then
10069        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10070$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10071      fi
10072      # Try to locate tool using the code snippet
10073      for ac_prog in rmdir
10074do
10075  # Extract the first word of "$ac_prog", so it can be a program name with args.
10076set dummy $ac_prog; ac_word=$2
10077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10078$as_echo_n "checking for $ac_word... " >&6; }
10079if ${ac_cv_path_RMDIR+:} false; then :
10080  $as_echo_n "(cached) " >&6
10081else
10082  case $RMDIR in
10083  [\\/]* | ?:[\\/]*)
10084  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10085  ;;
10086  *)
10087  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10088for as_dir in $PATH
10089do
10090  IFS=$as_save_IFS
10091  test -z "$as_dir" && as_dir=.
10092    for ac_exec_ext in '' $ac_executable_extensions; do
10093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10094    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10096    break 2
10097  fi
10098done
10099  done
10100IFS=$as_save_IFS
10101
10102  ;;
10103esac
10104fi
10105RMDIR=$ac_cv_path_RMDIR
10106if test -n "$RMDIR"; then
10107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10108$as_echo "$RMDIR" >&6; }
10109else
10110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10111$as_echo "no" >&6; }
10112fi
10113
10114
10115  test -n "$RMDIR" && break
10116done
10117
10118    else
10119      # If it succeeded, then it was overridden by the user. We will use it
10120      # for the tool.
10121
10122      # First remove it from the list of overridden variables, so we can test
10123      # for unknown variables in the end.
10124      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10125
10126      # Check if we try to supply an empty value
10127      if test "x$RMDIR" = x; then
10128        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10129$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10130        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10131$as_echo_n "checking for RMDIR... " >&6; }
10132        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10133$as_echo "disabled" >&6; }
10134      else
10135        # Check if the provided tool contains a complete path.
10136        tool_specified="$RMDIR"
10137        tool_basename="${tool_specified##*/}"
10138        if test "x$tool_basename" = "x$tool_specified"; then
10139          # A command without a complete path is provided, search $PATH.
10140          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10141$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10142          # Extract the first word of "$tool_basename", so it can be a program name with args.
10143set dummy $tool_basename; ac_word=$2
10144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10145$as_echo_n "checking for $ac_word... " >&6; }
10146if ${ac_cv_path_RMDIR+:} false; then :
10147  $as_echo_n "(cached) " >&6
10148else
10149  case $RMDIR in
10150  [\\/]* | ?:[\\/]*)
10151  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10152  ;;
10153  *)
10154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10155for as_dir in $PATH
10156do
10157  IFS=$as_save_IFS
10158  test -z "$as_dir" && as_dir=.
10159    for ac_exec_ext in '' $ac_executable_extensions; do
10160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10161    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10163    break 2
10164  fi
10165done
10166  done
10167IFS=$as_save_IFS
10168
10169  ;;
10170esac
10171fi
10172RMDIR=$ac_cv_path_RMDIR
10173if test -n "$RMDIR"; then
10174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10175$as_echo "$RMDIR" >&6; }
10176else
10177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10178$as_echo "no" >&6; }
10179fi
10180
10181
10182          if test "x$RMDIR" = x; then
10183            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10184          fi
10185        else
10186          # Otherwise we believe it is a complete path. Use it as it is.
10187          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10188$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10189          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10190$as_echo_n "checking for RMDIR... " >&6; }
10191          if test ! -x "$tool_specified"; then
10192            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10193$as_echo "not found" >&6; }
10194            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10195          fi
10196          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10197$as_echo "$tool_specified" >&6; }
10198        fi
10199      fi
10200    fi
10201
10202  fi
10203
10204
10205
10206  if test "x$RMDIR" = x; then
10207    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10208  fi
10209
10210
10211
10212
10213
10214  # Publish this variable in the help.
10215
10216
10217  if [ -z "${SH+x}" ]; then
10218    # The variable is not set by user, try to locate tool using the code snippet
10219    for ac_prog in sh
10220do
10221  # Extract the first word of "$ac_prog", so it can be a program name with args.
10222set dummy $ac_prog; ac_word=$2
10223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10224$as_echo_n "checking for $ac_word... " >&6; }
10225if ${ac_cv_path_SH+:} false; then :
10226  $as_echo_n "(cached) " >&6
10227else
10228  case $SH in
10229  [\\/]* | ?:[\\/]*)
10230  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10231  ;;
10232  *)
10233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10234for as_dir in $PATH
10235do
10236  IFS=$as_save_IFS
10237  test -z "$as_dir" && as_dir=.
10238    for ac_exec_ext in '' $ac_executable_extensions; do
10239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10240    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10242    break 2
10243  fi
10244done
10245  done
10246IFS=$as_save_IFS
10247
10248  ;;
10249esac
10250fi
10251SH=$ac_cv_path_SH
10252if test -n "$SH"; then
10253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10254$as_echo "$SH" >&6; }
10255else
10256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10257$as_echo "no" >&6; }
10258fi
10259
10260
10261  test -n "$SH" && break
10262done
10263
10264  else
10265    # The variable is set, but is it from the command line or the environment?
10266
10267    # Try to remove the string !SH! from our list.
10268    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10269    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10270      # If it failed, the variable was not from the command line. Ignore it,
10271      # but warn the user (except for BASH, which is always set by the calling BASH).
10272      if test "xSH" != xBASH; then
10273        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10274$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10275      fi
10276      # Try to locate tool using the code snippet
10277      for ac_prog in sh
10278do
10279  # Extract the first word of "$ac_prog", so it can be a program name with args.
10280set dummy $ac_prog; ac_word=$2
10281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10282$as_echo_n "checking for $ac_word... " >&6; }
10283if ${ac_cv_path_SH+:} false; then :
10284  $as_echo_n "(cached) " >&6
10285else
10286  case $SH in
10287  [\\/]* | ?:[\\/]*)
10288  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10289  ;;
10290  *)
10291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10292for as_dir in $PATH
10293do
10294  IFS=$as_save_IFS
10295  test -z "$as_dir" && as_dir=.
10296    for ac_exec_ext in '' $ac_executable_extensions; do
10297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10298    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10300    break 2
10301  fi
10302done
10303  done
10304IFS=$as_save_IFS
10305
10306  ;;
10307esac
10308fi
10309SH=$ac_cv_path_SH
10310if test -n "$SH"; then
10311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10312$as_echo "$SH" >&6; }
10313else
10314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10315$as_echo "no" >&6; }
10316fi
10317
10318
10319  test -n "$SH" && break
10320done
10321
10322    else
10323      # If it succeeded, then it was overridden by the user. We will use it
10324      # for the tool.
10325
10326      # First remove it from the list of overridden variables, so we can test
10327      # for unknown variables in the end.
10328      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10329
10330      # Check if we try to supply an empty value
10331      if test "x$SH" = x; then
10332        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10333$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10334        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10335$as_echo_n "checking for SH... " >&6; }
10336        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10337$as_echo "disabled" >&6; }
10338      else
10339        # Check if the provided tool contains a complete path.
10340        tool_specified="$SH"
10341        tool_basename="${tool_specified##*/}"
10342        if test "x$tool_basename" = "x$tool_specified"; then
10343          # A command without a complete path is provided, search $PATH.
10344          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10345$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10346          # Extract the first word of "$tool_basename", so it can be a program name with args.
10347set dummy $tool_basename; ac_word=$2
10348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10349$as_echo_n "checking for $ac_word... " >&6; }
10350if ${ac_cv_path_SH+:} false; then :
10351  $as_echo_n "(cached) " >&6
10352else
10353  case $SH in
10354  [\\/]* | ?:[\\/]*)
10355  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10356  ;;
10357  *)
10358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10359for as_dir in $PATH
10360do
10361  IFS=$as_save_IFS
10362  test -z "$as_dir" && as_dir=.
10363    for ac_exec_ext in '' $ac_executable_extensions; do
10364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10365    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10367    break 2
10368  fi
10369done
10370  done
10371IFS=$as_save_IFS
10372
10373  ;;
10374esac
10375fi
10376SH=$ac_cv_path_SH
10377if test -n "$SH"; then
10378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10379$as_echo "$SH" >&6; }
10380else
10381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10382$as_echo "no" >&6; }
10383fi
10384
10385
10386          if test "x$SH" = x; then
10387            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10388          fi
10389        else
10390          # Otherwise we believe it is a complete path. Use it as it is.
10391          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10392$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10393          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10394$as_echo_n "checking for SH... " >&6; }
10395          if test ! -x "$tool_specified"; then
10396            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10397$as_echo "not found" >&6; }
10398            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10399          fi
10400          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10401$as_echo "$tool_specified" >&6; }
10402        fi
10403      fi
10404    fi
10405
10406  fi
10407
10408
10409
10410  if test "x$SH" = x; then
10411    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10412  fi
10413
10414
10415
10416
10417
10418  # Publish this variable in the help.
10419
10420
10421  if [ -z "${SORT+x}" ]; then
10422    # The variable is not set by user, try to locate tool using the code snippet
10423    for ac_prog in sort
10424do
10425  # Extract the first word of "$ac_prog", so it can be a program name with args.
10426set dummy $ac_prog; ac_word=$2
10427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10428$as_echo_n "checking for $ac_word... " >&6; }
10429if ${ac_cv_path_SORT+:} false; then :
10430  $as_echo_n "(cached) " >&6
10431else
10432  case $SORT in
10433  [\\/]* | ?:[\\/]*)
10434  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10435  ;;
10436  *)
10437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10438for as_dir in $PATH
10439do
10440  IFS=$as_save_IFS
10441  test -z "$as_dir" && as_dir=.
10442    for ac_exec_ext in '' $ac_executable_extensions; do
10443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10444    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10446    break 2
10447  fi
10448done
10449  done
10450IFS=$as_save_IFS
10451
10452  ;;
10453esac
10454fi
10455SORT=$ac_cv_path_SORT
10456if test -n "$SORT"; then
10457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10458$as_echo "$SORT" >&6; }
10459else
10460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10461$as_echo "no" >&6; }
10462fi
10463
10464
10465  test -n "$SORT" && break
10466done
10467
10468  else
10469    # The variable is set, but is it from the command line or the environment?
10470
10471    # Try to remove the string !SORT! from our list.
10472    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10473    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10474      # If it failed, the variable was not from the command line. Ignore it,
10475      # but warn the user (except for BASH, which is always set by the calling BASH).
10476      if test "xSORT" != xBASH; then
10477        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10478$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10479      fi
10480      # Try to locate tool using the code snippet
10481      for ac_prog in sort
10482do
10483  # Extract the first word of "$ac_prog", so it can be a program name with args.
10484set dummy $ac_prog; ac_word=$2
10485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10486$as_echo_n "checking for $ac_word... " >&6; }
10487if ${ac_cv_path_SORT+:} false; then :
10488  $as_echo_n "(cached) " >&6
10489else
10490  case $SORT in
10491  [\\/]* | ?:[\\/]*)
10492  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10493  ;;
10494  *)
10495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10496for as_dir in $PATH
10497do
10498  IFS=$as_save_IFS
10499  test -z "$as_dir" && as_dir=.
10500    for ac_exec_ext in '' $ac_executable_extensions; do
10501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10502    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10504    break 2
10505  fi
10506done
10507  done
10508IFS=$as_save_IFS
10509
10510  ;;
10511esac
10512fi
10513SORT=$ac_cv_path_SORT
10514if test -n "$SORT"; then
10515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10516$as_echo "$SORT" >&6; }
10517else
10518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10519$as_echo "no" >&6; }
10520fi
10521
10522
10523  test -n "$SORT" && break
10524done
10525
10526    else
10527      # If it succeeded, then it was overridden by the user. We will use it
10528      # for the tool.
10529
10530      # First remove it from the list of overridden variables, so we can test
10531      # for unknown variables in the end.
10532      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10533
10534      # Check if we try to supply an empty value
10535      if test "x$SORT" = x; then
10536        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10537$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10538        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10539$as_echo_n "checking for SORT... " >&6; }
10540        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10541$as_echo "disabled" >&6; }
10542      else
10543        # Check if the provided tool contains a complete path.
10544        tool_specified="$SORT"
10545        tool_basename="${tool_specified##*/}"
10546        if test "x$tool_basename" = "x$tool_specified"; then
10547          # A command without a complete path is provided, search $PATH.
10548          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10549$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10550          # Extract the first word of "$tool_basename", so it can be a program name with args.
10551set dummy $tool_basename; ac_word=$2
10552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10553$as_echo_n "checking for $ac_word... " >&6; }
10554if ${ac_cv_path_SORT+:} false; then :
10555  $as_echo_n "(cached) " >&6
10556else
10557  case $SORT in
10558  [\\/]* | ?:[\\/]*)
10559  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10560  ;;
10561  *)
10562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10563for as_dir in $PATH
10564do
10565  IFS=$as_save_IFS
10566  test -z "$as_dir" && as_dir=.
10567    for ac_exec_ext in '' $ac_executable_extensions; do
10568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10569    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10571    break 2
10572  fi
10573done
10574  done
10575IFS=$as_save_IFS
10576
10577  ;;
10578esac
10579fi
10580SORT=$ac_cv_path_SORT
10581if test -n "$SORT"; then
10582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10583$as_echo "$SORT" >&6; }
10584else
10585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10586$as_echo "no" >&6; }
10587fi
10588
10589
10590          if test "x$SORT" = x; then
10591            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10592          fi
10593        else
10594          # Otherwise we believe it is a complete path. Use it as it is.
10595          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10596$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10597          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10598$as_echo_n "checking for SORT... " >&6; }
10599          if test ! -x "$tool_specified"; then
10600            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10601$as_echo "not found" >&6; }
10602            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10603          fi
10604          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10605$as_echo "$tool_specified" >&6; }
10606        fi
10607      fi
10608    fi
10609
10610  fi
10611
10612
10613
10614  if test "x$SORT" = x; then
10615    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10616  fi
10617
10618
10619
10620
10621
10622  # Publish this variable in the help.
10623
10624
10625  if [ -z "${TAIL+x}" ]; then
10626    # The variable is not set by user, try to locate tool using the code snippet
10627    for ac_prog in tail
10628do
10629  # Extract the first word of "$ac_prog", so it can be a program name with args.
10630set dummy $ac_prog; ac_word=$2
10631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10632$as_echo_n "checking for $ac_word... " >&6; }
10633if ${ac_cv_path_TAIL+:} false; then :
10634  $as_echo_n "(cached) " >&6
10635else
10636  case $TAIL in
10637  [\\/]* | ?:[\\/]*)
10638  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10639  ;;
10640  *)
10641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10642for as_dir in $PATH
10643do
10644  IFS=$as_save_IFS
10645  test -z "$as_dir" && as_dir=.
10646    for ac_exec_ext in '' $ac_executable_extensions; do
10647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10648    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10650    break 2
10651  fi
10652done
10653  done
10654IFS=$as_save_IFS
10655
10656  ;;
10657esac
10658fi
10659TAIL=$ac_cv_path_TAIL
10660if test -n "$TAIL"; then
10661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10662$as_echo "$TAIL" >&6; }
10663else
10664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10665$as_echo "no" >&6; }
10666fi
10667
10668
10669  test -n "$TAIL" && break
10670done
10671
10672  else
10673    # The variable is set, but is it from the command line or the environment?
10674
10675    # Try to remove the string !TAIL! from our list.
10676    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10677    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10678      # If it failed, the variable was not from the command line. Ignore it,
10679      # but warn the user (except for BASH, which is always set by the calling BASH).
10680      if test "xTAIL" != xBASH; then
10681        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10682$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10683      fi
10684      # Try to locate tool using the code snippet
10685      for ac_prog in tail
10686do
10687  # Extract the first word of "$ac_prog", so it can be a program name with args.
10688set dummy $ac_prog; ac_word=$2
10689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10690$as_echo_n "checking for $ac_word... " >&6; }
10691if ${ac_cv_path_TAIL+:} false; then :
10692  $as_echo_n "(cached) " >&6
10693else
10694  case $TAIL in
10695  [\\/]* | ?:[\\/]*)
10696  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10697  ;;
10698  *)
10699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10700for as_dir in $PATH
10701do
10702  IFS=$as_save_IFS
10703  test -z "$as_dir" && as_dir=.
10704    for ac_exec_ext in '' $ac_executable_extensions; do
10705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10706    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10708    break 2
10709  fi
10710done
10711  done
10712IFS=$as_save_IFS
10713
10714  ;;
10715esac
10716fi
10717TAIL=$ac_cv_path_TAIL
10718if test -n "$TAIL"; then
10719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10720$as_echo "$TAIL" >&6; }
10721else
10722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10723$as_echo "no" >&6; }
10724fi
10725
10726
10727  test -n "$TAIL" && break
10728done
10729
10730    else
10731      # If it succeeded, then it was overridden by the user. We will use it
10732      # for the tool.
10733
10734      # First remove it from the list of overridden variables, so we can test
10735      # for unknown variables in the end.
10736      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10737
10738      # Check if we try to supply an empty value
10739      if test "x$TAIL" = x; then
10740        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10741$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10742        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10743$as_echo_n "checking for TAIL... " >&6; }
10744        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10745$as_echo "disabled" >&6; }
10746      else
10747        # Check if the provided tool contains a complete path.
10748        tool_specified="$TAIL"
10749        tool_basename="${tool_specified##*/}"
10750        if test "x$tool_basename" = "x$tool_specified"; then
10751          # A command without a complete path is provided, search $PATH.
10752          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10753$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10754          # Extract the first word of "$tool_basename", so it can be a program name with args.
10755set dummy $tool_basename; ac_word=$2
10756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10757$as_echo_n "checking for $ac_word... " >&6; }
10758if ${ac_cv_path_TAIL+:} false; then :
10759  $as_echo_n "(cached) " >&6
10760else
10761  case $TAIL in
10762  [\\/]* | ?:[\\/]*)
10763  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10764  ;;
10765  *)
10766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10767for as_dir in $PATH
10768do
10769  IFS=$as_save_IFS
10770  test -z "$as_dir" && as_dir=.
10771    for ac_exec_ext in '' $ac_executable_extensions; do
10772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10773    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10775    break 2
10776  fi
10777done
10778  done
10779IFS=$as_save_IFS
10780
10781  ;;
10782esac
10783fi
10784TAIL=$ac_cv_path_TAIL
10785if test -n "$TAIL"; then
10786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10787$as_echo "$TAIL" >&6; }
10788else
10789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10790$as_echo "no" >&6; }
10791fi
10792
10793
10794          if test "x$TAIL" = x; then
10795            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10796          fi
10797        else
10798          # Otherwise we believe it is a complete path. Use it as it is.
10799          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10800$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10801          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10802$as_echo_n "checking for TAIL... " >&6; }
10803          if test ! -x "$tool_specified"; then
10804            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10805$as_echo "not found" >&6; }
10806            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10807          fi
10808          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10809$as_echo "$tool_specified" >&6; }
10810        fi
10811      fi
10812    fi
10813
10814  fi
10815
10816
10817
10818  if test "x$TAIL" = x; then
10819    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10820  fi
10821
10822
10823
10824
10825
10826  # Publish this variable in the help.
10827
10828
10829  if [ -z "${TAR+x}" ]; then
10830    # The variable is not set by user, try to locate tool using the code snippet
10831    for ac_prog in tar
10832do
10833  # Extract the first word of "$ac_prog", so it can be a program name with args.
10834set dummy $ac_prog; ac_word=$2
10835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10836$as_echo_n "checking for $ac_word... " >&6; }
10837if ${ac_cv_path_TAR+:} false; then :
10838  $as_echo_n "(cached) " >&6
10839else
10840  case $TAR in
10841  [\\/]* | ?:[\\/]*)
10842  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10843  ;;
10844  *)
10845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10846for as_dir in $PATH
10847do
10848  IFS=$as_save_IFS
10849  test -z "$as_dir" && as_dir=.
10850    for ac_exec_ext in '' $ac_executable_extensions; do
10851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10852    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10854    break 2
10855  fi
10856done
10857  done
10858IFS=$as_save_IFS
10859
10860  ;;
10861esac
10862fi
10863TAR=$ac_cv_path_TAR
10864if test -n "$TAR"; then
10865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10866$as_echo "$TAR" >&6; }
10867else
10868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10869$as_echo "no" >&6; }
10870fi
10871
10872
10873  test -n "$TAR" && break
10874done
10875
10876  else
10877    # The variable is set, but is it from the command line or the environment?
10878
10879    # Try to remove the string !TAR! from our list.
10880    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10881    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10882      # If it failed, the variable was not from the command line. Ignore it,
10883      # but warn the user (except for BASH, which is always set by the calling BASH).
10884      if test "xTAR" != xBASH; then
10885        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10886$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10887      fi
10888      # Try to locate tool using the code snippet
10889      for ac_prog in tar
10890do
10891  # Extract the first word of "$ac_prog", so it can be a program name with args.
10892set dummy $ac_prog; ac_word=$2
10893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10894$as_echo_n "checking for $ac_word... " >&6; }
10895if ${ac_cv_path_TAR+:} false; then :
10896  $as_echo_n "(cached) " >&6
10897else
10898  case $TAR in
10899  [\\/]* | ?:[\\/]*)
10900  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10901  ;;
10902  *)
10903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10904for as_dir in $PATH
10905do
10906  IFS=$as_save_IFS
10907  test -z "$as_dir" && as_dir=.
10908    for ac_exec_ext in '' $ac_executable_extensions; do
10909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10910    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10912    break 2
10913  fi
10914done
10915  done
10916IFS=$as_save_IFS
10917
10918  ;;
10919esac
10920fi
10921TAR=$ac_cv_path_TAR
10922if test -n "$TAR"; then
10923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10924$as_echo "$TAR" >&6; }
10925else
10926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10927$as_echo "no" >&6; }
10928fi
10929
10930
10931  test -n "$TAR" && break
10932done
10933
10934    else
10935      # If it succeeded, then it was overridden by the user. We will use it
10936      # for the tool.
10937
10938      # First remove it from the list of overridden variables, so we can test
10939      # for unknown variables in the end.
10940      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10941
10942      # Check if we try to supply an empty value
10943      if test "x$TAR" = x; then
10944        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10945$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10946        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10947$as_echo_n "checking for TAR... " >&6; }
10948        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10949$as_echo "disabled" >&6; }
10950      else
10951        # Check if the provided tool contains a complete path.
10952        tool_specified="$TAR"
10953        tool_basename="${tool_specified##*/}"
10954        if test "x$tool_basename" = "x$tool_specified"; then
10955          # A command without a complete path is provided, search $PATH.
10956          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10957$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10958          # Extract the first word of "$tool_basename", so it can be a program name with args.
10959set dummy $tool_basename; ac_word=$2
10960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10961$as_echo_n "checking for $ac_word... " >&6; }
10962if ${ac_cv_path_TAR+:} false; then :
10963  $as_echo_n "(cached) " >&6
10964else
10965  case $TAR in
10966  [\\/]* | ?:[\\/]*)
10967  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10968  ;;
10969  *)
10970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10971for as_dir in $PATH
10972do
10973  IFS=$as_save_IFS
10974  test -z "$as_dir" && as_dir=.
10975    for ac_exec_ext in '' $ac_executable_extensions; do
10976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10977    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10979    break 2
10980  fi
10981done
10982  done
10983IFS=$as_save_IFS
10984
10985  ;;
10986esac
10987fi
10988TAR=$ac_cv_path_TAR
10989if test -n "$TAR"; then
10990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10991$as_echo "$TAR" >&6; }
10992else
10993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10994$as_echo "no" >&6; }
10995fi
10996
10997
10998          if test "x$TAR" = x; then
10999            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11000          fi
11001        else
11002          # Otherwise we believe it is a complete path. Use it as it is.
11003          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11004$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11005          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11006$as_echo_n "checking for TAR... " >&6; }
11007          if test ! -x "$tool_specified"; then
11008            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11009$as_echo "not found" >&6; }
11010            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11011          fi
11012          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11013$as_echo "$tool_specified" >&6; }
11014        fi
11015      fi
11016    fi
11017
11018  fi
11019
11020
11021
11022  if test "x$TAR" = x; then
11023    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11024  fi
11025
11026
11027
11028
11029
11030  # Publish this variable in the help.
11031
11032
11033  if [ -z "${TEE+x}" ]; then
11034    # The variable is not set by user, try to locate tool using the code snippet
11035    for ac_prog in tee
11036do
11037  # Extract the first word of "$ac_prog", so it can be a program name with args.
11038set dummy $ac_prog; ac_word=$2
11039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11040$as_echo_n "checking for $ac_word... " >&6; }
11041if ${ac_cv_path_TEE+:} false; then :
11042  $as_echo_n "(cached) " >&6
11043else
11044  case $TEE in
11045  [\\/]* | ?:[\\/]*)
11046  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11047  ;;
11048  *)
11049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11050for as_dir in $PATH
11051do
11052  IFS=$as_save_IFS
11053  test -z "$as_dir" && as_dir=.
11054    for ac_exec_ext in '' $ac_executable_extensions; do
11055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11056    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11058    break 2
11059  fi
11060done
11061  done
11062IFS=$as_save_IFS
11063
11064  ;;
11065esac
11066fi
11067TEE=$ac_cv_path_TEE
11068if test -n "$TEE"; then
11069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11070$as_echo "$TEE" >&6; }
11071else
11072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11073$as_echo "no" >&6; }
11074fi
11075
11076
11077  test -n "$TEE" && break
11078done
11079
11080  else
11081    # The variable is set, but is it from the command line or the environment?
11082
11083    # Try to remove the string !TEE! from our list.
11084    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11085    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11086      # If it failed, the variable was not from the command line. Ignore it,
11087      # but warn the user (except for BASH, which is always set by the calling BASH).
11088      if test "xTEE" != xBASH; then
11089        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11090$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11091      fi
11092      # Try to locate tool using the code snippet
11093      for ac_prog in tee
11094do
11095  # Extract the first word of "$ac_prog", so it can be a program name with args.
11096set dummy $ac_prog; ac_word=$2
11097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11098$as_echo_n "checking for $ac_word... " >&6; }
11099if ${ac_cv_path_TEE+:} false; then :
11100  $as_echo_n "(cached) " >&6
11101else
11102  case $TEE in
11103  [\\/]* | ?:[\\/]*)
11104  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11105  ;;
11106  *)
11107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11108for as_dir in $PATH
11109do
11110  IFS=$as_save_IFS
11111  test -z "$as_dir" && as_dir=.
11112    for ac_exec_ext in '' $ac_executable_extensions; do
11113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11114    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11116    break 2
11117  fi
11118done
11119  done
11120IFS=$as_save_IFS
11121
11122  ;;
11123esac
11124fi
11125TEE=$ac_cv_path_TEE
11126if test -n "$TEE"; then
11127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11128$as_echo "$TEE" >&6; }
11129else
11130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11131$as_echo "no" >&6; }
11132fi
11133
11134
11135  test -n "$TEE" && break
11136done
11137
11138    else
11139      # If it succeeded, then it was overridden by the user. We will use it
11140      # for the tool.
11141
11142      # First remove it from the list of overridden variables, so we can test
11143      # for unknown variables in the end.
11144      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11145
11146      # Check if we try to supply an empty value
11147      if test "x$TEE" = x; then
11148        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11149$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11150        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11151$as_echo_n "checking for TEE... " >&6; }
11152        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11153$as_echo "disabled" >&6; }
11154      else
11155        # Check if the provided tool contains a complete path.
11156        tool_specified="$TEE"
11157        tool_basename="${tool_specified##*/}"
11158        if test "x$tool_basename" = "x$tool_specified"; then
11159          # A command without a complete path is provided, search $PATH.
11160          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11161$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11162          # Extract the first word of "$tool_basename", so it can be a program name with args.
11163set dummy $tool_basename; ac_word=$2
11164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11165$as_echo_n "checking for $ac_word... " >&6; }
11166if ${ac_cv_path_TEE+:} false; then :
11167  $as_echo_n "(cached) " >&6
11168else
11169  case $TEE in
11170  [\\/]* | ?:[\\/]*)
11171  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11172  ;;
11173  *)
11174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11175for as_dir in $PATH
11176do
11177  IFS=$as_save_IFS
11178  test -z "$as_dir" && as_dir=.
11179    for ac_exec_ext in '' $ac_executable_extensions; do
11180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11181    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11183    break 2
11184  fi
11185done
11186  done
11187IFS=$as_save_IFS
11188
11189  ;;
11190esac
11191fi
11192TEE=$ac_cv_path_TEE
11193if test -n "$TEE"; then
11194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11195$as_echo "$TEE" >&6; }
11196else
11197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11198$as_echo "no" >&6; }
11199fi
11200
11201
11202          if test "x$TEE" = x; then
11203            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11204          fi
11205        else
11206          # Otherwise we believe it is a complete path. Use it as it is.
11207          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11208$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11209          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11210$as_echo_n "checking for TEE... " >&6; }
11211          if test ! -x "$tool_specified"; then
11212            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11213$as_echo "not found" >&6; }
11214            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11215          fi
11216          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11217$as_echo "$tool_specified" >&6; }
11218        fi
11219      fi
11220    fi
11221
11222  fi
11223
11224
11225
11226  if test "x$TEE" = x; then
11227    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11228  fi
11229
11230
11231
11232
11233
11234  # Publish this variable in the help.
11235
11236
11237  if [ -z "${TOUCH+x}" ]; then
11238    # The variable is not set by user, try to locate tool using the code snippet
11239    for ac_prog in touch
11240do
11241  # Extract the first word of "$ac_prog", so it can be a program name with args.
11242set dummy $ac_prog; ac_word=$2
11243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11244$as_echo_n "checking for $ac_word... " >&6; }
11245if ${ac_cv_path_TOUCH+:} false; then :
11246  $as_echo_n "(cached) " >&6
11247else
11248  case $TOUCH in
11249  [\\/]* | ?:[\\/]*)
11250  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11251  ;;
11252  *)
11253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11254for as_dir in $PATH
11255do
11256  IFS=$as_save_IFS
11257  test -z "$as_dir" && as_dir=.
11258    for ac_exec_ext in '' $ac_executable_extensions; do
11259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11260    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11262    break 2
11263  fi
11264done
11265  done
11266IFS=$as_save_IFS
11267
11268  ;;
11269esac
11270fi
11271TOUCH=$ac_cv_path_TOUCH
11272if test -n "$TOUCH"; then
11273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11274$as_echo "$TOUCH" >&6; }
11275else
11276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11277$as_echo "no" >&6; }
11278fi
11279
11280
11281  test -n "$TOUCH" && break
11282done
11283
11284  else
11285    # The variable is set, but is it from the command line or the environment?
11286
11287    # Try to remove the string !TOUCH! from our list.
11288    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11289    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11290      # If it failed, the variable was not from the command line. Ignore it,
11291      # but warn the user (except for BASH, which is always set by the calling BASH).
11292      if test "xTOUCH" != xBASH; then
11293        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11294$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11295      fi
11296      # Try to locate tool using the code snippet
11297      for ac_prog in touch
11298do
11299  # Extract the first word of "$ac_prog", so it can be a program name with args.
11300set dummy $ac_prog; ac_word=$2
11301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11302$as_echo_n "checking for $ac_word... " >&6; }
11303if ${ac_cv_path_TOUCH+:} false; then :
11304  $as_echo_n "(cached) " >&6
11305else
11306  case $TOUCH in
11307  [\\/]* | ?:[\\/]*)
11308  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11309  ;;
11310  *)
11311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11312for as_dir in $PATH
11313do
11314  IFS=$as_save_IFS
11315  test -z "$as_dir" && as_dir=.
11316    for ac_exec_ext in '' $ac_executable_extensions; do
11317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11318    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11320    break 2
11321  fi
11322done
11323  done
11324IFS=$as_save_IFS
11325
11326  ;;
11327esac
11328fi
11329TOUCH=$ac_cv_path_TOUCH
11330if test -n "$TOUCH"; then
11331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11332$as_echo "$TOUCH" >&6; }
11333else
11334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11335$as_echo "no" >&6; }
11336fi
11337
11338
11339  test -n "$TOUCH" && break
11340done
11341
11342    else
11343      # If it succeeded, then it was overridden by the user. We will use it
11344      # for the tool.
11345
11346      # First remove it from the list of overridden variables, so we can test
11347      # for unknown variables in the end.
11348      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11349
11350      # Check if we try to supply an empty value
11351      if test "x$TOUCH" = x; then
11352        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11353$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11354        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11355$as_echo_n "checking for TOUCH... " >&6; }
11356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11357$as_echo "disabled" >&6; }
11358      else
11359        # Check if the provided tool contains a complete path.
11360        tool_specified="$TOUCH"
11361        tool_basename="${tool_specified##*/}"
11362        if test "x$tool_basename" = "x$tool_specified"; then
11363          # A command without a complete path is provided, search $PATH.
11364          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11365$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11366          # Extract the first word of "$tool_basename", so it can be a program name with args.
11367set dummy $tool_basename; ac_word=$2
11368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11369$as_echo_n "checking for $ac_word... " >&6; }
11370if ${ac_cv_path_TOUCH+:} false; then :
11371  $as_echo_n "(cached) " >&6
11372else
11373  case $TOUCH in
11374  [\\/]* | ?:[\\/]*)
11375  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11376  ;;
11377  *)
11378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11379for as_dir in $PATH
11380do
11381  IFS=$as_save_IFS
11382  test -z "$as_dir" && as_dir=.
11383    for ac_exec_ext in '' $ac_executable_extensions; do
11384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11385    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11387    break 2
11388  fi
11389done
11390  done
11391IFS=$as_save_IFS
11392
11393  ;;
11394esac
11395fi
11396TOUCH=$ac_cv_path_TOUCH
11397if test -n "$TOUCH"; then
11398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11399$as_echo "$TOUCH" >&6; }
11400else
11401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11402$as_echo "no" >&6; }
11403fi
11404
11405
11406          if test "x$TOUCH" = x; then
11407            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11408          fi
11409        else
11410          # Otherwise we believe it is a complete path. Use it as it is.
11411          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11412$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11413          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11414$as_echo_n "checking for TOUCH... " >&6; }
11415          if test ! -x "$tool_specified"; then
11416            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11417$as_echo "not found" >&6; }
11418            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11419          fi
11420          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11421$as_echo "$tool_specified" >&6; }
11422        fi
11423      fi
11424    fi
11425
11426  fi
11427
11428
11429
11430  if test "x$TOUCH" = x; then
11431    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11432  fi
11433
11434
11435
11436
11437
11438  # Publish this variable in the help.
11439
11440
11441  if [ -z "${TR+x}" ]; then
11442    # The variable is not set by user, try to locate tool using the code snippet
11443    for ac_prog in tr
11444do
11445  # Extract the first word of "$ac_prog", so it can be a program name with args.
11446set dummy $ac_prog; ac_word=$2
11447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11448$as_echo_n "checking for $ac_word... " >&6; }
11449if ${ac_cv_path_TR+:} false; then :
11450  $as_echo_n "(cached) " >&6
11451else
11452  case $TR in
11453  [\\/]* | ?:[\\/]*)
11454  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11455  ;;
11456  *)
11457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11458for as_dir in $PATH
11459do
11460  IFS=$as_save_IFS
11461  test -z "$as_dir" && as_dir=.
11462    for ac_exec_ext in '' $ac_executable_extensions; do
11463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11464    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11466    break 2
11467  fi
11468done
11469  done
11470IFS=$as_save_IFS
11471
11472  ;;
11473esac
11474fi
11475TR=$ac_cv_path_TR
11476if test -n "$TR"; then
11477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11478$as_echo "$TR" >&6; }
11479else
11480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11481$as_echo "no" >&6; }
11482fi
11483
11484
11485  test -n "$TR" && break
11486done
11487
11488  else
11489    # The variable is set, but is it from the command line or the environment?
11490
11491    # Try to remove the string !TR! from our list.
11492    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11493    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11494      # If it failed, the variable was not from the command line. Ignore it,
11495      # but warn the user (except for BASH, which is always set by the calling BASH).
11496      if test "xTR" != xBASH; then
11497        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11498$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11499      fi
11500      # Try to locate tool using the code snippet
11501      for ac_prog in tr
11502do
11503  # Extract the first word of "$ac_prog", so it can be a program name with args.
11504set dummy $ac_prog; ac_word=$2
11505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11506$as_echo_n "checking for $ac_word... " >&6; }
11507if ${ac_cv_path_TR+:} false; then :
11508  $as_echo_n "(cached) " >&6
11509else
11510  case $TR in
11511  [\\/]* | ?:[\\/]*)
11512  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11513  ;;
11514  *)
11515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11516for as_dir in $PATH
11517do
11518  IFS=$as_save_IFS
11519  test -z "$as_dir" && as_dir=.
11520    for ac_exec_ext in '' $ac_executable_extensions; do
11521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11522    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11524    break 2
11525  fi
11526done
11527  done
11528IFS=$as_save_IFS
11529
11530  ;;
11531esac
11532fi
11533TR=$ac_cv_path_TR
11534if test -n "$TR"; then
11535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11536$as_echo "$TR" >&6; }
11537else
11538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11539$as_echo "no" >&6; }
11540fi
11541
11542
11543  test -n "$TR" && break
11544done
11545
11546    else
11547      # If it succeeded, then it was overridden by the user. We will use it
11548      # for the tool.
11549
11550      # First remove it from the list of overridden variables, so we can test
11551      # for unknown variables in the end.
11552      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11553
11554      # Check if we try to supply an empty value
11555      if test "x$TR" = x; then
11556        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11557$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11558        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11559$as_echo_n "checking for TR... " >&6; }
11560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11561$as_echo "disabled" >&6; }
11562      else
11563        # Check if the provided tool contains a complete path.
11564        tool_specified="$TR"
11565        tool_basename="${tool_specified##*/}"
11566        if test "x$tool_basename" = "x$tool_specified"; then
11567          # A command without a complete path is provided, search $PATH.
11568          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11569$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11570          # Extract the first word of "$tool_basename", so it can be a program name with args.
11571set dummy $tool_basename; ac_word=$2
11572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11573$as_echo_n "checking for $ac_word... " >&6; }
11574if ${ac_cv_path_TR+:} false; then :
11575  $as_echo_n "(cached) " >&6
11576else
11577  case $TR in
11578  [\\/]* | ?:[\\/]*)
11579  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11580  ;;
11581  *)
11582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11583for as_dir in $PATH
11584do
11585  IFS=$as_save_IFS
11586  test -z "$as_dir" && as_dir=.
11587    for ac_exec_ext in '' $ac_executable_extensions; do
11588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11589    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11591    break 2
11592  fi
11593done
11594  done
11595IFS=$as_save_IFS
11596
11597  ;;
11598esac
11599fi
11600TR=$ac_cv_path_TR
11601if test -n "$TR"; then
11602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11603$as_echo "$TR" >&6; }
11604else
11605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11606$as_echo "no" >&6; }
11607fi
11608
11609
11610          if test "x$TR" = x; then
11611            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11612          fi
11613        else
11614          # Otherwise we believe it is a complete path. Use it as it is.
11615          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11616$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11617          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11618$as_echo_n "checking for TR... " >&6; }
11619          if test ! -x "$tool_specified"; then
11620            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11621$as_echo "not found" >&6; }
11622            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11623          fi
11624          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11625$as_echo "$tool_specified" >&6; }
11626        fi
11627      fi
11628    fi
11629
11630  fi
11631
11632
11633
11634  if test "x$TR" = x; then
11635    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11636  fi
11637
11638
11639
11640
11641
11642  # Publish this variable in the help.
11643
11644
11645  if [ -z "${UNAME+x}" ]; then
11646    # The variable is not set by user, try to locate tool using the code snippet
11647    for ac_prog in uname
11648do
11649  # Extract the first word of "$ac_prog", so it can be a program name with args.
11650set dummy $ac_prog; ac_word=$2
11651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11652$as_echo_n "checking for $ac_word... " >&6; }
11653if ${ac_cv_path_UNAME+:} false; then :
11654  $as_echo_n "(cached) " >&6
11655else
11656  case $UNAME in
11657  [\\/]* | ?:[\\/]*)
11658  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11659  ;;
11660  *)
11661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11662for as_dir in $PATH
11663do
11664  IFS=$as_save_IFS
11665  test -z "$as_dir" && as_dir=.
11666    for ac_exec_ext in '' $ac_executable_extensions; do
11667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11668    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11670    break 2
11671  fi
11672done
11673  done
11674IFS=$as_save_IFS
11675
11676  ;;
11677esac
11678fi
11679UNAME=$ac_cv_path_UNAME
11680if test -n "$UNAME"; then
11681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11682$as_echo "$UNAME" >&6; }
11683else
11684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11685$as_echo "no" >&6; }
11686fi
11687
11688
11689  test -n "$UNAME" && break
11690done
11691
11692  else
11693    # The variable is set, but is it from the command line or the environment?
11694
11695    # Try to remove the string !UNAME! from our list.
11696    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11697    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11698      # If it failed, the variable was not from the command line. Ignore it,
11699      # but warn the user (except for BASH, which is always set by the calling BASH).
11700      if test "xUNAME" != xBASH; then
11701        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11702$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11703      fi
11704      # Try to locate tool using the code snippet
11705      for ac_prog in uname
11706do
11707  # Extract the first word of "$ac_prog", so it can be a program name with args.
11708set dummy $ac_prog; ac_word=$2
11709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11710$as_echo_n "checking for $ac_word... " >&6; }
11711if ${ac_cv_path_UNAME+:} false; then :
11712  $as_echo_n "(cached) " >&6
11713else
11714  case $UNAME in
11715  [\\/]* | ?:[\\/]*)
11716  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11717  ;;
11718  *)
11719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11720for as_dir in $PATH
11721do
11722  IFS=$as_save_IFS
11723  test -z "$as_dir" && as_dir=.
11724    for ac_exec_ext in '' $ac_executable_extensions; do
11725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11726    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11728    break 2
11729  fi
11730done
11731  done
11732IFS=$as_save_IFS
11733
11734  ;;
11735esac
11736fi
11737UNAME=$ac_cv_path_UNAME
11738if test -n "$UNAME"; then
11739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11740$as_echo "$UNAME" >&6; }
11741else
11742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11743$as_echo "no" >&6; }
11744fi
11745
11746
11747  test -n "$UNAME" && break
11748done
11749
11750    else
11751      # If it succeeded, then it was overridden by the user. We will use it
11752      # for the tool.
11753
11754      # First remove it from the list of overridden variables, so we can test
11755      # for unknown variables in the end.
11756      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11757
11758      # Check if we try to supply an empty value
11759      if test "x$UNAME" = x; then
11760        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11761$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11762        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11763$as_echo_n "checking for UNAME... " >&6; }
11764        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11765$as_echo "disabled" >&6; }
11766      else
11767        # Check if the provided tool contains a complete path.
11768        tool_specified="$UNAME"
11769        tool_basename="${tool_specified##*/}"
11770        if test "x$tool_basename" = "x$tool_specified"; then
11771          # A command without a complete path is provided, search $PATH.
11772          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11773$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11774          # Extract the first word of "$tool_basename", so it can be a program name with args.
11775set dummy $tool_basename; ac_word=$2
11776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11777$as_echo_n "checking for $ac_word... " >&6; }
11778if ${ac_cv_path_UNAME+:} false; then :
11779  $as_echo_n "(cached) " >&6
11780else
11781  case $UNAME in
11782  [\\/]* | ?:[\\/]*)
11783  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11784  ;;
11785  *)
11786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11787for as_dir in $PATH
11788do
11789  IFS=$as_save_IFS
11790  test -z "$as_dir" && as_dir=.
11791    for ac_exec_ext in '' $ac_executable_extensions; do
11792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11793    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11795    break 2
11796  fi
11797done
11798  done
11799IFS=$as_save_IFS
11800
11801  ;;
11802esac
11803fi
11804UNAME=$ac_cv_path_UNAME
11805if test -n "$UNAME"; then
11806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11807$as_echo "$UNAME" >&6; }
11808else
11809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11810$as_echo "no" >&6; }
11811fi
11812
11813
11814          if test "x$UNAME" = x; then
11815            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11816          fi
11817        else
11818          # Otherwise we believe it is a complete path. Use it as it is.
11819          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11820$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11821          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11822$as_echo_n "checking for UNAME... " >&6; }
11823          if test ! -x "$tool_specified"; then
11824            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11825$as_echo "not found" >&6; }
11826            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11827          fi
11828          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11829$as_echo "$tool_specified" >&6; }
11830        fi
11831      fi
11832    fi
11833
11834  fi
11835
11836
11837
11838  if test "x$UNAME" = x; then
11839    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11840  fi
11841
11842
11843
11844
11845
11846  # Publish this variable in the help.
11847
11848
11849  if [ -z "${UNIQ+x}" ]; then
11850    # The variable is not set by user, try to locate tool using the code snippet
11851    for ac_prog in uniq
11852do
11853  # Extract the first word of "$ac_prog", so it can be a program name with args.
11854set dummy $ac_prog; ac_word=$2
11855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11856$as_echo_n "checking for $ac_word... " >&6; }
11857if ${ac_cv_path_UNIQ+:} false; then :
11858  $as_echo_n "(cached) " >&6
11859else
11860  case $UNIQ in
11861  [\\/]* | ?:[\\/]*)
11862  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11863  ;;
11864  *)
11865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11866for as_dir in $PATH
11867do
11868  IFS=$as_save_IFS
11869  test -z "$as_dir" && as_dir=.
11870    for ac_exec_ext in '' $ac_executable_extensions; do
11871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11872    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11874    break 2
11875  fi
11876done
11877  done
11878IFS=$as_save_IFS
11879
11880  ;;
11881esac
11882fi
11883UNIQ=$ac_cv_path_UNIQ
11884if test -n "$UNIQ"; then
11885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11886$as_echo "$UNIQ" >&6; }
11887else
11888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11889$as_echo "no" >&6; }
11890fi
11891
11892
11893  test -n "$UNIQ" && break
11894done
11895
11896  else
11897    # The variable is set, but is it from the command line or the environment?
11898
11899    # Try to remove the string !UNIQ! from our list.
11900    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11901    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11902      # If it failed, the variable was not from the command line. Ignore it,
11903      # but warn the user (except for BASH, which is always set by the calling BASH).
11904      if test "xUNIQ" != xBASH; then
11905        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11906$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11907      fi
11908      # Try to locate tool using the code snippet
11909      for ac_prog in uniq
11910do
11911  # Extract the first word of "$ac_prog", so it can be a program name with args.
11912set dummy $ac_prog; ac_word=$2
11913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11914$as_echo_n "checking for $ac_word... " >&6; }
11915if ${ac_cv_path_UNIQ+:} false; then :
11916  $as_echo_n "(cached) " >&6
11917else
11918  case $UNIQ in
11919  [\\/]* | ?:[\\/]*)
11920  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11921  ;;
11922  *)
11923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11924for as_dir in $PATH
11925do
11926  IFS=$as_save_IFS
11927  test -z "$as_dir" && as_dir=.
11928    for ac_exec_ext in '' $ac_executable_extensions; do
11929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11930    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11932    break 2
11933  fi
11934done
11935  done
11936IFS=$as_save_IFS
11937
11938  ;;
11939esac
11940fi
11941UNIQ=$ac_cv_path_UNIQ
11942if test -n "$UNIQ"; then
11943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11944$as_echo "$UNIQ" >&6; }
11945else
11946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11947$as_echo "no" >&6; }
11948fi
11949
11950
11951  test -n "$UNIQ" && break
11952done
11953
11954    else
11955      # If it succeeded, then it was overridden by the user. We will use it
11956      # for the tool.
11957
11958      # First remove it from the list of overridden variables, so we can test
11959      # for unknown variables in the end.
11960      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11961
11962      # Check if we try to supply an empty value
11963      if test "x$UNIQ" = x; then
11964        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11965$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11966        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11967$as_echo_n "checking for UNIQ... " >&6; }
11968        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11969$as_echo "disabled" >&6; }
11970      else
11971        # Check if the provided tool contains a complete path.
11972        tool_specified="$UNIQ"
11973        tool_basename="${tool_specified##*/}"
11974        if test "x$tool_basename" = "x$tool_specified"; then
11975          # A command without a complete path is provided, search $PATH.
11976          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11977$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11978          # Extract the first word of "$tool_basename", so it can be a program name with args.
11979set dummy $tool_basename; ac_word=$2
11980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11981$as_echo_n "checking for $ac_word... " >&6; }
11982if ${ac_cv_path_UNIQ+:} false; then :
11983  $as_echo_n "(cached) " >&6
11984else
11985  case $UNIQ in
11986  [\\/]* | ?:[\\/]*)
11987  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11988  ;;
11989  *)
11990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11991for as_dir in $PATH
11992do
11993  IFS=$as_save_IFS
11994  test -z "$as_dir" && as_dir=.
11995    for ac_exec_ext in '' $ac_executable_extensions; do
11996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11997    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11999    break 2
12000  fi
12001done
12002  done
12003IFS=$as_save_IFS
12004
12005  ;;
12006esac
12007fi
12008UNIQ=$ac_cv_path_UNIQ
12009if test -n "$UNIQ"; then
12010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12011$as_echo "$UNIQ" >&6; }
12012else
12013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12014$as_echo "no" >&6; }
12015fi
12016
12017
12018          if test "x$UNIQ" = x; then
12019            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12020          fi
12021        else
12022          # Otherwise we believe it is a complete path. Use it as it is.
12023          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12024$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12025          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12026$as_echo_n "checking for UNIQ... " >&6; }
12027          if test ! -x "$tool_specified"; then
12028            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12029$as_echo "not found" >&6; }
12030            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12031          fi
12032          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12033$as_echo "$tool_specified" >&6; }
12034        fi
12035      fi
12036    fi
12037
12038  fi
12039
12040
12041
12042  if test "x$UNIQ" = x; then
12043    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12044  fi
12045
12046
12047
12048
12049
12050  # Publish this variable in the help.
12051
12052
12053  if [ -z "${WC+x}" ]; then
12054    # The variable is not set by user, try to locate tool using the code snippet
12055    for ac_prog in wc
12056do
12057  # Extract the first word of "$ac_prog", so it can be a program name with args.
12058set dummy $ac_prog; ac_word=$2
12059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12060$as_echo_n "checking for $ac_word... " >&6; }
12061if ${ac_cv_path_WC+:} false; then :
12062  $as_echo_n "(cached) " >&6
12063else
12064  case $WC in
12065  [\\/]* | ?:[\\/]*)
12066  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12067  ;;
12068  *)
12069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12070for as_dir in $PATH
12071do
12072  IFS=$as_save_IFS
12073  test -z "$as_dir" && as_dir=.
12074    for ac_exec_ext in '' $ac_executable_extensions; do
12075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12076    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12078    break 2
12079  fi
12080done
12081  done
12082IFS=$as_save_IFS
12083
12084  ;;
12085esac
12086fi
12087WC=$ac_cv_path_WC
12088if test -n "$WC"; then
12089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12090$as_echo "$WC" >&6; }
12091else
12092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12093$as_echo "no" >&6; }
12094fi
12095
12096
12097  test -n "$WC" && break
12098done
12099
12100  else
12101    # The variable is set, but is it from the command line or the environment?
12102
12103    # Try to remove the string !WC! from our list.
12104    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12105    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12106      # If it failed, the variable was not from the command line. Ignore it,
12107      # but warn the user (except for BASH, which is always set by the calling BASH).
12108      if test "xWC" != xBASH; then
12109        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12110$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12111      fi
12112      # Try to locate tool using the code snippet
12113      for ac_prog in wc
12114do
12115  # Extract the first word of "$ac_prog", so it can be a program name with args.
12116set dummy $ac_prog; ac_word=$2
12117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12118$as_echo_n "checking for $ac_word... " >&6; }
12119if ${ac_cv_path_WC+:} false; then :
12120  $as_echo_n "(cached) " >&6
12121else
12122  case $WC in
12123  [\\/]* | ?:[\\/]*)
12124  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12125  ;;
12126  *)
12127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12128for as_dir in $PATH
12129do
12130  IFS=$as_save_IFS
12131  test -z "$as_dir" && as_dir=.
12132    for ac_exec_ext in '' $ac_executable_extensions; do
12133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12134    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12136    break 2
12137  fi
12138done
12139  done
12140IFS=$as_save_IFS
12141
12142  ;;
12143esac
12144fi
12145WC=$ac_cv_path_WC
12146if test -n "$WC"; then
12147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12148$as_echo "$WC" >&6; }
12149else
12150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12151$as_echo "no" >&6; }
12152fi
12153
12154
12155  test -n "$WC" && break
12156done
12157
12158    else
12159      # If it succeeded, then it was overridden by the user. We will use it
12160      # for the tool.
12161
12162      # First remove it from the list of overridden variables, so we can test
12163      # for unknown variables in the end.
12164      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12165
12166      # Check if we try to supply an empty value
12167      if test "x$WC" = x; then
12168        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12169$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12170        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12171$as_echo_n "checking for WC... " >&6; }
12172        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12173$as_echo "disabled" >&6; }
12174      else
12175        # Check if the provided tool contains a complete path.
12176        tool_specified="$WC"
12177        tool_basename="${tool_specified##*/}"
12178        if test "x$tool_basename" = "x$tool_specified"; then
12179          # A command without a complete path is provided, search $PATH.
12180          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12181$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12182          # Extract the first word of "$tool_basename", so it can be a program name with args.
12183set dummy $tool_basename; ac_word=$2
12184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12185$as_echo_n "checking for $ac_word... " >&6; }
12186if ${ac_cv_path_WC+:} false; then :
12187  $as_echo_n "(cached) " >&6
12188else
12189  case $WC in
12190  [\\/]* | ?:[\\/]*)
12191  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12192  ;;
12193  *)
12194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12195for as_dir in $PATH
12196do
12197  IFS=$as_save_IFS
12198  test -z "$as_dir" && as_dir=.
12199    for ac_exec_ext in '' $ac_executable_extensions; do
12200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12201    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12203    break 2
12204  fi
12205done
12206  done
12207IFS=$as_save_IFS
12208
12209  ;;
12210esac
12211fi
12212WC=$ac_cv_path_WC
12213if test -n "$WC"; then
12214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12215$as_echo "$WC" >&6; }
12216else
12217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12218$as_echo "no" >&6; }
12219fi
12220
12221
12222          if test "x$WC" = x; then
12223            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12224          fi
12225        else
12226          # Otherwise we believe it is a complete path. Use it as it is.
12227          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12228$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12229          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12230$as_echo_n "checking for WC... " >&6; }
12231          if test ! -x "$tool_specified"; then
12232            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12233$as_echo "not found" >&6; }
12234            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12235          fi
12236          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12237$as_echo "$tool_specified" >&6; }
12238        fi
12239      fi
12240    fi
12241
12242  fi
12243
12244
12245
12246  if test "x$WC" = x; then
12247    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12248  fi
12249
12250
12251
12252
12253
12254  # Publish this variable in the help.
12255
12256
12257  if [ -z "${WHICH+x}" ]; then
12258    # The variable is not set by user, try to locate tool using the code snippet
12259    for ac_prog in which
12260do
12261  # Extract the first word of "$ac_prog", so it can be a program name with args.
12262set dummy $ac_prog; ac_word=$2
12263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12264$as_echo_n "checking for $ac_word... " >&6; }
12265if ${ac_cv_path_WHICH+:} false; then :
12266  $as_echo_n "(cached) " >&6
12267else
12268  case $WHICH in
12269  [\\/]* | ?:[\\/]*)
12270  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12271  ;;
12272  *)
12273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12274for as_dir in $PATH
12275do
12276  IFS=$as_save_IFS
12277  test -z "$as_dir" && as_dir=.
12278    for ac_exec_ext in '' $ac_executable_extensions; do
12279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12280    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12282    break 2
12283  fi
12284done
12285  done
12286IFS=$as_save_IFS
12287
12288  ;;
12289esac
12290fi
12291WHICH=$ac_cv_path_WHICH
12292if test -n "$WHICH"; then
12293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12294$as_echo "$WHICH" >&6; }
12295else
12296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12297$as_echo "no" >&6; }
12298fi
12299
12300
12301  test -n "$WHICH" && break
12302done
12303
12304  else
12305    # The variable is set, but is it from the command line or the environment?
12306
12307    # Try to remove the string !WHICH! from our list.
12308    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12309    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12310      # If it failed, the variable was not from the command line. Ignore it,
12311      # but warn the user (except for BASH, which is always set by the calling BASH).
12312      if test "xWHICH" != xBASH; then
12313        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12314$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12315      fi
12316      # Try to locate tool using the code snippet
12317      for ac_prog in which
12318do
12319  # Extract the first word of "$ac_prog", so it can be a program name with args.
12320set dummy $ac_prog; ac_word=$2
12321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12322$as_echo_n "checking for $ac_word... " >&6; }
12323if ${ac_cv_path_WHICH+:} false; then :
12324  $as_echo_n "(cached) " >&6
12325else
12326  case $WHICH in
12327  [\\/]* | ?:[\\/]*)
12328  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12329  ;;
12330  *)
12331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12332for as_dir in $PATH
12333do
12334  IFS=$as_save_IFS
12335  test -z "$as_dir" && as_dir=.
12336    for ac_exec_ext in '' $ac_executable_extensions; do
12337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12338    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12340    break 2
12341  fi
12342done
12343  done
12344IFS=$as_save_IFS
12345
12346  ;;
12347esac
12348fi
12349WHICH=$ac_cv_path_WHICH
12350if test -n "$WHICH"; then
12351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12352$as_echo "$WHICH" >&6; }
12353else
12354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12355$as_echo "no" >&6; }
12356fi
12357
12358
12359  test -n "$WHICH" && break
12360done
12361
12362    else
12363      # If it succeeded, then it was overridden by the user. We will use it
12364      # for the tool.
12365
12366      # First remove it from the list of overridden variables, so we can test
12367      # for unknown variables in the end.
12368      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12369
12370      # Check if we try to supply an empty value
12371      if test "x$WHICH" = x; then
12372        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12373$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12374        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12375$as_echo_n "checking for WHICH... " >&6; }
12376        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12377$as_echo "disabled" >&6; }
12378      else
12379        # Check if the provided tool contains a complete path.
12380        tool_specified="$WHICH"
12381        tool_basename="${tool_specified##*/}"
12382        if test "x$tool_basename" = "x$tool_specified"; then
12383          # A command without a complete path is provided, search $PATH.
12384          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12385$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12386          # Extract the first word of "$tool_basename", so it can be a program name with args.
12387set dummy $tool_basename; ac_word=$2
12388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12389$as_echo_n "checking for $ac_word... " >&6; }
12390if ${ac_cv_path_WHICH+:} false; then :
12391  $as_echo_n "(cached) " >&6
12392else
12393  case $WHICH in
12394  [\\/]* | ?:[\\/]*)
12395  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12396  ;;
12397  *)
12398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12399for as_dir in $PATH
12400do
12401  IFS=$as_save_IFS
12402  test -z "$as_dir" && as_dir=.
12403    for ac_exec_ext in '' $ac_executable_extensions; do
12404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12405    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12407    break 2
12408  fi
12409done
12410  done
12411IFS=$as_save_IFS
12412
12413  ;;
12414esac
12415fi
12416WHICH=$ac_cv_path_WHICH
12417if test -n "$WHICH"; then
12418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12419$as_echo "$WHICH" >&6; }
12420else
12421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12422$as_echo "no" >&6; }
12423fi
12424
12425
12426          if test "x$WHICH" = x; then
12427            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12428          fi
12429        else
12430          # Otherwise we believe it is a complete path. Use it as it is.
12431          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12432$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12433          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12434$as_echo_n "checking for WHICH... " >&6; }
12435          if test ! -x "$tool_specified"; then
12436            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12437$as_echo "not found" >&6; }
12438            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12439          fi
12440          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12441$as_echo "$tool_specified" >&6; }
12442        fi
12443      fi
12444    fi
12445
12446  fi
12447
12448
12449
12450  if test "x$WHICH" = x; then
12451    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12452  fi
12453
12454
12455
12456
12457
12458  # Publish this variable in the help.
12459
12460
12461  if [ -z "${XARGS+x}" ]; then
12462    # The variable is not set by user, try to locate tool using the code snippet
12463    for ac_prog in xargs
12464do
12465  # Extract the first word of "$ac_prog", so it can be a program name with args.
12466set dummy $ac_prog; ac_word=$2
12467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12468$as_echo_n "checking for $ac_word... " >&6; }
12469if ${ac_cv_path_XARGS+:} false; then :
12470  $as_echo_n "(cached) " >&6
12471else
12472  case $XARGS in
12473  [\\/]* | ?:[\\/]*)
12474  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12475  ;;
12476  *)
12477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12478for as_dir in $PATH
12479do
12480  IFS=$as_save_IFS
12481  test -z "$as_dir" && as_dir=.
12482    for ac_exec_ext in '' $ac_executable_extensions; do
12483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12484    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12486    break 2
12487  fi
12488done
12489  done
12490IFS=$as_save_IFS
12491
12492  ;;
12493esac
12494fi
12495XARGS=$ac_cv_path_XARGS
12496if test -n "$XARGS"; then
12497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12498$as_echo "$XARGS" >&6; }
12499else
12500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12501$as_echo "no" >&6; }
12502fi
12503
12504
12505  test -n "$XARGS" && break
12506done
12507
12508  else
12509    # The variable is set, but is it from the command line or the environment?
12510
12511    # Try to remove the string !XARGS! from our list.
12512    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12513    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12514      # If it failed, the variable was not from the command line. Ignore it,
12515      # but warn the user (except for BASH, which is always set by the calling BASH).
12516      if test "xXARGS" != xBASH; then
12517        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12518$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12519      fi
12520      # Try to locate tool using the code snippet
12521      for ac_prog in xargs
12522do
12523  # Extract the first word of "$ac_prog", so it can be a program name with args.
12524set dummy $ac_prog; ac_word=$2
12525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12526$as_echo_n "checking for $ac_word... " >&6; }
12527if ${ac_cv_path_XARGS+:} false; then :
12528  $as_echo_n "(cached) " >&6
12529else
12530  case $XARGS in
12531  [\\/]* | ?:[\\/]*)
12532  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12533  ;;
12534  *)
12535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12536for as_dir in $PATH
12537do
12538  IFS=$as_save_IFS
12539  test -z "$as_dir" && as_dir=.
12540    for ac_exec_ext in '' $ac_executable_extensions; do
12541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12542    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12544    break 2
12545  fi
12546done
12547  done
12548IFS=$as_save_IFS
12549
12550  ;;
12551esac
12552fi
12553XARGS=$ac_cv_path_XARGS
12554if test -n "$XARGS"; then
12555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12556$as_echo "$XARGS" >&6; }
12557else
12558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12559$as_echo "no" >&6; }
12560fi
12561
12562
12563  test -n "$XARGS" && break
12564done
12565
12566    else
12567      # If it succeeded, then it was overridden by the user. We will use it
12568      # for the tool.
12569
12570      # First remove it from the list of overridden variables, so we can test
12571      # for unknown variables in the end.
12572      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12573
12574      # Check if we try to supply an empty value
12575      if test "x$XARGS" = x; then
12576        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12577$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12578        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12579$as_echo_n "checking for XARGS... " >&6; }
12580        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12581$as_echo "disabled" >&6; }
12582      else
12583        # Check if the provided tool contains a complete path.
12584        tool_specified="$XARGS"
12585        tool_basename="${tool_specified##*/}"
12586        if test "x$tool_basename" = "x$tool_specified"; then
12587          # A command without a complete path is provided, search $PATH.
12588          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12589$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12590          # Extract the first word of "$tool_basename", so it can be a program name with args.
12591set dummy $tool_basename; ac_word=$2
12592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12593$as_echo_n "checking for $ac_word... " >&6; }
12594if ${ac_cv_path_XARGS+:} false; then :
12595  $as_echo_n "(cached) " >&6
12596else
12597  case $XARGS in
12598  [\\/]* | ?:[\\/]*)
12599  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12600  ;;
12601  *)
12602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12603for as_dir in $PATH
12604do
12605  IFS=$as_save_IFS
12606  test -z "$as_dir" && as_dir=.
12607    for ac_exec_ext in '' $ac_executable_extensions; do
12608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12609    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12611    break 2
12612  fi
12613done
12614  done
12615IFS=$as_save_IFS
12616
12617  ;;
12618esac
12619fi
12620XARGS=$ac_cv_path_XARGS
12621if test -n "$XARGS"; then
12622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12623$as_echo "$XARGS" >&6; }
12624else
12625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12626$as_echo "no" >&6; }
12627fi
12628
12629
12630          if test "x$XARGS" = x; then
12631            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12632          fi
12633        else
12634          # Otherwise we believe it is a complete path. Use it as it is.
12635          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12636$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12637          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12638$as_echo_n "checking for XARGS... " >&6; }
12639          if test ! -x "$tool_specified"; then
12640            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12641$as_echo "not found" >&6; }
12642            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12643          fi
12644          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12645$as_echo "$tool_specified" >&6; }
12646        fi
12647      fi
12648    fi
12649
12650  fi
12651
12652
12653
12654  if test "x$XARGS" = x; then
12655    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12656  fi
12657
12658
12659
12660  # Then required tools that require some special treatment.
12661
12662
12663  # Publish this variable in the help.
12664
12665
12666  if [ -z "${AWK+x}" ]; then
12667    # The variable is not set by user, try to locate tool using the code snippet
12668    for ac_prog in gawk mawk nawk awk
12669do
12670  # Extract the first word of "$ac_prog", so it can be a program name with args.
12671set dummy $ac_prog; ac_word=$2
12672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12673$as_echo_n "checking for $ac_word... " >&6; }
12674if ${ac_cv_prog_AWK+:} false; then :
12675  $as_echo_n "(cached) " >&6
12676else
12677  if test -n "$AWK"; then
12678  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12679else
12680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12681for as_dir in $PATH
12682do
12683  IFS=$as_save_IFS
12684  test -z "$as_dir" && as_dir=.
12685    for ac_exec_ext in '' $ac_executable_extensions; do
12686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12687    ac_cv_prog_AWK="$ac_prog"
12688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12689    break 2
12690  fi
12691done
12692  done
12693IFS=$as_save_IFS
12694
12695fi
12696fi
12697AWK=$ac_cv_prog_AWK
12698if test -n "$AWK"; then
12699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12700$as_echo "$AWK" >&6; }
12701else
12702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12703$as_echo "no" >&6; }
12704fi
12705
12706
12707  test -n "$AWK" && break
12708done
12709
12710  else
12711    # The variable is set, but is it from the command line or the environment?
12712
12713    # Try to remove the string !AWK! from our list.
12714    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12715    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12716      # If it failed, the variable was not from the command line. Ignore it,
12717      # but warn the user (except for BASH, which is always set by the calling BASH).
12718      if test "xAWK" != xBASH; then
12719        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12720$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12721      fi
12722      # Try to locate tool using the code snippet
12723      for ac_prog in gawk mawk nawk awk
12724do
12725  # Extract the first word of "$ac_prog", so it can be a program name with args.
12726set dummy $ac_prog; ac_word=$2
12727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12728$as_echo_n "checking for $ac_word... " >&6; }
12729if ${ac_cv_prog_AWK+:} false; then :
12730  $as_echo_n "(cached) " >&6
12731else
12732  if test -n "$AWK"; then
12733  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12734else
12735as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12736for as_dir in $PATH
12737do
12738  IFS=$as_save_IFS
12739  test -z "$as_dir" && as_dir=.
12740    for ac_exec_ext in '' $ac_executable_extensions; do
12741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12742    ac_cv_prog_AWK="$ac_prog"
12743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12744    break 2
12745  fi
12746done
12747  done
12748IFS=$as_save_IFS
12749
12750fi
12751fi
12752AWK=$ac_cv_prog_AWK
12753if test -n "$AWK"; then
12754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12755$as_echo "$AWK" >&6; }
12756else
12757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12758$as_echo "no" >&6; }
12759fi
12760
12761
12762  test -n "$AWK" && break
12763done
12764
12765    else
12766      # If it succeeded, then it was overridden by the user. We will use it
12767      # for the tool.
12768
12769      # First remove it from the list of overridden variables, so we can test
12770      # for unknown variables in the end.
12771      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12772
12773      # Check if we try to supply an empty value
12774      if test "x$AWK" = x; then
12775        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12776$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12777        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12778$as_echo_n "checking for AWK... " >&6; }
12779        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12780$as_echo "disabled" >&6; }
12781      else
12782        # Check if the provided tool contains a complete path.
12783        tool_specified="$AWK"
12784        tool_basename="${tool_specified##*/}"
12785        if test "x$tool_basename" = "x$tool_specified"; then
12786          # A command without a complete path is provided, search $PATH.
12787          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12788$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12789          # Extract the first word of "$tool_basename", so it can be a program name with args.
12790set dummy $tool_basename; ac_word=$2
12791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12792$as_echo_n "checking for $ac_word... " >&6; }
12793if ${ac_cv_path_AWK+:} false; then :
12794  $as_echo_n "(cached) " >&6
12795else
12796  case $AWK in
12797  [\\/]* | ?:[\\/]*)
12798  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12799  ;;
12800  *)
12801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12802for as_dir in $PATH
12803do
12804  IFS=$as_save_IFS
12805  test -z "$as_dir" && as_dir=.
12806    for ac_exec_ext in '' $ac_executable_extensions; do
12807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12808    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12810    break 2
12811  fi
12812done
12813  done
12814IFS=$as_save_IFS
12815
12816  ;;
12817esac
12818fi
12819AWK=$ac_cv_path_AWK
12820if test -n "$AWK"; then
12821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12822$as_echo "$AWK" >&6; }
12823else
12824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12825$as_echo "no" >&6; }
12826fi
12827
12828
12829          if test "x$AWK" = x; then
12830            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12831          fi
12832        else
12833          # Otherwise we believe it is a complete path. Use it as it is.
12834          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12835$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12836          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12837$as_echo_n "checking for AWK... " >&6; }
12838          if test ! -x "$tool_specified"; then
12839            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12840$as_echo "not found" >&6; }
12841            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12842          fi
12843          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12844$as_echo "$tool_specified" >&6; }
12845        fi
12846      fi
12847    fi
12848
12849  fi
12850
12851
12852  if test "x$AWK" = x; then
12853    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12854  fi
12855
12856
12857
12858
12859  # Publish this variable in the help.
12860
12861
12862  if [ -z "${GREP+x}" ]; then
12863    # The variable is not set by user, try to locate tool using the code snippet
12864    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12865$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12866if ${ac_cv_path_GREP+:} false; then :
12867  $as_echo_n "(cached) " >&6
12868else
12869  if test -z "$GREP"; then
12870  ac_path_GREP_found=false
12871  # Loop through the user's path and test for each of PROGNAME-LIST
12872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12873for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12874do
12875  IFS=$as_save_IFS
12876  test -z "$as_dir" && as_dir=.
12877    for ac_prog in grep ggrep; do
12878    for ac_exec_ext in '' $ac_executable_extensions; do
12879      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12880      as_fn_executable_p "$ac_path_GREP" || continue
12881# Check for GNU ac_path_GREP and select it if it is found.
12882  # Check for GNU $ac_path_GREP
12883case `"$ac_path_GREP" --version 2>&1` in
12884*GNU*)
12885  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12886*)
12887  ac_count=0
12888  $as_echo_n 0123456789 >"conftest.in"
12889  while :
12890  do
12891    cat "conftest.in" "conftest.in" >"conftest.tmp"
12892    mv "conftest.tmp" "conftest.in"
12893    cp "conftest.in" "conftest.nl"
12894    $as_echo 'GREP' >> "conftest.nl"
12895    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12896    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12897    as_fn_arith $ac_count + 1 && ac_count=$as_val
12898    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12899      # Best one so far, save it but keep looking for a better one
12900      ac_cv_path_GREP="$ac_path_GREP"
12901      ac_path_GREP_max=$ac_count
12902    fi
12903    # 10*(2^10) chars as input seems more than enough
12904    test $ac_count -gt 10 && break
12905  done
12906  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12907esac
12908
12909      $ac_path_GREP_found && break 3
12910    done
12911  done
12912  done
12913IFS=$as_save_IFS
12914  if test -z "$ac_cv_path_GREP"; then
12915    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12916  fi
12917else
12918  ac_cv_path_GREP=$GREP
12919fi
12920
12921fi
12922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12923$as_echo "$ac_cv_path_GREP" >&6; }
12924 GREP="$ac_cv_path_GREP"
12925
12926
12927  else
12928    # The variable is set, but is it from the command line or the environment?
12929
12930    # Try to remove the string !GREP! from our list.
12931    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12932    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12933      # If it failed, the variable was not from the command line. Ignore it,
12934      # but warn the user (except for BASH, which is always set by the calling BASH).
12935      if test "xGREP" != xBASH; then
12936        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12937$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12938      fi
12939      # Try to locate tool using the code snippet
12940      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12941$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12942if ${ac_cv_path_GREP+:} false; then :
12943  $as_echo_n "(cached) " >&6
12944else
12945  if test -z "$GREP"; then
12946  ac_path_GREP_found=false
12947  # Loop through the user's path and test for each of PROGNAME-LIST
12948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12949for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12950do
12951  IFS=$as_save_IFS
12952  test -z "$as_dir" && as_dir=.
12953    for ac_prog in grep ggrep; do
12954    for ac_exec_ext in '' $ac_executable_extensions; do
12955      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12956      as_fn_executable_p "$ac_path_GREP" || continue
12957# Check for GNU ac_path_GREP and select it if it is found.
12958  # Check for GNU $ac_path_GREP
12959case `"$ac_path_GREP" --version 2>&1` in
12960*GNU*)
12961  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12962*)
12963  ac_count=0
12964  $as_echo_n 0123456789 >"conftest.in"
12965  while :
12966  do
12967    cat "conftest.in" "conftest.in" >"conftest.tmp"
12968    mv "conftest.tmp" "conftest.in"
12969    cp "conftest.in" "conftest.nl"
12970    $as_echo 'GREP' >> "conftest.nl"
12971    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12972    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12973    as_fn_arith $ac_count + 1 && ac_count=$as_val
12974    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12975      # Best one so far, save it but keep looking for a better one
12976      ac_cv_path_GREP="$ac_path_GREP"
12977      ac_path_GREP_max=$ac_count
12978    fi
12979    # 10*(2^10) chars as input seems more than enough
12980    test $ac_count -gt 10 && break
12981  done
12982  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12983esac
12984
12985      $ac_path_GREP_found && break 3
12986    done
12987  done
12988  done
12989IFS=$as_save_IFS
12990  if test -z "$ac_cv_path_GREP"; then
12991    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12992  fi
12993else
12994  ac_cv_path_GREP=$GREP
12995fi
12996
12997fi
12998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12999$as_echo "$ac_cv_path_GREP" >&6; }
13000 GREP="$ac_cv_path_GREP"
13001
13002
13003    else
13004      # If it succeeded, then it was overridden by the user. We will use it
13005      # for the tool.
13006
13007      # First remove it from the list of overridden variables, so we can test
13008      # for unknown variables in the end.
13009      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13010
13011      # Check if we try to supply an empty value
13012      if test "x$GREP" = x; then
13013        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13014$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13015        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13016$as_echo_n "checking for GREP... " >&6; }
13017        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13018$as_echo "disabled" >&6; }
13019      else
13020        # Check if the provided tool contains a complete path.
13021        tool_specified="$GREP"
13022        tool_basename="${tool_specified##*/}"
13023        if test "x$tool_basename" = "x$tool_specified"; then
13024          # A command without a complete path is provided, search $PATH.
13025          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13026$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13027          # Extract the first word of "$tool_basename", so it can be a program name with args.
13028set dummy $tool_basename; ac_word=$2
13029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13030$as_echo_n "checking for $ac_word... " >&6; }
13031if ${ac_cv_path_GREP+:} false; then :
13032  $as_echo_n "(cached) " >&6
13033else
13034  case $GREP in
13035  [\\/]* | ?:[\\/]*)
13036  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13037  ;;
13038  *)
13039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13040for as_dir in $PATH
13041do
13042  IFS=$as_save_IFS
13043  test -z "$as_dir" && as_dir=.
13044    for ac_exec_ext in '' $ac_executable_extensions; do
13045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13046    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13048    break 2
13049  fi
13050done
13051  done
13052IFS=$as_save_IFS
13053
13054  ;;
13055esac
13056fi
13057GREP=$ac_cv_path_GREP
13058if test -n "$GREP"; then
13059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13060$as_echo "$GREP" >&6; }
13061else
13062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13063$as_echo "no" >&6; }
13064fi
13065
13066
13067          if test "x$GREP" = x; then
13068            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13069          fi
13070        else
13071          # Otherwise we believe it is a complete path. Use it as it is.
13072          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13073$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13074          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13075$as_echo_n "checking for GREP... " >&6; }
13076          if test ! -x "$tool_specified"; then
13077            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13078$as_echo "not found" >&6; }
13079            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13080          fi
13081          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13082$as_echo "$tool_specified" >&6; }
13083        fi
13084      fi
13085    fi
13086
13087  fi
13088
13089
13090  if test "x$GREP" = x; then
13091    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13092  fi
13093
13094
13095
13096
13097  # Publish this variable in the help.
13098
13099
13100  if [ -z "${EGREP+x}" ]; then
13101    # The variable is not set by user, try to locate tool using the code snippet
13102    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13103$as_echo_n "checking for egrep... " >&6; }
13104if ${ac_cv_path_EGREP+:} false; then :
13105  $as_echo_n "(cached) " >&6
13106else
13107  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13108   then ac_cv_path_EGREP="$GREP -E"
13109   else
13110     if test -z "$EGREP"; then
13111  ac_path_EGREP_found=false
13112  # Loop through the user's path and test for each of PROGNAME-LIST
13113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13114for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13115do
13116  IFS=$as_save_IFS
13117  test -z "$as_dir" && as_dir=.
13118    for ac_prog in egrep; do
13119    for ac_exec_ext in '' $ac_executable_extensions; do
13120      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13121      as_fn_executable_p "$ac_path_EGREP" || continue
13122# Check for GNU ac_path_EGREP and select it if it is found.
13123  # Check for GNU $ac_path_EGREP
13124case `"$ac_path_EGREP" --version 2>&1` in
13125*GNU*)
13126  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13127*)
13128  ac_count=0
13129  $as_echo_n 0123456789 >"conftest.in"
13130  while :
13131  do
13132    cat "conftest.in" "conftest.in" >"conftest.tmp"
13133    mv "conftest.tmp" "conftest.in"
13134    cp "conftest.in" "conftest.nl"
13135    $as_echo 'EGREP' >> "conftest.nl"
13136    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13137    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13138    as_fn_arith $ac_count + 1 && ac_count=$as_val
13139    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13140      # Best one so far, save it but keep looking for a better one
13141      ac_cv_path_EGREP="$ac_path_EGREP"
13142      ac_path_EGREP_max=$ac_count
13143    fi
13144    # 10*(2^10) chars as input seems more than enough
13145    test $ac_count -gt 10 && break
13146  done
13147  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13148esac
13149
13150      $ac_path_EGREP_found && break 3
13151    done
13152  done
13153  done
13154IFS=$as_save_IFS
13155  if test -z "$ac_cv_path_EGREP"; then
13156    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13157  fi
13158else
13159  ac_cv_path_EGREP=$EGREP
13160fi
13161
13162   fi
13163fi
13164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13165$as_echo "$ac_cv_path_EGREP" >&6; }
13166 EGREP="$ac_cv_path_EGREP"
13167
13168
13169  else
13170    # The variable is set, but is it from the command line or the environment?
13171
13172    # Try to remove the string !EGREP! from our list.
13173    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13174    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13175      # If it failed, the variable was not from the command line. Ignore it,
13176      # but warn the user (except for BASH, which is always set by the calling BASH).
13177      if test "xEGREP" != xBASH; then
13178        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13179$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13180      fi
13181      # Try to locate tool using the code snippet
13182      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13183$as_echo_n "checking for egrep... " >&6; }
13184if ${ac_cv_path_EGREP+:} false; then :
13185  $as_echo_n "(cached) " >&6
13186else
13187  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13188   then ac_cv_path_EGREP="$GREP -E"
13189   else
13190     if test -z "$EGREP"; then
13191  ac_path_EGREP_found=false
13192  # Loop through the user's path and test for each of PROGNAME-LIST
13193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13194for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13195do
13196  IFS=$as_save_IFS
13197  test -z "$as_dir" && as_dir=.
13198    for ac_prog in egrep; do
13199    for ac_exec_ext in '' $ac_executable_extensions; do
13200      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13201      as_fn_executable_p "$ac_path_EGREP" || continue
13202# Check for GNU ac_path_EGREP and select it if it is found.
13203  # Check for GNU $ac_path_EGREP
13204case `"$ac_path_EGREP" --version 2>&1` in
13205*GNU*)
13206  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13207*)
13208  ac_count=0
13209  $as_echo_n 0123456789 >"conftest.in"
13210  while :
13211  do
13212    cat "conftest.in" "conftest.in" >"conftest.tmp"
13213    mv "conftest.tmp" "conftest.in"
13214    cp "conftest.in" "conftest.nl"
13215    $as_echo 'EGREP' >> "conftest.nl"
13216    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13217    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13218    as_fn_arith $ac_count + 1 && ac_count=$as_val
13219    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13220      # Best one so far, save it but keep looking for a better one
13221      ac_cv_path_EGREP="$ac_path_EGREP"
13222      ac_path_EGREP_max=$ac_count
13223    fi
13224    # 10*(2^10) chars as input seems more than enough
13225    test $ac_count -gt 10 && break
13226  done
13227  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13228esac
13229
13230      $ac_path_EGREP_found && break 3
13231    done
13232  done
13233  done
13234IFS=$as_save_IFS
13235  if test -z "$ac_cv_path_EGREP"; then
13236    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13237  fi
13238else
13239  ac_cv_path_EGREP=$EGREP
13240fi
13241
13242   fi
13243fi
13244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13245$as_echo "$ac_cv_path_EGREP" >&6; }
13246 EGREP="$ac_cv_path_EGREP"
13247
13248
13249    else
13250      # If it succeeded, then it was overridden by the user. We will use it
13251      # for the tool.
13252
13253      # First remove it from the list of overridden variables, so we can test
13254      # for unknown variables in the end.
13255      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13256
13257      # Check if we try to supply an empty value
13258      if test "x$EGREP" = x; then
13259        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13260$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13261        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13262$as_echo_n "checking for EGREP... " >&6; }
13263        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13264$as_echo "disabled" >&6; }
13265      else
13266        # Check if the provided tool contains a complete path.
13267        tool_specified="$EGREP"
13268        tool_basename="${tool_specified##*/}"
13269        if test "x$tool_basename" = "x$tool_specified"; then
13270          # A command without a complete path is provided, search $PATH.
13271          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13272$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13273          # Extract the first word of "$tool_basename", so it can be a program name with args.
13274set dummy $tool_basename; ac_word=$2
13275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13276$as_echo_n "checking for $ac_word... " >&6; }
13277if ${ac_cv_path_EGREP+:} false; then :
13278  $as_echo_n "(cached) " >&6
13279else
13280  case $EGREP in
13281  [\\/]* | ?:[\\/]*)
13282  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13283  ;;
13284  *)
13285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13286for as_dir in $PATH
13287do
13288  IFS=$as_save_IFS
13289  test -z "$as_dir" && as_dir=.
13290    for ac_exec_ext in '' $ac_executable_extensions; do
13291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13292    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13294    break 2
13295  fi
13296done
13297  done
13298IFS=$as_save_IFS
13299
13300  ;;
13301esac
13302fi
13303EGREP=$ac_cv_path_EGREP
13304if test -n "$EGREP"; then
13305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13306$as_echo "$EGREP" >&6; }
13307else
13308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13309$as_echo "no" >&6; }
13310fi
13311
13312
13313          if test "x$EGREP" = x; then
13314            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13315          fi
13316        else
13317          # Otherwise we believe it is a complete path. Use it as it is.
13318          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13319$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13320          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13321$as_echo_n "checking for EGREP... " >&6; }
13322          if test ! -x "$tool_specified"; then
13323            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13324$as_echo "not found" >&6; }
13325            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13326          fi
13327          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13328$as_echo "$tool_specified" >&6; }
13329        fi
13330      fi
13331    fi
13332
13333  fi
13334
13335
13336  if test "x$EGREP" = x; then
13337    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13338  fi
13339
13340
13341
13342
13343  # Publish this variable in the help.
13344
13345
13346  if [ -z "${FGREP+x}" ]; then
13347    # The variable is not set by user, try to locate tool using the code snippet
13348    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13349$as_echo_n "checking for fgrep... " >&6; }
13350if ${ac_cv_path_FGREP+:} false; then :
13351  $as_echo_n "(cached) " >&6
13352else
13353  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13354   then ac_cv_path_FGREP="$GREP -F"
13355   else
13356     if test -z "$FGREP"; then
13357  ac_path_FGREP_found=false
13358  # Loop through the user's path and test for each of PROGNAME-LIST
13359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13360for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13361do
13362  IFS=$as_save_IFS
13363  test -z "$as_dir" && as_dir=.
13364    for ac_prog in fgrep; do
13365    for ac_exec_ext in '' $ac_executable_extensions; do
13366      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13367      as_fn_executable_p "$ac_path_FGREP" || continue
13368# Check for GNU ac_path_FGREP and select it if it is found.
13369  # Check for GNU $ac_path_FGREP
13370case `"$ac_path_FGREP" --version 2>&1` in
13371*GNU*)
13372  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13373*)
13374  ac_count=0
13375  $as_echo_n 0123456789 >"conftest.in"
13376  while :
13377  do
13378    cat "conftest.in" "conftest.in" >"conftest.tmp"
13379    mv "conftest.tmp" "conftest.in"
13380    cp "conftest.in" "conftest.nl"
13381    $as_echo 'FGREP' >> "conftest.nl"
13382    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13383    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13384    as_fn_arith $ac_count + 1 && ac_count=$as_val
13385    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13386      # Best one so far, save it but keep looking for a better one
13387      ac_cv_path_FGREP="$ac_path_FGREP"
13388      ac_path_FGREP_max=$ac_count
13389    fi
13390    # 10*(2^10) chars as input seems more than enough
13391    test $ac_count -gt 10 && break
13392  done
13393  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13394esac
13395
13396      $ac_path_FGREP_found && break 3
13397    done
13398  done
13399  done
13400IFS=$as_save_IFS
13401  if test -z "$ac_cv_path_FGREP"; then
13402    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13403  fi
13404else
13405  ac_cv_path_FGREP=$FGREP
13406fi
13407
13408   fi
13409fi
13410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13411$as_echo "$ac_cv_path_FGREP" >&6; }
13412 FGREP="$ac_cv_path_FGREP"
13413
13414
13415  else
13416    # The variable is set, but is it from the command line or the environment?
13417
13418    # Try to remove the string !FGREP! from our list.
13419    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13420    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13421      # If it failed, the variable was not from the command line. Ignore it,
13422      # but warn the user (except for BASH, which is always set by the calling BASH).
13423      if test "xFGREP" != xBASH; then
13424        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13425$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13426      fi
13427      # Try to locate tool using the code snippet
13428      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13429$as_echo_n "checking for fgrep... " >&6; }
13430if ${ac_cv_path_FGREP+:} false; then :
13431  $as_echo_n "(cached) " >&6
13432else
13433  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13434   then ac_cv_path_FGREP="$GREP -F"
13435   else
13436     if test -z "$FGREP"; then
13437  ac_path_FGREP_found=false
13438  # Loop through the user's path and test for each of PROGNAME-LIST
13439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13440for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13441do
13442  IFS=$as_save_IFS
13443  test -z "$as_dir" && as_dir=.
13444    for ac_prog in fgrep; do
13445    for ac_exec_ext in '' $ac_executable_extensions; do
13446      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13447      as_fn_executable_p "$ac_path_FGREP" || continue
13448# Check for GNU ac_path_FGREP and select it if it is found.
13449  # Check for GNU $ac_path_FGREP
13450case `"$ac_path_FGREP" --version 2>&1` in
13451*GNU*)
13452  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13453*)
13454  ac_count=0
13455  $as_echo_n 0123456789 >"conftest.in"
13456  while :
13457  do
13458    cat "conftest.in" "conftest.in" >"conftest.tmp"
13459    mv "conftest.tmp" "conftest.in"
13460    cp "conftest.in" "conftest.nl"
13461    $as_echo 'FGREP' >> "conftest.nl"
13462    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13463    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13464    as_fn_arith $ac_count + 1 && ac_count=$as_val
13465    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13466      # Best one so far, save it but keep looking for a better one
13467      ac_cv_path_FGREP="$ac_path_FGREP"
13468      ac_path_FGREP_max=$ac_count
13469    fi
13470    # 10*(2^10) chars as input seems more than enough
13471    test $ac_count -gt 10 && break
13472  done
13473  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13474esac
13475
13476      $ac_path_FGREP_found && break 3
13477    done
13478  done
13479  done
13480IFS=$as_save_IFS
13481  if test -z "$ac_cv_path_FGREP"; then
13482    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13483  fi
13484else
13485  ac_cv_path_FGREP=$FGREP
13486fi
13487
13488   fi
13489fi
13490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13491$as_echo "$ac_cv_path_FGREP" >&6; }
13492 FGREP="$ac_cv_path_FGREP"
13493
13494
13495    else
13496      # If it succeeded, then it was overridden by the user. We will use it
13497      # for the tool.
13498
13499      # First remove it from the list of overridden variables, so we can test
13500      # for unknown variables in the end.
13501      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13502
13503      # Check if we try to supply an empty value
13504      if test "x$FGREP" = x; then
13505        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13506$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13507        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13508$as_echo_n "checking for FGREP... " >&6; }
13509        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13510$as_echo "disabled" >&6; }
13511      else
13512        # Check if the provided tool contains a complete path.
13513        tool_specified="$FGREP"
13514        tool_basename="${tool_specified##*/}"
13515        if test "x$tool_basename" = "x$tool_specified"; then
13516          # A command without a complete path is provided, search $PATH.
13517          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13518$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13519          # Extract the first word of "$tool_basename", so it can be a program name with args.
13520set dummy $tool_basename; ac_word=$2
13521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13522$as_echo_n "checking for $ac_word... " >&6; }
13523if ${ac_cv_path_FGREP+:} false; then :
13524  $as_echo_n "(cached) " >&6
13525else
13526  case $FGREP in
13527  [\\/]* | ?:[\\/]*)
13528  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13529  ;;
13530  *)
13531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13532for as_dir in $PATH
13533do
13534  IFS=$as_save_IFS
13535  test -z "$as_dir" && as_dir=.
13536    for ac_exec_ext in '' $ac_executable_extensions; do
13537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13538    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13540    break 2
13541  fi
13542done
13543  done
13544IFS=$as_save_IFS
13545
13546  ;;
13547esac
13548fi
13549FGREP=$ac_cv_path_FGREP
13550if test -n "$FGREP"; then
13551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13552$as_echo "$FGREP" >&6; }
13553else
13554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13555$as_echo "no" >&6; }
13556fi
13557
13558
13559          if test "x$FGREP" = x; then
13560            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13561          fi
13562        else
13563          # Otherwise we believe it is a complete path. Use it as it is.
13564          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13565$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13566          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13567$as_echo_n "checking for FGREP... " >&6; }
13568          if test ! -x "$tool_specified"; then
13569            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13570$as_echo "not found" >&6; }
13571            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13572          fi
13573          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13574$as_echo "$tool_specified" >&6; }
13575        fi
13576      fi
13577    fi
13578
13579  fi
13580
13581
13582  if test "x$FGREP" = x; then
13583    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13584  fi
13585
13586
13587
13588
13589  # Publish this variable in the help.
13590
13591
13592  if [ -z "${SED+x}" ]; then
13593    # The variable is not set by user, try to locate tool using the code snippet
13594    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13595$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13596if ${ac_cv_path_SED+:} false; then :
13597  $as_echo_n "(cached) " >&6
13598else
13599            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13600     for ac_i in 1 2 3 4 5 6 7; do
13601       ac_script="$ac_script$as_nl$ac_script"
13602     done
13603     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13604     { ac_script=; unset ac_script;}
13605     if test -z "$SED"; then
13606  ac_path_SED_found=false
13607  # Loop through the user's path and test for each of PROGNAME-LIST
13608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13609for as_dir in $PATH
13610do
13611  IFS=$as_save_IFS
13612  test -z "$as_dir" && as_dir=.
13613    for ac_prog in sed gsed; do
13614    for ac_exec_ext in '' $ac_executable_extensions; do
13615      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13616      as_fn_executable_p "$ac_path_SED" || continue
13617# Check for GNU ac_path_SED and select it if it is found.
13618  # Check for GNU $ac_path_SED
13619case `"$ac_path_SED" --version 2>&1` in
13620*GNU*)
13621  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13622*)
13623  ac_count=0
13624  $as_echo_n 0123456789 >"conftest.in"
13625  while :
13626  do
13627    cat "conftest.in" "conftest.in" >"conftest.tmp"
13628    mv "conftest.tmp" "conftest.in"
13629    cp "conftest.in" "conftest.nl"
13630    $as_echo '' >> "conftest.nl"
13631    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13632    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13633    as_fn_arith $ac_count + 1 && ac_count=$as_val
13634    if test $ac_count -gt ${ac_path_SED_max-0}; then
13635      # Best one so far, save it but keep looking for a better one
13636      ac_cv_path_SED="$ac_path_SED"
13637      ac_path_SED_max=$ac_count
13638    fi
13639    # 10*(2^10) chars as input seems more than enough
13640    test $ac_count -gt 10 && break
13641  done
13642  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13643esac
13644
13645      $ac_path_SED_found && break 3
13646    done
13647  done
13648  done
13649IFS=$as_save_IFS
13650  if test -z "$ac_cv_path_SED"; then
13651    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13652  fi
13653else
13654  ac_cv_path_SED=$SED
13655fi
13656
13657fi
13658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13659$as_echo "$ac_cv_path_SED" >&6; }
13660 SED="$ac_cv_path_SED"
13661  rm -f conftest.sed
13662
13663  else
13664    # The variable is set, but is it from the command line or the environment?
13665
13666    # Try to remove the string !SED! from our list.
13667    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13668    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13669      # If it failed, the variable was not from the command line. Ignore it,
13670      # but warn the user (except for BASH, which is always set by the calling BASH).
13671      if test "xSED" != xBASH; then
13672        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13673$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13674      fi
13675      # Try to locate tool using the code snippet
13676      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13677$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13678if ${ac_cv_path_SED+:} false; then :
13679  $as_echo_n "(cached) " >&6
13680else
13681            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13682     for ac_i in 1 2 3 4 5 6 7; do
13683       ac_script="$ac_script$as_nl$ac_script"
13684     done
13685     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13686     { ac_script=; unset ac_script;}
13687     if test -z "$SED"; then
13688  ac_path_SED_found=false
13689  # Loop through the user's path and test for each of PROGNAME-LIST
13690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13691for as_dir in $PATH
13692do
13693  IFS=$as_save_IFS
13694  test -z "$as_dir" && as_dir=.
13695    for ac_prog in sed gsed; do
13696    for ac_exec_ext in '' $ac_executable_extensions; do
13697      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13698      as_fn_executable_p "$ac_path_SED" || continue
13699# Check for GNU ac_path_SED and select it if it is found.
13700  # Check for GNU $ac_path_SED
13701case `"$ac_path_SED" --version 2>&1` in
13702*GNU*)
13703  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13704*)
13705  ac_count=0
13706  $as_echo_n 0123456789 >"conftest.in"
13707  while :
13708  do
13709    cat "conftest.in" "conftest.in" >"conftest.tmp"
13710    mv "conftest.tmp" "conftest.in"
13711    cp "conftest.in" "conftest.nl"
13712    $as_echo '' >> "conftest.nl"
13713    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13714    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13715    as_fn_arith $ac_count + 1 && ac_count=$as_val
13716    if test $ac_count -gt ${ac_path_SED_max-0}; then
13717      # Best one so far, save it but keep looking for a better one
13718      ac_cv_path_SED="$ac_path_SED"
13719      ac_path_SED_max=$ac_count
13720    fi
13721    # 10*(2^10) chars as input seems more than enough
13722    test $ac_count -gt 10 && break
13723  done
13724  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13725esac
13726
13727      $ac_path_SED_found && break 3
13728    done
13729  done
13730  done
13731IFS=$as_save_IFS
13732  if test -z "$ac_cv_path_SED"; then
13733    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13734  fi
13735else
13736  ac_cv_path_SED=$SED
13737fi
13738
13739fi
13740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13741$as_echo "$ac_cv_path_SED" >&6; }
13742 SED="$ac_cv_path_SED"
13743  rm -f conftest.sed
13744
13745    else
13746      # If it succeeded, then it was overridden by the user. We will use it
13747      # for the tool.
13748
13749      # First remove it from the list of overridden variables, so we can test
13750      # for unknown variables in the end.
13751      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13752
13753      # Check if we try to supply an empty value
13754      if test "x$SED" = x; then
13755        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13756$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13757        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13758$as_echo_n "checking for SED... " >&6; }
13759        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13760$as_echo "disabled" >&6; }
13761      else
13762        # Check if the provided tool contains a complete path.
13763        tool_specified="$SED"
13764        tool_basename="${tool_specified##*/}"
13765        if test "x$tool_basename" = "x$tool_specified"; then
13766          # A command without a complete path is provided, search $PATH.
13767          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13768$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13769          # Extract the first word of "$tool_basename", so it can be a program name with args.
13770set dummy $tool_basename; ac_word=$2
13771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13772$as_echo_n "checking for $ac_word... " >&6; }
13773if ${ac_cv_path_SED+:} false; then :
13774  $as_echo_n "(cached) " >&6
13775else
13776  case $SED in
13777  [\\/]* | ?:[\\/]*)
13778  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13779  ;;
13780  *)
13781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13782for as_dir in $PATH
13783do
13784  IFS=$as_save_IFS
13785  test -z "$as_dir" && as_dir=.
13786    for ac_exec_ext in '' $ac_executable_extensions; do
13787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13788    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13790    break 2
13791  fi
13792done
13793  done
13794IFS=$as_save_IFS
13795
13796  ;;
13797esac
13798fi
13799SED=$ac_cv_path_SED
13800if test -n "$SED"; then
13801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13802$as_echo "$SED" >&6; }
13803else
13804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13805$as_echo "no" >&6; }
13806fi
13807
13808
13809          if test "x$SED" = x; then
13810            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13811          fi
13812        else
13813          # Otherwise we believe it is a complete path. Use it as it is.
13814          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13815$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13816          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13817$as_echo_n "checking for SED... " >&6; }
13818          if test ! -x "$tool_specified"; then
13819            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13820$as_echo "not found" >&6; }
13821            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13822          fi
13823          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13824$as_echo "$tool_specified" >&6; }
13825        fi
13826      fi
13827    fi
13828
13829  fi
13830
13831
13832  if test "x$SED" = x; then
13833    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13834  fi
13835
13836
13837
13838  # Always force rm.
13839  RM="$RM -f"
13840
13841  # pwd behaves differently on various platforms and some don't support the -L flag.
13842  # Always use the bash builtin pwd to get uniform behavior.
13843  THEPWDCMD=pwd
13844
13845  # These are not required on all platforms
13846
13847
13848  # Publish this variable in the help.
13849
13850
13851  if [ -z "${CYGPATH+x}" ]; then
13852    # The variable is not set by user, try to locate tool using the code snippet
13853    for ac_prog in cygpath
13854do
13855  # Extract the first word of "$ac_prog", so it can be a program name with args.
13856set dummy $ac_prog; ac_word=$2
13857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13858$as_echo_n "checking for $ac_word... " >&6; }
13859if ${ac_cv_path_CYGPATH+:} false; then :
13860  $as_echo_n "(cached) " >&6
13861else
13862  case $CYGPATH in
13863  [\\/]* | ?:[\\/]*)
13864  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13865  ;;
13866  *)
13867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13868for as_dir in $PATH
13869do
13870  IFS=$as_save_IFS
13871  test -z "$as_dir" && as_dir=.
13872    for ac_exec_ext in '' $ac_executable_extensions; do
13873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13874    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13876    break 2
13877  fi
13878done
13879  done
13880IFS=$as_save_IFS
13881
13882  ;;
13883esac
13884fi
13885CYGPATH=$ac_cv_path_CYGPATH
13886if test -n "$CYGPATH"; then
13887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13888$as_echo "$CYGPATH" >&6; }
13889else
13890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13891$as_echo "no" >&6; }
13892fi
13893
13894
13895  test -n "$CYGPATH" && break
13896done
13897
13898  else
13899    # The variable is set, but is it from the command line or the environment?
13900
13901    # Try to remove the string !CYGPATH! from our list.
13902    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13903    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13904      # If it failed, the variable was not from the command line. Ignore it,
13905      # but warn the user (except for BASH, which is always set by the calling BASH).
13906      if test "xCYGPATH" != xBASH; then
13907        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13908$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13909      fi
13910      # Try to locate tool using the code snippet
13911      for ac_prog in cygpath
13912do
13913  # Extract the first word of "$ac_prog", so it can be a program name with args.
13914set dummy $ac_prog; ac_word=$2
13915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13916$as_echo_n "checking for $ac_word... " >&6; }
13917if ${ac_cv_path_CYGPATH+:} false; then :
13918  $as_echo_n "(cached) " >&6
13919else
13920  case $CYGPATH in
13921  [\\/]* | ?:[\\/]*)
13922  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13923  ;;
13924  *)
13925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13926for as_dir in $PATH
13927do
13928  IFS=$as_save_IFS
13929  test -z "$as_dir" && as_dir=.
13930    for ac_exec_ext in '' $ac_executable_extensions; do
13931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13932    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13934    break 2
13935  fi
13936done
13937  done
13938IFS=$as_save_IFS
13939
13940  ;;
13941esac
13942fi
13943CYGPATH=$ac_cv_path_CYGPATH
13944if test -n "$CYGPATH"; then
13945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13946$as_echo "$CYGPATH" >&6; }
13947else
13948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13949$as_echo "no" >&6; }
13950fi
13951
13952
13953  test -n "$CYGPATH" && break
13954done
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$CYGPATH" = x; then
13966        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13967$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13968        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13969$as_echo_n "checking for CYGPATH... " >&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="$CYGPATH"
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 CYGPATH=$tool_basename" >&5
13979$as_echo "$as_me: Will search for user supplied tool CYGPATH=$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_CYGPATH+:} false; then :
13985  $as_echo_n "(cached) " >&6
13986else
13987  case $CYGPATH in
13988  [\\/]* | ?:[\\/]*)
13989  ac_cv_path_CYGPATH="$CYGPATH" # 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_CYGPATH="$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
14010CYGPATH=$ac_cv_path_CYGPATH
14011if test -n "$CYGPATH"; then
14012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14013$as_echo "$CYGPATH" >&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$CYGPATH" = 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 CYGPATH=$tool_specified" >&5
14026$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14027          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14028$as_echo_n "checking for CYGPATH... " >&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 CYGPATH=$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
14044
14045  # Publish this variable in the help.
14046
14047
14048  if [ -z "${READLINK+x}" ]; then
14049    # The variable is not set by user, try to locate tool using the code snippet
14050    for ac_prog in greadlink readlink
14051do
14052  # Extract the first word of "$ac_prog", so it can be a program name with args.
14053set dummy $ac_prog; ac_word=$2
14054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14055$as_echo_n "checking for $ac_word... " >&6; }
14056if ${ac_cv_path_READLINK+:} false; then :
14057  $as_echo_n "(cached) " >&6
14058else
14059  case $READLINK in
14060  [\\/]* | ?:[\\/]*)
14061  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14062  ;;
14063  *)
14064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14065for as_dir in $PATH
14066do
14067  IFS=$as_save_IFS
14068  test -z "$as_dir" && as_dir=.
14069    for ac_exec_ext in '' $ac_executable_extensions; do
14070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14071    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14073    break 2
14074  fi
14075done
14076  done
14077IFS=$as_save_IFS
14078
14079  ;;
14080esac
14081fi
14082READLINK=$ac_cv_path_READLINK
14083if test -n "$READLINK"; then
14084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14085$as_echo "$READLINK" >&6; }
14086else
14087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14088$as_echo "no" >&6; }
14089fi
14090
14091
14092  test -n "$READLINK" && break
14093done
14094
14095  else
14096    # The variable is set, but is it from the command line or the environment?
14097
14098    # Try to remove the string !READLINK! from our list.
14099    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14100    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14101      # If it failed, the variable was not from the command line. Ignore it,
14102      # but warn the user (except for BASH, which is always set by the calling BASH).
14103      if test "xREADLINK" != xBASH; then
14104        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14105$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14106      fi
14107      # Try to locate tool using the code snippet
14108      for ac_prog in greadlink readlink
14109do
14110  # Extract the first word of "$ac_prog", so it can be a program name with args.
14111set dummy $ac_prog; ac_word=$2
14112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14113$as_echo_n "checking for $ac_word... " >&6; }
14114if ${ac_cv_path_READLINK+:} false; then :
14115  $as_echo_n "(cached) " >&6
14116else
14117  case $READLINK in
14118  [\\/]* | ?:[\\/]*)
14119  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14120  ;;
14121  *)
14122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14123for as_dir in $PATH
14124do
14125  IFS=$as_save_IFS
14126  test -z "$as_dir" && as_dir=.
14127    for ac_exec_ext in '' $ac_executable_extensions; do
14128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14129    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14131    break 2
14132  fi
14133done
14134  done
14135IFS=$as_save_IFS
14136
14137  ;;
14138esac
14139fi
14140READLINK=$ac_cv_path_READLINK
14141if test -n "$READLINK"; then
14142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14143$as_echo "$READLINK" >&6; }
14144else
14145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14146$as_echo "no" >&6; }
14147fi
14148
14149
14150  test -n "$READLINK" && break
14151done
14152
14153    else
14154      # If it succeeded, then it was overridden by the user. We will use it
14155      # for the tool.
14156
14157      # First remove it from the list of overridden variables, so we can test
14158      # for unknown variables in the end.
14159      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14160
14161      # Check if we try to supply an empty value
14162      if test "x$READLINK" = x; then
14163        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14164$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14165        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14166$as_echo_n "checking for READLINK... " >&6; }
14167        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14168$as_echo "disabled" >&6; }
14169      else
14170        # Check if the provided tool contains a complete path.
14171        tool_specified="$READLINK"
14172        tool_basename="${tool_specified##*/}"
14173        if test "x$tool_basename" = "x$tool_specified"; then
14174          # A command without a complete path is provided, search $PATH.
14175          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14176$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14177          # Extract the first word of "$tool_basename", so it can be a program name with args.
14178set dummy $tool_basename; ac_word=$2
14179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14180$as_echo_n "checking for $ac_word... " >&6; }
14181if ${ac_cv_path_READLINK+:} false; then :
14182  $as_echo_n "(cached) " >&6
14183else
14184  case $READLINK in
14185  [\\/]* | ?:[\\/]*)
14186  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14187  ;;
14188  *)
14189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14190for as_dir in $PATH
14191do
14192  IFS=$as_save_IFS
14193  test -z "$as_dir" && as_dir=.
14194    for ac_exec_ext in '' $ac_executable_extensions; do
14195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14196    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14198    break 2
14199  fi
14200done
14201  done
14202IFS=$as_save_IFS
14203
14204  ;;
14205esac
14206fi
14207READLINK=$ac_cv_path_READLINK
14208if test -n "$READLINK"; then
14209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14210$as_echo "$READLINK" >&6; }
14211else
14212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14213$as_echo "no" >&6; }
14214fi
14215
14216
14217          if test "x$READLINK" = x; then
14218            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14219          fi
14220        else
14221          # Otherwise we believe it is a complete path. Use it as it is.
14222          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14223$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14224          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14225$as_echo_n "checking for READLINK... " >&6; }
14226          if test ! -x "$tool_specified"; then
14227            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14228$as_echo "not found" >&6; }
14229            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14230          fi
14231          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14232$as_echo "$tool_specified" >&6; }
14233        fi
14234      fi
14235    fi
14236
14237  fi
14238
14239
14240
14241
14242  # Publish this variable in the help.
14243
14244
14245  if [ -z "${DF+x}" ]; then
14246    # The variable is not set by user, try to locate tool using the code snippet
14247    for ac_prog in df
14248do
14249  # Extract the first word of "$ac_prog", so it can be a program name with args.
14250set dummy $ac_prog; ac_word=$2
14251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14252$as_echo_n "checking for $ac_word... " >&6; }
14253if ${ac_cv_path_DF+:} false; then :
14254  $as_echo_n "(cached) " >&6
14255else
14256  case $DF in
14257  [\\/]* | ?:[\\/]*)
14258  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14259  ;;
14260  *)
14261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14262for as_dir in $PATH
14263do
14264  IFS=$as_save_IFS
14265  test -z "$as_dir" && as_dir=.
14266    for ac_exec_ext in '' $ac_executable_extensions; do
14267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14268    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14270    break 2
14271  fi
14272done
14273  done
14274IFS=$as_save_IFS
14275
14276  ;;
14277esac
14278fi
14279DF=$ac_cv_path_DF
14280if test -n "$DF"; then
14281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14282$as_echo "$DF" >&6; }
14283else
14284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14285$as_echo "no" >&6; }
14286fi
14287
14288
14289  test -n "$DF" && break
14290done
14291
14292  else
14293    # The variable is set, but is it from the command line or the environment?
14294
14295    # Try to remove the string !DF! from our list.
14296    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14297    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14298      # If it failed, the variable was not from the command line. Ignore it,
14299      # but warn the user (except for BASH, which is always set by the calling BASH).
14300      if test "xDF" != xBASH; then
14301        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14302$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14303      fi
14304      # Try to locate tool using the code snippet
14305      for ac_prog in df
14306do
14307  # Extract the first word of "$ac_prog", so it can be a program name with args.
14308set dummy $ac_prog; ac_word=$2
14309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14310$as_echo_n "checking for $ac_word... " >&6; }
14311if ${ac_cv_path_DF+:} false; then :
14312  $as_echo_n "(cached) " >&6
14313else
14314  case $DF in
14315  [\\/]* | ?:[\\/]*)
14316  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14317  ;;
14318  *)
14319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14320for as_dir in $PATH
14321do
14322  IFS=$as_save_IFS
14323  test -z "$as_dir" && as_dir=.
14324    for ac_exec_ext in '' $ac_executable_extensions; do
14325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14326    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14328    break 2
14329  fi
14330done
14331  done
14332IFS=$as_save_IFS
14333
14334  ;;
14335esac
14336fi
14337DF=$ac_cv_path_DF
14338if test -n "$DF"; then
14339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14340$as_echo "$DF" >&6; }
14341else
14342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14343$as_echo "no" >&6; }
14344fi
14345
14346
14347  test -n "$DF" && break
14348done
14349
14350    else
14351      # If it succeeded, then it was overridden by the user. We will use it
14352      # for the tool.
14353
14354      # First remove it from the list of overridden variables, so we can test
14355      # for unknown variables in the end.
14356      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14357
14358      # Check if we try to supply an empty value
14359      if test "x$DF" = x; then
14360        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14361$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14362        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14363$as_echo_n "checking for DF... " >&6; }
14364        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14365$as_echo "disabled" >&6; }
14366      else
14367        # Check if the provided tool contains a complete path.
14368        tool_specified="$DF"
14369        tool_basename="${tool_specified##*/}"
14370        if test "x$tool_basename" = "x$tool_specified"; then
14371          # A command without a complete path is provided, search $PATH.
14372          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14373$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14374          # Extract the first word of "$tool_basename", so it can be a program name with args.
14375set dummy $tool_basename; 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_DF+:} false; then :
14379  $as_echo_n "(cached) " >&6
14380else
14381  case $DF in
14382  [\\/]* | ?:[\\/]*)
14383  ac_cv_path_DF="$DF" # 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_DF="$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
14404DF=$ac_cv_path_DF
14405if test -n "$DF"; then
14406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14407$as_echo "$DF" >&6; }
14408else
14409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14410$as_echo "no" >&6; }
14411fi
14412
14413
14414          if test "x$DF" = x; then
14415            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14416          fi
14417        else
14418          # Otherwise we believe it is a complete path. Use it as it is.
14419          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14420$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14421          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14422$as_echo_n "checking for DF... " >&6; }
14423          if test ! -x "$tool_specified"; then
14424            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14425$as_echo "not found" >&6; }
14426            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14427          fi
14428          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14429$as_echo "$tool_specified" >&6; }
14430        fi
14431      fi
14432    fi
14433
14434  fi
14435
14436
14437
14438
14439  # Publish this variable in the help.
14440
14441
14442  if [ -z "${CPIO+x}" ]; then
14443    # The variable is not set by user, try to locate tool using the code snippet
14444    for ac_prog in cpio bsdcpio
14445do
14446  # Extract the first word of "$ac_prog", so it can be a program name with args.
14447set dummy $ac_prog; ac_word=$2
14448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14449$as_echo_n "checking for $ac_word... " >&6; }
14450if ${ac_cv_path_CPIO+:} false; then :
14451  $as_echo_n "(cached) " >&6
14452else
14453  case $CPIO in
14454  [\\/]* | ?:[\\/]*)
14455  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14456  ;;
14457  *)
14458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14459for as_dir in $PATH
14460do
14461  IFS=$as_save_IFS
14462  test -z "$as_dir" && as_dir=.
14463    for ac_exec_ext in '' $ac_executable_extensions; do
14464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14465    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14467    break 2
14468  fi
14469done
14470  done
14471IFS=$as_save_IFS
14472
14473  ;;
14474esac
14475fi
14476CPIO=$ac_cv_path_CPIO
14477if test -n "$CPIO"; then
14478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14479$as_echo "$CPIO" >&6; }
14480else
14481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14482$as_echo "no" >&6; }
14483fi
14484
14485
14486  test -n "$CPIO" && break
14487done
14488
14489  else
14490    # The variable is set, but is it from the command line or the environment?
14491
14492    # Try to remove the string !CPIO! from our list.
14493    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14494    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14495      # If it failed, the variable was not from the command line. Ignore it,
14496      # but warn the user (except for BASH, which is always set by the calling BASH).
14497      if test "xCPIO" != xBASH; then
14498        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14499$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14500      fi
14501      # Try to locate tool using the code snippet
14502      for ac_prog in cpio bsdcpio
14503do
14504  # Extract the first word of "$ac_prog", so it can be a program name with args.
14505set dummy $ac_prog; ac_word=$2
14506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14507$as_echo_n "checking for $ac_word... " >&6; }
14508if ${ac_cv_path_CPIO+:} false; then :
14509  $as_echo_n "(cached) " >&6
14510else
14511  case $CPIO in
14512  [\\/]* | ?:[\\/]*)
14513  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14514  ;;
14515  *)
14516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14517for as_dir in $PATH
14518do
14519  IFS=$as_save_IFS
14520  test -z "$as_dir" && as_dir=.
14521    for ac_exec_ext in '' $ac_executable_extensions; do
14522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14523    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14525    break 2
14526  fi
14527done
14528  done
14529IFS=$as_save_IFS
14530
14531  ;;
14532esac
14533fi
14534CPIO=$ac_cv_path_CPIO
14535if test -n "$CPIO"; then
14536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14537$as_echo "$CPIO" >&6; }
14538else
14539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14540$as_echo "no" >&6; }
14541fi
14542
14543
14544  test -n "$CPIO" && break
14545done
14546
14547    else
14548      # If it succeeded, then it was overridden by the user. We will use it
14549      # for the tool.
14550
14551      # First remove it from the list of overridden variables, so we can test
14552      # for unknown variables in the end.
14553      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14554
14555      # Check if we try to supply an empty value
14556      if test "x$CPIO" = x; then
14557        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14558$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14559        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14560$as_echo_n "checking for CPIO... " >&6; }
14561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14562$as_echo "disabled" >&6; }
14563      else
14564        # Check if the provided tool contains a complete path.
14565        tool_specified="$CPIO"
14566        tool_basename="${tool_specified##*/}"
14567        if test "x$tool_basename" = "x$tool_specified"; then
14568          # A command without a complete path is provided, search $PATH.
14569          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14570$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14571          # Extract the first word of "$tool_basename", so it can be a program name with args.
14572set dummy $tool_basename; 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_CPIO+:} false; then :
14576  $as_echo_n "(cached) " >&6
14577else
14578  case $CPIO in
14579  [\\/]* | ?:[\\/]*)
14580  ac_cv_path_CPIO="$CPIO" # 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_CPIO="$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
14601CPIO=$ac_cv_path_CPIO
14602if test -n "$CPIO"; then
14603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14604$as_echo "$CPIO" >&6; }
14605else
14606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14607$as_echo "no" >&6; }
14608fi
14609
14610
14611          if test "x$CPIO" = x; then
14612            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14613          fi
14614        else
14615          # Otherwise we believe it is a complete path. Use it as it is.
14616          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14617$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14618          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14619$as_echo_n "checking for CPIO... " >&6; }
14620          if test ! -x "$tool_specified"; then
14621            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14622$as_echo "not found" >&6; }
14623            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14624          fi
14625          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14626$as_echo "$tool_specified" >&6; }
14627        fi
14628      fi
14629    fi
14630
14631  fi
14632
14633
14634
14635
14636  # Publish this variable in the help.
14637
14638
14639  if [ -z "${NICE+x}" ]; then
14640    # The variable is not set by user, try to locate tool using the code snippet
14641    for ac_prog in nice
14642do
14643  # Extract the first word of "$ac_prog", so it can be a program name with args.
14644set dummy $ac_prog; ac_word=$2
14645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14646$as_echo_n "checking for $ac_word... " >&6; }
14647if ${ac_cv_path_NICE+:} false; then :
14648  $as_echo_n "(cached) " >&6
14649else
14650  case $NICE in
14651  [\\/]* | ?:[\\/]*)
14652  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14653  ;;
14654  *)
14655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14656for as_dir in $PATH
14657do
14658  IFS=$as_save_IFS
14659  test -z "$as_dir" && as_dir=.
14660    for ac_exec_ext in '' $ac_executable_extensions; do
14661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14662    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14664    break 2
14665  fi
14666done
14667  done
14668IFS=$as_save_IFS
14669
14670  ;;
14671esac
14672fi
14673NICE=$ac_cv_path_NICE
14674if test -n "$NICE"; then
14675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14676$as_echo "$NICE" >&6; }
14677else
14678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14679$as_echo "no" >&6; }
14680fi
14681
14682
14683  test -n "$NICE" && break
14684done
14685
14686  else
14687    # The variable is set, but is it from the command line or the environment?
14688
14689    # Try to remove the string !NICE! from our list.
14690    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14691    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14692      # If it failed, the variable was not from the command line. Ignore it,
14693      # but warn the user (except for BASH, which is always set by the calling BASH).
14694      if test "xNICE" != xBASH; then
14695        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14696$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14697      fi
14698      # Try to locate tool using the code snippet
14699      for ac_prog in nice
14700do
14701  # Extract the first word of "$ac_prog", so it can be a program name with args.
14702set dummy $ac_prog; ac_word=$2
14703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14704$as_echo_n "checking for $ac_word... " >&6; }
14705if ${ac_cv_path_NICE+:} false; then :
14706  $as_echo_n "(cached) " >&6
14707else
14708  case $NICE in
14709  [\\/]* | ?:[\\/]*)
14710  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14711  ;;
14712  *)
14713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14714for as_dir in $PATH
14715do
14716  IFS=$as_save_IFS
14717  test -z "$as_dir" && as_dir=.
14718    for ac_exec_ext in '' $ac_executable_extensions; do
14719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14720    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14722    break 2
14723  fi
14724done
14725  done
14726IFS=$as_save_IFS
14727
14728  ;;
14729esac
14730fi
14731NICE=$ac_cv_path_NICE
14732if test -n "$NICE"; then
14733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14734$as_echo "$NICE" >&6; }
14735else
14736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14737$as_echo "no" >&6; }
14738fi
14739
14740
14741  test -n "$NICE" && break
14742done
14743
14744    else
14745      # If it succeeded, then it was overridden by the user. We will use it
14746      # for the tool.
14747
14748      # First remove it from the list of overridden variables, so we can test
14749      # for unknown variables in the end.
14750      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14751
14752      # Check if we try to supply an empty value
14753      if test "x$NICE" = x; then
14754        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14755$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14756        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14757$as_echo_n "checking for NICE... " >&6; }
14758        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14759$as_echo "disabled" >&6; }
14760      else
14761        # Check if the provided tool contains a complete path.
14762        tool_specified="$NICE"
14763        tool_basename="${tool_specified##*/}"
14764        if test "x$tool_basename" = "x$tool_specified"; then
14765          # A command without a complete path is provided, search $PATH.
14766          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14767$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14768          # Extract the first word of "$tool_basename", so it can be a program name with args.
14769set dummy $tool_basename; 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_NICE+:} false; then :
14773  $as_echo_n "(cached) " >&6
14774else
14775  case $NICE in
14776  [\\/]* | ?:[\\/]*)
14777  ac_cv_path_NICE="$NICE" # 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_NICE="$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
14798NICE=$ac_cv_path_NICE
14799if test -n "$NICE"; then
14800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14801$as_echo "$NICE" >&6; }
14802else
14803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14804$as_echo "no" >&6; }
14805fi
14806
14807
14808          if test "x$NICE" = x; then
14809            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14810          fi
14811        else
14812          # Otherwise we believe it is a complete path. Use it as it is.
14813          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14814$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14815          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14816$as_echo_n "checking for NICE... " >&6; }
14817          if test ! -x "$tool_specified"; then
14818            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14819$as_echo "not found" >&6; }
14820            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14821          fi
14822          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14823$as_echo "$tool_specified" >&6; }
14824        fi
14825      fi
14826    fi
14827
14828  fi
14829
14830
14831
14832
14833# Now we can determine OpenJDK build and target platforms. This is required to
14834# have early on.
14835# Make sure we can run config.sub.
14836$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14837  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14838
14839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14840$as_echo_n "checking build system type... " >&6; }
14841if ${ac_cv_build+:} false; then :
14842  $as_echo_n "(cached) " >&6
14843else
14844  ac_build_alias=$build_alias
14845test "x$ac_build_alias" = x &&
14846  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14847test "x$ac_build_alias" = x &&
14848  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14849ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14850  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14851
14852fi
14853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14854$as_echo "$ac_cv_build" >&6; }
14855case $ac_cv_build in
14856*-*-*) ;;
14857*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14858esac
14859build=$ac_cv_build
14860ac_save_IFS=$IFS; IFS='-'
14861set x $ac_cv_build
14862shift
14863build_cpu=$1
14864build_vendor=$2
14865shift; shift
14866# Remember, the first character of IFS is used to create $*,
14867# except with old shells:
14868build_os=$*
14869IFS=$ac_save_IFS
14870case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14871
14872
14873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14874$as_echo_n "checking host system type... " >&6; }
14875if ${ac_cv_host+:} false; then :
14876  $as_echo_n "(cached) " >&6
14877else
14878  if test "x$host_alias" = x; then
14879  ac_cv_host=$ac_cv_build
14880else
14881  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14882    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14883fi
14884
14885fi
14886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14887$as_echo "$ac_cv_host" >&6; }
14888case $ac_cv_host in
14889*-*-*) ;;
14890*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14891esac
14892host=$ac_cv_host
14893ac_save_IFS=$IFS; IFS='-'
14894set x $ac_cv_host
14895shift
14896host_cpu=$1
14897host_vendor=$2
14898shift; shift
14899# Remember, the first character of IFS is used to create $*,
14900# except with old shells:
14901host_os=$*
14902IFS=$ac_save_IFS
14903case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14904
14905
14906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14907$as_echo_n "checking target system type... " >&6; }
14908if ${ac_cv_target+:} false; then :
14909  $as_echo_n "(cached) " >&6
14910else
14911  if test "x$target_alias" = x; then
14912  ac_cv_target=$ac_cv_host
14913else
14914  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14915    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14916fi
14917
14918fi
14919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14920$as_echo "$ac_cv_target" >&6; }
14921case $ac_cv_target in
14922*-*-*) ;;
14923*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14924esac
14925target=$ac_cv_target
14926ac_save_IFS=$IFS; IFS='-'
14927set x $ac_cv_target
14928shift
14929target_cpu=$1
14930target_vendor=$2
14931shift; shift
14932# Remember, the first character of IFS is used to create $*,
14933# except with old shells:
14934target_os=$*
14935IFS=$ac_save_IFS
14936case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14937
14938
14939# The aliases save the names the user supplied, while $host etc.
14940# will get canonicalized.
14941test -n "$target_alias" &&
14942  test "$program_prefix$program_suffix$program_transform_name" = \
14943    NONENONEs,x,x, &&
14944  program_prefix=${target_alias}-
14945
14946  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14947  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14948  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14949  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14950  # to use the configure naming style.
14951
14952
14953
14954
14955
14956  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14957  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14958  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14959  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14960  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14961  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14962
14963
14964
14965  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14966
14967  case "$build_os" in
14968    *linux*)
14969      VAR_OS=linux
14970      VAR_OS_TYPE=unix
14971      ;;
14972    *solaris*)
14973      VAR_OS=solaris
14974      VAR_OS_TYPE=unix
14975      ;;
14976    *darwin*)
14977      VAR_OS=macosx
14978      VAR_OS_TYPE=unix
14979      ;;
14980    *bsd*)
14981      VAR_OS=bsd
14982      VAR_OS_TYPE=unix
14983      ;;
14984    *cygwin*)
14985      VAR_OS=windows
14986      VAR_OS_ENV=windows.cygwin
14987      ;;
14988    *mingw*)
14989      VAR_OS=windows
14990      VAR_OS_ENV=windows.msys
14991      ;;
14992    *aix*)
14993      VAR_OS=aix
14994      VAR_OS_TYPE=unix
14995      ;;
14996    *)
14997      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14998      ;;
14999  esac
15000
15001
15002  # First argument is the cpu name from the trip/quad
15003  case "$build_cpu" in
15004    x86_64)
15005      VAR_CPU=x86_64
15006      VAR_CPU_ARCH=x86
15007      VAR_CPU_BITS=64
15008      VAR_CPU_ENDIAN=little
15009      ;;
15010    i?86)
15011      VAR_CPU=x86
15012      VAR_CPU_ARCH=x86
15013      VAR_CPU_BITS=32
15014      VAR_CPU_ENDIAN=little
15015      ;;
15016    arm*)
15017      VAR_CPU=arm
15018      VAR_CPU_ARCH=arm
15019      VAR_CPU_BITS=32
15020      VAR_CPU_ENDIAN=little
15021      ;;
15022    aarch64)
15023      VAR_CPU=aarch64
15024      VAR_CPU_ARCH=aarch64
15025      VAR_CPU_BITS=64
15026      VAR_CPU_ENDIAN=little
15027      ;;
15028    powerpc)
15029      VAR_CPU=ppc
15030      VAR_CPU_ARCH=ppc
15031      VAR_CPU_BITS=32
15032      VAR_CPU_ENDIAN=big
15033      ;;
15034    powerpc64)
15035      VAR_CPU=ppc64
15036      VAR_CPU_ARCH=ppc
15037      VAR_CPU_BITS=64
15038      VAR_CPU_ENDIAN=big
15039      ;;
15040    powerpc64le)
15041      VAR_CPU=ppc64le
15042      VAR_CPU_ARCH=ppc
15043      VAR_CPU_BITS=64
15044      VAR_CPU_ENDIAN=little
15045      ;;
15046    s390)
15047      VAR_CPU=s390
15048      VAR_CPU_ARCH=s390
15049      VAR_CPU_BITS=32
15050      VAR_CPU_ENDIAN=big
15051      ;;
15052    s390x)
15053      VAR_CPU=s390x
15054      VAR_CPU_ARCH=s390
15055      VAR_CPU_BITS=64
15056      VAR_CPU_ENDIAN=big
15057      ;;
15058    sparc)
15059      VAR_CPU=sparc
15060      VAR_CPU_ARCH=sparc
15061      VAR_CPU_BITS=32
15062      VAR_CPU_ENDIAN=big
15063      ;;
15064    sparcv9|sparc64)
15065      VAR_CPU=sparcv9
15066      VAR_CPU_ARCH=sparc
15067      VAR_CPU_BITS=64
15068      VAR_CPU_ENDIAN=big
15069      ;;
15070    *)
15071      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15072      ;;
15073  esac
15074
15075  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15076  OPENJDK_BUILD_OS="$VAR_OS"
15077  if test "x$VAR_OS_TYPE" != x; then
15078    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15079  else
15080    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15081  fi
15082  if test "x$VAR_OS_ENV" != x; then
15083    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15084  else
15085    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15086  fi
15087  OPENJDK_BUILD_CPU="$VAR_CPU"
15088  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15089  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15090  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15091
15092
15093
15094
15095
15096
15097
15098
15099  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15100$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15102$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15103
15104  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15105
15106  case "$host_os" in
15107    *linux*)
15108      VAR_OS=linux
15109      VAR_OS_TYPE=unix
15110      ;;
15111    *solaris*)
15112      VAR_OS=solaris
15113      VAR_OS_TYPE=unix
15114      ;;
15115    *darwin*)
15116      VAR_OS=macosx
15117      VAR_OS_TYPE=unix
15118      ;;
15119    *bsd*)
15120      VAR_OS=bsd
15121      VAR_OS_TYPE=unix
15122      ;;
15123    *cygwin*)
15124      VAR_OS=windows
15125      VAR_OS_ENV=windows.cygwin
15126      ;;
15127    *mingw*)
15128      VAR_OS=windows
15129      VAR_OS_ENV=windows.msys
15130      ;;
15131    *aix*)
15132      VAR_OS=aix
15133      VAR_OS_TYPE=unix
15134      ;;
15135    *)
15136      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15137      ;;
15138  esac
15139
15140
15141  # First argument is the cpu name from the trip/quad
15142  case "$host_cpu" in
15143    x86_64)
15144      VAR_CPU=x86_64
15145      VAR_CPU_ARCH=x86
15146      VAR_CPU_BITS=64
15147      VAR_CPU_ENDIAN=little
15148      ;;
15149    i?86)
15150      VAR_CPU=x86
15151      VAR_CPU_ARCH=x86
15152      VAR_CPU_BITS=32
15153      VAR_CPU_ENDIAN=little
15154      ;;
15155    arm*)
15156      VAR_CPU=arm
15157      VAR_CPU_ARCH=arm
15158      VAR_CPU_BITS=32
15159      VAR_CPU_ENDIAN=little
15160      ;;
15161    aarch64)
15162      VAR_CPU=aarch64
15163      VAR_CPU_ARCH=aarch64
15164      VAR_CPU_BITS=64
15165      VAR_CPU_ENDIAN=little
15166      ;;
15167    powerpc)
15168      VAR_CPU=ppc
15169      VAR_CPU_ARCH=ppc
15170      VAR_CPU_BITS=32
15171      VAR_CPU_ENDIAN=big
15172      ;;
15173    powerpc64)
15174      VAR_CPU=ppc64
15175      VAR_CPU_ARCH=ppc
15176      VAR_CPU_BITS=64
15177      VAR_CPU_ENDIAN=big
15178      ;;
15179    powerpc64le)
15180      VAR_CPU=ppc64le
15181      VAR_CPU_ARCH=ppc
15182      VAR_CPU_BITS=64
15183      VAR_CPU_ENDIAN=little
15184      ;;
15185    s390)
15186      VAR_CPU=s390
15187      VAR_CPU_ARCH=s390
15188      VAR_CPU_BITS=32
15189      VAR_CPU_ENDIAN=big
15190      ;;
15191    s390x)
15192      VAR_CPU=s390x
15193      VAR_CPU_ARCH=s390
15194      VAR_CPU_BITS=64
15195      VAR_CPU_ENDIAN=big
15196      ;;
15197    sparc)
15198      VAR_CPU=sparc
15199      VAR_CPU_ARCH=sparc
15200      VAR_CPU_BITS=32
15201      VAR_CPU_ENDIAN=big
15202      ;;
15203    sparcv9|sparc64)
15204      VAR_CPU=sparcv9
15205      VAR_CPU_ARCH=sparc
15206      VAR_CPU_BITS=64
15207      VAR_CPU_ENDIAN=big
15208      ;;
15209    *)
15210      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15211      ;;
15212  esac
15213
15214  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15215  OPENJDK_TARGET_OS="$VAR_OS"
15216  if test "x$VAR_OS_TYPE" != x; then
15217    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15218  else
15219    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15220  fi
15221  if test "x$VAR_OS_ENV" != x; then
15222    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15223  else
15224    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15225  fi
15226  OPENJDK_TARGET_CPU="$VAR_CPU"
15227  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15228  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15229  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15230
15231
15232
15233
15234
15235
15236
15237
15238  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15239$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15241$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15242
15243
15244
15245# Check whether --with-target-bits was given.
15246if test "${with_target_bits+set}" = set; then :
15247  withval=$with_target_bits;
15248fi
15249
15250
15251  # We have three types of compiles:
15252  # native  == normal compilation, target system == build system
15253  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15254  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15255  #
15256  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15257    # We're doing a proper cross-compilation
15258    COMPILE_TYPE="cross"
15259  else
15260    COMPILE_TYPE="native"
15261  fi
15262
15263  if test "x$with_target_bits" != x; then
15264    if test "x$COMPILE_TYPE" = "xcross"; then
15265      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15266    fi
15267
15268    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15269      # A reduced build is requested
15270      COMPILE_TYPE="reduced"
15271      OPENJDK_TARGET_CPU_BITS=32
15272      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15273        OPENJDK_TARGET_CPU=x86
15274      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15275        OPENJDK_TARGET_CPU=sparc
15276      else
15277        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15278      fi
15279    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15280      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
15281    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15282      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15283$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15284    else
15285      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15286    fi
15287  fi
15288
15289
15290  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15291$as_echo_n "checking compilation type... " >&6; }
15292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15293$as_echo "$COMPILE_TYPE" >&6; }
15294
15295
15296  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15297    REQUIRED_OS_NAME=SunOS
15298    REQUIRED_OS_VERSION=5.10
15299  fi
15300  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15301    REQUIRED_OS_NAME=Linux
15302    REQUIRED_OS_VERSION=2.6
15303  fi
15304  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15305    REQUIRED_OS_NAME=Windows
15306    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15307      REQUIRED_OS_VERSION=5.2
15308    else
15309      REQUIRED_OS_VERSION=5.1
15310    fi
15311  fi
15312  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15313    REQUIRED_OS_NAME=Darwin
15314    REQUIRED_OS_VERSION=11.2
15315  fi
15316  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15317    REQUIRED_OS_NAME=AIX
15318    REQUIRED_OS_VERSION=7.1
15319  fi
15320
15321
15322
15323
15324
15325
15326  # Also store the legacy naming of the cpu.
15327  # Ie i586 and amd64 instead of x86 and x86_64
15328  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15329  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15330    OPENJDK_TARGET_CPU_LEGACY="i586"
15331  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15332    # On all platforms except MacOSX replace x86_64 with amd64.
15333    OPENJDK_TARGET_CPU_LEGACY="amd64"
15334  fi
15335
15336
15337  # And the second legacy naming of the cpu.
15338  # Ie i386 and amd64 instead of x86 and x86_64.
15339  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15340  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15341    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15342  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15343    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15344  fi
15345
15346
15347  # This is the name of the cpu (but using i386 and amd64 instead of
15348  # x86 and x86_64, respectively), preceeded by a /, to be used when
15349  # locating libraries. On macosx, it's empty, though.
15350  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15351  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15352    OPENJDK_TARGET_CPU_LIBDIR=""
15353  fi
15354
15355
15356  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15357  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15358  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15359  OPENJDK_TARGET_CPU_ISADIR=""
15360  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15361    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15362      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15363    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15364      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15365    fi
15366  fi
15367
15368
15369  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15370  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15371  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15372    # On linux only, we replace x86 with i386.
15373    OPENJDK_TARGET_CPU_OSARCH="i386"
15374  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15375    # On all platforms except macosx, we replace x86_64 with amd64.
15376    OPENJDK_TARGET_CPU_OSARCH="amd64"
15377  fi
15378
15379
15380  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15381  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15382    OPENJDK_TARGET_CPU_JLI="i386"
15383  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15384    # On all platforms except macosx, we replace x86_64 with amd64.
15385    OPENJDK_TARGET_CPU_JLI="amd64"
15386  fi
15387  # Now setup the -D flags for building libjli.
15388  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15389  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15390    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15391      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15392    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15393      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15394    fi
15395  fi
15396
15397
15398  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15399      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15400  else
15401      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15402  fi
15403
15404
15405  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15406    A_LP64="LP64:="
15407    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15408    # unpack200.exe
15409    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15410      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15411    fi
15412  fi
15413  LP64=$A_LP64
15414
15415
15416  if test "x$COMPILE_TYPE" = "xcross"; then
15417    # FIXME: ... or should this include reduced builds..?
15418    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15419  else
15420    DEFINE_CROSS_COMPILE_ARCH=""
15421  fi
15422
15423
15424  # Convert openjdk platform names to hotspot names
15425
15426  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15427  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15428    HOTSPOT_TARGET_OS=bsd
15429  fi
15430
15431
15432  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15433  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15434    HOTSPOT_TARGET_OS_TYPE=posix
15435  fi
15436
15437
15438  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15439  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15440    HOTSPOT_TARGET_CPU=x86_32
15441  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15442    HOTSPOT_TARGET_CPU=sparc
15443  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15444    HOTSPOT_TARGET_CPU=ppc_64
15445  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15446    HOTSPOT_TARGET_CPU=ppc_64
15447  fi
15448
15449
15450  # This is identical with OPENJDK_*, but define anyway for consistency.
15451  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15452
15453
15454  # Setup HOTSPOT_TARGET_CPU_DEFINE
15455  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15456    HOTSPOT_TARGET_CPU_DEFINE=IA32
15457  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15458    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15459  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15460    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15461  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15462    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15463  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15464    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15465  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15466    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15467
15468  # The cpu defines below are for zero, we don't support them directly.
15469  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15470    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15471  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15472    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15473  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15474    HOTSPOT_TARGET_CPU_DEFINE=S390
15475  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15476    HOTSPOT_TARGET_CPU_DEFINE=S390
15477  fi
15478
15479
15480
15481
15482  # Also store the legacy naming of the cpu.
15483  # Ie i586 and amd64 instead of x86 and x86_64
15484  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15485  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15486    OPENJDK_BUILD_CPU_LEGACY="i586"
15487  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15488    # On all platforms except MacOSX replace x86_64 with amd64.
15489    OPENJDK_BUILD_CPU_LEGACY="amd64"
15490  fi
15491
15492
15493  # And the second legacy naming of the cpu.
15494  # Ie i386 and amd64 instead of x86 and x86_64.
15495  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15496  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15497    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15498  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15499    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15500  fi
15501
15502
15503  # This is the name of the cpu (but using i386 and amd64 instead of
15504  # x86 and x86_64, respectively), preceeded by a /, to be used when
15505  # locating libraries. On macosx, it's empty, though.
15506  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15507  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15508    OPENJDK_BUILD_CPU_LIBDIR=""
15509  fi
15510
15511
15512  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15513  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15514  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15515  OPENJDK_BUILD_CPU_ISADIR=""
15516  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15517    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15518      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15519    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15520      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15521    fi
15522  fi
15523
15524
15525  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15526  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15527  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15528    # On linux only, we replace x86 with i386.
15529    OPENJDK_BUILD_CPU_OSARCH="i386"
15530  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15531    # On all platforms except macosx, we replace x86_64 with amd64.
15532    OPENJDK_BUILD_CPU_OSARCH="amd64"
15533  fi
15534
15535
15536  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
15537  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15538    OPENJDK_BUILD_CPU_JLI="i386"
15539  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15540    # On all platforms except macosx, we replace x86_64 with amd64.
15541    OPENJDK_BUILD_CPU_JLI="amd64"
15542  fi
15543  # Now setup the -D flags for building libjli.
15544  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
15545  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15546    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
15547      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15548    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
15549      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15550    fi
15551  fi
15552
15553
15554  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15555      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
15556  else
15557      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
15558  fi
15559
15560
15561  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
15562    A_LP64="LP64:="
15563    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15564    # unpack200.exe
15565    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
15566      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
15567    fi
15568  fi
15569  LP64=$A_LP64
15570
15571
15572  if test "x$COMPILE_TYPE" = "xcross"; then
15573    # FIXME: ... or should this include reduced builds..?
15574    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
15575  else
15576    DEFINE_CROSS_COMPILE_ARCH=""
15577  fi
15578
15579
15580  # Convert openjdk platform names to hotspot names
15581
15582  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
15583  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15584    HOTSPOT_BUILD_OS=bsd
15585  fi
15586
15587
15588  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
15589  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
15590    HOTSPOT_BUILD_OS_TYPE=posix
15591  fi
15592
15593
15594  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
15595  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15596    HOTSPOT_BUILD_CPU=x86_32
15597  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15598    HOTSPOT_BUILD_CPU=sparc
15599  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
15600    HOTSPOT_BUILD_CPU=ppc_64
15601  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
15602    HOTSPOT_BUILD_CPU=ppc_64
15603  fi
15604
15605
15606  # This is identical with OPENJDK_*, but define anyway for consistency.
15607  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
15608
15609
15610  # Setup HOTSPOT_BUILD_CPU_DEFINE
15611  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15612    HOTSPOT_BUILD_CPU_DEFINE=IA32
15613  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15614    HOTSPOT_BUILD_CPU_DEFINE=AMD64
15615  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15616    HOTSPOT_BUILD_CPU_DEFINE=SPARC
15617  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
15618    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
15619  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
15620    HOTSPOT_BUILD_CPU_DEFINE=PPC64
15621  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
15622    HOTSPOT_BUILD_CPU_DEFINE=PPC64
15623
15624  # The cpu defines below are for zero, we don't support them directly.
15625  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
15626    HOTSPOT_BUILD_CPU_DEFINE=SPARC
15627  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
15628    HOTSPOT_BUILD_CPU_DEFINE=PPC32
15629  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
15630    HOTSPOT_BUILD_CPU_DEFINE=S390
15631  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
15632    HOTSPOT_BUILD_CPU_DEFINE=S390
15633  fi
15634
15635
15636
15637
15638  # ZERO_ARCHDEF is used to enable architecture-specific code.
15639  # This is used in legacy hotspot build.
15640  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
15641
15642
15643
15644
15645
15646# Continue setting up basic stuff. Most remaining code require fundamental tools.
15647
15648  # Save the current directory this script was started from
15649  CURDIR="$PWD"
15650
15651  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15652  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15653  # was not available at that time.
15654  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15655  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15656    ORIGINAL_PATH="$REWRITTEN_PATH"
15657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15658$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15659  fi
15660
15661  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15662    PATH_SEP=";"
15663
15664  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15665  if test $SRC_ROOT_LENGTH -gt 100; then
15666    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15667  fi
15668
15669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15670    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15671$as_echo_n "checking cygwin release... " >&6; }
15672    CYGWIN_VERSION=`$UNAME -r`
15673    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15674$as_echo "$CYGWIN_VERSION" >&6; }
15675    WINDOWS_ENV_VENDOR='cygwin'
15676    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15677
15678    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15679    if test "x$CYGWIN_VERSION_OLD" != x; then
15680      { $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
15681$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;}
15682      as_fn_error $? "Cannot continue" "$LINENO" 5
15683    fi
15684    if test "x$CYGPATH" = x; then
15685      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15686    fi
15687    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15688$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15689    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15690    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15691    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15692    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15693    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15694$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15695    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15696    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15697    if test "x$test_cygdrive_prefix" = x; then
15698      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15699    fi
15700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15701    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15702$as_echo_n "checking msys release... " >&6; }
15703    MSYS_VERSION=`$UNAME -r`
15704    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15705$as_echo "$MSYS_VERSION" >&6; }
15706
15707    WINDOWS_ENV_VENDOR='msys'
15708    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15709
15710    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15711$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15712    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15713    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15714
15715  windows_path="$MSYS_ROOT_PATH"
15716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15717    unix_path=`$CYGPATH -u "$windows_path"`
15718    MSYS_ROOT_PATH="$unix_path"
15719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15721    MSYS_ROOT_PATH="$unix_path"
15722  fi
15723
15724    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15725$as_echo "$MSYS_ROOT_PATH" >&6; }
15726    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15727  else
15728    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15729  fi
15730
15731  # Test if windows or unix (cygwin/msys) find is first in path.
15732  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15733$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15734  FIND_BINARY_OUTPUT=`find --version 2>&1`
15735  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15736    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15737$as_echo "unix style" >&6; }
15738  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15739    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15740$as_echo "Windows" >&6; }
15741    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15742$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15743    { $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
15744$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15745    as_fn_error $? "Cannot continue" "$LINENO" 5
15746  else
15747    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15748$as_echo "unknown" >&6; }
15749    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15750$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15751  fi
15752
15753  else
15754    PATH_SEP=":"
15755  fi
15756
15757
15758  # We get the top-level directory from the supporting wrappers.
15759  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15760$as_echo_n "checking for top-level directory... " >&6; }
15761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15762$as_echo "$TOPDIR" >&6; }
15763
15764
15765  # Save the original version of TOPDIR for string comparisons
15766  ORIGINAL_TOPDIR="$TOPDIR"
15767
15768
15769  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15770
15771  # Only process if variable expands to non-empty
15772
15773  if test "x$CURDIR" != x; then
15774    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15775
15776  # Input might be given as Windows format, start by converting to
15777  # unix format.
15778  path="$CURDIR"
15779  new_path=`$CYGPATH -u "$path"`
15780
15781  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15782  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15783  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15784  # "foo.exe" is OK but "foo" is an error.
15785  #
15786  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15787  # It is also a way to make sure we got the proper file name for the real test later on.
15788  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15789  if test "x$test_shortpath" = x; then
15790    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15791$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15792    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15793  fi
15794
15795  # Call helper function which possibly converts this using DOS-style short mode.
15796  # If so, the updated path is stored in $new_path.
15797
15798  input_path="$new_path"
15799  # Check if we need to convert this using DOS-style short mode. If the path
15800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15801  # take no chances and rewrite it.
15802  # Note: m4 eats our [], so we need to use [ and ] instead.
15803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15804  if test "x$has_forbidden_chars" != x; then
15805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15806    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15807    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15808    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15809      # Going to short mode and back again did indeed matter. Since short mode is
15810      # case insensitive, let's make it lowercase to improve readability.
15811      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15812      # Now convert it back to Unix-style (cygpath)
15813      input_path=`$CYGPATH -u "$shortmode_path"`
15814      new_path="$input_path"
15815    fi
15816  fi
15817
15818  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15819  if test "x$test_cygdrive_prefix" = x; then
15820    # As a simple fix, exclude /usr/bin since it's not a real path.
15821    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15822      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15823      # a path prefixed by /cygdrive for fixpath to work.
15824      new_path="$CYGWIN_ROOT_PATH$input_path"
15825    fi
15826  fi
15827
15828
15829  if test "x$path" != "x$new_path"; then
15830    CURDIR="$new_path"
15831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15832$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15833  fi
15834
15835    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15836
15837  path="$CURDIR"
15838  has_colon=`$ECHO $path | $GREP ^.:`
15839  new_path="$path"
15840  if test "x$has_colon" = x; then
15841    # Not in mixed or Windows style, start by that.
15842    new_path=`cmd //c echo $path`
15843  fi
15844
15845
15846  input_path="$new_path"
15847  # Check if we need to convert this using DOS-style short mode. If the path
15848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15849  # take no chances and rewrite it.
15850  # Note: m4 eats our [], so we need to use [ and ] instead.
15851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15852  if test "x$has_forbidden_chars" != x; then
15853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15854    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15855  fi
15856
15857
15858  windows_path="$new_path"
15859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15860    unix_path=`$CYGPATH -u "$windows_path"`
15861    new_path="$unix_path"
15862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15864    new_path="$unix_path"
15865  fi
15866
15867  if test "x$path" != "x$new_path"; then
15868    CURDIR="$new_path"
15869    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15870$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15871  fi
15872
15873  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15874  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15875
15876    else
15877      # We're on a unix platform. Hooray! :)
15878      path="$CURDIR"
15879      has_space=`$ECHO "$path" | $GREP " "`
15880      if test "x$has_space" != x; then
15881        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15882$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15883        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15884      fi
15885
15886      # Use eval to expand a potential ~
15887      eval path="$path"
15888      if test ! -f "$path" && test ! -d "$path"; then
15889        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15890      fi
15891
15892      if test -d "$path"; then
15893        CURDIR="`cd "$path"; $THEPWDCMD -L`"
15894      else
15895        dir="`$DIRNAME "$path"`"
15896        base="`$BASENAME "$path"`"
15897        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15898      fi
15899    fi
15900  fi
15901
15902
15903  # Only process if variable expands to non-empty
15904
15905  if test "x$TOPDIR" != x; then
15906    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15907
15908  # Input might be given as Windows format, start by converting to
15909  # unix format.
15910  path="$TOPDIR"
15911  new_path=`$CYGPATH -u "$path"`
15912
15913  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15914  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15915  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15916  # "foo.exe" is OK but "foo" is an error.
15917  #
15918  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15919  # It is also a way to make sure we got the proper file name for the real test later on.
15920  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15921  if test "x$test_shortpath" = x; then
15922    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15923$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15924    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15925  fi
15926
15927  # Call helper function which possibly converts this using DOS-style short mode.
15928  # If so, the updated path is stored in $new_path.
15929
15930  input_path="$new_path"
15931  # Check if we need to convert this using DOS-style short mode. If the path
15932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15933  # take no chances and rewrite it.
15934  # Note: m4 eats our [], so we need to use [ and ] instead.
15935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15936  if test "x$has_forbidden_chars" != x; then
15937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15938    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15939    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15940    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15941      # Going to short mode and back again did indeed matter. Since short mode is
15942      # case insensitive, let's make it lowercase to improve readability.
15943      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15944      # Now convert it back to Unix-style (cygpath)
15945      input_path=`$CYGPATH -u "$shortmode_path"`
15946      new_path="$input_path"
15947    fi
15948  fi
15949
15950  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15951  if test "x$test_cygdrive_prefix" = x; then
15952    # As a simple fix, exclude /usr/bin since it's not a real path.
15953    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15954      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15955      # a path prefixed by /cygdrive for fixpath to work.
15956      new_path="$CYGWIN_ROOT_PATH$input_path"
15957    fi
15958  fi
15959
15960
15961  if test "x$path" != "x$new_path"; then
15962    TOPDIR="$new_path"
15963    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15964$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15965  fi
15966
15967    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15968
15969  path="$TOPDIR"
15970  has_colon=`$ECHO $path | $GREP ^.:`
15971  new_path="$path"
15972  if test "x$has_colon" = x; then
15973    # Not in mixed or Windows style, start by that.
15974    new_path=`cmd //c echo $path`
15975  fi
15976
15977
15978  input_path="$new_path"
15979  # Check if we need to convert this using DOS-style short mode. If the path
15980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15981  # take no chances and rewrite it.
15982  # Note: m4 eats our [], so we need to use [ and ] instead.
15983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15984  if test "x$has_forbidden_chars" != x; then
15985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15986    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15987  fi
15988
15989
15990  windows_path="$new_path"
15991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15992    unix_path=`$CYGPATH -u "$windows_path"`
15993    new_path="$unix_path"
15994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15996    new_path="$unix_path"
15997  fi
15998
15999  if test "x$path" != "x$new_path"; then
16000    TOPDIR="$new_path"
16001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16002$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16003  fi
16004
16005  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16006  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16007
16008    else
16009      # We're on a unix platform. Hooray! :)
16010      path="$TOPDIR"
16011      has_space=`$ECHO "$path" | $GREP " "`
16012      if test "x$has_space" != x; then
16013        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16014$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16015        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16016      fi
16017
16018      # Use eval to expand a potential ~
16019      eval path="$path"
16020      if test ! -f "$path" && test ! -d "$path"; then
16021        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16022      fi
16023
16024      if test -d "$path"; then
16025        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16026      else
16027        dir="`$DIRNAME "$path"`"
16028        base="`$BASENAME "$path"`"
16029        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16030      fi
16031    fi
16032  fi
16033
16034  # SRC_ROOT is a traditional alias for TOPDIR.
16035  SRC_ROOT=$TOPDIR
16036
16037  # Calculate a canonical version of TOPDIR for string comparisons
16038  CANONICAL_TOPDIR=$TOPDIR
16039
16040  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16041    # Follow a chain of symbolic links. Use readlink
16042    # where it exists, else fall back to horribly
16043    # complicated shell code.
16044    if test "x$READLINK_TESTED" != yes; then
16045      # On MacOSX there is a readlink tool with a different
16046      # purpose than the GNU readlink tool. Check the found readlink.
16047      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16048      if test "x$ISGNU" = x; then
16049        # A readlink that we do not know how to use.
16050        # Are there other non-GNU readlinks out there?
16051        READLINK_TESTED=yes
16052        READLINK=
16053      fi
16054    fi
16055
16056    if test "x$READLINK" != x; then
16057      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16058    else
16059      # Save the current directory for restoring afterwards
16060      STARTDIR=$PWD
16061      COUNTER=0
16062      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16063      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16064      cd $sym_link_dir
16065      # Use -P flag to resolve symlinks in directories.
16066      cd `$THEPWDCMD -P`
16067      sym_link_dir=`$THEPWDCMD -P`
16068      # Resolve file symlinks
16069      while test $COUNTER -lt 20; do
16070        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16071        if test "x$ISLINK" == x; then
16072          # This is not a symbolic link! We are done!
16073          break
16074        fi
16075        # Again resolve directory symlinks since the target of the just found
16076        # link could be in a different directory
16077        cd `$DIRNAME $ISLINK`
16078        sym_link_dir=`$THEPWDCMD -P`
16079        sym_link_file=`$BASENAME $ISLINK`
16080        let COUNTER=COUNTER+1
16081      done
16082      cd $STARTDIR
16083      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16084    fi
16085  fi
16086
16087
16088
16089  # Locate the directory of this script.
16090  AUTOCONF_DIR=$TOPDIR/common/autoconf
16091
16092  # Setup username (for use in adhoc version strings etc)
16093  # Outer [ ] to quote m4.
16094   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16095
16096
16097
16098# Check if it's a pure open build or if custom sources are to be used.
16099
16100  # Check whether --enable-openjdk-only was given.
16101if test "${enable_openjdk_only+set}" = set; then :
16102  enableval=$enable_openjdk_only;
16103else
16104  enable_openjdk_only="no"
16105fi
16106
16107
16108  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
16109$as_echo_n "checking for presence of closed sources... " >&6; }
16110  if test -d "$SRC_ROOT/jdk/src/closed"; then
16111    CLOSED_SOURCE_PRESENT=yes
16112  else
16113    CLOSED_SOURCE_PRESENT=no
16114  fi
16115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
16116$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
16117
16118  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
16119$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
16120  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
16121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
16122$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
16123
16124  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
16125    OPENJDK=true
16126    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16127      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
16128$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
16129    fi
16130  else
16131    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16132      OPENJDK=true
16133    else
16134      OPENJDK=false
16135    fi
16136  fi
16137
16138  if test "x$OPENJDK" = "xtrue"; then
16139    SET_OPENJDK="OPENJDK=true"
16140  fi
16141
16142
16143
16144  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16145  # the IncludeCustomExtension macro.
16146
16147
16148# Check whether --with-custom-make-dir was given.
16149if test "${with_custom_make_dir+set}" = set; then :
16150  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
16151$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16152fi
16153
16154
16155
16156
16157# These are needed to be able to create a configuration name (and thus the output directory)
16158
16159  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16160$as_echo_n "checking which variant of the JDK to build... " >&6; }
16161
16162# Check whether --with-jdk-variant was given.
16163if test "${with_jdk_variant+set}" = set; then :
16164  withval=$with_jdk_variant;
16165fi
16166
16167
16168  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16169    JDK_VARIANT="normal"
16170  else
16171    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16172  fi
16173
16174
16175
16176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16177$as_echo "$JDK_VARIANT" >&6; }
16178
16179
16180  DEBUG_LEVEL="release"
16181  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16182$as_echo_n "checking which debug level to use... " >&6; }
16183  # Check whether --enable-debug was given.
16184if test "${enable_debug+set}" = set; then :
16185  enableval=$enable_debug;
16186        ENABLE_DEBUG="${enableval}"
16187        DEBUG_LEVEL="fastdebug"
16188
16189else
16190  ENABLE_DEBUG="no"
16191fi
16192
16193
16194
16195# Check whether --with-debug-level was given.
16196if test "${with_debug_level+set}" = set; then :
16197  withval=$with_debug_level;
16198        DEBUG_LEVEL="${withval}"
16199        if test "x$ENABLE_DEBUG" = xyes; then
16200          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16201        fi
16202
16203fi
16204
16205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16206$as_echo "$DEBUG_LEVEL" >&6; }
16207
16208  if test "x$DEBUG_LEVEL" != xrelease && \
16209      test "x$DEBUG_LEVEL" != xoptimized && \
16210      test "x$DEBUG_LEVEL" != xfastdebug && \
16211      test "x$DEBUG_LEVEL" != xslowdebug; then
16212    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16213  fi
16214
16215  # Translate DEBUG_LEVEL to debug level used by Hotspot
16216  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16217  if test "x$DEBUG_LEVEL" = xrelease; then
16218    HOTSPOT_DEBUG_LEVEL="product"
16219  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16220    HOTSPOT_DEBUG_LEVEL="debug"
16221  fi
16222
16223  if test "x$DEBUG_LEVEL" = xoptimized; then
16224    # The debug level 'optimized' is a little special because it is currently only
16225    # applicable to the HotSpot build where it means to build a completely
16226    # optimized version of the VM without any debugging code (like for the
16227    # 'release' debug level which is called 'product' in the HotSpot build) but
16228    # with the exception that it can contain additional code which is otherwise
16229    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16230    # test new and/or experimental features which are not intended for customer
16231    # shipment. Because these new features need to be tested and benchmarked in
16232    # real world scenarios, we want to build the containing JDK at the 'release'
16233    # debug level.
16234    DEBUG_LEVEL="release"
16235  fi
16236
16237
16238
16239
16240
16241
16242# Check whether --with-jvm-variants was given.
16243if test "${with_jvm_variants+set}" = set; then :
16244  withval=$with_jvm_variants;
16245fi
16246
16247
16248  if test "x$with_jvm_variants" = x; then
16249    with_jvm_variants="server"
16250  fi
16251  JVM_VARIANTS_OPT="$with_jvm_variants"
16252
16253  # Has the user listed more than one variant?
16254  # Additional [] needed to keep m4 from mangling shell constructs.
16255  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16256    BUILDING_MULTIPLE_JVM_VARIANTS=true
16257  else
16258    BUILDING_MULTIPLE_JVM_VARIANTS=false
16259  fi
16260  # Replace the commas with AND for use in the build directory name.
16261  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16262
16263  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16264$as_echo_n "checking which variants of the JVM to build... " >&6; }
16265  # JVM_VARIANTS is a space-separated list.
16266  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16267  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16269$as_echo "$JVM_VARIANTS" >&6; }
16270
16271  # Check that the selected variants are valid
16272
16273  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16274  # Notice that the original variant failes on SLES 10 and 11
16275  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16276  STACK=${JVM_VARIANTS// /$'\n'}
16277  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16278  if test "x$INVALID_VARIANTS" != x; then
16279    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16280$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16281    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16282  fi
16283
16284  # All "special" variants share the same output directory ("server")
16285  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16286  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16287  STACK=${JVM_VARIANTS// /$'\n'}
16288  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16289  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16290    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16291  fi
16292
16293
16294
16295
16296  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16297    # zero behaves as a platform and rewrites these values. This is really weird. :(
16298    # We are guaranteed that we do not build any other variants when building zero.
16299    HOTSPOT_TARGET_CPU=zero
16300    HOTSPOT_TARGET_CPU_ARCH=zero
16301  fi
16302
16303
16304# With basic setup done, call the custom early hook.
16305
16306
16307# Check if we have devkits, extra paths or sysroot set.
16308
16309
16310# Check whether --with-devkit was given.
16311if test "${with_devkit+set}" = set; then :
16312  withval=$with_devkit;
16313
16314  # Only process if variable expands to non-empty
16315
16316  if test "x$with_devkit" != x; then
16317    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16318
16319  # Input might be given as Windows format, start by converting to
16320  # unix format.
16321  path="$with_devkit"
16322  new_path=`$CYGPATH -u "$path"`
16323
16324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16327  # "foo.exe" is OK but "foo" is an error.
16328  #
16329  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16330  # It is also a way to make sure we got the proper file name for the real test later on.
16331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16332  if test "x$test_shortpath" = x; then
16333    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16334$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16335    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16336  fi
16337
16338  # Call helper function which possibly converts this using DOS-style short mode.
16339  # If so, the updated path is stored in $new_path.
16340
16341  input_path="$new_path"
16342  # Check if we need to convert this using DOS-style short mode. If the path
16343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16344  # take no chances and rewrite it.
16345  # Note: m4 eats our [], so we need to use [ and ] instead.
16346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16347  if test "x$has_forbidden_chars" != x; then
16348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16352      # Going to short mode and back again did indeed matter. Since short mode is
16353      # case insensitive, let's make it lowercase to improve readability.
16354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16355      # Now convert it back to Unix-style (cygpath)
16356      input_path=`$CYGPATH -u "$shortmode_path"`
16357      new_path="$input_path"
16358    fi
16359  fi
16360
16361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16362  if test "x$test_cygdrive_prefix" = x; then
16363    # As a simple fix, exclude /usr/bin since it's not a real path.
16364    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16366      # a path prefixed by /cygdrive for fixpath to work.
16367      new_path="$CYGWIN_ROOT_PATH$input_path"
16368    fi
16369  fi
16370
16371
16372  if test "x$path" != "x$new_path"; then
16373    with_devkit="$new_path"
16374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16375$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16376  fi
16377
16378    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16379
16380  path="$with_devkit"
16381  has_colon=`$ECHO $path | $GREP ^.:`
16382  new_path="$path"
16383  if test "x$has_colon" = x; then
16384    # Not in mixed or Windows style, start by that.
16385    new_path=`cmd //c echo $path`
16386  fi
16387
16388
16389  input_path="$new_path"
16390  # Check if we need to convert this using DOS-style short mode. If the path
16391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16392  # take no chances and rewrite it.
16393  # Note: m4 eats our [], so we need to use [ and ] instead.
16394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16395  if test "x$has_forbidden_chars" != x; then
16396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16398  fi
16399
16400
16401  windows_path="$new_path"
16402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16403    unix_path=`$CYGPATH -u "$windows_path"`
16404    new_path="$unix_path"
16405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16407    new_path="$unix_path"
16408  fi
16409
16410  if test "x$path" != "x$new_path"; then
16411    with_devkit="$new_path"
16412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16413$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16414  fi
16415
16416  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16417  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16418
16419    else
16420      # We're on a unix platform. Hooray! :)
16421      path="$with_devkit"
16422      has_space=`$ECHO "$path" | $GREP " "`
16423      if test "x$has_space" != x; then
16424        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16425$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16426        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16427      fi
16428
16429      # Use eval to expand a potential ~
16430      eval path="$path"
16431      if test ! -f "$path" && test ! -d "$path"; then
16432        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16433      fi
16434
16435      if test -d "$path"; then
16436        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16437      else
16438        dir="`$DIRNAME "$path"`"
16439        base="`$BASENAME "$path"`"
16440        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16441      fi
16442    fi
16443  fi
16444
16445        DEVKIT_ROOT="$with_devkit"
16446        # Check for a meta data info file in the root of the devkit
16447        if test -f "$DEVKIT_ROOT/devkit.info"; then
16448          . $DEVKIT_ROOT/devkit.info
16449          # This potentially sets the following:
16450          # A descriptive name of the devkit
16451
16452  if test "x$DEVKIT_NAME" = x; then
16453    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16454  fi
16455
16456          # Corresponds to --with-extra-path
16457
16458  if test "x$DEVKIT_EXTRA_PATH" = x; then
16459    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16460  fi
16461
16462          # Corresponds to --with-toolchain-path
16463
16464  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16465    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16466  fi
16467
16468          # Corresponds to --with-sysroot
16469
16470  if test "x$DEVKIT_SYSROOT" = x; then
16471    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16472  fi
16473
16474
16475          # Identifies the Visual Studio version in the devkit
16476
16477  if test "x$DEVKIT_VS_VERSION" = x; then
16478    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16479  fi
16480
16481          # The Visual Studio include environment variable
16482
16483  if test "x$DEVKIT_VS_INCLUDE" = x; then
16484    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16485  fi
16486
16487          # The Visual Studio lib environment variable
16488
16489  if test "x$DEVKIT_VS_LIB" = x; then
16490    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16491  fi
16492
16493          # Corresponds to --with-msvcr-dll
16494
16495  if test "x$DEVKIT_MSVCR_DLL" = x; then
16496    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16497  fi
16498
16499          # Corresponds to --with-msvcp-dll
16500
16501  if test "x$DEVKIT_MSVCP_DLL" = x; then
16502    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16503  fi
16504
16505        fi
16506
16507        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16508$as_echo_n "checking for devkit... " >&6; }
16509        if test "x$DEVKIT_NAME" != x; then
16510          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16511$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16512        else
16513          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16514$as_echo "$DEVKIT_ROOT" >&6; }
16515        fi
16516
16517
16518  if test "x$DEVKIT_EXTRA_PATH" != x; then
16519    if test "x$EXTRA_PATH" = x; then
16520      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16521    else
16522      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16523    fi
16524  fi
16525
16526
16527        # Fallback default of just /bin if DEVKIT_PATH is not defined
16528        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16529          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16530        fi
16531
16532  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16533    if test "x$TOOLCHAIN_PATH" = x; then
16534      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16535    else
16536      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16537    fi
16538  fi
16539
16540
16541        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16542        # places for backwards compatiblity.
16543        if test "x$DEVKIT_SYSROOT" != x; then
16544          SYSROOT="$DEVKIT_SYSROOT"
16545        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16546          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16547        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16548          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16549        fi
16550
16551
16552fi
16553
16554
16555  # You can force the sysroot if the sysroot encoded into the compiler tools
16556  # is not correct.
16557
16558# Check whether --with-sys-root was given.
16559if test "${with_sys_root+set}" = set; then :
16560  withval=$with_sys_root; SYSROOT=$with_sys_root
16561
16562fi
16563
16564
16565
16566# Check whether --with-sysroot was given.
16567if test "${with_sysroot+set}" = set; then :
16568  withval=$with_sysroot; SYSROOT=$with_sysroot
16569
16570fi
16571
16572
16573
16574# Check whether --with-tools-dir was given.
16575if test "${with_tools_dir+set}" = set; then :
16576  withval=$with_tools_dir;
16577  if test "x$with_tools_dir" != x; then
16578    if test "x$TOOLCHAIN_PATH" = x; then
16579      TOOLCHAIN_PATH="$with_tools_dir"
16580    else
16581      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16582    fi
16583  fi
16584
16585
16586fi
16587
16588
16589
16590# Check whether --with-toolchain-path was given.
16591if test "${with_toolchain_path+set}" = set; then :
16592  withval=$with_toolchain_path;
16593  if test "x$with_toolchain_path" != x; then
16594    if test "x$TOOLCHAIN_PATH" = x; then
16595      TOOLCHAIN_PATH="$with_toolchain_path"
16596    else
16597      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16598    fi
16599  fi
16600
16601
16602fi
16603
16604
16605
16606# Check whether --with-extra-path was given.
16607if test "${with_extra_path+set}" = set; then :
16608  withval=$with_extra_path;
16609  if test "x$with_extra_path" != x; then
16610    if test "x$EXTRA_PATH" = x; then
16611      EXTRA_PATH="$with_extra_path"
16612    else
16613      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16614    fi
16615  fi
16616
16617
16618fi
16619
16620
16621  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16622    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16623    # If not, detect if Xcode is installed by running xcodebuild -version
16624    # if no Xcode installed, xcodebuild exits with 1
16625    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16626    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16627      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16628      # fall back on the stub binary in /usr/bin/xcodebuild
16629      # Extract the first word of "xcodebuild", so it can be a program name with args.
16630set dummy xcodebuild; ac_word=$2
16631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16632$as_echo_n "checking for $ac_word... " >&6; }
16633if ${ac_cv_path_XCODEBUILD+:} false; then :
16634  $as_echo_n "(cached) " >&6
16635else
16636  case $XCODEBUILD in
16637  [\\/]* | ?:[\\/]*)
16638  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16639  ;;
16640  *)
16641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16642for as_dir in $TOOLCHAIN_PATH
16643do
16644  IFS=$as_save_IFS
16645  test -z "$as_dir" && as_dir=.
16646    for ac_exec_ext in '' $ac_executable_extensions; do
16647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16648    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16650    break 2
16651  fi
16652done
16653  done
16654IFS=$as_save_IFS
16655
16656  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16657  ;;
16658esac
16659fi
16660XCODEBUILD=$ac_cv_path_XCODEBUILD
16661if test -n "$XCODEBUILD"; then
16662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16663$as_echo "$XCODEBUILD" >&6; }
16664else
16665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16666$as_echo "no" >&6; }
16667fi
16668
16669
16670    else
16671      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16672      # when only the command line tools are installed there are no SDKs, so headers
16673      # are copied into the system frameworks
16674      XCODEBUILD=
16675
16676    fi
16677
16678    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16679$as_echo_n "checking for sdk name... " >&6; }
16680
16681# Check whether --with-sdk-name was given.
16682if test "${with_sdk_name+set}" = set; then :
16683  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16684
16685fi
16686
16687    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16688$as_echo "$SDKNAME" >&6; }
16689
16690    # if toolchain path is specified then don't rely on system headers, they may not compile
16691    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16692    test -z "$TOOLCHAIN_PATH" && \
16693      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16694
16695    if test -z "$SYSROOT"; then
16696      if test -n "$XCODEBUILD"; then
16697        # if we don't have system headers, use default SDK name (last resort)
16698        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16699          SDKNAME=${SDKNAME:-macosx}
16700        fi
16701
16702        if test -n "$SDKNAME"; then
16703          # Call xcodebuild to determine SYSROOT
16704          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16705        fi
16706      else
16707        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16708          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
16709        fi
16710      fi
16711    else
16712      # warn user if --with-sdk-name was also set
16713      if test -n "$with_sdk_name"; then
16714        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16715$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16716      fi
16717    fi
16718
16719    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16720      # If no system framework headers, then SYSROOT must be set, or we won't build
16721      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
16722    fi
16723
16724    # Perform a basic sanity test
16725    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16726      if test -z "$SYSROOT"; then
16727        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
16728      else
16729        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16730      fi
16731    fi
16732
16733    # set SDKROOT too, Xcode tools will pick it up
16734    SDKROOT=$SYSROOT
16735
16736  fi
16737
16738  # Prepend the extra path to the global path
16739
16740  if test "x$EXTRA_PATH" != x; then
16741    if test "x$PATH" = x; then
16742      PATH="$EXTRA_PATH"
16743    else
16744      PATH="$EXTRA_PATH:$PATH"
16745    fi
16746  fi
16747
16748
16749  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16750    # Add extra search paths on solaris for utilities like ar, as, dtrace etc...
16751    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:/usr/sbin"
16752  fi
16753
16754  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16755$as_echo_n "checking for sysroot... " >&6; }
16756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16757$as_echo "$SYSROOT" >&6; }
16758  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16759$as_echo_n "checking for toolchain path... " >&6; }
16760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16761$as_echo "$TOOLCHAIN_PATH" >&6; }
16762  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16763$as_echo_n "checking for extra path... " >&6; }
16764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16765$as_echo "$EXTRA_PATH" >&6; }
16766
16767
16768# To properly create a configuration name, we need to have the OpenJDK target
16769# and options (variants and debug level) parsed.
16770
16771
16772
16773# Check whether --with-conf-name was given.
16774if test "${with_conf_name+set}" = set; then :
16775  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16776fi
16777
16778
16779  # Test from where we are running configure, in or outside of src root.
16780  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16781$as_echo_n "checking where to store configuration... " >&6; }
16782  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16783      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16784      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16785    # We are running configure from the src root.
16786    # Create a default ./build/target-variant-debuglevel output root.
16787    if test "x${CONF_NAME}" = x; then
16788      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16789$as_echo "in default location" >&6; }
16790      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
16791    else
16792      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16793$as_echo "in build directory with custom name" >&6; }
16794    fi
16795    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16796    $MKDIR -p "$OUTPUT_ROOT"
16797    if test ! -d "$OUTPUT_ROOT"; then
16798      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16799    fi
16800  else
16801    # We are running configure from outside of the src dir.
16802    # Then use the current directory as output dir!
16803    # If configuration is situated in normal build directory, just use the build
16804    # directory name as configuration name, otherwise use the complete path.
16805    if test "x${CONF_NAME}" = x; then
16806      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16807    fi
16808    OUTPUT_ROOT="$CURDIR"
16809    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16810$as_echo "in current directory" >&6; }
16811
16812    # WARNING: This might be a bad thing to do. You need to be sure you want to
16813    # have a configuration in this directory. Do some sanity checks!
16814
16815    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16816      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16817      # other files
16818      files_present=`$LS $OUTPUT_ROOT`
16819      # Configure has already touched config.log and confdefs.h in the current dir when this check
16820      # is performed.
16821      filtered_files=`$ECHO "$files_present" \
16822          | $SED -e 's/config.log//g' \
16823              -e 's/configure.log//g' \
16824              -e 's/confdefs.h//g' \
16825              -e 's/ //g' \
16826          | $TR -d '\n'`
16827      if test "x$filtered_files" != x; then
16828        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16829$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16830        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16831$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16832        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16833$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16834        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16835$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16836        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16837$as_echo "$as_me: seriously mess up just about everything." >&6;}
16838        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16839$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16840        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16841$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16842        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16843      fi
16844    fi
16845  fi
16846  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16847$as_echo_n "checking what configuration name to use... " >&6; }
16848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16849$as_echo "$CONF_NAME" >&6; }
16850
16851
16852  # Only process if variable expands to non-empty
16853
16854  if test "x$OUTPUT_ROOT" != x; then
16855    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16856
16857  # Input might be given as Windows format, start by converting to
16858  # unix format.
16859  path="$OUTPUT_ROOT"
16860  new_path=`$CYGPATH -u "$path"`
16861
16862  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16863  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16864  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16865  # "foo.exe" is OK but "foo" is an error.
16866  #
16867  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16868  # It is also a way to make sure we got the proper file name for the real test later on.
16869  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16870  if test "x$test_shortpath" = x; then
16871    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16872$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16873    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16874  fi
16875
16876  # Call helper function which possibly converts this using DOS-style short mode.
16877  # If so, the updated path is stored in $new_path.
16878
16879  input_path="$new_path"
16880  # Check if we need to convert this using DOS-style short mode. If the path
16881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16882  # take no chances and rewrite it.
16883  # Note: m4 eats our [], so we need to use [ and ] instead.
16884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16885  if test "x$has_forbidden_chars" != x; then
16886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16887    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16888    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16889    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16890      # Going to short mode and back again did indeed matter. Since short mode is
16891      # case insensitive, let's make it lowercase to improve readability.
16892      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16893      # Now convert it back to Unix-style (cygpath)
16894      input_path=`$CYGPATH -u "$shortmode_path"`
16895      new_path="$input_path"
16896    fi
16897  fi
16898
16899  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16900  if test "x$test_cygdrive_prefix" = x; then
16901    # As a simple fix, exclude /usr/bin since it's not a real path.
16902    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16903      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16904      # a path prefixed by /cygdrive for fixpath to work.
16905      new_path="$CYGWIN_ROOT_PATH$input_path"
16906    fi
16907  fi
16908
16909
16910  if test "x$path" != "x$new_path"; then
16911    OUTPUT_ROOT="$new_path"
16912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16913$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16914  fi
16915
16916    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16917
16918  path="$OUTPUT_ROOT"
16919  has_colon=`$ECHO $path | $GREP ^.:`
16920  new_path="$path"
16921  if test "x$has_colon" = x; then
16922    # Not in mixed or Windows style, start by that.
16923    new_path=`cmd //c echo $path`
16924  fi
16925
16926
16927  input_path="$new_path"
16928  # Check if we need to convert this using DOS-style short mode. If the path
16929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16930  # take no chances and rewrite it.
16931  # Note: m4 eats our [], so we need to use [ and ] instead.
16932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16933  if test "x$has_forbidden_chars" != x; then
16934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16935    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16936  fi
16937
16938
16939  windows_path="$new_path"
16940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16941    unix_path=`$CYGPATH -u "$windows_path"`
16942    new_path="$unix_path"
16943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16945    new_path="$unix_path"
16946  fi
16947
16948  if test "x$path" != "x$new_path"; then
16949    OUTPUT_ROOT="$new_path"
16950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16951$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16952  fi
16953
16954  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16955  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16956
16957    else
16958      # We're on a unix platform. Hooray! :)
16959      path="$OUTPUT_ROOT"
16960      has_space=`$ECHO "$path" | $GREP " "`
16961      if test "x$has_space" != x; then
16962        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16963$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16964        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16965      fi
16966
16967      # Use eval to expand a potential ~
16968      eval path="$path"
16969      if test ! -f "$path" && test ! -d "$path"; then
16970        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16971      fi
16972
16973      if test -d "$path"; then
16974        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16975      else
16976        dir="`$DIRNAME "$path"`"
16977        base="`$BASENAME "$path"`"
16978        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16979      fi
16980    fi
16981  fi
16982
16983
16984  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16985  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16986
16987  SPEC=$OUTPUT_ROOT/spec.gmk
16988
16989  CONF_NAME=$CONF_NAME
16990
16991  OUTPUT_ROOT=$OUTPUT_ROOT
16992
16993
16994
16995  # The spec.gmk file contains all variables for the make system.
16996  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16997
16998  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16999  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17000
17001  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17002  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17003
17004  # The compare.sh is used to compare the build output to other builds.
17005  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17006
17007  # The generated Makefile knows where the spec.gmk is and where the source is.
17008  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17009  # which will look for generated configurations
17010  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17011
17012
17013
17014# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17015
17016  for ac_prog in apt-get yum port pkgutil pkgadd
17017do
17018  # Extract the first word of "$ac_prog", so it can be a program name with args.
17019set dummy $ac_prog; ac_word=$2
17020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17021$as_echo_n "checking for $ac_word... " >&6; }
17022if ${ac_cv_prog_PKGHANDLER+:} false; then :
17023  $as_echo_n "(cached) " >&6
17024else
17025  if test -n "$PKGHANDLER"; then
17026  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17027else
17028as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17029for as_dir in $PATH
17030do
17031  IFS=$as_save_IFS
17032  test -z "$as_dir" && as_dir=.
17033    for ac_exec_ext in '' $ac_executable_extensions; do
17034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17035    ac_cv_prog_PKGHANDLER="$ac_prog"
17036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17037    break 2
17038  fi
17039done
17040  done
17041IFS=$as_save_IFS
17042
17043fi
17044fi
17045PKGHANDLER=$ac_cv_prog_PKGHANDLER
17046if test -n "$PKGHANDLER"; then
17047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17048$as_echo "$PKGHANDLER" >&6; }
17049else
17050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17051$as_echo "no" >&6; }
17052fi
17053
17054
17055  test -n "$PKGHANDLER" && break
17056done
17057
17058
17059
17060# Setup tools that requires more complex handling, or that is not needed by the configure script.
17061
17062
17063
17064  # Publish this variable in the help.
17065
17066
17067  if [ -z "${MAKE+x}" ]; then
17068    # The variable is not set by user, try to locate tool using the code snippet
17069
17070    # Try our hardest to locate a correct version of GNU make
17071    for ac_prog in gmake
17072do
17073  # Extract the first word of "$ac_prog", so it can be a program name with args.
17074set dummy $ac_prog; ac_word=$2
17075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17076$as_echo_n "checking for $ac_word... " >&6; }
17077if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17078  $as_echo_n "(cached) " >&6
17079else
17080  case $CHECK_GMAKE in
17081  [\\/]* | ?:[\\/]*)
17082  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17083  ;;
17084  *)
17085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17086for as_dir in $PATH
17087do
17088  IFS=$as_save_IFS
17089  test -z "$as_dir" && as_dir=.
17090    for ac_exec_ext in '' $ac_executable_extensions; do
17091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17092    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17094    break 2
17095  fi
17096done
17097  done
17098IFS=$as_save_IFS
17099
17100  ;;
17101esac
17102fi
17103CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17104if test -n "$CHECK_GMAKE"; then
17105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17106$as_echo "$CHECK_GMAKE" >&6; }
17107else
17108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17109$as_echo "no" >&6; }
17110fi
17111
17112
17113  test -n "$CHECK_GMAKE" && break
17114done
17115
17116
17117  MAKE_CANDIDATE=""$CHECK_GMAKE""
17118  DESCRIPTION="gmake in PATH"
17119
17120  # On Cygwin, we require a newer version of make than on other platforms
17121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17122    MAKE_VERSION_EXPR="-e 4\."
17123    MAKE_REQUIRED_VERSION="4.0"
17124   else
17125    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17126    MAKE_REQUIRED_VERSION="3.81"
17127  fi
17128
17129  if test "x$MAKE_CANDIDATE" != x; then
17130    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17131$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17132    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17133    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17134    if test "x$IS_GNU_MAKE" = x; then
17135      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17136$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17137    else
17138      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17139      if test "x$IS_MODERN_MAKE" = x; then
17140        { $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
17141$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;}
17142      else
17143        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17144          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17145            MAKE_EXPECTED_ENV='cygwin'
17146          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17147            MAKE_EXPECTED_ENV='msys'
17148          else
17149            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17150          fi
17151          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17152          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17153        else
17154          # Not relevant for non-Windows
17155          IS_MAKE_CORRECT_ENV=true
17156        fi
17157        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17158          { $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
17159$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;}
17160        else
17161          FOUND_MAKE=$MAKE_CANDIDATE
17162
17163  # Only process if variable expands to non-empty
17164
17165  if test "x$FOUND_MAKE" != x; then
17166    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17167
17168  # First separate the path from the arguments. This will split at the first
17169  # space.
17170  complete="$FOUND_MAKE"
17171  path="${complete%% *}"
17172  tmp="$complete EOL"
17173  arguments="${tmp#* }"
17174
17175  # Input might be given as Windows format, start by converting to
17176  # unix format.
17177  new_path=`$CYGPATH -u "$path"`
17178
17179  # Now try to locate executable using which
17180  new_path=`$WHICH "$new_path" 2> /dev/null`
17181  # bat and cmd files are not always considered executable in cygwin causing which
17182  # to not find them
17183  if test "x$new_path" = x \
17184      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17185      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17186    new_path=`$CYGPATH -u "$path"`
17187  fi
17188  if test "x$new_path" = x; then
17189    # Oops. Which didn't find the executable.
17190    # The splitting of arguments from the executable at a space might have been incorrect,
17191    # since paths with space are more likely in Windows. Give it another try with the whole
17192    # argument.
17193    path="$complete"
17194    arguments="EOL"
17195    new_path=`$CYGPATH -u "$path"`
17196    new_path=`$WHICH "$new_path" 2> /dev/null`
17197    # bat and cmd files are not always considered executable in cygwin causing which
17198    # to not find them
17199    if test "x$new_path" = x \
17200        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17201        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17202      new_path=`$CYGPATH -u "$path"`
17203    fi
17204    if test "x$new_path" = x; then
17205      # It's still not found. Now this is an unrecoverable error.
17206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17207$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17208      has_space=`$ECHO "$complete" | $GREP " "`
17209      if test "x$has_space" != x; then
17210        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17211$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17212      fi
17213      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17214    fi
17215  fi
17216
17217  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17218  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17219  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17220  # "foo.exe" is OK but "foo" is an error.
17221  #
17222  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17223  # It is also a way to make sure we got the proper file name for the real test later on.
17224  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17225  if test "x$test_shortpath" = x; then
17226    # Short path failed, file does not exist as specified.
17227    # Try adding .exe or .cmd
17228    if test -f "${new_path}.exe"; then
17229      input_to_shortpath="${new_path}.exe"
17230    elif test -f "${new_path}.cmd"; then
17231      input_to_shortpath="${new_path}.cmd"
17232    else
17233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17234$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17235      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17236$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17237      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17238    fi
17239  else
17240    input_to_shortpath="$new_path"
17241  fi
17242
17243  # Call helper function which possibly converts this using DOS-style short mode.
17244  # If so, the updated path is stored in $new_path.
17245  new_path="$input_to_shortpath"
17246
17247  input_path="$input_to_shortpath"
17248  # Check if we need to convert this using DOS-style short mode. If the path
17249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17250  # take no chances and rewrite it.
17251  # Note: m4 eats our [], so we need to use [ and ] instead.
17252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17253  if test "x$has_forbidden_chars" != x; then
17254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17255    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17256    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17257    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17258      # Going to short mode and back again did indeed matter. Since short mode is
17259      # case insensitive, let's make it lowercase to improve readability.
17260      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17261      # Now convert it back to Unix-style (cygpath)
17262      input_path=`$CYGPATH -u "$shortmode_path"`
17263      new_path="$input_path"
17264    fi
17265  fi
17266
17267  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17268  if test "x$test_cygdrive_prefix" = x; then
17269    # As a simple fix, exclude /usr/bin since it's not a real path.
17270    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17271      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17272      # a path prefixed by /cygdrive for fixpath to work.
17273      new_path="$CYGWIN_ROOT_PATH$input_path"
17274    fi
17275  fi
17276
17277  # remove trailing .exe if any
17278  new_path="${new_path/%.exe/}"
17279
17280    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17281
17282  # First separate the path from the arguments. This will split at the first
17283  # space.
17284  complete="$FOUND_MAKE"
17285  path="${complete%% *}"
17286  tmp="$complete EOL"
17287  arguments="${tmp#* }"
17288
17289  # Input might be given as Windows format, start by converting to
17290  # unix format.
17291  new_path="$path"
17292
17293  windows_path="$new_path"
17294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17295    unix_path=`$CYGPATH -u "$windows_path"`
17296    new_path="$unix_path"
17297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17299    new_path="$unix_path"
17300  fi
17301
17302
17303  # Now try to locate executable using which
17304  new_path=`$WHICH "$new_path" 2> /dev/null`
17305
17306  if test "x$new_path" = x; then
17307    # Oops. Which didn't find the executable.
17308    # The splitting of arguments from the executable at a space might have been incorrect,
17309    # since paths with space are more likely in Windows. Give it another try with the whole
17310    # argument.
17311    path="$complete"
17312    arguments="EOL"
17313    new_path="$path"
17314
17315  windows_path="$new_path"
17316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17317    unix_path=`$CYGPATH -u "$windows_path"`
17318    new_path="$unix_path"
17319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17321    new_path="$unix_path"
17322  fi
17323
17324
17325    new_path=`$WHICH "$new_path" 2> /dev/null`
17326    # bat and cmd files are not always considered executable in MSYS causing which
17327    # to not find them
17328    if test "x$new_path" = x \
17329        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17330        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17331      new_path="$path"
17332
17333  windows_path="$new_path"
17334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17335    unix_path=`$CYGPATH -u "$windows_path"`
17336    new_path="$unix_path"
17337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17339    new_path="$unix_path"
17340  fi
17341
17342    fi
17343
17344    if test "x$new_path" = x; then
17345      # It's still not found. Now this is an unrecoverable error.
17346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17347$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17348      has_space=`$ECHO "$complete" | $GREP " "`
17349      if test "x$has_space" != x; then
17350        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17351$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17352      fi
17353      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17354    fi
17355  fi
17356
17357  # Now new_path has a complete unix path to the binary
17358  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17359    # Keep paths in /bin as-is, but remove trailing .exe if any
17360    new_path="${new_path/%.exe/}"
17361    # Do not save /bin paths to all_fixpath_prefixes!
17362  else
17363    # Not in mixed or Windows style, start by that.
17364    new_path=`cmd //c echo $new_path`
17365
17366  input_path="$new_path"
17367  # Check if we need to convert this using DOS-style short mode. If the path
17368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17369  # take no chances and rewrite it.
17370  # Note: m4 eats our [], so we need to use [ and ] instead.
17371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17372  if test "x$has_forbidden_chars" != x; then
17373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17374    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17375  fi
17376
17377    # Output is in $new_path
17378
17379  windows_path="$new_path"
17380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17381    unix_path=`$CYGPATH -u "$windows_path"`
17382    new_path="$unix_path"
17383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17385    new_path="$unix_path"
17386  fi
17387
17388    # remove trailing .exe if any
17389    new_path="${new_path/%.exe/}"
17390
17391    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17392    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17393  fi
17394
17395    else
17396      # We're on a unix platform. Hooray! :)
17397      # First separate the path from the arguments. This will split at the first
17398      # space.
17399      complete="$FOUND_MAKE"
17400      path="${complete%% *}"
17401      tmp="$complete EOL"
17402      arguments="${tmp#* }"
17403
17404      # Cannot rely on the command "which" here since it doesn't always work.
17405      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17406      if test -z "$is_absolute_path"; then
17407        # Path to executable is not absolute. Find it.
17408        IFS_save="$IFS"
17409        IFS=:
17410        for p in $PATH; do
17411          if test -f "$p/$path" && test -x "$p/$path"; then
17412            new_path="$p/$path"
17413            break
17414          fi
17415        done
17416        IFS="$IFS_save"
17417      else
17418        # This is an absolute path, we can use it without further modifications.
17419        new_path="$path"
17420      fi
17421
17422      if test "x$new_path" = x; then
17423        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17424$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17425        has_space=`$ECHO "$complete" | $GREP " "`
17426        if test "x$has_space" != x; then
17427          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17428$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17429        fi
17430        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17431      fi
17432    fi
17433
17434    # Now join together the path and the arguments once again
17435    if test "x$arguments" != xEOL; then
17436      new_complete="$new_path ${arguments% *}"
17437    else
17438      new_complete="$new_path"
17439    fi
17440
17441    if test "x$complete" != "x$new_complete"; then
17442      FOUND_MAKE="$new_complete"
17443      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17444$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17445    fi
17446  fi
17447
17448        fi
17449      fi
17450    fi
17451  fi
17452
17453
17454    if test "x$FOUND_MAKE" = x; then
17455      for ac_prog in make
17456do
17457  # Extract the first word of "$ac_prog", so it can be a program name with args.
17458set dummy $ac_prog; ac_word=$2
17459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17460$as_echo_n "checking for $ac_word... " >&6; }
17461if ${ac_cv_path_CHECK_MAKE+:} false; then :
17462  $as_echo_n "(cached) " >&6
17463else
17464  case $CHECK_MAKE in
17465  [\\/]* | ?:[\\/]*)
17466  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17467  ;;
17468  *)
17469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17470for as_dir in $PATH
17471do
17472  IFS=$as_save_IFS
17473  test -z "$as_dir" && as_dir=.
17474    for ac_exec_ext in '' $ac_executable_extensions; do
17475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17476    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17478    break 2
17479  fi
17480done
17481  done
17482IFS=$as_save_IFS
17483
17484  ;;
17485esac
17486fi
17487CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17488if test -n "$CHECK_MAKE"; then
17489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17490$as_echo "$CHECK_MAKE" >&6; }
17491else
17492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17493$as_echo "no" >&6; }
17494fi
17495
17496
17497  test -n "$CHECK_MAKE" && break
17498done
17499
17500
17501  MAKE_CANDIDATE=""$CHECK_MAKE""
17502  DESCRIPTION="make in PATH"
17503
17504  # On Cygwin, we require a newer version of make than on other platforms
17505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17506    MAKE_VERSION_EXPR="-e 4\."
17507    MAKE_REQUIRED_VERSION="4.0"
17508   else
17509    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17510    MAKE_REQUIRED_VERSION="3.81"
17511  fi
17512
17513  if test "x$MAKE_CANDIDATE" != x; then
17514    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17515$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17516    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17517    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17518    if test "x$IS_GNU_MAKE" = x; then
17519      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17520$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17521    else
17522      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17523      if test "x$IS_MODERN_MAKE" = x; then
17524        { $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
17525$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;}
17526      else
17527        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17528          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17529            MAKE_EXPECTED_ENV='cygwin'
17530          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17531            MAKE_EXPECTED_ENV='msys'
17532          else
17533            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17534          fi
17535          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17536          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17537        else
17538          # Not relevant for non-Windows
17539          IS_MAKE_CORRECT_ENV=true
17540        fi
17541        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17542          { $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
17543$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;}
17544        else
17545          FOUND_MAKE=$MAKE_CANDIDATE
17546
17547  # Only process if variable expands to non-empty
17548
17549  if test "x$FOUND_MAKE" != x; then
17550    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17551
17552  # First separate the path from the arguments. This will split at the first
17553  # space.
17554  complete="$FOUND_MAKE"
17555  path="${complete%% *}"
17556  tmp="$complete EOL"
17557  arguments="${tmp#* }"
17558
17559  # Input might be given as Windows format, start by converting to
17560  # unix format.
17561  new_path=`$CYGPATH -u "$path"`
17562
17563  # Now try to locate executable using which
17564  new_path=`$WHICH "$new_path" 2> /dev/null`
17565  # bat and cmd files are not always considered executable in cygwin causing which
17566  # to not find them
17567  if test "x$new_path" = x \
17568      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17569      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17570    new_path=`$CYGPATH -u "$path"`
17571  fi
17572  if test "x$new_path" = x; then
17573    # Oops. Which didn't find the executable.
17574    # The splitting of arguments from the executable at a space might have been incorrect,
17575    # since paths with space are more likely in Windows. Give it another try with the whole
17576    # argument.
17577    path="$complete"
17578    arguments="EOL"
17579    new_path=`$CYGPATH -u "$path"`
17580    new_path=`$WHICH "$new_path" 2> /dev/null`
17581    # bat and cmd files are not always considered executable in cygwin causing which
17582    # to not find them
17583    if test "x$new_path" = x \
17584        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17585        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17586      new_path=`$CYGPATH -u "$path"`
17587    fi
17588    if test "x$new_path" = x; then
17589      # It's still not found. Now this is an unrecoverable error.
17590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17591$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17592      has_space=`$ECHO "$complete" | $GREP " "`
17593      if test "x$has_space" != x; then
17594        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17595$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17596      fi
17597      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17598    fi
17599  fi
17600
17601  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17602  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17603  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17604  # "foo.exe" is OK but "foo" is an error.
17605  #
17606  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17607  # It is also a way to make sure we got the proper file name for the real test later on.
17608  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17609  if test "x$test_shortpath" = x; then
17610    # Short path failed, file does not exist as specified.
17611    # Try adding .exe or .cmd
17612    if test -f "${new_path}.exe"; then
17613      input_to_shortpath="${new_path}.exe"
17614    elif test -f "${new_path}.cmd"; then
17615      input_to_shortpath="${new_path}.cmd"
17616    else
17617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17618$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17619      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17620$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17621      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17622    fi
17623  else
17624    input_to_shortpath="$new_path"
17625  fi
17626
17627  # Call helper function which possibly converts this using DOS-style short mode.
17628  # If so, the updated path is stored in $new_path.
17629  new_path="$input_to_shortpath"
17630
17631  input_path="$input_to_shortpath"
17632  # Check if we need to convert this using DOS-style short mode. If the path
17633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17634  # take no chances and rewrite it.
17635  # Note: m4 eats our [], so we need to use [ and ] instead.
17636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17637  if test "x$has_forbidden_chars" != x; then
17638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17639    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17640    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17641    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17642      # Going to short mode and back again did indeed matter. Since short mode is
17643      # case insensitive, let's make it lowercase to improve readability.
17644      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17645      # Now convert it back to Unix-style (cygpath)
17646      input_path=`$CYGPATH -u "$shortmode_path"`
17647      new_path="$input_path"
17648    fi
17649  fi
17650
17651  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17652  if test "x$test_cygdrive_prefix" = x; then
17653    # As a simple fix, exclude /usr/bin since it's not a real path.
17654    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17655      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17656      # a path prefixed by /cygdrive for fixpath to work.
17657      new_path="$CYGWIN_ROOT_PATH$input_path"
17658    fi
17659  fi
17660
17661  # remove trailing .exe if any
17662  new_path="${new_path/%.exe/}"
17663
17664    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17665
17666  # First separate the path from the arguments. This will split at the first
17667  # space.
17668  complete="$FOUND_MAKE"
17669  path="${complete%% *}"
17670  tmp="$complete EOL"
17671  arguments="${tmp#* }"
17672
17673  # Input might be given as Windows format, start by converting to
17674  # unix format.
17675  new_path="$path"
17676
17677  windows_path="$new_path"
17678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17679    unix_path=`$CYGPATH -u "$windows_path"`
17680    new_path="$unix_path"
17681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17683    new_path="$unix_path"
17684  fi
17685
17686
17687  # Now try to locate executable using which
17688  new_path=`$WHICH "$new_path" 2> /dev/null`
17689
17690  if test "x$new_path" = x; then
17691    # Oops. Which didn't find the executable.
17692    # The splitting of arguments from the executable at a space might have been incorrect,
17693    # since paths with space are more likely in Windows. Give it another try with the whole
17694    # argument.
17695    path="$complete"
17696    arguments="EOL"
17697    new_path="$path"
17698
17699  windows_path="$new_path"
17700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17701    unix_path=`$CYGPATH -u "$windows_path"`
17702    new_path="$unix_path"
17703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17705    new_path="$unix_path"
17706  fi
17707
17708
17709    new_path=`$WHICH "$new_path" 2> /dev/null`
17710    # bat and cmd files are not always considered executable in MSYS causing which
17711    # to not find them
17712    if test "x$new_path" = x \
17713        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17714        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17715      new_path="$path"
17716
17717  windows_path="$new_path"
17718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17719    unix_path=`$CYGPATH -u "$windows_path"`
17720    new_path="$unix_path"
17721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17723    new_path="$unix_path"
17724  fi
17725
17726    fi
17727
17728    if test "x$new_path" = x; then
17729      # It's still not found. Now this is an unrecoverable error.
17730      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17731$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17732      has_space=`$ECHO "$complete" | $GREP " "`
17733      if test "x$has_space" != x; then
17734        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17735$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17736      fi
17737      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17738    fi
17739  fi
17740
17741  # Now new_path has a complete unix path to the binary
17742  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17743    # Keep paths in /bin as-is, but remove trailing .exe if any
17744    new_path="${new_path/%.exe/}"
17745    # Do not save /bin paths to all_fixpath_prefixes!
17746  else
17747    # Not in mixed or Windows style, start by that.
17748    new_path=`cmd //c echo $new_path`
17749
17750  input_path="$new_path"
17751  # Check if we need to convert this using DOS-style short mode. If the path
17752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17753  # take no chances and rewrite it.
17754  # Note: m4 eats our [], so we need to use [ and ] instead.
17755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17756  if test "x$has_forbidden_chars" != x; then
17757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17758    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17759  fi
17760
17761    # Output is in $new_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    # remove trailing .exe if any
17773    new_path="${new_path/%.exe/}"
17774
17775    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17776    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17777  fi
17778
17779    else
17780      # We're on a unix platform. Hooray! :)
17781      # First separate the path from the arguments. This will split at the first
17782      # space.
17783      complete="$FOUND_MAKE"
17784      path="${complete%% *}"
17785      tmp="$complete EOL"
17786      arguments="${tmp#* }"
17787
17788      # Cannot rely on the command "which" here since it doesn't always work.
17789      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17790      if test -z "$is_absolute_path"; then
17791        # Path to executable is not absolute. Find it.
17792        IFS_save="$IFS"
17793        IFS=:
17794        for p in $PATH; do
17795          if test -f "$p/$path" && test -x "$p/$path"; then
17796            new_path="$p/$path"
17797            break
17798          fi
17799        done
17800        IFS="$IFS_save"
17801      else
17802        # This is an absolute path, we can use it without further modifications.
17803        new_path="$path"
17804      fi
17805
17806      if test "x$new_path" = x; then
17807        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17808$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17809        has_space=`$ECHO "$complete" | $GREP " "`
17810        if test "x$has_space" != x; then
17811          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17812$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17813        fi
17814        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17815      fi
17816    fi
17817
17818    # Now join together the path and the arguments once again
17819    if test "x$arguments" != xEOL; then
17820      new_complete="$new_path ${arguments% *}"
17821    else
17822      new_complete="$new_path"
17823    fi
17824
17825    if test "x$complete" != "x$new_complete"; then
17826      FOUND_MAKE="$new_complete"
17827      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17828$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17829    fi
17830  fi
17831
17832        fi
17833      fi
17834    fi
17835  fi
17836
17837    fi
17838
17839    if test "x$FOUND_MAKE" = x; then
17840      if test "x$TOOLCHAIN_PATH" != x; then
17841        # We have a toolchain path, check that as well before giving up.
17842        OLD_PATH=$PATH
17843        PATH=$TOOLCHAIN_PATH:$PATH
17844        for ac_prog in gmake
17845do
17846  # Extract the first word of "$ac_prog", so it can be a program name with args.
17847set dummy $ac_prog; ac_word=$2
17848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17849$as_echo_n "checking for $ac_word... " >&6; }
17850if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17851  $as_echo_n "(cached) " >&6
17852else
17853  case $CHECK_TOOLSDIR_GMAKE in
17854  [\\/]* | ?:[\\/]*)
17855  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17856  ;;
17857  *)
17858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17859for as_dir in $PATH
17860do
17861  IFS=$as_save_IFS
17862  test -z "$as_dir" && as_dir=.
17863    for ac_exec_ext in '' $ac_executable_extensions; do
17864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17865    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17867    break 2
17868  fi
17869done
17870  done
17871IFS=$as_save_IFS
17872
17873  ;;
17874esac
17875fi
17876CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17877if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17879$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17880else
17881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17882$as_echo "no" >&6; }
17883fi
17884
17885
17886  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17887done
17888
17889
17890  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17891  DESCRIPTION="gmake in tools-dir"
17892
17893  # On Cygwin, we require a newer version of make than on other platforms
17894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17895    MAKE_VERSION_EXPR="-e 4\."
17896    MAKE_REQUIRED_VERSION="4.0"
17897   else
17898    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17899    MAKE_REQUIRED_VERSION="3.81"
17900  fi
17901
17902  if test "x$MAKE_CANDIDATE" != x; then
17903    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17904$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17905    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17906    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17907    if test "x$IS_GNU_MAKE" = x; then
17908      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17909$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17910    else
17911      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17912      if test "x$IS_MODERN_MAKE" = x; then
17913        { $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
17914$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;}
17915      else
17916        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17917          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17918            MAKE_EXPECTED_ENV='cygwin'
17919          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17920            MAKE_EXPECTED_ENV='msys'
17921          else
17922            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17923          fi
17924          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17925          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17926        else
17927          # Not relevant for non-Windows
17928          IS_MAKE_CORRECT_ENV=true
17929        fi
17930        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17931          { $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
17932$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;}
17933        else
17934          FOUND_MAKE=$MAKE_CANDIDATE
17935
17936  # Only process if variable expands to non-empty
17937
17938  if test "x$FOUND_MAKE" != x; then
17939    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17940
17941  # First separate the path from the arguments. This will split at the first
17942  # space.
17943  complete="$FOUND_MAKE"
17944  path="${complete%% *}"
17945  tmp="$complete EOL"
17946  arguments="${tmp#* }"
17947
17948  # Input might be given as Windows format, start by converting to
17949  # unix format.
17950  new_path=`$CYGPATH -u "$path"`
17951
17952  # Now try to locate executable using which
17953  new_path=`$WHICH "$new_path" 2> /dev/null`
17954  # bat and cmd files are not always considered executable in cygwin causing which
17955  # to not find them
17956  if test "x$new_path" = x \
17957      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17958      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17959    new_path=`$CYGPATH -u "$path"`
17960  fi
17961  if test "x$new_path" = x; then
17962    # Oops. Which didn't find the executable.
17963    # The splitting of arguments from the executable at a space might have been incorrect,
17964    # since paths with space are more likely in Windows. Give it another try with the whole
17965    # argument.
17966    path="$complete"
17967    arguments="EOL"
17968    new_path=`$CYGPATH -u "$path"`
17969    new_path=`$WHICH "$new_path" 2> /dev/null`
17970    # bat and cmd files are not always considered executable in cygwin causing which
17971    # to not find them
17972    if test "x$new_path" = x \
17973        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17974        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17975      new_path=`$CYGPATH -u "$path"`
17976    fi
17977    if test "x$new_path" = x; then
17978      # It's still not found. Now this is an unrecoverable error.
17979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17980$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17981      has_space=`$ECHO "$complete" | $GREP " "`
17982      if test "x$has_space" != x; then
17983        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17984$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17985      fi
17986      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17987    fi
17988  fi
17989
17990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17993  # "foo.exe" is OK but "foo" is an error.
17994  #
17995  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17996  # It is also a way to make sure we got the proper file name for the real test later on.
17997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17998  if test "x$test_shortpath" = x; then
17999    # Short path failed, file does not exist as specified.
18000    # Try adding .exe or .cmd
18001    if test -f "${new_path}.exe"; then
18002      input_to_shortpath="${new_path}.exe"
18003    elif test -f "${new_path}.cmd"; then
18004      input_to_shortpath="${new_path}.cmd"
18005    else
18006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18007$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18008      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18009$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18010      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18011    fi
18012  else
18013    input_to_shortpath="$new_path"
18014  fi
18015
18016  # Call helper function which possibly converts this using DOS-style short mode.
18017  # If so, the updated path is stored in $new_path.
18018  new_path="$input_to_shortpath"
18019
18020  input_path="$input_to_shortpath"
18021  # Check if we need to convert this using DOS-style short mode. If the path
18022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18023  # take no chances and rewrite it.
18024  # Note: m4 eats our [], so we need to use [ and ] instead.
18025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18026  if test "x$has_forbidden_chars" != x; then
18027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18028    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18029    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18030    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18031      # Going to short mode and back again did indeed matter. Since short mode is
18032      # case insensitive, let's make it lowercase to improve readability.
18033      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18034      # Now convert it back to Unix-style (cygpath)
18035      input_path=`$CYGPATH -u "$shortmode_path"`
18036      new_path="$input_path"
18037    fi
18038  fi
18039
18040  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18041  if test "x$test_cygdrive_prefix" = x; then
18042    # As a simple fix, exclude /usr/bin since it's not a real path.
18043    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18044      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18045      # a path prefixed by /cygdrive for fixpath to work.
18046      new_path="$CYGWIN_ROOT_PATH$input_path"
18047    fi
18048  fi
18049
18050  # remove trailing .exe if any
18051  new_path="${new_path/%.exe/}"
18052
18053    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18054
18055  # First separate the path from the arguments. This will split at the first
18056  # space.
18057  complete="$FOUND_MAKE"
18058  path="${complete%% *}"
18059  tmp="$complete EOL"
18060  arguments="${tmp#* }"
18061
18062  # Input might be given as Windows format, start by converting to
18063  # unix format.
18064  new_path="$path"
18065
18066  windows_path="$new_path"
18067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18068    unix_path=`$CYGPATH -u "$windows_path"`
18069    new_path="$unix_path"
18070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18072    new_path="$unix_path"
18073  fi
18074
18075
18076  # Now try to locate executable using which
18077  new_path=`$WHICH "$new_path" 2> /dev/null`
18078
18079  if test "x$new_path" = x; then
18080    # Oops. Which didn't find the executable.
18081    # The splitting of arguments from the executable at a space might have been incorrect,
18082    # since paths with space are more likely in Windows. Give it another try with the whole
18083    # argument.
18084    path="$complete"
18085    arguments="EOL"
18086    new_path="$path"
18087
18088  windows_path="$new_path"
18089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18090    unix_path=`$CYGPATH -u "$windows_path"`
18091    new_path="$unix_path"
18092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18094    new_path="$unix_path"
18095  fi
18096
18097
18098    new_path=`$WHICH "$new_path" 2> /dev/null`
18099    # bat and cmd files are not always considered executable in MSYS causing which
18100    # to not find them
18101    if test "x$new_path" = x \
18102        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18103        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18104      new_path="$path"
18105
18106  windows_path="$new_path"
18107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18108    unix_path=`$CYGPATH -u "$windows_path"`
18109    new_path="$unix_path"
18110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18112    new_path="$unix_path"
18113  fi
18114
18115    fi
18116
18117    if test "x$new_path" = x; then
18118      # It's still not found. Now this is an unrecoverable error.
18119      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18120$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18121      has_space=`$ECHO "$complete" | $GREP " "`
18122      if test "x$has_space" != x; then
18123        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18124$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18125      fi
18126      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18127    fi
18128  fi
18129
18130  # Now new_path has a complete unix path to the binary
18131  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18132    # Keep paths in /bin as-is, but remove trailing .exe if any
18133    new_path="${new_path/%.exe/}"
18134    # Do not save /bin paths to all_fixpath_prefixes!
18135  else
18136    # Not in mixed or Windows style, start by that.
18137    new_path=`cmd //c echo $new_path`
18138
18139  input_path="$new_path"
18140  # Check if we need to convert this using DOS-style short mode. If the path
18141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18142  # take no chances and rewrite it.
18143  # Note: m4 eats our [], so we need to use [ and ] instead.
18144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18145  if test "x$has_forbidden_chars" != x; then
18146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18147    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18148  fi
18149
18150    # Output is in $new_path
18151
18152  windows_path="$new_path"
18153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18154    unix_path=`$CYGPATH -u "$windows_path"`
18155    new_path="$unix_path"
18156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18158    new_path="$unix_path"
18159  fi
18160
18161    # remove trailing .exe if any
18162    new_path="${new_path/%.exe/}"
18163
18164    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18165    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18166  fi
18167
18168    else
18169      # We're on a unix platform. Hooray! :)
18170      # First separate the path from the arguments. This will split at the first
18171      # space.
18172      complete="$FOUND_MAKE"
18173      path="${complete%% *}"
18174      tmp="$complete EOL"
18175      arguments="${tmp#* }"
18176
18177      # Cannot rely on the command "which" here since it doesn't always work.
18178      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18179      if test -z "$is_absolute_path"; then
18180        # Path to executable is not absolute. Find it.
18181        IFS_save="$IFS"
18182        IFS=:
18183        for p in $PATH; do
18184          if test -f "$p/$path" && test -x "$p/$path"; then
18185            new_path="$p/$path"
18186            break
18187          fi
18188        done
18189        IFS="$IFS_save"
18190      else
18191        # This is an absolute path, we can use it without further modifications.
18192        new_path="$path"
18193      fi
18194
18195      if test "x$new_path" = x; then
18196        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18197$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18198        has_space=`$ECHO "$complete" | $GREP " "`
18199        if test "x$has_space" != x; then
18200          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18201$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18202        fi
18203        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18204      fi
18205    fi
18206
18207    # Now join together the path and the arguments once again
18208    if test "x$arguments" != xEOL; then
18209      new_complete="$new_path ${arguments% *}"
18210    else
18211      new_complete="$new_path"
18212    fi
18213
18214    if test "x$complete" != "x$new_complete"; then
18215      FOUND_MAKE="$new_complete"
18216      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18217$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18218    fi
18219  fi
18220
18221        fi
18222      fi
18223    fi
18224  fi
18225
18226        if test "x$FOUND_MAKE" = x; then
18227          for ac_prog in make
18228do
18229  # Extract the first word of "$ac_prog", so it can be a program name with args.
18230set dummy $ac_prog; ac_word=$2
18231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18232$as_echo_n "checking for $ac_word... " >&6; }
18233if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18234  $as_echo_n "(cached) " >&6
18235else
18236  case $CHECK_TOOLSDIR_MAKE in
18237  [\\/]* | ?:[\\/]*)
18238  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18239  ;;
18240  *)
18241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18242for as_dir in $PATH
18243do
18244  IFS=$as_save_IFS
18245  test -z "$as_dir" && as_dir=.
18246    for ac_exec_ext in '' $ac_executable_extensions; do
18247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18248    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18250    break 2
18251  fi
18252done
18253  done
18254IFS=$as_save_IFS
18255
18256  ;;
18257esac
18258fi
18259CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18260if test -n "$CHECK_TOOLSDIR_MAKE"; then
18261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18262$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18263else
18264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18265$as_echo "no" >&6; }
18266fi
18267
18268
18269  test -n "$CHECK_TOOLSDIR_MAKE" && break
18270done
18271
18272
18273  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18274  DESCRIPTION="make in tools-dir"
18275
18276  # On Cygwin, we require a newer version of make than on other platforms
18277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18278    MAKE_VERSION_EXPR="-e 4\."
18279    MAKE_REQUIRED_VERSION="4.0"
18280   else
18281    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18282    MAKE_REQUIRED_VERSION="3.81"
18283  fi
18284
18285  if test "x$MAKE_CANDIDATE" != x; then
18286    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18287$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18288    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18289    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18290    if test "x$IS_GNU_MAKE" = x; then
18291      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18292$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18293    else
18294      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18295      if test "x$IS_MODERN_MAKE" = x; then
18296        { $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
18297$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;}
18298      else
18299        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18300          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18301            MAKE_EXPECTED_ENV='cygwin'
18302          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18303            MAKE_EXPECTED_ENV='msys'
18304          else
18305            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18306          fi
18307          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18308          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18309        else
18310          # Not relevant for non-Windows
18311          IS_MAKE_CORRECT_ENV=true
18312        fi
18313        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18314          { $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
18315$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;}
18316        else
18317          FOUND_MAKE=$MAKE_CANDIDATE
18318
18319  # Only process if variable expands to non-empty
18320
18321  if test "x$FOUND_MAKE" != x; then
18322    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18323
18324  # First separate the path from the arguments. This will split at the first
18325  # space.
18326  complete="$FOUND_MAKE"
18327  path="${complete%% *}"
18328  tmp="$complete EOL"
18329  arguments="${tmp#* }"
18330
18331  # Input might be given as Windows format, start by converting to
18332  # unix format.
18333  new_path=`$CYGPATH -u "$path"`
18334
18335  # Now try to locate executable using which
18336  new_path=`$WHICH "$new_path" 2> /dev/null`
18337  # bat and cmd files are not always considered executable in cygwin causing which
18338  # to not find them
18339  if test "x$new_path" = x \
18340      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18341      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18342    new_path=`$CYGPATH -u "$path"`
18343  fi
18344  if test "x$new_path" = x; then
18345    # Oops. Which didn't find the executable.
18346    # The splitting of arguments from the executable at a space might have been incorrect,
18347    # since paths with space are more likely in Windows. Give it another try with the whole
18348    # argument.
18349    path="$complete"
18350    arguments="EOL"
18351    new_path=`$CYGPATH -u "$path"`
18352    new_path=`$WHICH "$new_path" 2> /dev/null`
18353    # bat and cmd files are not always considered executable in cygwin causing which
18354    # to not find them
18355    if test "x$new_path" = x \
18356        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18357        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18358      new_path=`$CYGPATH -u "$path"`
18359    fi
18360    if test "x$new_path" = x; then
18361      # It's still not found. Now this is an unrecoverable error.
18362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18363$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18364      has_space=`$ECHO "$complete" | $GREP " "`
18365      if test "x$has_space" != x; then
18366        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18367$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18368      fi
18369      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18370    fi
18371  fi
18372
18373  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18374  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18375  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18376  # "foo.exe" is OK but "foo" is an error.
18377  #
18378  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18379  # It is also a way to make sure we got the proper file name for the real test later on.
18380  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18381  if test "x$test_shortpath" = x; then
18382    # Short path failed, file does not exist as specified.
18383    # Try adding .exe or .cmd
18384    if test -f "${new_path}.exe"; then
18385      input_to_shortpath="${new_path}.exe"
18386    elif test -f "${new_path}.cmd"; then
18387      input_to_shortpath="${new_path}.cmd"
18388    else
18389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18390$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18391      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18392$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18393      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18394    fi
18395  else
18396    input_to_shortpath="$new_path"
18397  fi
18398
18399  # Call helper function which possibly converts this using DOS-style short mode.
18400  # If so, the updated path is stored in $new_path.
18401  new_path="$input_to_shortpath"
18402
18403  input_path="$input_to_shortpath"
18404  # Check if we need to convert this using DOS-style short mode. If the path
18405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18406  # take no chances and rewrite it.
18407  # Note: m4 eats our [], so we need to use [ and ] instead.
18408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18409  if test "x$has_forbidden_chars" != x; then
18410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18411    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18412    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18413    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18414      # Going to short mode and back again did indeed matter. Since short mode is
18415      # case insensitive, let's make it lowercase to improve readability.
18416      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18417      # Now convert it back to Unix-style (cygpath)
18418      input_path=`$CYGPATH -u "$shortmode_path"`
18419      new_path="$input_path"
18420    fi
18421  fi
18422
18423  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18424  if test "x$test_cygdrive_prefix" = x; then
18425    # As a simple fix, exclude /usr/bin since it's not a real path.
18426    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18427      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18428      # a path prefixed by /cygdrive for fixpath to work.
18429      new_path="$CYGWIN_ROOT_PATH$input_path"
18430    fi
18431  fi
18432
18433  # remove trailing .exe if any
18434  new_path="${new_path/%.exe/}"
18435
18436    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18437
18438  # First separate the path from the arguments. This will split at the first
18439  # space.
18440  complete="$FOUND_MAKE"
18441  path="${complete%% *}"
18442  tmp="$complete EOL"
18443  arguments="${tmp#* }"
18444
18445  # Input might be given as Windows format, start by converting to
18446  # unix format.
18447  new_path="$path"
18448
18449  windows_path="$new_path"
18450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18451    unix_path=`$CYGPATH -u "$windows_path"`
18452    new_path="$unix_path"
18453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18455    new_path="$unix_path"
18456  fi
18457
18458
18459  # Now try to locate executable using which
18460  new_path=`$WHICH "$new_path" 2> /dev/null`
18461
18462  if test "x$new_path" = x; then
18463    # Oops. Which didn't find the executable.
18464    # The splitting of arguments from the executable at a space might have been incorrect,
18465    # since paths with space are more likely in Windows. Give it another try with the whole
18466    # argument.
18467    path="$complete"
18468    arguments="EOL"
18469    new_path="$path"
18470
18471  windows_path="$new_path"
18472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18473    unix_path=`$CYGPATH -u "$windows_path"`
18474    new_path="$unix_path"
18475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18477    new_path="$unix_path"
18478  fi
18479
18480
18481    new_path=`$WHICH "$new_path" 2> /dev/null`
18482    # bat and cmd files are not always considered executable in MSYS causing which
18483    # to not find them
18484    if test "x$new_path" = x \
18485        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18486        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18487      new_path="$path"
18488
18489  windows_path="$new_path"
18490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18491    unix_path=`$CYGPATH -u "$windows_path"`
18492    new_path="$unix_path"
18493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18495    new_path="$unix_path"
18496  fi
18497
18498    fi
18499
18500    if test "x$new_path" = x; then
18501      # It's still not found. Now this is an unrecoverable error.
18502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18503$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18504      has_space=`$ECHO "$complete" | $GREP " "`
18505      if test "x$has_space" != x; then
18506        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18507$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18508      fi
18509      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18510    fi
18511  fi
18512
18513  # Now new_path has a complete unix path to the binary
18514  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18515    # Keep paths in /bin as-is, but remove trailing .exe if any
18516    new_path="${new_path/%.exe/}"
18517    # Do not save /bin paths to all_fixpath_prefixes!
18518  else
18519    # Not in mixed or Windows style, start by that.
18520    new_path=`cmd //c echo $new_path`
18521
18522  input_path="$new_path"
18523  # Check if we need to convert this using DOS-style short mode. If the path
18524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18525  # take no chances and rewrite it.
18526  # Note: m4 eats our [], so we need to use [ and ] instead.
18527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18528  if test "x$has_forbidden_chars" != x; then
18529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18530    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18531  fi
18532
18533    # Output is in $new_path
18534
18535  windows_path="$new_path"
18536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18537    unix_path=`$CYGPATH -u "$windows_path"`
18538    new_path="$unix_path"
18539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18541    new_path="$unix_path"
18542  fi
18543
18544    # remove trailing .exe if any
18545    new_path="${new_path/%.exe/}"
18546
18547    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18548    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18549  fi
18550
18551    else
18552      # We're on a unix platform. Hooray! :)
18553      # First separate the path from the arguments. This will split at the first
18554      # space.
18555      complete="$FOUND_MAKE"
18556      path="${complete%% *}"
18557      tmp="$complete EOL"
18558      arguments="${tmp#* }"
18559
18560      # Cannot rely on the command "which" here since it doesn't always work.
18561      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18562      if test -z "$is_absolute_path"; then
18563        # Path to executable is not absolute. Find it.
18564        IFS_save="$IFS"
18565        IFS=:
18566        for p in $PATH; do
18567          if test -f "$p/$path" && test -x "$p/$path"; then
18568            new_path="$p/$path"
18569            break
18570          fi
18571        done
18572        IFS="$IFS_save"
18573      else
18574        # This is an absolute path, we can use it without further modifications.
18575        new_path="$path"
18576      fi
18577
18578      if test "x$new_path" = x; then
18579        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18580$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18581        has_space=`$ECHO "$complete" | $GREP " "`
18582        if test "x$has_space" != x; then
18583          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18584$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18585        fi
18586        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18587      fi
18588    fi
18589
18590    # Now join together the path and the arguments once again
18591    if test "x$arguments" != xEOL; then
18592      new_complete="$new_path ${arguments% *}"
18593    else
18594      new_complete="$new_path"
18595    fi
18596
18597    if test "x$complete" != "x$new_complete"; then
18598      FOUND_MAKE="$new_complete"
18599      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18600$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18601    fi
18602  fi
18603
18604        fi
18605      fi
18606    fi
18607  fi
18608
18609        fi
18610        PATH=$OLD_PATH
18611      fi
18612    fi
18613
18614    if test "x$FOUND_MAKE" = x; then
18615      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
18616    fi
18617
18618  else
18619    # The variable is set, but is it from the command line or the environment?
18620
18621    # Try to remove the string !MAKE! from our list.
18622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18624      # If it failed, the variable was not from the command line. Ignore it,
18625      # but warn the user (except for BASH, which is always set by the calling BASH).
18626      if test "xMAKE" != xBASH; then
18627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18628$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18629      fi
18630      # Try to locate tool using the code snippet
18631
18632    # Try our hardest to locate a correct version of GNU make
18633    for ac_prog in gmake
18634do
18635  # Extract the first word of "$ac_prog", so it can be a program name with args.
18636set dummy $ac_prog; ac_word=$2
18637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18638$as_echo_n "checking for $ac_word... " >&6; }
18639if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18640  $as_echo_n "(cached) " >&6
18641else
18642  case $CHECK_GMAKE in
18643  [\\/]* | ?:[\\/]*)
18644  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18645  ;;
18646  *)
18647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18648for as_dir in $PATH
18649do
18650  IFS=$as_save_IFS
18651  test -z "$as_dir" && as_dir=.
18652    for ac_exec_ext in '' $ac_executable_extensions; do
18653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18654    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18656    break 2
18657  fi
18658done
18659  done
18660IFS=$as_save_IFS
18661
18662  ;;
18663esac
18664fi
18665CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18666if test -n "$CHECK_GMAKE"; then
18667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18668$as_echo "$CHECK_GMAKE" >&6; }
18669else
18670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18671$as_echo "no" >&6; }
18672fi
18673
18674
18675  test -n "$CHECK_GMAKE" && break
18676done
18677
18678
18679  MAKE_CANDIDATE=""$CHECK_GMAKE""
18680  DESCRIPTION="gmake in PATH"
18681
18682  # On Cygwin, we require a newer version of make than on other platforms
18683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18684    MAKE_VERSION_EXPR="-e 4\."
18685    MAKE_REQUIRED_VERSION="4.0"
18686   else
18687    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18688    MAKE_REQUIRED_VERSION="3.81"
18689  fi
18690
18691  if test "x$MAKE_CANDIDATE" != x; then
18692    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18693$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18694    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18695    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18696    if test "x$IS_GNU_MAKE" = x; then
18697      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18698$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18699    else
18700      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18701      if test "x$IS_MODERN_MAKE" = x; then
18702        { $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
18703$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;}
18704      else
18705        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18706          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18707            MAKE_EXPECTED_ENV='cygwin'
18708          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18709            MAKE_EXPECTED_ENV='msys'
18710          else
18711            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18712          fi
18713          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18714          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18715        else
18716          # Not relevant for non-Windows
18717          IS_MAKE_CORRECT_ENV=true
18718        fi
18719        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18720          { $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
18721$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;}
18722        else
18723          FOUND_MAKE=$MAKE_CANDIDATE
18724
18725  # Only process if variable expands to non-empty
18726
18727  if test "x$FOUND_MAKE" != x; then
18728    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18729
18730  # First separate the path from the arguments. This will split at the first
18731  # space.
18732  complete="$FOUND_MAKE"
18733  path="${complete%% *}"
18734  tmp="$complete EOL"
18735  arguments="${tmp#* }"
18736
18737  # Input might be given as Windows format, start by converting to
18738  # unix format.
18739  new_path=`$CYGPATH -u "$path"`
18740
18741  # Now try to locate executable using which
18742  new_path=`$WHICH "$new_path" 2> /dev/null`
18743  # bat and cmd files are not always considered executable in cygwin causing which
18744  # to not find them
18745  if test "x$new_path" = x \
18746      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18747      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18748    new_path=`$CYGPATH -u "$path"`
18749  fi
18750  if test "x$new_path" = x; then
18751    # Oops. Which didn't find the executable.
18752    # The splitting of arguments from the executable at a space might have been incorrect,
18753    # since paths with space are more likely in Windows. Give it another try with the whole
18754    # argument.
18755    path="$complete"
18756    arguments="EOL"
18757    new_path=`$CYGPATH -u "$path"`
18758    new_path=`$WHICH "$new_path" 2> /dev/null`
18759    # bat and cmd files are not always considered executable in cygwin causing which
18760    # to not find them
18761    if test "x$new_path" = x \
18762        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18763        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18764      new_path=`$CYGPATH -u "$path"`
18765    fi
18766    if test "x$new_path" = x; then
18767      # It's still not found. Now this is an unrecoverable error.
18768      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18769$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18770      has_space=`$ECHO "$complete" | $GREP " "`
18771      if test "x$has_space" != x; then
18772        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18773$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18774      fi
18775      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18776    fi
18777  fi
18778
18779  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18780  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18781  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18782  # "foo.exe" is OK but "foo" is an error.
18783  #
18784  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18785  # It is also a way to make sure we got the proper file name for the real test later on.
18786  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18787  if test "x$test_shortpath" = x; then
18788    # Short path failed, file does not exist as specified.
18789    # Try adding .exe or .cmd
18790    if test -f "${new_path}.exe"; then
18791      input_to_shortpath="${new_path}.exe"
18792    elif test -f "${new_path}.cmd"; then
18793      input_to_shortpath="${new_path}.cmd"
18794    else
18795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18796$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18797      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18798$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18799      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18800    fi
18801  else
18802    input_to_shortpath="$new_path"
18803  fi
18804
18805  # Call helper function which possibly converts this using DOS-style short mode.
18806  # If so, the updated path is stored in $new_path.
18807  new_path="$input_to_shortpath"
18808
18809  input_path="$input_to_shortpath"
18810  # Check if we need to convert this using DOS-style short mode. If the path
18811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18812  # take no chances and rewrite it.
18813  # Note: m4 eats our [], so we need to use [ and ] instead.
18814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18815  if test "x$has_forbidden_chars" != x; then
18816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18817    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18818    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18819    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18820      # Going to short mode and back again did indeed matter. Since short mode is
18821      # case insensitive, let's make it lowercase to improve readability.
18822      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18823      # Now convert it back to Unix-style (cygpath)
18824      input_path=`$CYGPATH -u "$shortmode_path"`
18825      new_path="$input_path"
18826    fi
18827  fi
18828
18829  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18830  if test "x$test_cygdrive_prefix" = x; then
18831    # As a simple fix, exclude /usr/bin since it's not a real path.
18832    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18833      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18834      # a path prefixed by /cygdrive for fixpath to work.
18835      new_path="$CYGWIN_ROOT_PATH$input_path"
18836    fi
18837  fi
18838
18839  # remove trailing .exe if any
18840  new_path="${new_path/%.exe/}"
18841
18842    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18843
18844  # First separate the path from the arguments. This will split at the first
18845  # space.
18846  complete="$FOUND_MAKE"
18847  path="${complete%% *}"
18848  tmp="$complete EOL"
18849  arguments="${tmp#* }"
18850
18851  # Input might be given as Windows format, start by converting to
18852  # unix format.
18853  new_path="$path"
18854
18855  windows_path="$new_path"
18856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18857    unix_path=`$CYGPATH -u "$windows_path"`
18858    new_path="$unix_path"
18859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18861    new_path="$unix_path"
18862  fi
18863
18864
18865  # Now try to locate executable using which
18866  new_path=`$WHICH "$new_path" 2> /dev/null`
18867
18868  if test "x$new_path" = x; then
18869    # Oops. Which didn't find the executable.
18870    # The splitting of arguments from the executable at a space might have been incorrect,
18871    # since paths with space are more likely in Windows. Give it another try with the whole
18872    # argument.
18873    path="$complete"
18874    arguments="EOL"
18875    new_path="$path"
18876
18877  windows_path="$new_path"
18878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18879    unix_path=`$CYGPATH -u "$windows_path"`
18880    new_path="$unix_path"
18881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18883    new_path="$unix_path"
18884  fi
18885
18886
18887    new_path=`$WHICH "$new_path" 2> /dev/null`
18888    # bat and cmd files are not always considered executable in MSYS causing which
18889    # to not find them
18890    if test "x$new_path" = x \
18891        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18892        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18893      new_path="$path"
18894
18895  windows_path="$new_path"
18896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18897    unix_path=`$CYGPATH -u "$windows_path"`
18898    new_path="$unix_path"
18899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18901    new_path="$unix_path"
18902  fi
18903
18904    fi
18905
18906    if test "x$new_path" = x; then
18907      # It's still not found. Now this is an unrecoverable error.
18908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18909$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18910      has_space=`$ECHO "$complete" | $GREP " "`
18911      if test "x$has_space" != x; then
18912        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18913$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18914      fi
18915      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18916    fi
18917  fi
18918
18919  # Now new_path has a complete unix path to the binary
18920  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18921    # Keep paths in /bin as-is, but remove trailing .exe if any
18922    new_path="${new_path/%.exe/}"
18923    # Do not save /bin paths to all_fixpath_prefixes!
18924  else
18925    # Not in mixed or Windows style, start by that.
18926    new_path=`cmd //c echo $new_path`
18927
18928  input_path="$new_path"
18929  # Check if we need to convert this using DOS-style short mode. If the path
18930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18931  # take no chances and rewrite it.
18932  # Note: m4 eats our [], so we need to use [ and ] instead.
18933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18934  if test "x$has_forbidden_chars" != x; then
18935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18936    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18937  fi
18938
18939    # Output is in $new_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    # remove trailing .exe if any
18951    new_path="${new_path/%.exe/}"
18952
18953    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18954    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18955  fi
18956
18957    else
18958      # We're on a unix platform. Hooray! :)
18959      # First separate the path from the arguments. This will split at the first
18960      # space.
18961      complete="$FOUND_MAKE"
18962      path="${complete%% *}"
18963      tmp="$complete EOL"
18964      arguments="${tmp#* }"
18965
18966      # Cannot rely on the command "which" here since it doesn't always work.
18967      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18968      if test -z "$is_absolute_path"; then
18969        # Path to executable is not absolute. Find it.
18970        IFS_save="$IFS"
18971        IFS=:
18972        for p in $PATH; do
18973          if test -f "$p/$path" && test -x "$p/$path"; then
18974            new_path="$p/$path"
18975            break
18976          fi
18977        done
18978        IFS="$IFS_save"
18979      else
18980        # This is an absolute path, we can use it without further modifications.
18981        new_path="$path"
18982      fi
18983
18984      if test "x$new_path" = x; then
18985        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18986$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18987        has_space=`$ECHO "$complete" | $GREP " "`
18988        if test "x$has_space" != x; then
18989          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18990$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18991        fi
18992        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18993      fi
18994    fi
18995
18996    # Now join together the path and the arguments once again
18997    if test "x$arguments" != xEOL; then
18998      new_complete="$new_path ${arguments% *}"
18999    else
19000      new_complete="$new_path"
19001    fi
19002
19003    if test "x$complete" != "x$new_complete"; then
19004      FOUND_MAKE="$new_complete"
19005      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19006$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19007    fi
19008  fi
19009
19010        fi
19011      fi
19012    fi
19013  fi
19014
19015
19016    if test "x$FOUND_MAKE" = x; then
19017      for ac_prog in make
19018do
19019  # Extract the first word of "$ac_prog", so it can be a program name with args.
19020set dummy $ac_prog; ac_word=$2
19021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19022$as_echo_n "checking for $ac_word... " >&6; }
19023if ${ac_cv_path_CHECK_MAKE+:} false; then :
19024  $as_echo_n "(cached) " >&6
19025else
19026  case $CHECK_MAKE in
19027  [\\/]* | ?:[\\/]*)
19028  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19029  ;;
19030  *)
19031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19032for as_dir in $PATH
19033do
19034  IFS=$as_save_IFS
19035  test -z "$as_dir" && as_dir=.
19036    for ac_exec_ext in '' $ac_executable_extensions; do
19037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19038    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19040    break 2
19041  fi
19042done
19043  done
19044IFS=$as_save_IFS
19045
19046  ;;
19047esac
19048fi
19049CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19050if test -n "$CHECK_MAKE"; then
19051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19052$as_echo "$CHECK_MAKE" >&6; }
19053else
19054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19055$as_echo "no" >&6; }
19056fi
19057
19058
19059  test -n "$CHECK_MAKE" && break
19060done
19061
19062
19063  MAKE_CANDIDATE=""$CHECK_MAKE""
19064  DESCRIPTION="make in PATH"
19065
19066  # On Cygwin, we require a newer version of make than on other platforms
19067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19068    MAKE_VERSION_EXPR="-e 4\."
19069    MAKE_REQUIRED_VERSION="4.0"
19070   else
19071    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19072    MAKE_REQUIRED_VERSION="3.81"
19073  fi
19074
19075  if test "x$MAKE_CANDIDATE" != x; then
19076    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19077$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19078    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19079    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19080    if test "x$IS_GNU_MAKE" = x; then
19081      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19082$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19083    else
19084      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19085      if test "x$IS_MODERN_MAKE" = x; then
19086        { $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
19087$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;}
19088      else
19089        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19090          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19091            MAKE_EXPECTED_ENV='cygwin'
19092          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19093            MAKE_EXPECTED_ENV='msys'
19094          else
19095            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19096          fi
19097          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19098          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19099        else
19100          # Not relevant for non-Windows
19101          IS_MAKE_CORRECT_ENV=true
19102        fi
19103        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19104          { $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
19105$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;}
19106        else
19107          FOUND_MAKE=$MAKE_CANDIDATE
19108
19109  # Only process if variable expands to non-empty
19110
19111  if test "x$FOUND_MAKE" != x; then
19112    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19113
19114  # First separate the path from the arguments. This will split at the first
19115  # space.
19116  complete="$FOUND_MAKE"
19117  path="${complete%% *}"
19118  tmp="$complete EOL"
19119  arguments="${tmp#* }"
19120
19121  # Input might be given as Windows format, start by converting to
19122  # unix format.
19123  new_path=`$CYGPATH -u "$path"`
19124
19125  # Now try to locate executable using which
19126  new_path=`$WHICH "$new_path" 2> /dev/null`
19127  # bat and cmd files are not always considered executable in cygwin causing which
19128  # to not find them
19129  if test "x$new_path" = x \
19130      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19131      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19132    new_path=`$CYGPATH -u "$path"`
19133  fi
19134  if test "x$new_path" = x; then
19135    # Oops. Which didn't find the executable.
19136    # The splitting of arguments from the executable at a space might have been incorrect,
19137    # since paths with space are more likely in Windows. Give it another try with the whole
19138    # argument.
19139    path="$complete"
19140    arguments="EOL"
19141    new_path=`$CYGPATH -u "$path"`
19142    new_path=`$WHICH "$new_path" 2> /dev/null`
19143    # bat and cmd files are not always considered executable in cygwin causing which
19144    # to not find them
19145    if test "x$new_path" = x \
19146        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19147        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19148      new_path=`$CYGPATH -u "$path"`
19149    fi
19150    if test "x$new_path" = x; then
19151      # It's still not found. Now this is an unrecoverable error.
19152      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19153$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19154      has_space=`$ECHO "$complete" | $GREP " "`
19155      if test "x$has_space" != x; then
19156        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19157$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19158      fi
19159      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19160    fi
19161  fi
19162
19163  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19164  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19165  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19166  # "foo.exe" is OK but "foo" is an error.
19167  #
19168  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19169  # It is also a way to make sure we got the proper file name for the real test later on.
19170  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19171  if test "x$test_shortpath" = x; then
19172    # Short path failed, file does not exist as specified.
19173    # Try adding .exe or .cmd
19174    if test -f "${new_path}.exe"; then
19175      input_to_shortpath="${new_path}.exe"
19176    elif test -f "${new_path}.cmd"; then
19177      input_to_shortpath="${new_path}.cmd"
19178    else
19179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19180$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19181      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19182$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19183      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19184    fi
19185  else
19186    input_to_shortpath="$new_path"
19187  fi
19188
19189  # Call helper function which possibly converts this using DOS-style short mode.
19190  # If so, the updated path is stored in $new_path.
19191  new_path="$input_to_shortpath"
19192
19193  input_path="$input_to_shortpath"
19194  # Check if we need to convert this using DOS-style short mode. If the path
19195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19196  # take no chances and rewrite it.
19197  # Note: m4 eats our [], so we need to use [ and ] instead.
19198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19199  if test "x$has_forbidden_chars" != x; then
19200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19201    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19202    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19203    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19204      # Going to short mode and back again did indeed matter. Since short mode is
19205      # case insensitive, let's make it lowercase to improve readability.
19206      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19207      # Now convert it back to Unix-style (cygpath)
19208      input_path=`$CYGPATH -u "$shortmode_path"`
19209      new_path="$input_path"
19210    fi
19211  fi
19212
19213  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19214  if test "x$test_cygdrive_prefix" = x; then
19215    # As a simple fix, exclude /usr/bin since it's not a real path.
19216    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19217      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19218      # a path prefixed by /cygdrive for fixpath to work.
19219      new_path="$CYGWIN_ROOT_PATH$input_path"
19220    fi
19221  fi
19222
19223  # remove trailing .exe if any
19224  new_path="${new_path/%.exe/}"
19225
19226    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19227
19228  # First separate the path from the arguments. This will split at the first
19229  # space.
19230  complete="$FOUND_MAKE"
19231  path="${complete%% *}"
19232  tmp="$complete EOL"
19233  arguments="${tmp#* }"
19234
19235  # Input might be given as Windows format, start by converting to
19236  # unix format.
19237  new_path="$path"
19238
19239  windows_path="$new_path"
19240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19241    unix_path=`$CYGPATH -u "$windows_path"`
19242    new_path="$unix_path"
19243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19245    new_path="$unix_path"
19246  fi
19247
19248
19249  # Now try to locate executable using which
19250  new_path=`$WHICH "$new_path" 2> /dev/null`
19251
19252  if test "x$new_path" = x; then
19253    # Oops. Which didn't find the executable.
19254    # The splitting of arguments from the executable at a space might have been incorrect,
19255    # since paths with space are more likely in Windows. Give it another try with the whole
19256    # argument.
19257    path="$complete"
19258    arguments="EOL"
19259    new_path="$path"
19260
19261  windows_path="$new_path"
19262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19263    unix_path=`$CYGPATH -u "$windows_path"`
19264    new_path="$unix_path"
19265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19267    new_path="$unix_path"
19268  fi
19269
19270
19271    new_path=`$WHICH "$new_path" 2> /dev/null`
19272    # bat and cmd files are not always considered executable in MSYS causing which
19273    # to not find them
19274    if test "x$new_path" = x \
19275        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19276        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19277      new_path="$path"
19278
19279  windows_path="$new_path"
19280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19281    unix_path=`$CYGPATH -u "$windows_path"`
19282    new_path="$unix_path"
19283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19285    new_path="$unix_path"
19286  fi
19287
19288    fi
19289
19290    if test "x$new_path" = x; then
19291      # It's still not found. Now this is an unrecoverable error.
19292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19293$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19294      has_space=`$ECHO "$complete" | $GREP " "`
19295      if test "x$has_space" != x; then
19296        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19297$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19298      fi
19299      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19300    fi
19301  fi
19302
19303  # Now new_path has a complete unix path to the binary
19304  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19305    # Keep paths in /bin as-is, but remove trailing .exe if any
19306    new_path="${new_path/%.exe/}"
19307    # Do not save /bin paths to all_fixpath_prefixes!
19308  else
19309    # Not in mixed or Windows style, start by that.
19310    new_path=`cmd //c echo $new_path`
19311
19312  input_path="$new_path"
19313  # Check if we need to convert this using DOS-style short mode. If the path
19314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19315  # take no chances and rewrite it.
19316  # Note: m4 eats our [], so we need to use [ and ] instead.
19317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19318  if test "x$has_forbidden_chars" != x; then
19319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19320    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19321  fi
19322
19323    # Output is in $new_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    # remove trailing .exe if any
19335    new_path="${new_path/%.exe/}"
19336
19337    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19338    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19339  fi
19340
19341    else
19342      # We're on a unix platform. Hooray! :)
19343      # First separate the path from the arguments. This will split at the first
19344      # space.
19345      complete="$FOUND_MAKE"
19346      path="${complete%% *}"
19347      tmp="$complete EOL"
19348      arguments="${tmp#* }"
19349
19350      # Cannot rely on the command "which" here since it doesn't always work.
19351      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19352      if test -z "$is_absolute_path"; then
19353        # Path to executable is not absolute. Find it.
19354        IFS_save="$IFS"
19355        IFS=:
19356        for p in $PATH; do
19357          if test -f "$p/$path" && test -x "$p/$path"; then
19358            new_path="$p/$path"
19359            break
19360          fi
19361        done
19362        IFS="$IFS_save"
19363      else
19364        # This is an absolute path, we can use it without further modifications.
19365        new_path="$path"
19366      fi
19367
19368      if test "x$new_path" = x; then
19369        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19370$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19371        has_space=`$ECHO "$complete" | $GREP " "`
19372        if test "x$has_space" != x; then
19373          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19374$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19375        fi
19376        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19377      fi
19378    fi
19379
19380    # Now join together the path and the arguments once again
19381    if test "x$arguments" != xEOL; then
19382      new_complete="$new_path ${arguments% *}"
19383    else
19384      new_complete="$new_path"
19385    fi
19386
19387    if test "x$complete" != "x$new_complete"; then
19388      FOUND_MAKE="$new_complete"
19389      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19390$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19391    fi
19392  fi
19393
19394        fi
19395      fi
19396    fi
19397  fi
19398
19399    fi
19400
19401    if test "x$FOUND_MAKE" = x; then
19402      if test "x$TOOLCHAIN_PATH" != x; then
19403        # We have a toolchain path, check that as well before giving up.
19404        OLD_PATH=$PATH
19405        PATH=$TOOLCHAIN_PATH:$PATH
19406        for ac_prog in gmake
19407do
19408  # Extract the first word of "$ac_prog", so it can be a program name with args.
19409set dummy $ac_prog; ac_word=$2
19410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19411$as_echo_n "checking for $ac_word... " >&6; }
19412if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19413  $as_echo_n "(cached) " >&6
19414else
19415  case $CHECK_TOOLSDIR_GMAKE in
19416  [\\/]* | ?:[\\/]*)
19417  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19418  ;;
19419  *)
19420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19421for as_dir in $PATH
19422do
19423  IFS=$as_save_IFS
19424  test -z "$as_dir" && as_dir=.
19425    for ac_exec_ext in '' $ac_executable_extensions; do
19426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19427    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19429    break 2
19430  fi
19431done
19432  done
19433IFS=$as_save_IFS
19434
19435  ;;
19436esac
19437fi
19438CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19439if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19441$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19442else
19443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19444$as_echo "no" >&6; }
19445fi
19446
19447
19448  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19449done
19450
19451
19452  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19453  DESCRIPTION="gmake in tools-dir"
19454
19455  # On Cygwin, we require a newer version of make than on other platforms
19456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19457    MAKE_VERSION_EXPR="-e 4\."
19458    MAKE_REQUIRED_VERSION="4.0"
19459   else
19460    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19461    MAKE_REQUIRED_VERSION="3.81"
19462  fi
19463
19464  if test "x$MAKE_CANDIDATE" != x; then
19465    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19466$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19467    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19468    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19469    if test "x$IS_GNU_MAKE" = x; then
19470      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19471$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19472    else
19473      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19474      if test "x$IS_MODERN_MAKE" = x; then
19475        { $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
19476$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;}
19477      else
19478        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19479          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19480            MAKE_EXPECTED_ENV='cygwin'
19481          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19482            MAKE_EXPECTED_ENV='msys'
19483          else
19484            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19485          fi
19486          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19487          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19488        else
19489          # Not relevant for non-Windows
19490          IS_MAKE_CORRECT_ENV=true
19491        fi
19492        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19493          { $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
19494$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;}
19495        else
19496          FOUND_MAKE=$MAKE_CANDIDATE
19497
19498  # Only process if variable expands to non-empty
19499
19500  if test "x$FOUND_MAKE" != x; then
19501    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19502
19503  # First separate the path from the arguments. This will split at the first
19504  # space.
19505  complete="$FOUND_MAKE"
19506  path="${complete%% *}"
19507  tmp="$complete EOL"
19508  arguments="${tmp#* }"
19509
19510  # Input might be given as Windows format, start by converting to
19511  # unix format.
19512  new_path=`$CYGPATH -u "$path"`
19513
19514  # Now try to locate executable using which
19515  new_path=`$WHICH "$new_path" 2> /dev/null`
19516  # bat and cmd files are not always considered executable in cygwin causing which
19517  # to not find them
19518  if test "x$new_path" = x \
19519      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19520      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19521    new_path=`$CYGPATH -u "$path"`
19522  fi
19523  if test "x$new_path" = x; then
19524    # Oops. Which didn't find the executable.
19525    # The splitting of arguments from the executable at a space might have been incorrect,
19526    # since paths with space are more likely in Windows. Give it another try with the whole
19527    # argument.
19528    path="$complete"
19529    arguments="EOL"
19530    new_path=`$CYGPATH -u "$path"`
19531    new_path=`$WHICH "$new_path" 2> /dev/null`
19532    # bat and cmd files are not always considered executable in cygwin causing which
19533    # to not find them
19534    if test "x$new_path" = x \
19535        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19536        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19537      new_path=`$CYGPATH -u "$path"`
19538    fi
19539    if test "x$new_path" = x; then
19540      # It's still not found. Now this is an unrecoverable error.
19541      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19542$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19543      has_space=`$ECHO "$complete" | $GREP " "`
19544      if test "x$has_space" != x; then
19545        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19546$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19547      fi
19548      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19549    fi
19550  fi
19551
19552  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19553  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19554  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19555  # "foo.exe" is OK but "foo" is an error.
19556  #
19557  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19558  # It is also a way to make sure we got the proper file name for the real test later on.
19559  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19560  if test "x$test_shortpath" = x; then
19561    # Short path failed, file does not exist as specified.
19562    # Try adding .exe or .cmd
19563    if test -f "${new_path}.exe"; then
19564      input_to_shortpath="${new_path}.exe"
19565    elif test -f "${new_path}.cmd"; then
19566      input_to_shortpath="${new_path}.cmd"
19567    else
19568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19569$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19570      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19571$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19572      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19573    fi
19574  else
19575    input_to_shortpath="$new_path"
19576  fi
19577
19578  # Call helper function which possibly converts this using DOS-style short mode.
19579  # If so, the updated path is stored in $new_path.
19580  new_path="$input_to_shortpath"
19581
19582  input_path="$input_to_shortpath"
19583  # Check if we need to convert this using DOS-style short mode. If the path
19584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19585  # take no chances and rewrite it.
19586  # Note: m4 eats our [], so we need to use [ and ] instead.
19587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19588  if test "x$has_forbidden_chars" != x; then
19589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19593      # Going to short mode and back again did indeed matter. Since short mode is
19594      # case insensitive, let's make it lowercase to improve readability.
19595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19596      # Now convert it back to Unix-style (cygpath)
19597      input_path=`$CYGPATH -u "$shortmode_path"`
19598      new_path="$input_path"
19599    fi
19600  fi
19601
19602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19603  if test "x$test_cygdrive_prefix" = x; then
19604    # As a simple fix, exclude /usr/bin since it's not a real path.
19605    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19607      # a path prefixed by /cygdrive for fixpath to work.
19608      new_path="$CYGWIN_ROOT_PATH$input_path"
19609    fi
19610  fi
19611
19612  # remove trailing .exe if any
19613  new_path="${new_path/%.exe/}"
19614
19615    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19616
19617  # First separate the path from the arguments. This will split at the first
19618  # space.
19619  complete="$FOUND_MAKE"
19620  path="${complete%% *}"
19621  tmp="$complete EOL"
19622  arguments="${tmp#* }"
19623
19624  # Input might be given as Windows format, start by converting to
19625  # unix format.
19626  new_path="$path"
19627
19628  windows_path="$new_path"
19629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19630    unix_path=`$CYGPATH -u "$windows_path"`
19631    new_path="$unix_path"
19632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19634    new_path="$unix_path"
19635  fi
19636
19637
19638  # Now try to locate executable using which
19639  new_path=`$WHICH "$new_path" 2> /dev/null`
19640
19641  if test "x$new_path" = x; then
19642    # Oops. Which didn't find the executable.
19643    # The splitting of arguments from the executable at a space might have been incorrect,
19644    # since paths with space are more likely in Windows. Give it another try with the whole
19645    # argument.
19646    path="$complete"
19647    arguments="EOL"
19648    new_path="$path"
19649
19650  windows_path="$new_path"
19651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19652    unix_path=`$CYGPATH -u "$windows_path"`
19653    new_path="$unix_path"
19654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19656    new_path="$unix_path"
19657  fi
19658
19659
19660    new_path=`$WHICH "$new_path" 2> /dev/null`
19661    # bat and cmd files are not always considered executable in MSYS causing which
19662    # to not find them
19663    if test "x$new_path" = x \
19664        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19665        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19666      new_path="$path"
19667
19668  windows_path="$new_path"
19669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19670    unix_path=`$CYGPATH -u "$windows_path"`
19671    new_path="$unix_path"
19672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19674    new_path="$unix_path"
19675  fi
19676
19677    fi
19678
19679    if test "x$new_path" = x; then
19680      # It's still not found. Now this is an unrecoverable error.
19681      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19682$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19683      has_space=`$ECHO "$complete" | $GREP " "`
19684      if test "x$has_space" != x; then
19685        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19686$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19687      fi
19688      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19689    fi
19690  fi
19691
19692  # Now new_path has a complete unix path to the binary
19693  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19694    # Keep paths in /bin as-is, but remove trailing .exe if any
19695    new_path="${new_path/%.exe/}"
19696    # Do not save /bin paths to all_fixpath_prefixes!
19697  else
19698    # Not in mixed or Windows style, start by that.
19699    new_path=`cmd //c echo $new_path`
19700
19701  input_path="$new_path"
19702  # Check if we need to convert this using DOS-style short mode. If the path
19703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19704  # take no chances and rewrite it.
19705  # Note: m4 eats our [], so we need to use [ and ] instead.
19706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19707  if test "x$has_forbidden_chars" != x; then
19708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19709    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19710  fi
19711
19712    # Output is in $new_path
19713
19714  windows_path="$new_path"
19715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19716    unix_path=`$CYGPATH -u "$windows_path"`
19717    new_path="$unix_path"
19718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19720    new_path="$unix_path"
19721  fi
19722
19723    # remove trailing .exe if any
19724    new_path="${new_path/%.exe/}"
19725
19726    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19727    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19728  fi
19729
19730    else
19731      # We're on a unix platform. Hooray! :)
19732      # First separate the path from the arguments. This will split at the first
19733      # space.
19734      complete="$FOUND_MAKE"
19735      path="${complete%% *}"
19736      tmp="$complete EOL"
19737      arguments="${tmp#* }"
19738
19739      # Cannot rely on the command "which" here since it doesn't always work.
19740      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19741      if test -z "$is_absolute_path"; then
19742        # Path to executable is not absolute. Find it.
19743        IFS_save="$IFS"
19744        IFS=:
19745        for p in $PATH; do
19746          if test -f "$p/$path" && test -x "$p/$path"; then
19747            new_path="$p/$path"
19748            break
19749          fi
19750        done
19751        IFS="$IFS_save"
19752      else
19753        # This is an absolute path, we can use it without further modifications.
19754        new_path="$path"
19755      fi
19756
19757      if test "x$new_path" = x; then
19758        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19759$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19760        has_space=`$ECHO "$complete" | $GREP " "`
19761        if test "x$has_space" != x; then
19762          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19763$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19764        fi
19765        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19766      fi
19767    fi
19768
19769    # Now join together the path and the arguments once again
19770    if test "x$arguments" != xEOL; then
19771      new_complete="$new_path ${arguments% *}"
19772    else
19773      new_complete="$new_path"
19774    fi
19775
19776    if test "x$complete" != "x$new_complete"; then
19777      FOUND_MAKE="$new_complete"
19778      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19779$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19780    fi
19781  fi
19782
19783        fi
19784      fi
19785    fi
19786  fi
19787
19788        if test "x$FOUND_MAKE" = x; then
19789          for ac_prog in make
19790do
19791  # Extract the first word of "$ac_prog", so it can be a program name with args.
19792set dummy $ac_prog; ac_word=$2
19793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19794$as_echo_n "checking for $ac_word... " >&6; }
19795if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19796  $as_echo_n "(cached) " >&6
19797else
19798  case $CHECK_TOOLSDIR_MAKE in
19799  [\\/]* | ?:[\\/]*)
19800  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19801  ;;
19802  *)
19803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19804for as_dir in $PATH
19805do
19806  IFS=$as_save_IFS
19807  test -z "$as_dir" && as_dir=.
19808    for ac_exec_ext in '' $ac_executable_extensions; do
19809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19810    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19812    break 2
19813  fi
19814done
19815  done
19816IFS=$as_save_IFS
19817
19818  ;;
19819esac
19820fi
19821CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19822if test -n "$CHECK_TOOLSDIR_MAKE"; then
19823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19824$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19825else
19826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19827$as_echo "no" >&6; }
19828fi
19829
19830
19831  test -n "$CHECK_TOOLSDIR_MAKE" && break
19832done
19833
19834
19835  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19836  DESCRIPTION="make in tools-dir"
19837
19838  # On Cygwin, we require a newer version of make than on other platforms
19839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19840    MAKE_VERSION_EXPR="-e 4\."
19841    MAKE_REQUIRED_VERSION="4.0"
19842   else
19843    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19844    MAKE_REQUIRED_VERSION="3.81"
19845  fi
19846
19847  if test "x$MAKE_CANDIDATE" != x; then
19848    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19849$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19850    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19851    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19852    if test "x$IS_GNU_MAKE" = x; then
19853      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19854$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19855    else
19856      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19857      if test "x$IS_MODERN_MAKE" = x; then
19858        { $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
19859$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;}
19860      else
19861        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19862          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19863            MAKE_EXPECTED_ENV='cygwin'
19864          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19865            MAKE_EXPECTED_ENV='msys'
19866          else
19867            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19868          fi
19869          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19870          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19871        else
19872          # Not relevant for non-Windows
19873          IS_MAKE_CORRECT_ENV=true
19874        fi
19875        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19876          { $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
19877$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;}
19878        else
19879          FOUND_MAKE=$MAKE_CANDIDATE
19880
19881  # Only process if variable expands to non-empty
19882
19883  if test "x$FOUND_MAKE" != x; then
19884    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19885
19886  # First separate the path from the arguments. This will split at the first
19887  # space.
19888  complete="$FOUND_MAKE"
19889  path="${complete%% *}"
19890  tmp="$complete EOL"
19891  arguments="${tmp#* }"
19892
19893  # Input might be given as Windows format, start by converting to
19894  # unix format.
19895  new_path=`$CYGPATH -u "$path"`
19896
19897  # Now try to locate executable using which
19898  new_path=`$WHICH "$new_path" 2> /dev/null`
19899  # bat and cmd files are not always considered executable in cygwin causing which
19900  # to not find them
19901  if test "x$new_path" = x \
19902      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19903      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19904    new_path=`$CYGPATH -u "$path"`
19905  fi
19906  if test "x$new_path" = x; then
19907    # Oops. Which didn't find the executable.
19908    # The splitting of arguments from the executable at a space might have been incorrect,
19909    # since paths with space are more likely in Windows. Give it another try with the whole
19910    # argument.
19911    path="$complete"
19912    arguments="EOL"
19913    new_path=`$CYGPATH -u "$path"`
19914    new_path=`$WHICH "$new_path" 2> /dev/null`
19915    # bat and cmd files are not always considered executable in cygwin causing which
19916    # to not find them
19917    if test "x$new_path" = x \
19918        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19919        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19920      new_path=`$CYGPATH -u "$path"`
19921    fi
19922    if test "x$new_path" = x; then
19923      # It's still not found. Now this is an unrecoverable error.
19924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19925$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19926      has_space=`$ECHO "$complete" | $GREP " "`
19927      if test "x$has_space" != x; then
19928        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19929$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19930      fi
19931      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19932    fi
19933  fi
19934
19935  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19936  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19937  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19938  # "foo.exe" is OK but "foo" is an error.
19939  #
19940  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19941  # It is also a way to make sure we got the proper file name for the real test later on.
19942  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19943  if test "x$test_shortpath" = x; then
19944    # Short path failed, file does not exist as specified.
19945    # Try adding .exe or .cmd
19946    if test -f "${new_path}.exe"; then
19947      input_to_shortpath="${new_path}.exe"
19948    elif test -f "${new_path}.cmd"; then
19949      input_to_shortpath="${new_path}.cmd"
19950    else
19951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19952$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19953      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19954$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19955      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19956    fi
19957  else
19958    input_to_shortpath="$new_path"
19959  fi
19960
19961  # Call helper function which possibly converts this using DOS-style short mode.
19962  # If so, the updated path is stored in $new_path.
19963  new_path="$input_to_shortpath"
19964
19965  input_path="$input_to_shortpath"
19966  # Check if we need to convert this using DOS-style short mode. If the path
19967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19968  # take no chances and rewrite it.
19969  # Note: m4 eats our [], so we need to use [ and ] instead.
19970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19971  if test "x$has_forbidden_chars" != x; then
19972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19973    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19974    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19975    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19976      # Going to short mode and back again did indeed matter. Since short mode is
19977      # case insensitive, let's make it lowercase to improve readability.
19978      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19979      # Now convert it back to Unix-style (cygpath)
19980      input_path=`$CYGPATH -u "$shortmode_path"`
19981      new_path="$input_path"
19982    fi
19983  fi
19984
19985  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19986  if test "x$test_cygdrive_prefix" = x; then
19987    # As a simple fix, exclude /usr/bin since it's not a real path.
19988    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19989      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19990      # a path prefixed by /cygdrive for fixpath to work.
19991      new_path="$CYGWIN_ROOT_PATH$input_path"
19992    fi
19993  fi
19994
19995  # remove trailing .exe if any
19996  new_path="${new_path/%.exe/}"
19997
19998    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19999
20000  # First separate the path from the arguments. This will split at the first
20001  # space.
20002  complete="$FOUND_MAKE"
20003  path="${complete%% *}"
20004  tmp="$complete EOL"
20005  arguments="${tmp#* }"
20006
20007  # Input might be given as Windows format, start by converting to
20008  # unix format.
20009  new_path="$path"
20010
20011  windows_path="$new_path"
20012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20013    unix_path=`$CYGPATH -u "$windows_path"`
20014    new_path="$unix_path"
20015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20017    new_path="$unix_path"
20018  fi
20019
20020
20021  # Now try to locate executable using which
20022  new_path=`$WHICH "$new_path" 2> /dev/null`
20023
20024  if test "x$new_path" = x; then
20025    # Oops. Which didn't find the executable.
20026    # The splitting of arguments from the executable at a space might have been incorrect,
20027    # since paths with space are more likely in Windows. Give it another try with the whole
20028    # argument.
20029    path="$complete"
20030    arguments="EOL"
20031    new_path="$path"
20032
20033  windows_path="$new_path"
20034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20035    unix_path=`$CYGPATH -u "$windows_path"`
20036    new_path="$unix_path"
20037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20039    new_path="$unix_path"
20040  fi
20041
20042
20043    new_path=`$WHICH "$new_path" 2> /dev/null`
20044    # bat and cmd files are not always considered executable in MSYS causing which
20045    # to not find them
20046    if test "x$new_path" = x \
20047        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20048        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20049      new_path="$path"
20050
20051  windows_path="$new_path"
20052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20053    unix_path=`$CYGPATH -u "$windows_path"`
20054    new_path="$unix_path"
20055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20057    new_path="$unix_path"
20058  fi
20059
20060    fi
20061
20062    if test "x$new_path" = x; then
20063      # It's still not found. Now this is an unrecoverable error.
20064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20065$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20066      has_space=`$ECHO "$complete" | $GREP " "`
20067      if test "x$has_space" != x; then
20068        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20069$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20070      fi
20071      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20072    fi
20073  fi
20074
20075  # Now new_path has a complete unix path to the binary
20076  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20077    # Keep paths in /bin as-is, but remove trailing .exe if any
20078    new_path="${new_path/%.exe/}"
20079    # Do not save /bin paths to all_fixpath_prefixes!
20080  else
20081    # Not in mixed or Windows style, start by that.
20082    new_path=`cmd //c echo $new_path`
20083
20084  input_path="$new_path"
20085  # Check if we need to convert this using DOS-style short mode. If the path
20086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20087  # take no chances and rewrite it.
20088  # Note: m4 eats our [], so we need to use [ and ] instead.
20089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20090  if test "x$has_forbidden_chars" != x; then
20091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20092    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20093  fi
20094
20095    # Output is in $new_path
20096
20097  windows_path="$new_path"
20098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20099    unix_path=`$CYGPATH -u "$windows_path"`
20100    new_path="$unix_path"
20101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20103    new_path="$unix_path"
20104  fi
20105
20106    # remove trailing .exe if any
20107    new_path="${new_path/%.exe/}"
20108
20109    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20110    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20111  fi
20112
20113    else
20114      # We're on a unix platform. Hooray! :)
20115      # First separate the path from the arguments. This will split at the first
20116      # space.
20117      complete="$FOUND_MAKE"
20118      path="${complete%% *}"
20119      tmp="$complete EOL"
20120      arguments="${tmp#* }"
20121
20122      # Cannot rely on the command "which" here since it doesn't always work.
20123      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20124      if test -z "$is_absolute_path"; then
20125        # Path to executable is not absolute. Find it.
20126        IFS_save="$IFS"
20127        IFS=:
20128        for p in $PATH; do
20129          if test -f "$p/$path" && test -x "$p/$path"; then
20130            new_path="$p/$path"
20131            break
20132          fi
20133        done
20134        IFS="$IFS_save"
20135      else
20136        # This is an absolute path, we can use it without further modifications.
20137        new_path="$path"
20138      fi
20139
20140      if test "x$new_path" = x; then
20141        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20142$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20143        has_space=`$ECHO "$complete" | $GREP " "`
20144        if test "x$has_space" != x; then
20145          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20146$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20147        fi
20148        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20149      fi
20150    fi
20151
20152    # Now join together the path and the arguments once again
20153    if test "x$arguments" != xEOL; then
20154      new_complete="$new_path ${arguments% *}"
20155    else
20156      new_complete="$new_path"
20157    fi
20158
20159    if test "x$complete" != "x$new_complete"; then
20160      FOUND_MAKE="$new_complete"
20161      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20162$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20163    fi
20164  fi
20165
20166        fi
20167      fi
20168    fi
20169  fi
20170
20171        fi
20172        PATH=$OLD_PATH
20173      fi
20174    fi
20175
20176    if test "x$FOUND_MAKE" = x; then
20177      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
20178    fi
20179
20180    else
20181      # If it succeeded, then it was overridden by the user. We will use it
20182      # for the tool.
20183
20184      # First remove it from the list of overridden variables, so we can test
20185      # for unknown variables in the end.
20186      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20187
20188      # Check if we try to supply an empty value
20189      if test "x$MAKE" = x; then
20190        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20191$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20192        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20193$as_echo_n "checking for MAKE... " >&6; }
20194        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20195$as_echo "disabled" >&6; }
20196      else
20197        # Check if the provided tool contains a complete path.
20198        tool_specified="$MAKE"
20199        tool_basename="${tool_specified##*/}"
20200        if test "x$tool_basename" = "x$tool_specified"; then
20201          # A command without a complete path is provided, search $PATH.
20202          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20203$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20204          # Extract the first word of "$tool_basename", so it can be a program name with args.
20205set dummy $tool_basename; ac_word=$2
20206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20207$as_echo_n "checking for $ac_word... " >&6; }
20208if ${ac_cv_path_MAKE+:} false; then :
20209  $as_echo_n "(cached) " >&6
20210else
20211  case $MAKE in
20212  [\\/]* | ?:[\\/]*)
20213  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20214  ;;
20215  *)
20216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20217for as_dir in $PATH
20218do
20219  IFS=$as_save_IFS
20220  test -z "$as_dir" && as_dir=.
20221    for ac_exec_ext in '' $ac_executable_extensions; do
20222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20223    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20225    break 2
20226  fi
20227done
20228  done
20229IFS=$as_save_IFS
20230
20231  ;;
20232esac
20233fi
20234MAKE=$ac_cv_path_MAKE
20235if test -n "$MAKE"; then
20236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20237$as_echo "$MAKE" >&6; }
20238else
20239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20240$as_echo "no" >&6; }
20241fi
20242
20243
20244          if test "x$MAKE" = x; then
20245            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20246          fi
20247        else
20248          # Otherwise we believe it is a complete path. Use it as it is.
20249          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20250$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20251          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20252$as_echo_n "checking for MAKE... " >&6; }
20253          if test ! -x "$tool_specified"; then
20254            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20255$as_echo "not found" >&6; }
20256            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20257          fi
20258          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20259$as_echo "$tool_specified" >&6; }
20260        fi
20261      fi
20262    fi
20263
20264    # If MAKE was set by user, verify the version
20265
20266  MAKE_CANDIDATE=""$MAKE""
20267  DESCRIPTION="user supplied MAKE=$MAKE"
20268
20269  # On Cygwin, we require a newer version of make than on other platforms
20270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20271    MAKE_VERSION_EXPR="-e 4\."
20272    MAKE_REQUIRED_VERSION="4.0"
20273   else
20274    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20275    MAKE_REQUIRED_VERSION="3.81"
20276  fi
20277
20278  if test "x$MAKE_CANDIDATE" != x; then
20279    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20280$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20281    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20282    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20283    if test "x$IS_GNU_MAKE" = x; then
20284      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20285$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20286    else
20287      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20288      if test "x$IS_MODERN_MAKE" = x; then
20289        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
20290$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
20291      else
20292        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20293          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20294            MAKE_EXPECTED_ENV='cygwin'
20295          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20296            MAKE_EXPECTED_ENV='msys'
20297          else
20298            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20299          fi
20300          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20301          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20302        else
20303          # Not relevant for non-Windows
20304          IS_MAKE_CORRECT_ENV=true
20305        fi
20306        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20307          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
20308$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
20309        else
20310          FOUND_MAKE=$MAKE_CANDIDATE
20311
20312  # Only process if variable expands to non-empty
20313
20314  if test "x$FOUND_MAKE" != x; then
20315    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20316
20317  # First separate the path from the arguments. This will split at the first
20318  # space.
20319  complete="$FOUND_MAKE"
20320  path="${complete%% *}"
20321  tmp="$complete EOL"
20322  arguments="${tmp#* }"
20323
20324  # Input might be given as Windows format, start by converting to
20325  # unix format.
20326  new_path=`$CYGPATH -u "$path"`
20327
20328  # Now try to locate executable using which
20329  new_path=`$WHICH "$new_path" 2> /dev/null`
20330  # bat and cmd files are not always considered executable in cygwin causing which
20331  # to not find them
20332  if test "x$new_path" = x \
20333      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20334      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20335    new_path=`$CYGPATH -u "$path"`
20336  fi
20337  if test "x$new_path" = x; then
20338    # Oops. Which didn't find the executable.
20339    # The splitting of arguments from the executable at a space might have been incorrect,
20340    # since paths with space are more likely in Windows. Give it another try with the whole
20341    # argument.
20342    path="$complete"
20343    arguments="EOL"
20344    new_path=`$CYGPATH -u "$path"`
20345    new_path=`$WHICH "$new_path" 2> /dev/null`
20346    # bat and cmd files are not always considered executable in cygwin causing which
20347    # to not find them
20348    if test "x$new_path" = x \
20349        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20350        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20351      new_path=`$CYGPATH -u "$path"`
20352    fi
20353    if test "x$new_path" = x; then
20354      # It's still not found. Now this is an unrecoverable error.
20355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20356$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20357      has_space=`$ECHO "$complete" | $GREP " "`
20358      if test "x$has_space" != x; then
20359        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20360$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20361      fi
20362      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20363    fi
20364  fi
20365
20366  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20367  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20368  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20369  # "foo.exe" is OK but "foo" is an error.
20370  #
20371  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20372  # It is also a way to make sure we got the proper file name for the real test later on.
20373  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20374  if test "x$test_shortpath" = x; then
20375    # Short path failed, file does not exist as specified.
20376    # Try adding .exe or .cmd
20377    if test -f "${new_path}.exe"; then
20378      input_to_shortpath="${new_path}.exe"
20379    elif test -f "${new_path}.cmd"; then
20380      input_to_shortpath="${new_path}.cmd"
20381    else
20382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20383$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20384      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20385$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20386      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20387    fi
20388  else
20389    input_to_shortpath="$new_path"
20390  fi
20391
20392  # Call helper function which possibly converts this using DOS-style short mode.
20393  # If so, the updated path is stored in $new_path.
20394  new_path="$input_to_shortpath"
20395
20396  input_path="$input_to_shortpath"
20397  # Check if we need to convert this using DOS-style short mode. If the path
20398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20399  # take no chances and rewrite it.
20400  # Note: m4 eats our [], so we need to use [ and ] instead.
20401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20402  if test "x$has_forbidden_chars" != x; then
20403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20404    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20405    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20406    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20407      # Going to short mode and back again did indeed matter. Since short mode is
20408      # case insensitive, let's make it lowercase to improve readability.
20409      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20410      # Now convert it back to Unix-style (cygpath)
20411      input_path=`$CYGPATH -u "$shortmode_path"`
20412      new_path="$input_path"
20413    fi
20414  fi
20415
20416  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20417  if test "x$test_cygdrive_prefix" = x; then
20418    # As a simple fix, exclude /usr/bin since it's not a real path.
20419    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20420      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20421      # a path prefixed by /cygdrive for fixpath to work.
20422      new_path="$CYGWIN_ROOT_PATH$input_path"
20423    fi
20424  fi
20425
20426  # remove trailing .exe if any
20427  new_path="${new_path/%.exe/}"
20428
20429    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20430
20431  # First separate the path from the arguments. This will split at the first
20432  # space.
20433  complete="$FOUND_MAKE"
20434  path="${complete%% *}"
20435  tmp="$complete EOL"
20436  arguments="${tmp#* }"
20437
20438  # Input might be given as Windows format, start by converting to
20439  # unix format.
20440  new_path="$path"
20441
20442  windows_path="$new_path"
20443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20444    unix_path=`$CYGPATH -u "$windows_path"`
20445    new_path="$unix_path"
20446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20448    new_path="$unix_path"
20449  fi
20450
20451
20452  # Now try to locate executable using which
20453  new_path=`$WHICH "$new_path" 2> /dev/null`
20454
20455  if test "x$new_path" = x; then
20456    # Oops. Which didn't find the executable.
20457    # The splitting of arguments from the executable at a space might have been incorrect,
20458    # since paths with space are more likely in Windows. Give it another try with the whole
20459    # argument.
20460    path="$complete"
20461    arguments="EOL"
20462    new_path="$path"
20463
20464  windows_path="$new_path"
20465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20466    unix_path=`$CYGPATH -u "$windows_path"`
20467    new_path="$unix_path"
20468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20470    new_path="$unix_path"
20471  fi
20472
20473
20474    new_path=`$WHICH "$new_path" 2> /dev/null`
20475    # bat and cmd files are not always considered executable in MSYS causing which
20476    # to not find them
20477    if test "x$new_path" = x \
20478        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20479        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20480      new_path="$path"
20481
20482  windows_path="$new_path"
20483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20484    unix_path=`$CYGPATH -u "$windows_path"`
20485    new_path="$unix_path"
20486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20488    new_path="$unix_path"
20489  fi
20490
20491    fi
20492
20493    if test "x$new_path" = x; then
20494      # It's still not found. Now this is an unrecoverable error.
20495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20496$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20497      has_space=`$ECHO "$complete" | $GREP " "`
20498      if test "x$has_space" != x; then
20499        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20500$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20501      fi
20502      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20503    fi
20504  fi
20505
20506  # Now new_path has a complete unix path to the binary
20507  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20508    # Keep paths in /bin as-is, but remove trailing .exe if any
20509    new_path="${new_path/%.exe/}"
20510    # Do not save /bin paths to all_fixpath_prefixes!
20511  else
20512    # Not in mixed or Windows style, start by that.
20513    new_path=`cmd //c echo $new_path`
20514
20515  input_path="$new_path"
20516  # Check if we need to convert this using DOS-style short mode. If the path
20517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20518  # take no chances and rewrite it.
20519  # Note: m4 eats our [], so we need to use [ and ] instead.
20520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20521  if test "x$has_forbidden_chars" != x; then
20522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20524  fi
20525
20526    # Output is in $new_path
20527
20528  windows_path="$new_path"
20529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20530    unix_path=`$CYGPATH -u "$windows_path"`
20531    new_path="$unix_path"
20532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20534    new_path="$unix_path"
20535  fi
20536
20537    # remove trailing .exe if any
20538    new_path="${new_path/%.exe/}"
20539
20540    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20541    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20542  fi
20543
20544    else
20545      # We're on a unix platform. Hooray! :)
20546      # First separate the path from the arguments. This will split at the first
20547      # space.
20548      complete="$FOUND_MAKE"
20549      path="${complete%% *}"
20550      tmp="$complete EOL"
20551      arguments="${tmp#* }"
20552
20553      # Cannot rely on the command "which" here since it doesn't always work.
20554      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20555      if test -z "$is_absolute_path"; then
20556        # Path to executable is not absolute. Find it.
20557        IFS_save="$IFS"
20558        IFS=:
20559        for p in $PATH; do
20560          if test -f "$p/$path" && test -x "$p/$path"; then
20561            new_path="$p/$path"
20562            break
20563          fi
20564        done
20565        IFS="$IFS_save"
20566      else
20567        # This is an absolute path, we can use it without further modifications.
20568        new_path="$path"
20569      fi
20570
20571      if test "x$new_path" = x; then
20572        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20573$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20574        has_space=`$ECHO "$complete" | $GREP " "`
20575        if test "x$has_space" != x; then
20576          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20577$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20578        fi
20579        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20580      fi
20581    fi
20582
20583    # Now join together the path and the arguments once again
20584    if test "x$arguments" != xEOL; then
20585      new_complete="$new_path ${arguments% *}"
20586    else
20587      new_complete="$new_path"
20588    fi
20589
20590    if test "x$complete" != "x$new_complete"; then
20591      FOUND_MAKE="$new_complete"
20592      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20593$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20594    fi
20595  fi
20596
20597        fi
20598      fi
20599    fi
20600  fi
20601
20602    if test "x$FOUND_MAKE" = x; then
20603      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20604    fi
20605
20606  fi
20607
20608
20609  MAKE=$FOUND_MAKE
20610
20611  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20612$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20613
20614
20615  # Check if make supports the output sync option and if so, setup using it.
20616  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20617$as_echo_n "checking if make --output-sync is supported... " >&6; }
20618  if $MAKE --version -O > /dev/null 2>&1; then
20619    OUTPUT_SYNC_SUPPORTED=true
20620    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20621$as_echo "yes" >&6; }
20622    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20623$as_echo_n "checking for output-sync value... " >&6; }
20624
20625# Check whether --with-output-sync was given.
20626if test "${with_output_sync+set}" = set; then :
20627  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20628fi
20629
20630    if test "x$OUTPUT_SYNC" = "x"; then
20631      OUTPUT_SYNC=none
20632    fi
20633    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20634$as_echo "$OUTPUT_SYNC" >&6; }
20635    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20636      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20637    fi
20638  else
20639    OUTPUT_SYNC_SUPPORTED=false
20640    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20641$as_echo "no" >&6; }
20642  fi
20643
20644
20645
20646
20647
20648
20649  # Test if find supports -delete
20650  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20651$as_echo_n "checking if find supports -delete... " >&6; }
20652  FIND_DELETE="-delete"
20653
20654  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20655
20656  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20657
20658  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20659  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20660    # No, it does not.
20661    rm $DELETEDIR/TestIfFindSupportsDelete
20662    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20663      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20664      FIND_DELETE="-print | xargs rm"
20665    else
20666      FIND_DELETE="-exec rm \{\} \+"
20667    fi
20668    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20669$as_echo "no" >&6; }
20670  else
20671    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20672$as_echo "yes" >&6; }
20673  fi
20674  rmdir $DELETEDIR
20675
20676
20677
20678  # These tools might not be installed by default,
20679  # need hint on how to install them.
20680
20681
20682
20683  # Publish this variable in the help.
20684
20685
20686  if [ -z "${UNZIP+x}" ]; then
20687    # The variable is not set by user, try to locate tool using the code snippet
20688    for ac_prog in unzip
20689do
20690  # Extract the first word of "$ac_prog", so it can be a program name with args.
20691set dummy $ac_prog; ac_word=$2
20692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20693$as_echo_n "checking for $ac_word... " >&6; }
20694if ${ac_cv_path_UNZIP+:} false; then :
20695  $as_echo_n "(cached) " >&6
20696else
20697  case $UNZIP in
20698  [\\/]* | ?:[\\/]*)
20699  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20700  ;;
20701  *)
20702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20703for as_dir in $PATH
20704do
20705  IFS=$as_save_IFS
20706  test -z "$as_dir" && as_dir=.
20707    for ac_exec_ext in '' $ac_executable_extensions; do
20708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20709    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20711    break 2
20712  fi
20713done
20714  done
20715IFS=$as_save_IFS
20716
20717  ;;
20718esac
20719fi
20720UNZIP=$ac_cv_path_UNZIP
20721if test -n "$UNZIP"; then
20722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20723$as_echo "$UNZIP" >&6; }
20724else
20725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20726$as_echo "no" >&6; }
20727fi
20728
20729
20730  test -n "$UNZIP" && break
20731done
20732
20733  else
20734    # The variable is set, but is it from the command line or the environment?
20735
20736    # Try to remove the string !UNZIP! from our list.
20737    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20738    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20739      # If it failed, the variable was not from the command line. Ignore it,
20740      # but warn the user (except for BASH, which is always set by the calling BASH).
20741      if test "xUNZIP" != xBASH; then
20742        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20743$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20744      fi
20745      # Try to locate tool using the code snippet
20746      for ac_prog in unzip
20747do
20748  # Extract the first word of "$ac_prog", so it can be a program name with args.
20749set dummy $ac_prog; ac_word=$2
20750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20751$as_echo_n "checking for $ac_word... " >&6; }
20752if ${ac_cv_path_UNZIP+:} false; then :
20753  $as_echo_n "(cached) " >&6
20754else
20755  case $UNZIP in
20756  [\\/]* | ?:[\\/]*)
20757  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20758  ;;
20759  *)
20760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20761for as_dir in $PATH
20762do
20763  IFS=$as_save_IFS
20764  test -z "$as_dir" && as_dir=.
20765    for ac_exec_ext in '' $ac_executable_extensions; do
20766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20767    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20769    break 2
20770  fi
20771done
20772  done
20773IFS=$as_save_IFS
20774
20775  ;;
20776esac
20777fi
20778UNZIP=$ac_cv_path_UNZIP
20779if test -n "$UNZIP"; then
20780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20781$as_echo "$UNZIP" >&6; }
20782else
20783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20784$as_echo "no" >&6; }
20785fi
20786
20787
20788  test -n "$UNZIP" && break
20789done
20790
20791    else
20792      # If it succeeded, then it was overridden by the user. We will use it
20793      # for the tool.
20794
20795      # First remove it from the list of overridden variables, so we can test
20796      # for unknown variables in the end.
20797      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20798
20799      # Check if we try to supply an empty value
20800      if test "x$UNZIP" = x; then
20801        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20802$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20803        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20804$as_echo_n "checking for UNZIP... " >&6; }
20805        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20806$as_echo "disabled" >&6; }
20807      else
20808        # Check if the provided tool contains a complete path.
20809        tool_specified="$UNZIP"
20810        tool_basename="${tool_specified##*/}"
20811        if test "x$tool_basename" = "x$tool_specified"; then
20812          # A command without a complete path is provided, search $PATH.
20813          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20814$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20815          # Extract the first word of "$tool_basename", so it can be a program name with args.
20816set dummy $tool_basename; ac_word=$2
20817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20818$as_echo_n "checking for $ac_word... " >&6; }
20819if ${ac_cv_path_UNZIP+:} false; then :
20820  $as_echo_n "(cached) " >&6
20821else
20822  case $UNZIP in
20823  [\\/]* | ?:[\\/]*)
20824  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20825  ;;
20826  *)
20827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20828for as_dir in $PATH
20829do
20830  IFS=$as_save_IFS
20831  test -z "$as_dir" && as_dir=.
20832    for ac_exec_ext in '' $ac_executable_extensions; do
20833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20834    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20836    break 2
20837  fi
20838done
20839  done
20840IFS=$as_save_IFS
20841
20842  ;;
20843esac
20844fi
20845UNZIP=$ac_cv_path_UNZIP
20846if test -n "$UNZIP"; then
20847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20848$as_echo "$UNZIP" >&6; }
20849else
20850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20851$as_echo "no" >&6; }
20852fi
20853
20854
20855          if test "x$UNZIP" = x; then
20856            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20857          fi
20858        else
20859          # Otherwise we believe it is a complete path. Use it as it is.
20860          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20861$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20862          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20863$as_echo_n "checking for UNZIP... " >&6; }
20864          if test ! -x "$tool_specified"; then
20865            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20866$as_echo "not found" >&6; }
20867            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20868          fi
20869          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20870$as_echo "$tool_specified" >&6; }
20871        fi
20872      fi
20873    fi
20874
20875  fi
20876
20877
20878
20879  if test "x$UNZIP" = x; then
20880    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20881  fi
20882
20883
20884
20885
20886
20887  # Publish this variable in the help.
20888
20889
20890  if [ -z "${ZIP+x}" ]; then
20891    # The variable is not set by user, try to locate tool using the code snippet
20892    for ac_prog in zip
20893do
20894  # Extract the first word of "$ac_prog", so it can be a program name with args.
20895set dummy $ac_prog; ac_word=$2
20896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20897$as_echo_n "checking for $ac_word... " >&6; }
20898if ${ac_cv_path_ZIP+:} false; then :
20899  $as_echo_n "(cached) " >&6
20900else
20901  case $ZIP in
20902  [\\/]* | ?:[\\/]*)
20903  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20904  ;;
20905  *)
20906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20907for as_dir in $PATH
20908do
20909  IFS=$as_save_IFS
20910  test -z "$as_dir" && as_dir=.
20911    for ac_exec_ext in '' $ac_executable_extensions; do
20912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20913    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20915    break 2
20916  fi
20917done
20918  done
20919IFS=$as_save_IFS
20920
20921  ;;
20922esac
20923fi
20924ZIP=$ac_cv_path_ZIP
20925if test -n "$ZIP"; then
20926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20927$as_echo "$ZIP" >&6; }
20928else
20929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20930$as_echo "no" >&6; }
20931fi
20932
20933
20934  test -n "$ZIP" && break
20935done
20936
20937  else
20938    # The variable is set, but is it from the command line or the environment?
20939
20940    # Try to remove the string !ZIP! from our list.
20941    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20942    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20943      # If it failed, the variable was not from the command line. Ignore it,
20944      # but warn the user (except for BASH, which is always set by the calling BASH).
20945      if test "xZIP" != xBASH; then
20946        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20947$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20948      fi
20949      # Try to locate tool using the code snippet
20950      for ac_prog in zip
20951do
20952  # Extract the first word of "$ac_prog", so it can be a program name with args.
20953set dummy $ac_prog; ac_word=$2
20954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20955$as_echo_n "checking for $ac_word... " >&6; }
20956if ${ac_cv_path_ZIP+:} false; then :
20957  $as_echo_n "(cached) " >&6
20958else
20959  case $ZIP in
20960  [\\/]* | ?:[\\/]*)
20961  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20962  ;;
20963  *)
20964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20965for as_dir in $PATH
20966do
20967  IFS=$as_save_IFS
20968  test -z "$as_dir" && as_dir=.
20969    for ac_exec_ext in '' $ac_executable_extensions; do
20970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20971    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20973    break 2
20974  fi
20975done
20976  done
20977IFS=$as_save_IFS
20978
20979  ;;
20980esac
20981fi
20982ZIP=$ac_cv_path_ZIP
20983if test -n "$ZIP"; then
20984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20985$as_echo "$ZIP" >&6; }
20986else
20987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20988$as_echo "no" >&6; }
20989fi
20990
20991
20992  test -n "$ZIP" && break
20993done
20994
20995    else
20996      # If it succeeded, then it was overridden by the user. We will use it
20997      # for the tool.
20998
20999      # First remove it from the list of overridden variables, so we can test
21000      # for unknown variables in the end.
21001      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21002
21003      # Check if we try to supply an empty value
21004      if test "x$ZIP" = x; then
21005        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21006$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21007        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21008$as_echo_n "checking for ZIP... " >&6; }
21009        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21010$as_echo "disabled" >&6; }
21011      else
21012        # Check if the provided tool contains a complete path.
21013        tool_specified="$ZIP"
21014        tool_basename="${tool_specified##*/}"
21015        if test "x$tool_basename" = "x$tool_specified"; then
21016          # A command without a complete path is provided, search $PATH.
21017          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21018$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21019          # Extract the first word of "$tool_basename", so it can be a program name with args.
21020set dummy $tool_basename; ac_word=$2
21021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21022$as_echo_n "checking for $ac_word... " >&6; }
21023if ${ac_cv_path_ZIP+:} false; then :
21024  $as_echo_n "(cached) " >&6
21025else
21026  case $ZIP in
21027  [\\/]* | ?:[\\/]*)
21028  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21029  ;;
21030  *)
21031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21032for as_dir in $PATH
21033do
21034  IFS=$as_save_IFS
21035  test -z "$as_dir" && as_dir=.
21036    for ac_exec_ext in '' $ac_executable_extensions; do
21037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21038    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21040    break 2
21041  fi
21042done
21043  done
21044IFS=$as_save_IFS
21045
21046  ;;
21047esac
21048fi
21049ZIP=$ac_cv_path_ZIP
21050if test -n "$ZIP"; then
21051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21052$as_echo "$ZIP" >&6; }
21053else
21054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21055$as_echo "no" >&6; }
21056fi
21057
21058
21059          if test "x$ZIP" = x; then
21060            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21061          fi
21062        else
21063          # Otherwise we believe it is a complete path. Use it as it is.
21064          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21065$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21066          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21067$as_echo_n "checking for ZIP... " >&6; }
21068          if test ! -x "$tool_specified"; then
21069            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21070$as_echo "not found" >&6; }
21071            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21072          fi
21073          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21074$as_echo "$tool_specified" >&6; }
21075        fi
21076      fi
21077    fi
21078
21079  fi
21080
21081
21082
21083  if test "x$ZIP" = x; then
21084    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21085  fi
21086
21087
21088
21089  # Non-required basic tools
21090
21091
21092
21093  # Publish this variable in the help.
21094
21095
21096  if [ -z "${LDD+x}" ]; then
21097    # The variable is not set by user, try to locate tool using the code snippet
21098    for ac_prog in ldd
21099do
21100  # Extract the first word of "$ac_prog", so it can be a program name with args.
21101set dummy $ac_prog; ac_word=$2
21102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21103$as_echo_n "checking for $ac_word... " >&6; }
21104if ${ac_cv_path_LDD+:} false; then :
21105  $as_echo_n "(cached) " >&6
21106else
21107  case $LDD in
21108  [\\/]* | ?:[\\/]*)
21109  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21110  ;;
21111  *)
21112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21113for as_dir in $PATH
21114do
21115  IFS=$as_save_IFS
21116  test -z "$as_dir" && as_dir=.
21117    for ac_exec_ext in '' $ac_executable_extensions; do
21118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21119    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21121    break 2
21122  fi
21123done
21124  done
21125IFS=$as_save_IFS
21126
21127  ;;
21128esac
21129fi
21130LDD=$ac_cv_path_LDD
21131if test -n "$LDD"; then
21132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21133$as_echo "$LDD" >&6; }
21134else
21135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21136$as_echo "no" >&6; }
21137fi
21138
21139
21140  test -n "$LDD" && break
21141done
21142
21143  else
21144    # The variable is set, but is it from the command line or the environment?
21145
21146    # Try to remove the string !LDD! from our list.
21147    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21148    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21149      # If it failed, the variable was not from the command line. Ignore it,
21150      # but warn the user (except for BASH, which is always set by the calling BASH).
21151      if test "xLDD" != xBASH; then
21152        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21153$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21154      fi
21155      # Try to locate tool using the code snippet
21156      for ac_prog in ldd
21157do
21158  # Extract the first word of "$ac_prog", so it can be a program name with args.
21159set dummy $ac_prog; ac_word=$2
21160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21161$as_echo_n "checking for $ac_word... " >&6; }
21162if ${ac_cv_path_LDD+:} false; then :
21163  $as_echo_n "(cached) " >&6
21164else
21165  case $LDD in
21166  [\\/]* | ?:[\\/]*)
21167  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21168  ;;
21169  *)
21170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21171for as_dir in $PATH
21172do
21173  IFS=$as_save_IFS
21174  test -z "$as_dir" && as_dir=.
21175    for ac_exec_ext in '' $ac_executable_extensions; do
21176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21177    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21179    break 2
21180  fi
21181done
21182  done
21183IFS=$as_save_IFS
21184
21185  ;;
21186esac
21187fi
21188LDD=$ac_cv_path_LDD
21189if test -n "$LDD"; then
21190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21191$as_echo "$LDD" >&6; }
21192else
21193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21194$as_echo "no" >&6; }
21195fi
21196
21197
21198  test -n "$LDD" && break
21199done
21200
21201    else
21202      # If it succeeded, then it was overridden by the user. We will use it
21203      # for the tool.
21204
21205      # First remove it from the list of overridden variables, so we can test
21206      # for unknown variables in the end.
21207      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21208
21209      # Check if we try to supply an empty value
21210      if test "x$LDD" = x; then
21211        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21212$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21213        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21214$as_echo_n "checking for LDD... " >&6; }
21215        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21216$as_echo "disabled" >&6; }
21217      else
21218        # Check if the provided tool contains a complete path.
21219        tool_specified="$LDD"
21220        tool_basename="${tool_specified##*/}"
21221        if test "x$tool_basename" = "x$tool_specified"; then
21222          # A command without a complete path is provided, search $PATH.
21223          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21224$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21225          # Extract the first word of "$tool_basename", so it can be a program name with args.
21226set dummy $tool_basename; ac_word=$2
21227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21228$as_echo_n "checking for $ac_word... " >&6; }
21229if ${ac_cv_path_LDD+:} false; then :
21230  $as_echo_n "(cached) " >&6
21231else
21232  case $LDD in
21233  [\\/]* | ?:[\\/]*)
21234  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21235  ;;
21236  *)
21237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21238for as_dir in $PATH
21239do
21240  IFS=$as_save_IFS
21241  test -z "$as_dir" && as_dir=.
21242    for ac_exec_ext in '' $ac_executable_extensions; do
21243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21244    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21246    break 2
21247  fi
21248done
21249  done
21250IFS=$as_save_IFS
21251
21252  ;;
21253esac
21254fi
21255LDD=$ac_cv_path_LDD
21256if test -n "$LDD"; then
21257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21258$as_echo "$LDD" >&6; }
21259else
21260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21261$as_echo "no" >&6; }
21262fi
21263
21264
21265          if test "x$LDD" = x; then
21266            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21267          fi
21268        else
21269          # Otherwise we believe it is a complete path. Use it as it is.
21270          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21271$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21272          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21273$as_echo_n "checking for LDD... " >&6; }
21274          if test ! -x "$tool_specified"; then
21275            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21276$as_echo "not found" >&6; }
21277            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21278          fi
21279          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21280$as_echo "$tool_specified" >&6; }
21281        fi
21282      fi
21283    fi
21284
21285  fi
21286
21287
21288  if test "x$LDD" = "x"; then
21289    # List shared lib dependencies is used for
21290    # debug output and checking for forbidden dependencies.
21291    # We can build without it.
21292    LDD="true"
21293  fi
21294
21295
21296  # Publish this variable in the help.
21297
21298
21299  if [ -z "${OTOOL+x}" ]; then
21300    # The variable is not set by user, try to locate tool using the code snippet
21301    for ac_prog in otool
21302do
21303  # Extract the first word of "$ac_prog", so it can be a program name with args.
21304set dummy $ac_prog; ac_word=$2
21305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21306$as_echo_n "checking for $ac_word... " >&6; }
21307if ${ac_cv_path_OTOOL+:} false; then :
21308  $as_echo_n "(cached) " >&6
21309else
21310  case $OTOOL in
21311  [\\/]* | ?:[\\/]*)
21312  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21313  ;;
21314  *)
21315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21316for as_dir in $PATH
21317do
21318  IFS=$as_save_IFS
21319  test -z "$as_dir" && as_dir=.
21320    for ac_exec_ext in '' $ac_executable_extensions; do
21321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21322    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21324    break 2
21325  fi
21326done
21327  done
21328IFS=$as_save_IFS
21329
21330  ;;
21331esac
21332fi
21333OTOOL=$ac_cv_path_OTOOL
21334if test -n "$OTOOL"; then
21335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21336$as_echo "$OTOOL" >&6; }
21337else
21338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21339$as_echo "no" >&6; }
21340fi
21341
21342
21343  test -n "$OTOOL" && break
21344done
21345
21346  else
21347    # The variable is set, but is it from the command line or the environment?
21348
21349    # Try to remove the string !OTOOL! from our list.
21350    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21351    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21352      # If it failed, the variable was not from the command line. Ignore it,
21353      # but warn the user (except for BASH, which is always set by the calling BASH).
21354      if test "xOTOOL" != xBASH; then
21355        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21356$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21357      fi
21358      # Try to locate tool using the code snippet
21359      for ac_prog in otool
21360do
21361  # Extract the first word of "$ac_prog", so it can be a program name with args.
21362set dummy $ac_prog; ac_word=$2
21363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21364$as_echo_n "checking for $ac_word... " >&6; }
21365if ${ac_cv_path_OTOOL+:} false; then :
21366  $as_echo_n "(cached) " >&6
21367else
21368  case $OTOOL in
21369  [\\/]* | ?:[\\/]*)
21370  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21371  ;;
21372  *)
21373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21374for as_dir in $PATH
21375do
21376  IFS=$as_save_IFS
21377  test -z "$as_dir" && as_dir=.
21378    for ac_exec_ext in '' $ac_executable_extensions; do
21379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21380    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21382    break 2
21383  fi
21384done
21385  done
21386IFS=$as_save_IFS
21387
21388  ;;
21389esac
21390fi
21391OTOOL=$ac_cv_path_OTOOL
21392if test -n "$OTOOL"; then
21393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21394$as_echo "$OTOOL" >&6; }
21395else
21396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21397$as_echo "no" >&6; }
21398fi
21399
21400
21401  test -n "$OTOOL" && break
21402done
21403
21404    else
21405      # If it succeeded, then it was overridden by the user. We will use it
21406      # for the tool.
21407
21408      # First remove it from the list of overridden variables, so we can test
21409      # for unknown variables in the end.
21410      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21411
21412      # Check if we try to supply an empty value
21413      if test "x$OTOOL" = x; then
21414        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21415$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21416        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21417$as_echo_n "checking for OTOOL... " >&6; }
21418        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21419$as_echo "disabled" >&6; }
21420      else
21421        # Check if the provided tool contains a complete path.
21422        tool_specified="$OTOOL"
21423        tool_basename="${tool_specified##*/}"
21424        if test "x$tool_basename" = "x$tool_specified"; then
21425          # A command without a complete path is provided, search $PATH.
21426          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21427$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21428          # Extract the first word of "$tool_basename", so it can be a program name with args.
21429set dummy $tool_basename; ac_word=$2
21430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21431$as_echo_n "checking for $ac_word... " >&6; }
21432if ${ac_cv_path_OTOOL+:} false; then :
21433  $as_echo_n "(cached) " >&6
21434else
21435  case $OTOOL in
21436  [\\/]* | ?:[\\/]*)
21437  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21438  ;;
21439  *)
21440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21441for as_dir in $PATH
21442do
21443  IFS=$as_save_IFS
21444  test -z "$as_dir" && as_dir=.
21445    for ac_exec_ext in '' $ac_executable_extensions; do
21446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21447    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21449    break 2
21450  fi
21451done
21452  done
21453IFS=$as_save_IFS
21454
21455  ;;
21456esac
21457fi
21458OTOOL=$ac_cv_path_OTOOL
21459if test -n "$OTOOL"; then
21460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21461$as_echo "$OTOOL" >&6; }
21462else
21463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21464$as_echo "no" >&6; }
21465fi
21466
21467
21468          if test "x$OTOOL" = x; then
21469            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21470          fi
21471        else
21472          # Otherwise we believe it is a complete path. Use it as it is.
21473          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21474$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21475          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21476$as_echo_n "checking for OTOOL... " >&6; }
21477          if test ! -x "$tool_specified"; then
21478            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21479$as_echo "not found" >&6; }
21480            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21481          fi
21482          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21483$as_echo "$tool_specified" >&6; }
21484        fi
21485      fi
21486    fi
21487
21488  fi
21489
21490
21491  if test "x$OTOOL" = "x"; then
21492    OTOOL="true"
21493  fi
21494
21495
21496  # Publish this variable in the help.
21497
21498
21499  if [ -z "${READELF+x}" ]; then
21500    # The variable is not set by user, try to locate tool using the code snippet
21501    for ac_prog in greadelf readelf
21502do
21503  # Extract the first word of "$ac_prog", so it can be a program name with args.
21504set dummy $ac_prog; ac_word=$2
21505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21506$as_echo_n "checking for $ac_word... " >&6; }
21507if ${ac_cv_path_READELF+:} false; then :
21508  $as_echo_n "(cached) " >&6
21509else
21510  case $READELF in
21511  [\\/]* | ?:[\\/]*)
21512  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21513  ;;
21514  *)
21515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21516for as_dir in $PATH
21517do
21518  IFS=$as_save_IFS
21519  test -z "$as_dir" && as_dir=.
21520    for ac_exec_ext in '' $ac_executable_extensions; do
21521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21522    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21524    break 2
21525  fi
21526done
21527  done
21528IFS=$as_save_IFS
21529
21530  ;;
21531esac
21532fi
21533READELF=$ac_cv_path_READELF
21534if test -n "$READELF"; then
21535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21536$as_echo "$READELF" >&6; }
21537else
21538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21539$as_echo "no" >&6; }
21540fi
21541
21542
21543  test -n "$READELF" && break
21544done
21545
21546  else
21547    # The variable is set, but is it from the command line or the environment?
21548
21549    # Try to remove the string !READELF! from our list.
21550    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21551    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21552      # If it failed, the variable was not from the command line. Ignore it,
21553      # but warn the user (except for BASH, which is always set by the calling BASH).
21554      if test "xREADELF" != xBASH; then
21555        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21556$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21557      fi
21558      # Try to locate tool using the code snippet
21559      for ac_prog in greadelf readelf
21560do
21561  # Extract the first word of "$ac_prog", so it can be a program name with args.
21562set dummy $ac_prog; ac_word=$2
21563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21564$as_echo_n "checking for $ac_word... " >&6; }
21565if ${ac_cv_path_READELF+:} false; then :
21566  $as_echo_n "(cached) " >&6
21567else
21568  case $READELF in
21569  [\\/]* | ?:[\\/]*)
21570  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21571  ;;
21572  *)
21573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21574for as_dir in $PATH
21575do
21576  IFS=$as_save_IFS
21577  test -z "$as_dir" && as_dir=.
21578    for ac_exec_ext in '' $ac_executable_extensions; do
21579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21580    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21582    break 2
21583  fi
21584done
21585  done
21586IFS=$as_save_IFS
21587
21588  ;;
21589esac
21590fi
21591READELF=$ac_cv_path_READELF
21592if test -n "$READELF"; then
21593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21594$as_echo "$READELF" >&6; }
21595else
21596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21597$as_echo "no" >&6; }
21598fi
21599
21600
21601  test -n "$READELF" && break
21602done
21603
21604    else
21605      # If it succeeded, then it was overridden by the user. We will use it
21606      # for the tool.
21607
21608      # First remove it from the list of overridden variables, so we can test
21609      # for unknown variables in the end.
21610      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21611
21612      # Check if we try to supply an empty value
21613      if test "x$READELF" = x; then
21614        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21615$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21616        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21617$as_echo_n "checking for READELF... " >&6; }
21618        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21619$as_echo "disabled" >&6; }
21620      else
21621        # Check if the provided tool contains a complete path.
21622        tool_specified="$READELF"
21623        tool_basename="${tool_specified##*/}"
21624        if test "x$tool_basename" = "x$tool_specified"; then
21625          # A command without a complete path is provided, search $PATH.
21626          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21627$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21628          # Extract the first word of "$tool_basename", so it can be a program name with args.
21629set dummy $tool_basename; ac_word=$2
21630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21631$as_echo_n "checking for $ac_word... " >&6; }
21632if ${ac_cv_path_READELF+:} false; then :
21633  $as_echo_n "(cached) " >&6
21634else
21635  case $READELF in
21636  [\\/]* | ?:[\\/]*)
21637  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21638  ;;
21639  *)
21640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21641for as_dir in $PATH
21642do
21643  IFS=$as_save_IFS
21644  test -z "$as_dir" && as_dir=.
21645    for ac_exec_ext in '' $ac_executable_extensions; do
21646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21647    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21649    break 2
21650  fi
21651done
21652  done
21653IFS=$as_save_IFS
21654
21655  ;;
21656esac
21657fi
21658READELF=$ac_cv_path_READELF
21659if test -n "$READELF"; then
21660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21661$as_echo "$READELF" >&6; }
21662else
21663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21664$as_echo "no" >&6; }
21665fi
21666
21667
21668          if test "x$READELF" = x; then
21669            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21670          fi
21671        else
21672          # Otherwise we believe it is a complete path. Use it as it is.
21673          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21674$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21675          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21676$as_echo_n "checking for READELF... " >&6; }
21677          if test ! -x "$tool_specified"; then
21678            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21679$as_echo "not found" >&6; }
21680            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21681          fi
21682          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21683$as_echo "$tool_specified" >&6; }
21684        fi
21685      fi
21686    fi
21687
21688  fi
21689
21690
21691
21692
21693  # Publish this variable in the help.
21694
21695
21696  if [ -z "${HG+x}" ]; then
21697    # The variable is not set by user, try to locate tool using the code snippet
21698    for ac_prog in hg
21699do
21700  # Extract the first word of "$ac_prog", so it can be a program name with args.
21701set dummy $ac_prog; ac_word=$2
21702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21703$as_echo_n "checking for $ac_word... " >&6; }
21704if ${ac_cv_path_HG+:} false; then :
21705  $as_echo_n "(cached) " >&6
21706else
21707  case $HG in
21708  [\\/]* | ?:[\\/]*)
21709  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21710  ;;
21711  *)
21712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21713for as_dir in $PATH
21714do
21715  IFS=$as_save_IFS
21716  test -z "$as_dir" && as_dir=.
21717    for ac_exec_ext in '' $ac_executable_extensions; do
21718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21719    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21721    break 2
21722  fi
21723done
21724  done
21725IFS=$as_save_IFS
21726
21727  ;;
21728esac
21729fi
21730HG=$ac_cv_path_HG
21731if test -n "$HG"; then
21732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21733$as_echo "$HG" >&6; }
21734else
21735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21736$as_echo "no" >&6; }
21737fi
21738
21739
21740  test -n "$HG" && break
21741done
21742
21743  else
21744    # The variable is set, but is it from the command line or the environment?
21745
21746    # Try to remove the string !HG! from our list.
21747    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21748    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21749      # If it failed, the variable was not from the command line. Ignore it,
21750      # but warn the user (except for BASH, which is always set by the calling BASH).
21751      if test "xHG" != xBASH; then
21752        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21753$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21754      fi
21755      # Try to locate tool using the code snippet
21756      for ac_prog in hg
21757do
21758  # Extract the first word of "$ac_prog", so it can be a program name with args.
21759set dummy $ac_prog; ac_word=$2
21760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21761$as_echo_n "checking for $ac_word... " >&6; }
21762if ${ac_cv_path_HG+:} false; then :
21763  $as_echo_n "(cached) " >&6
21764else
21765  case $HG in
21766  [\\/]* | ?:[\\/]*)
21767  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21768  ;;
21769  *)
21770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21771for as_dir in $PATH
21772do
21773  IFS=$as_save_IFS
21774  test -z "$as_dir" && as_dir=.
21775    for ac_exec_ext in '' $ac_executable_extensions; do
21776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21777    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21779    break 2
21780  fi
21781done
21782  done
21783IFS=$as_save_IFS
21784
21785  ;;
21786esac
21787fi
21788HG=$ac_cv_path_HG
21789if test -n "$HG"; then
21790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21791$as_echo "$HG" >&6; }
21792else
21793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21794$as_echo "no" >&6; }
21795fi
21796
21797
21798  test -n "$HG" && break
21799done
21800
21801    else
21802      # If it succeeded, then it was overridden by the user. We will use it
21803      # for the tool.
21804
21805      # First remove it from the list of overridden variables, so we can test
21806      # for unknown variables in the end.
21807      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21808
21809      # Check if we try to supply an empty value
21810      if test "x$HG" = x; then
21811        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21812$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21813        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21814$as_echo_n "checking for HG... " >&6; }
21815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21816$as_echo "disabled" >&6; }
21817      else
21818        # Check if the provided tool contains a complete path.
21819        tool_specified="$HG"
21820        tool_basename="${tool_specified##*/}"
21821        if test "x$tool_basename" = "x$tool_specified"; then
21822          # A command without a complete path is provided, search $PATH.
21823          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21824$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21825          # Extract the first word of "$tool_basename", so it can be a program name with args.
21826set dummy $tool_basename; ac_word=$2
21827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21828$as_echo_n "checking for $ac_word... " >&6; }
21829if ${ac_cv_path_HG+:} false; then :
21830  $as_echo_n "(cached) " >&6
21831else
21832  case $HG in
21833  [\\/]* | ?:[\\/]*)
21834  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21835  ;;
21836  *)
21837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21838for as_dir in $PATH
21839do
21840  IFS=$as_save_IFS
21841  test -z "$as_dir" && as_dir=.
21842    for ac_exec_ext in '' $ac_executable_extensions; do
21843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21844    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21846    break 2
21847  fi
21848done
21849  done
21850IFS=$as_save_IFS
21851
21852  ;;
21853esac
21854fi
21855HG=$ac_cv_path_HG
21856if test -n "$HG"; then
21857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21858$as_echo "$HG" >&6; }
21859else
21860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21861$as_echo "no" >&6; }
21862fi
21863
21864
21865          if test "x$HG" = x; then
21866            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21867          fi
21868        else
21869          # Otherwise we believe it is a complete path. Use it as it is.
21870          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21871$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21872          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21873$as_echo_n "checking for HG... " >&6; }
21874          if test ! -x "$tool_specified"; then
21875            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21876$as_echo "not found" >&6; }
21877            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21878          fi
21879          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21880$as_echo "$tool_specified" >&6; }
21881        fi
21882      fi
21883    fi
21884
21885  fi
21886
21887
21888
21889
21890  # Publish this variable in the help.
21891
21892
21893  if [ -z "${STAT+x}" ]; then
21894    # The variable is not set by user, try to locate tool using the code snippet
21895    for ac_prog in stat
21896do
21897  # Extract the first word of "$ac_prog", so it can be a program name with args.
21898set dummy $ac_prog; ac_word=$2
21899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21900$as_echo_n "checking for $ac_word... " >&6; }
21901if ${ac_cv_path_STAT+:} false; then :
21902  $as_echo_n "(cached) " >&6
21903else
21904  case $STAT in
21905  [\\/]* | ?:[\\/]*)
21906  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21907  ;;
21908  *)
21909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21910for as_dir in $PATH
21911do
21912  IFS=$as_save_IFS
21913  test -z "$as_dir" && as_dir=.
21914    for ac_exec_ext in '' $ac_executable_extensions; do
21915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21916    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21918    break 2
21919  fi
21920done
21921  done
21922IFS=$as_save_IFS
21923
21924  ;;
21925esac
21926fi
21927STAT=$ac_cv_path_STAT
21928if test -n "$STAT"; then
21929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21930$as_echo "$STAT" >&6; }
21931else
21932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21933$as_echo "no" >&6; }
21934fi
21935
21936
21937  test -n "$STAT" && break
21938done
21939
21940  else
21941    # The variable is set, but is it from the command line or the environment?
21942
21943    # Try to remove the string !STAT! from our list.
21944    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21945    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21946      # If it failed, the variable was not from the command line. Ignore it,
21947      # but warn the user (except for BASH, which is always set by the calling BASH).
21948      if test "xSTAT" != xBASH; then
21949        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21950$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21951      fi
21952      # Try to locate tool using the code snippet
21953      for ac_prog in stat
21954do
21955  # Extract the first word of "$ac_prog", so it can be a program name with args.
21956set dummy $ac_prog; ac_word=$2
21957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21958$as_echo_n "checking for $ac_word... " >&6; }
21959if ${ac_cv_path_STAT+:} false; then :
21960  $as_echo_n "(cached) " >&6
21961else
21962  case $STAT in
21963  [\\/]* | ?:[\\/]*)
21964  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21965  ;;
21966  *)
21967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21968for as_dir in $PATH
21969do
21970  IFS=$as_save_IFS
21971  test -z "$as_dir" && as_dir=.
21972    for ac_exec_ext in '' $ac_executable_extensions; do
21973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21974    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21976    break 2
21977  fi
21978done
21979  done
21980IFS=$as_save_IFS
21981
21982  ;;
21983esac
21984fi
21985STAT=$ac_cv_path_STAT
21986if test -n "$STAT"; then
21987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21988$as_echo "$STAT" >&6; }
21989else
21990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21991$as_echo "no" >&6; }
21992fi
21993
21994
21995  test -n "$STAT" && break
21996done
21997
21998    else
21999      # If it succeeded, then it was overridden by the user. We will use it
22000      # for the tool.
22001
22002      # First remove it from the list of overridden variables, so we can test
22003      # for unknown variables in the end.
22004      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22005
22006      # Check if we try to supply an empty value
22007      if test "x$STAT" = x; then
22008        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22009$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22010        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22011$as_echo_n "checking for STAT... " >&6; }
22012        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22013$as_echo "disabled" >&6; }
22014      else
22015        # Check if the provided tool contains a complete path.
22016        tool_specified="$STAT"
22017        tool_basename="${tool_specified##*/}"
22018        if test "x$tool_basename" = "x$tool_specified"; then
22019          # A command without a complete path is provided, search $PATH.
22020          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22021$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22022          # Extract the first word of "$tool_basename", so it can be a program name with args.
22023set dummy $tool_basename; ac_word=$2
22024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22025$as_echo_n "checking for $ac_word... " >&6; }
22026if ${ac_cv_path_STAT+:} false; then :
22027  $as_echo_n "(cached) " >&6
22028else
22029  case $STAT in
22030  [\\/]* | ?:[\\/]*)
22031  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22032  ;;
22033  *)
22034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22035for as_dir in $PATH
22036do
22037  IFS=$as_save_IFS
22038  test -z "$as_dir" && as_dir=.
22039    for ac_exec_ext in '' $ac_executable_extensions; do
22040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22041    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22043    break 2
22044  fi
22045done
22046  done
22047IFS=$as_save_IFS
22048
22049  ;;
22050esac
22051fi
22052STAT=$ac_cv_path_STAT
22053if test -n "$STAT"; then
22054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22055$as_echo "$STAT" >&6; }
22056else
22057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22058$as_echo "no" >&6; }
22059fi
22060
22061
22062          if test "x$STAT" = x; then
22063            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22064          fi
22065        else
22066          # Otherwise we believe it is a complete path. Use it as it is.
22067          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22068$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22069          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22070$as_echo_n "checking for STAT... " >&6; }
22071          if test ! -x "$tool_specified"; then
22072            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22073$as_echo "not found" >&6; }
22074            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22075          fi
22076          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22077$as_echo "$tool_specified" >&6; }
22078        fi
22079      fi
22080    fi
22081
22082  fi
22083
22084
22085
22086
22087  # Publish this variable in the help.
22088
22089
22090  if [ -z "${TIME+x}" ]; then
22091    # The variable is not set by user, try to locate tool using the code snippet
22092    for ac_prog in time
22093do
22094  # Extract the first word of "$ac_prog", so it can be a program name with args.
22095set dummy $ac_prog; ac_word=$2
22096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22097$as_echo_n "checking for $ac_word... " >&6; }
22098if ${ac_cv_path_TIME+:} false; then :
22099  $as_echo_n "(cached) " >&6
22100else
22101  case $TIME in
22102  [\\/]* | ?:[\\/]*)
22103  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22104  ;;
22105  *)
22106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22107for as_dir in $PATH
22108do
22109  IFS=$as_save_IFS
22110  test -z "$as_dir" && as_dir=.
22111    for ac_exec_ext in '' $ac_executable_extensions; do
22112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22113    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22115    break 2
22116  fi
22117done
22118  done
22119IFS=$as_save_IFS
22120
22121  ;;
22122esac
22123fi
22124TIME=$ac_cv_path_TIME
22125if test -n "$TIME"; then
22126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22127$as_echo "$TIME" >&6; }
22128else
22129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22130$as_echo "no" >&6; }
22131fi
22132
22133
22134  test -n "$TIME" && break
22135done
22136
22137  else
22138    # The variable is set, but is it from the command line or the environment?
22139
22140    # Try to remove the string !TIME! from our list.
22141    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22142    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22143      # If it failed, the variable was not from the command line. Ignore it,
22144      # but warn the user (except for BASH, which is always set by the calling BASH).
22145      if test "xTIME" != xBASH; then
22146        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22147$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22148      fi
22149      # Try to locate tool using the code snippet
22150      for ac_prog in time
22151do
22152  # Extract the first word of "$ac_prog", so it can be a program name with args.
22153set dummy $ac_prog; ac_word=$2
22154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22155$as_echo_n "checking for $ac_word... " >&6; }
22156if ${ac_cv_path_TIME+:} false; then :
22157  $as_echo_n "(cached) " >&6
22158else
22159  case $TIME in
22160  [\\/]* | ?:[\\/]*)
22161  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22162  ;;
22163  *)
22164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22165for as_dir in $PATH
22166do
22167  IFS=$as_save_IFS
22168  test -z "$as_dir" && as_dir=.
22169    for ac_exec_ext in '' $ac_executable_extensions; do
22170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22171    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22173    break 2
22174  fi
22175done
22176  done
22177IFS=$as_save_IFS
22178
22179  ;;
22180esac
22181fi
22182TIME=$ac_cv_path_TIME
22183if test -n "$TIME"; then
22184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22185$as_echo "$TIME" >&6; }
22186else
22187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22188$as_echo "no" >&6; }
22189fi
22190
22191
22192  test -n "$TIME" && break
22193done
22194
22195    else
22196      # If it succeeded, then it was overridden by the user. We will use it
22197      # for the tool.
22198
22199      # First remove it from the list of overridden variables, so we can test
22200      # for unknown variables in the end.
22201      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22202
22203      # Check if we try to supply an empty value
22204      if test "x$TIME" = x; then
22205        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22206$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22207        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22208$as_echo_n "checking for TIME... " >&6; }
22209        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22210$as_echo "disabled" >&6; }
22211      else
22212        # Check if the provided tool contains a complete path.
22213        tool_specified="$TIME"
22214        tool_basename="${tool_specified##*/}"
22215        if test "x$tool_basename" = "x$tool_specified"; then
22216          # A command without a complete path is provided, search $PATH.
22217          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22218$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22219          # Extract the first word of "$tool_basename", so it can be a program name with args.
22220set dummy $tool_basename; ac_word=$2
22221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22222$as_echo_n "checking for $ac_word... " >&6; }
22223if ${ac_cv_path_TIME+:} false; then :
22224  $as_echo_n "(cached) " >&6
22225else
22226  case $TIME in
22227  [\\/]* | ?:[\\/]*)
22228  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22229  ;;
22230  *)
22231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22232for as_dir in $PATH
22233do
22234  IFS=$as_save_IFS
22235  test -z "$as_dir" && as_dir=.
22236    for ac_exec_ext in '' $ac_executable_extensions; do
22237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22238    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22240    break 2
22241  fi
22242done
22243  done
22244IFS=$as_save_IFS
22245
22246  ;;
22247esac
22248fi
22249TIME=$ac_cv_path_TIME
22250if test -n "$TIME"; then
22251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22252$as_echo "$TIME" >&6; }
22253else
22254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22255$as_echo "no" >&6; }
22256fi
22257
22258
22259          if test "x$TIME" = x; then
22260            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22261          fi
22262        else
22263          # Otherwise we believe it is a complete path. Use it as it is.
22264          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22265$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22266          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22267$as_echo_n "checking for TIME... " >&6; }
22268          if test ! -x "$tool_specified"; then
22269            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22270$as_echo "not found" >&6; }
22271            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22272          fi
22273          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22274$as_echo "$tool_specified" >&6; }
22275        fi
22276      fi
22277    fi
22278
22279  fi
22280
22281
22282
22283
22284  # Publish this variable in the help.
22285
22286
22287  if [ -z "${DTRACE+x}" ]; then
22288    # The variable is not set by user, try to locate tool using the code snippet
22289    for ac_prog in dtrace
22290do
22291  # Extract the first word of "$ac_prog", so it can be a program name with args.
22292set dummy $ac_prog; ac_word=$2
22293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22294$as_echo_n "checking for $ac_word... " >&6; }
22295if ${ac_cv_path_DTRACE+:} false; then :
22296  $as_echo_n "(cached) " >&6
22297else
22298  case $DTRACE in
22299  [\\/]* | ?:[\\/]*)
22300  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22301  ;;
22302  *)
22303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22304for as_dir in $PATH
22305do
22306  IFS=$as_save_IFS
22307  test -z "$as_dir" && as_dir=.
22308    for ac_exec_ext in '' $ac_executable_extensions; do
22309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22310    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22312    break 2
22313  fi
22314done
22315  done
22316IFS=$as_save_IFS
22317
22318  ;;
22319esac
22320fi
22321DTRACE=$ac_cv_path_DTRACE
22322if test -n "$DTRACE"; then
22323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22324$as_echo "$DTRACE" >&6; }
22325else
22326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22327$as_echo "no" >&6; }
22328fi
22329
22330
22331  test -n "$DTRACE" && break
22332done
22333
22334  else
22335    # The variable is set, but is it from the command line or the environment?
22336
22337    # Try to remove the string !DTRACE! from our list.
22338    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22339    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22340      # If it failed, the variable was not from the command line. Ignore it,
22341      # but warn the user (except for BASH, which is always set by the calling BASH).
22342      if test "xDTRACE" != xBASH; then
22343        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22344$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22345      fi
22346      # Try to locate tool using the code snippet
22347      for ac_prog in dtrace
22348do
22349  # Extract the first word of "$ac_prog", so it can be a program name with args.
22350set dummy $ac_prog; ac_word=$2
22351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22352$as_echo_n "checking for $ac_word... " >&6; }
22353if ${ac_cv_path_DTRACE+:} false; then :
22354  $as_echo_n "(cached) " >&6
22355else
22356  case $DTRACE in
22357  [\\/]* | ?:[\\/]*)
22358  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22359  ;;
22360  *)
22361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22362for as_dir in $PATH
22363do
22364  IFS=$as_save_IFS
22365  test -z "$as_dir" && as_dir=.
22366    for ac_exec_ext in '' $ac_executable_extensions; do
22367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22368    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22370    break 2
22371  fi
22372done
22373  done
22374IFS=$as_save_IFS
22375
22376  ;;
22377esac
22378fi
22379DTRACE=$ac_cv_path_DTRACE
22380if test -n "$DTRACE"; then
22381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22382$as_echo "$DTRACE" >&6; }
22383else
22384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22385$as_echo "no" >&6; }
22386fi
22387
22388
22389  test -n "$DTRACE" && break
22390done
22391
22392    else
22393      # If it succeeded, then it was overridden by the user. We will use it
22394      # for the tool.
22395
22396      # First remove it from the list of overridden variables, so we can test
22397      # for unknown variables in the end.
22398      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22399
22400      # Check if we try to supply an empty value
22401      if test "x$DTRACE" = x; then
22402        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22403$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22404        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22405$as_echo_n "checking for DTRACE... " >&6; }
22406        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22407$as_echo "disabled" >&6; }
22408      else
22409        # Check if the provided tool contains a complete path.
22410        tool_specified="$DTRACE"
22411        tool_basename="${tool_specified##*/}"
22412        if test "x$tool_basename" = "x$tool_specified"; then
22413          # A command without a complete path is provided, search $PATH.
22414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22415$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22416          # Extract the first word of "$tool_basename", so it can be a program name with args.
22417set dummy $tool_basename; ac_word=$2
22418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22419$as_echo_n "checking for $ac_word... " >&6; }
22420if ${ac_cv_path_DTRACE+:} false; then :
22421  $as_echo_n "(cached) " >&6
22422else
22423  case $DTRACE in
22424  [\\/]* | ?:[\\/]*)
22425  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22426  ;;
22427  *)
22428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22429for as_dir in $PATH
22430do
22431  IFS=$as_save_IFS
22432  test -z "$as_dir" && as_dir=.
22433    for ac_exec_ext in '' $ac_executable_extensions; do
22434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22435    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22437    break 2
22438  fi
22439done
22440  done
22441IFS=$as_save_IFS
22442
22443  ;;
22444esac
22445fi
22446DTRACE=$ac_cv_path_DTRACE
22447if test -n "$DTRACE"; then
22448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22449$as_echo "$DTRACE" >&6; }
22450else
22451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22452$as_echo "no" >&6; }
22453fi
22454
22455
22456          if test "x$DTRACE" = x; then
22457            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22458          fi
22459        else
22460          # Otherwise we believe it is a complete path. Use it as it is.
22461          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22462$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22463          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22464$as_echo_n "checking for DTRACE... " >&6; }
22465          if test ! -x "$tool_specified"; then
22466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22467$as_echo "not found" >&6; }
22468            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22469          fi
22470          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22471$as_echo "$tool_specified" >&6; }
22472        fi
22473      fi
22474    fi
22475
22476  fi
22477
22478
22479
22480
22481  # Publish this variable in the help.
22482
22483
22484  if [ -z "${PATCH+x}" ]; then
22485    # The variable is not set by user, try to locate tool using the code snippet
22486    for ac_prog in gpatch patch
22487do
22488  # Extract the first word of "$ac_prog", so it can be a program name with args.
22489set dummy $ac_prog; ac_word=$2
22490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22491$as_echo_n "checking for $ac_word... " >&6; }
22492if ${ac_cv_path_PATCH+:} false; then :
22493  $as_echo_n "(cached) " >&6
22494else
22495  case $PATCH in
22496  [\\/]* | ?:[\\/]*)
22497  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22498  ;;
22499  *)
22500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22501for as_dir in $PATH
22502do
22503  IFS=$as_save_IFS
22504  test -z "$as_dir" && as_dir=.
22505    for ac_exec_ext in '' $ac_executable_extensions; do
22506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22507    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22509    break 2
22510  fi
22511done
22512  done
22513IFS=$as_save_IFS
22514
22515  ;;
22516esac
22517fi
22518PATCH=$ac_cv_path_PATCH
22519if test -n "$PATCH"; then
22520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22521$as_echo "$PATCH" >&6; }
22522else
22523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22524$as_echo "no" >&6; }
22525fi
22526
22527
22528  test -n "$PATCH" && break
22529done
22530
22531  else
22532    # The variable is set, but is it from the command line or the environment?
22533
22534    # Try to remove the string !PATCH! from our list.
22535    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
22536    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22537      # If it failed, the variable was not from the command line. Ignore it,
22538      # but warn the user (except for BASH, which is always set by the calling BASH).
22539      if test "xPATCH" != xBASH; then
22540        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
22541$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
22542      fi
22543      # Try to locate tool using the code snippet
22544      for ac_prog in gpatch patch
22545do
22546  # Extract the first word of "$ac_prog", so it can be a program name with args.
22547set dummy $ac_prog; ac_word=$2
22548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22549$as_echo_n "checking for $ac_word... " >&6; }
22550if ${ac_cv_path_PATCH+:} false; then :
22551  $as_echo_n "(cached) " >&6
22552else
22553  case $PATCH in
22554  [\\/]* | ?:[\\/]*)
22555  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22556  ;;
22557  *)
22558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22559for as_dir in $PATH
22560do
22561  IFS=$as_save_IFS
22562  test -z "$as_dir" && as_dir=.
22563    for ac_exec_ext in '' $ac_executable_extensions; do
22564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22565    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22567    break 2
22568  fi
22569done
22570  done
22571IFS=$as_save_IFS
22572
22573  ;;
22574esac
22575fi
22576PATCH=$ac_cv_path_PATCH
22577if test -n "$PATCH"; then
22578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22579$as_echo "$PATCH" >&6; }
22580else
22581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22582$as_echo "no" >&6; }
22583fi
22584
22585
22586  test -n "$PATCH" && break
22587done
22588
22589    else
22590      # If it succeeded, then it was overridden by the user. We will use it
22591      # for the tool.
22592
22593      # First remove it from the list of overridden variables, so we can test
22594      # for unknown variables in the end.
22595      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22596
22597      # Check if we try to supply an empty value
22598      if test "x$PATCH" = x; then
22599        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22600$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22601        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22602$as_echo_n "checking for PATCH... " >&6; }
22603        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22604$as_echo "disabled" >&6; }
22605      else
22606        # Check if the provided tool contains a complete path.
22607        tool_specified="$PATCH"
22608        tool_basename="${tool_specified##*/}"
22609        if test "x$tool_basename" = "x$tool_specified"; then
22610          # A command without a complete path is provided, search $PATH.
22611          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22612$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22613          # Extract the first word of "$tool_basename", so it can be a program name with args.
22614set dummy $tool_basename; ac_word=$2
22615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22616$as_echo_n "checking for $ac_word... " >&6; }
22617if ${ac_cv_path_PATCH+:} false; then :
22618  $as_echo_n "(cached) " >&6
22619else
22620  case $PATCH in
22621  [\\/]* | ?:[\\/]*)
22622  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22623  ;;
22624  *)
22625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22626for as_dir in $PATH
22627do
22628  IFS=$as_save_IFS
22629  test -z "$as_dir" && as_dir=.
22630    for ac_exec_ext in '' $ac_executable_extensions; do
22631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22632    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22634    break 2
22635  fi
22636done
22637  done
22638IFS=$as_save_IFS
22639
22640  ;;
22641esac
22642fi
22643PATCH=$ac_cv_path_PATCH
22644if test -n "$PATCH"; then
22645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22646$as_echo "$PATCH" >&6; }
22647else
22648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22649$as_echo "no" >&6; }
22650fi
22651
22652
22653          if test "x$PATCH" = x; then
22654            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22655          fi
22656        else
22657          # Otherwise we believe it is a complete path. Use it as it is.
22658          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22659$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22660          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22661$as_echo_n "checking for PATCH... " >&6; }
22662          if test ! -x "$tool_specified"; then
22663            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22664$as_echo "not found" >&6; }
22665            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22666          fi
22667          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22668$as_echo "$tool_specified" >&6; }
22669        fi
22670      fi
22671    fi
22672
22673  fi
22674
22675
22676  # Check if it's GNU time
22677  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22678  if test "x$IS_GNU_TIME" != x; then
22679    IS_GNU_TIME=yes
22680  else
22681    IS_GNU_TIME=no
22682  fi
22683
22684
22685  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22686
22687
22688
22689  # Publish this variable in the help.
22690
22691
22692  if [ -z "${DSYMUTIL+x}" ]; then
22693    # The variable is not set by user, try to locate tool using the code snippet
22694    for ac_prog in dsymutil
22695do
22696  # Extract the first word of "$ac_prog", so it can be a program name with args.
22697set dummy $ac_prog; ac_word=$2
22698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22699$as_echo_n "checking for $ac_word... " >&6; }
22700if ${ac_cv_path_DSYMUTIL+:} false; then :
22701  $as_echo_n "(cached) " >&6
22702else
22703  case $DSYMUTIL in
22704  [\\/]* | ?:[\\/]*)
22705  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22706  ;;
22707  *)
22708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22709for as_dir in $PATH
22710do
22711  IFS=$as_save_IFS
22712  test -z "$as_dir" && as_dir=.
22713    for ac_exec_ext in '' $ac_executable_extensions; do
22714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22715    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22717    break 2
22718  fi
22719done
22720  done
22721IFS=$as_save_IFS
22722
22723  ;;
22724esac
22725fi
22726DSYMUTIL=$ac_cv_path_DSYMUTIL
22727if test -n "$DSYMUTIL"; then
22728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22729$as_echo "$DSYMUTIL" >&6; }
22730else
22731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22732$as_echo "no" >&6; }
22733fi
22734
22735
22736  test -n "$DSYMUTIL" && break
22737done
22738
22739  else
22740    # The variable is set, but is it from the command line or the environment?
22741
22742    # Try to remove the string !DSYMUTIL! from our list.
22743    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22744    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22745      # If it failed, the variable was not from the command line. Ignore it,
22746      # but warn the user (except for BASH, which is always set by the calling BASH).
22747      if test "xDSYMUTIL" != xBASH; then
22748        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22749$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22750      fi
22751      # Try to locate tool using the code snippet
22752      for ac_prog in dsymutil
22753do
22754  # Extract the first word of "$ac_prog", so it can be a program name with args.
22755set dummy $ac_prog; ac_word=$2
22756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22757$as_echo_n "checking for $ac_word... " >&6; }
22758if ${ac_cv_path_DSYMUTIL+:} false; then :
22759  $as_echo_n "(cached) " >&6
22760else
22761  case $DSYMUTIL in
22762  [\\/]* | ?:[\\/]*)
22763  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22764  ;;
22765  *)
22766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22767for as_dir in $PATH
22768do
22769  IFS=$as_save_IFS
22770  test -z "$as_dir" && as_dir=.
22771    for ac_exec_ext in '' $ac_executable_extensions; do
22772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22773    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22775    break 2
22776  fi
22777done
22778  done
22779IFS=$as_save_IFS
22780
22781  ;;
22782esac
22783fi
22784DSYMUTIL=$ac_cv_path_DSYMUTIL
22785if test -n "$DSYMUTIL"; then
22786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22787$as_echo "$DSYMUTIL" >&6; }
22788else
22789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22790$as_echo "no" >&6; }
22791fi
22792
22793
22794  test -n "$DSYMUTIL" && break
22795done
22796
22797    else
22798      # If it succeeded, then it was overridden by the user. We will use it
22799      # for the tool.
22800
22801      # First remove it from the list of overridden variables, so we can test
22802      # for unknown variables in the end.
22803      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22804
22805      # Check if we try to supply an empty value
22806      if test "x$DSYMUTIL" = x; then
22807        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22808$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22809        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22810$as_echo_n "checking for DSYMUTIL... " >&6; }
22811        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22812$as_echo "disabled" >&6; }
22813      else
22814        # Check if the provided tool contains a complete path.
22815        tool_specified="$DSYMUTIL"
22816        tool_basename="${tool_specified##*/}"
22817        if test "x$tool_basename" = "x$tool_specified"; then
22818          # A command without a complete path is provided, search $PATH.
22819          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22820$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22821          # Extract the first word of "$tool_basename", so it can be a program name with args.
22822set dummy $tool_basename; ac_word=$2
22823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22824$as_echo_n "checking for $ac_word... " >&6; }
22825if ${ac_cv_path_DSYMUTIL+:} false; then :
22826  $as_echo_n "(cached) " >&6
22827else
22828  case $DSYMUTIL in
22829  [\\/]* | ?:[\\/]*)
22830  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22831  ;;
22832  *)
22833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22834for as_dir in $PATH
22835do
22836  IFS=$as_save_IFS
22837  test -z "$as_dir" && as_dir=.
22838    for ac_exec_ext in '' $ac_executable_extensions; do
22839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22840    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22842    break 2
22843  fi
22844done
22845  done
22846IFS=$as_save_IFS
22847
22848  ;;
22849esac
22850fi
22851DSYMUTIL=$ac_cv_path_DSYMUTIL
22852if test -n "$DSYMUTIL"; then
22853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22854$as_echo "$DSYMUTIL" >&6; }
22855else
22856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22857$as_echo "no" >&6; }
22858fi
22859
22860
22861          if test "x$DSYMUTIL" = x; then
22862            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22863          fi
22864        else
22865          # Otherwise we believe it is a complete path. Use it as it is.
22866          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22867$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22868          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22869$as_echo_n "checking for DSYMUTIL... " >&6; }
22870          if test ! -x "$tool_specified"; then
22871            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22872$as_echo "not found" >&6; }
22873            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22874          fi
22875          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22876$as_echo "$tool_specified" >&6; }
22877        fi
22878      fi
22879    fi
22880
22881  fi
22882
22883
22884
22885  if test "x$DSYMUTIL" = x; then
22886    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22887  fi
22888
22889
22890
22891
22892
22893  # Publish this variable in the help.
22894
22895
22896  if [ -z "${XATTR+x}" ]; then
22897    # The variable is not set by user, try to locate tool using the code snippet
22898    for ac_prog in xattr
22899do
22900  # Extract the first word of "$ac_prog", so it can be a program name with args.
22901set dummy $ac_prog; ac_word=$2
22902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22903$as_echo_n "checking for $ac_word... " >&6; }
22904if ${ac_cv_path_XATTR+:} false; then :
22905  $as_echo_n "(cached) " >&6
22906else
22907  case $XATTR in
22908  [\\/]* | ?:[\\/]*)
22909  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22910  ;;
22911  *)
22912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22913for as_dir in $PATH
22914do
22915  IFS=$as_save_IFS
22916  test -z "$as_dir" && as_dir=.
22917    for ac_exec_ext in '' $ac_executable_extensions; do
22918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22919    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22921    break 2
22922  fi
22923done
22924  done
22925IFS=$as_save_IFS
22926
22927  ;;
22928esac
22929fi
22930XATTR=$ac_cv_path_XATTR
22931if test -n "$XATTR"; then
22932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22933$as_echo "$XATTR" >&6; }
22934else
22935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22936$as_echo "no" >&6; }
22937fi
22938
22939
22940  test -n "$XATTR" && break
22941done
22942
22943  else
22944    # The variable is set, but is it from the command line or the environment?
22945
22946    # Try to remove the string !XATTR! from our list.
22947    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22948    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22949      # If it failed, the variable was not from the command line. Ignore it,
22950      # but warn the user (except for BASH, which is always set by the calling BASH).
22951      if test "xXATTR" != xBASH; then
22952        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22953$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22954      fi
22955      # Try to locate tool using the code snippet
22956      for ac_prog in xattr
22957do
22958  # Extract the first word of "$ac_prog", so it can be a program name with args.
22959set dummy $ac_prog; ac_word=$2
22960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22961$as_echo_n "checking for $ac_word... " >&6; }
22962if ${ac_cv_path_XATTR+:} false; then :
22963  $as_echo_n "(cached) " >&6
22964else
22965  case $XATTR in
22966  [\\/]* | ?:[\\/]*)
22967  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22968  ;;
22969  *)
22970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22971for as_dir in $PATH
22972do
22973  IFS=$as_save_IFS
22974  test -z "$as_dir" && as_dir=.
22975    for ac_exec_ext in '' $ac_executable_extensions; do
22976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22977    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22979    break 2
22980  fi
22981done
22982  done
22983IFS=$as_save_IFS
22984
22985  ;;
22986esac
22987fi
22988XATTR=$ac_cv_path_XATTR
22989if test -n "$XATTR"; then
22990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22991$as_echo "$XATTR" >&6; }
22992else
22993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22994$as_echo "no" >&6; }
22995fi
22996
22997
22998  test -n "$XATTR" && break
22999done
23000
23001    else
23002      # If it succeeded, then it was overridden by the user. We will use it
23003      # for the tool.
23004
23005      # First remove it from the list of overridden variables, so we can test
23006      # for unknown variables in the end.
23007      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23008
23009      # Check if we try to supply an empty value
23010      if test "x$XATTR" = x; then
23011        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23012$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23013        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23014$as_echo_n "checking for XATTR... " >&6; }
23015        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23016$as_echo "disabled" >&6; }
23017      else
23018        # Check if the provided tool contains a complete path.
23019        tool_specified="$XATTR"
23020        tool_basename="${tool_specified##*/}"
23021        if test "x$tool_basename" = "x$tool_specified"; then
23022          # A command without a complete path is provided, search $PATH.
23023          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23024$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23025          # Extract the first word of "$tool_basename", so it can be a program name with args.
23026set dummy $tool_basename; ac_word=$2
23027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23028$as_echo_n "checking for $ac_word... " >&6; }
23029if ${ac_cv_path_XATTR+:} false; then :
23030  $as_echo_n "(cached) " >&6
23031else
23032  case $XATTR in
23033  [\\/]* | ?:[\\/]*)
23034  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23035  ;;
23036  *)
23037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23038for as_dir in $PATH
23039do
23040  IFS=$as_save_IFS
23041  test -z "$as_dir" && as_dir=.
23042    for ac_exec_ext in '' $ac_executable_extensions; do
23043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23044    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23046    break 2
23047  fi
23048done
23049  done
23050IFS=$as_save_IFS
23051
23052  ;;
23053esac
23054fi
23055XATTR=$ac_cv_path_XATTR
23056if test -n "$XATTR"; then
23057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23058$as_echo "$XATTR" >&6; }
23059else
23060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23061$as_echo "no" >&6; }
23062fi
23063
23064
23065          if test "x$XATTR" = x; then
23066            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23067          fi
23068        else
23069          # Otherwise we believe it is a complete path. Use it as it is.
23070          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23071$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23072          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23073$as_echo_n "checking for XATTR... " >&6; }
23074          if test ! -x "$tool_specified"; then
23075            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23076$as_echo "not found" >&6; }
23077            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23078          fi
23079          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23080$as_echo "$tool_specified" >&6; }
23081        fi
23082      fi
23083    fi
23084
23085  fi
23086
23087
23088
23089  if test "x$XATTR" = x; then
23090    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23091  fi
23092
23093
23094
23095
23096  # Publish this variable in the help.
23097
23098
23099  if [ -z "${CODESIGN+x}" ]; then
23100    # The variable is not set by user, try to locate tool using the code snippet
23101    for ac_prog in codesign
23102do
23103  # Extract the first word of "$ac_prog", so it can be a program name with args.
23104set dummy $ac_prog; ac_word=$2
23105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23106$as_echo_n "checking for $ac_word... " >&6; }
23107if ${ac_cv_path_CODESIGN+:} false; then :
23108  $as_echo_n "(cached) " >&6
23109else
23110  case $CODESIGN in
23111  [\\/]* | ?:[\\/]*)
23112  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23113  ;;
23114  *)
23115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23116for as_dir in $PATH
23117do
23118  IFS=$as_save_IFS
23119  test -z "$as_dir" && as_dir=.
23120    for ac_exec_ext in '' $ac_executable_extensions; do
23121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23122    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23124    break 2
23125  fi
23126done
23127  done
23128IFS=$as_save_IFS
23129
23130  ;;
23131esac
23132fi
23133CODESIGN=$ac_cv_path_CODESIGN
23134if test -n "$CODESIGN"; then
23135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23136$as_echo "$CODESIGN" >&6; }
23137else
23138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23139$as_echo "no" >&6; }
23140fi
23141
23142
23143  test -n "$CODESIGN" && break
23144done
23145
23146  else
23147    # The variable is set, but is it from the command line or the environment?
23148
23149    # Try to remove the string !CODESIGN! from our list.
23150    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23151    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23152      # If it failed, the variable was not from the command line. Ignore it,
23153      # but warn the user (except for BASH, which is always set by the calling BASH).
23154      if test "xCODESIGN" != xBASH; then
23155        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23156$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23157      fi
23158      # Try to locate tool using the code snippet
23159      for ac_prog in codesign
23160do
23161  # Extract the first word of "$ac_prog", so it can be a program name with args.
23162set dummy $ac_prog; ac_word=$2
23163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23164$as_echo_n "checking for $ac_word... " >&6; }
23165if ${ac_cv_path_CODESIGN+:} false; then :
23166  $as_echo_n "(cached) " >&6
23167else
23168  case $CODESIGN in
23169  [\\/]* | ?:[\\/]*)
23170  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23171  ;;
23172  *)
23173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23174for as_dir in $PATH
23175do
23176  IFS=$as_save_IFS
23177  test -z "$as_dir" && as_dir=.
23178    for ac_exec_ext in '' $ac_executable_extensions; do
23179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23180    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23182    break 2
23183  fi
23184done
23185  done
23186IFS=$as_save_IFS
23187
23188  ;;
23189esac
23190fi
23191CODESIGN=$ac_cv_path_CODESIGN
23192if test -n "$CODESIGN"; then
23193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23194$as_echo "$CODESIGN" >&6; }
23195else
23196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23197$as_echo "no" >&6; }
23198fi
23199
23200
23201  test -n "$CODESIGN" && break
23202done
23203
23204    else
23205      # If it succeeded, then it was overridden by the user. We will use it
23206      # for the tool.
23207
23208      # First remove it from the list of overridden variables, so we can test
23209      # for unknown variables in the end.
23210      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23211
23212      # Check if we try to supply an empty value
23213      if test "x$CODESIGN" = x; then
23214        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23215$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23216        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23217$as_echo_n "checking for CODESIGN... " >&6; }
23218        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23219$as_echo "disabled" >&6; }
23220      else
23221        # Check if the provided tool contains a complete path.
23222        tool_specified="$CODESIGN"
23223        tool_basename="${tool_specified##*/}"
23224        if test "x$tool_basename" = "x$tool_specified"; then
23225          # A command without a complete path is provided, search $PATH.
23226          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23227$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23228          # Extract the first word of "$tool_basename", so it can be a program name with args.
23229set dummy $tool_basename; ac_word=$2
23230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23231$as_echo_n "checking for $ac_word... " >&6; }
23232if ${ac_cv_path_CODESIGN+:} false; then :
23233  $as_echo_n "(cached) " >&6
23234else
23235  case $CODESIGN in
23236  [\\/]* | ?:[\\/]*)
23237  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23238  ;;
23239  *)
23240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23241for as_dir in $PATH
23242do
23243  IFS=$as_save_IFS
23244  test -z "$as_dir" && as_dir=.
23245    for ac_exec_ext in '' $ac_executable_extensions; do
23246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23247    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23249    break 2
23250  fi
23251done
23252  done
23253IFS=$as_save_IFS
23254
23255  ;;
23256esac
23257fi
23258CODESIGN=$ac_cv_path_CODESIGN
23259if test -n "$CODESIGN"; then
23260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23261$as_echo "$CODESIGN" >&6; }
23262else
23263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23264$as_echo "no" >&6; }
23265fi
23266
23267
23268          if test "x$CODESIGN" = x; then
23269            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23270          fi
23271        else
23272          # Otherwise we believe it is a complete path. Use it as it is.
23273          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23274$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23275          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23276$as_echo_n "checking for CODESIGN... " >&6; }
23277          if test ! -x "$tool_specified"; then
23278            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23279$as_echo "not found" >&6; }
23280            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23281          fi
23282          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23283$as_echo "$tool_specified" >&6; }
23284        fi
23285      fi
23286    fi
23287
23288  fi
23289
23290
23291    if test "x$CODESIGN" != "x"; then
23292      # Verify that the openjdk_codesign certificate is present
23293      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23294$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23295      rm -f codesign-testfile
23296      touch codesign-testfile
23297      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23298      rm -f codesign-testfile
23299      if test "x$CODESIGN" = x; then
23300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23301$as_echo "no" >&6; }
23302      else
23303        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23304$as_echo "yes" >&6; }
23305      fi
23306    fi
23307
23308
23309
23310  # Publish this variable in the help.
23311
23312
23313  if [ -z "${SETFILE+x}" ]; then
23314    # The variable is not set by user, try to locate tool using the code snippet
23315    for ac_prog in SetFile
23316do
23317  # Extract the first word of "$ac_prog", so it can be a program name with args.
23318set dummy $ac_prog; ac_word=$2
23319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23320$as_echo_n "checking for $ac_word... " >&6; }
23321if ${ac_cv_path_SETFILE+:} false; then :
23322  $as_echo_n "(cached) " >&6
23323else
23324  case $SETFILE in
23325  [\\/]* | ?:[\\/]*)
23326  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23327  ;;
23328  *)
23329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23330for as_dir in $PATH
23331do
23332  IFS=$as_save_IFS
23333  test -z "$as_dir" && as_dir=.
23334    for ac_exec_ext in '' $ac_executable_extensions; do
23335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23336    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23338    break 2
23339  fi
23340done
23341  done
23342IFS=$as_save_IFS
23343
23344  ;;
23345esac
23346fi
23347SETFILE=$ac_cv_path_SETFILE
23348if test -n "$SETFILE"; then
23349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23350$as_echo "$SETFILE" >&6; }
23351else
23352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23353$as_echo "no" >&6; }
23354fi
23355
23356
23357  test -n "$SETFILE" && break
23358done
23359
23360  else
23361    # The variable is set, but is it from the command line or the environment?
23362
23363    # Try to remove the string !SETFILE! from our list.
23364    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23365    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23366      # If it failed, the variable was not from the command line. Ignore it,
23367      # but warn the user (except for BASH, which is always set by the calling BASH).
23368      if test "xSETFILE" != xBASH; then
23369        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23370$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23371      fi
23372      # Try to locate tool using the code snippet
23373      for ac_prog in SetFile
23374do
23375  # Extract the first word of "$ac_prog", so it can be a program name with args.
23376set dummy $ac_prog; ac_word=$2
23377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23378$as_echo_n "checking for $ac_word... " >&6; }
23379if ${ac_cv_path_SETFILE+:} false; then :
23380  $as_echo_n "(cached) " >&6
23381else
23382  case $SETFILE in
23383  [\\/]* | ?:[\\/]*)
23384  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23385  ;;
23386  *)
23387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23388for as_dir in $PATH
23389do
23390  IFS=$as_save_IFS
23391  test -z "$as_dir" && as_dir=.
23392    for ac_exec_ext in '' $ac_executable_extensions; do
23393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23394    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23396    break 2
23397  fi
23398done
23399  done
23400IFS=$as_save_IFS
23401
23402  ;;
23403esac
23404fi
23405SETFILE=$ac_cv_path_SETFILE
23406if test -n "$SETFILE"; then
23407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23408$as_echo "$SETFILE" >&6; }
23409else
23410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23411$as_echo "no" >&6; }
23412fi
23413
23414
23415  test -n "$SETFILE" && break
23416done
23417
23418    else
23419      # If it succeeded, then it was overridden by the user. We will use it
23420      # for the tool.
23421
23422      # First remove it from the list of overridden variables, so we can test
23423      # for unknown variables in the end.
23424      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23425
23426      # Check if we try to supply an empty value
23427      if test "x$SETFILE" = x; then
23428        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23429$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23430        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23431$as_echo_n "checking for SETFILE... " >&6; }
23432        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23433$as_echo "disabled" >&6; }
23434      else
23435        # Check if the provided tool contains a complete path.
23436        tool_specified="$SETFILE"
23437        tool_basename="${tool_specified##*/}"
23438        if test "x$tool_basename" = "x$tool_specified"; then
23439          # A command without a complete path is provided, search $PATH.
23440          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23441$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23442          # Extract the first word of "$tool_basename", so it can be a program name with args.
23443set dummy $tool_basename; ac_word=$2
23444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23445$as_echo_n "checking for $ac_word... " >&6; }
23446if ${ac_cv_path_SETFILE+:} false; then :
23447  $as_echo_n "(cached) " >&6
23448else
23449  case $SETFILE in
23450  [\\/]* | ?:[\\/]*)
23451  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23452  ;;
23453  *)
23454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23455for as_dir in $PATH
23456do
23457  IFS=$as_save_IFS
23458  test -z "$as_dir" && as_dir=.
23459    for ac_exec_ext in '' $ac_executable_extensions; do
23460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23461    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23463    break 2
23464  fi
23465done
23466  done
23467IFS=$as_save_IFS
23468
23469  ;;
23470esac
23471fi
23472SETFILE=$ac_cv_path_SETFILE
23473if test -n "$SETFILE"; then
23474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23475$as_echo "$SETFILE" >&6; }
23476else
23477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23478$as_echo "no" >&6; }
23479fi
23480
23481
23482          if test "x$SETFILE" = x; then
23483            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23484          fi
23485        else
23486          # Otherwise we believe it is a complete path. Use it as it is.
23487          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23488$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23489          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23490$as_echo_n "checking for SETFILE... " >&6; }
23491          if test ! -x "$tool_specified"; then
23492            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23493$as_echo "not found" >&6; }
23494            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23495          fi
23496          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23497$as_echo "$tool_specified" >&6; }
23498        fi
23499      fi
23500    fi
23501
23502  fi
23503
23504
23505
23506  if test "x$SETFILE" = x; then
23507    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23508  fi
23509
23510
23511  fi
23512
23513
23514  # Test if bash supports pipefail.
23515  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
23516$as_echo_n "checking if bash supports pipefail... " >&6; }
23517  if ${BASH} -c 'set -o pipefail'; then
23518    BASH_ARGS="$BASH_ARGS -o pipefail"
23519    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23520$as_echo "yes" >&6; }
23521  else
23522    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23523$as_echo "no" >&6; }
23524  fi
23525
23526  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
23527$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
23528  if ${BASH} -e -c 'true'; then
23529    BASH_ARGS="$BASH_ARGS -e"
23530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23531$as_echo "yes" >&6; }
23532  else
23533    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23534$as_echo "no" >&6; }
23535  fi
23536
23537
23538
23539
23540# Check if pkg-config is available.
23541
23542
23543if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
23544	if test -n "$ac_tool_prefix"; then
23545  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
23546set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
23547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23548$as_echo_n "checking for $ac_word... " >&6; }
23549if ${ac_cv_path_PKG_CONFIG+:} false; then :
23550  $as_echo_n "(cached) " >&6
23551else
23552  case $PKG_CONFIG in
23553  [\\/]* | ?:[\\/]*)
23554  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
23555  ;;
23556  *)
23557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23558for as_dir in $PATH
23559do
23560  IFS=$as_save_IFS
23561  test -z "$as_dir" && as_dir=.
23562    for ac_exec_ext in '' $ac_executable_extensions; do
23563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23564    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23566    break 2
23567  fi
23568done
23569  done
23570IFS=$as_save_IFS
23571
23572  ;;
23573esac
23574fi
23575PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23576if test -n "$PKG_CONFIG"; then
23577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23578$as_echo "$PKG_CONFIG" >&6; }
23579else
23580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23581$as_echo "no" >&6; }
23582fi
23583
23584
23585fi
23586if test -z "$ac_cv_path_PKG_CONFIG"; then
23587  ac_pt_PKG_CONFIG=$PKG_CONFIG
23588  # Extract the first word of "pkg-config", so it can be a program name with args.
23589set dummy pkg-config; ac_word=$2
23590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23591$as_echo_n "checking for $ac_word... " >&6; }
23592if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23593  $as_echo_n "(cached) " >&6
23594else
23595  case $ac_pt_PKG_CONFIG in
23596  [\\/]* | ?:[\\/]*)
23597  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23598  ;;
23599  *)
23600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23601for as_dir in $PATH
23602do
23603  IFS=$as_save_IFS
23604  test -z "$as_dir" && as_dir=.
23605    for ac_exec_ext in '' $ac_executable_extensions; do
23606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23607    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23609    break 2
23610  fi
23611done
23612  done
23613IFS=$as_save_IFS
23614
23615  ;;
23616esac
23617fi
23618ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23619if test -n "$ac_pt_PKG_CONFIG"; then
23620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23621$as_echo "$ac_pt_PKG_CONFIG" >&6; }
23622else
23623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23624$as_echo "no" >&6; }
23625fi
23626
23627  if test "x$ac_pt_PKG_CONFIG" = x; then
23628    PKG_CONFIG=""
23629  else
23630    case $cross_compiling:$ac_tool_warned in
23631yes:)
23632{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23633$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23634ac_tool_warned=yes ;;
23635esac
23636    PKG_CONFIG=$ac_pt_PKG_CONFIG
23637  fi
23638else
23639  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23640fi
23641
23642fi
23643if test -n "$PKG_CONFIG"; then
23644	_pkg_min_version=0.9.0
23645	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23646$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23647	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23648		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23649$as_echo "yes" >&6; }
23650	else
23651		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23652$as_echo "no" >&6; }
23653		PKG_CONFIG=""
23654	fi
23655
23656fi
23657
23658# After basic tools have been setup, we can check build os specific details.
23659
23660  ###############################################################################
23661
23662  # Note that this is the build platform OS version!
23663
23664  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23665  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23666  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23667  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23668
23669
23670
23671
23672
23673# Misc basic settings
23674
23675
23676# Check whether --with-default-make-target was given.
23677if test "${with_default_make_target+set}" = set; then :
23678  withval=$with_default_make_target;
23679fi
23680
23681  if test "x$with_default_make_target" = "x" \
23682      || test "x$with_default_make_target" = "xyes"; then
23683    DEFAULT_MAKE_TARGET="exploded-image"
23684  elif test "x$with_default_make_target" = "xno"; then
23685    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23686  else
23687    DEFAULT_MAKE_TARGET="$with_default_make_target"
23688  fi
23689
23690
23691
23692
23693###############################################################################
23694#
23695# Determine OpenJDK variants, options and version numbers.
23696#
23697###############################################################################
23698
23699# We need build & target for this.
23700
23701  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23702  # We always build headless support.
23703  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23704$as_echo_n "checking headful support... " >&6; }
23705  # Check whether --enable-headful was given.
23706if test "${enable_headful+set}" = set; then :
23707  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23708else
23709  SUPPORT_HEADFUL=yes
23710fi
23711
23712
23713  SUPPORT_HEADLESS=yes
23714  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23715
23716  if test "x$SUPPORT_HEADFUL" = xyes; then
23717    # We are building both headful and headless.
23718    headful_msg="include support for both headful and headless"
23719  fi
23720
23721  if test "x$SUPPORT_HEADFUL" = xno; then
23722    # Thus we are building headless only.
23723    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23724    headful_msg="headless only"
23725  fi
23726
23727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23728$as_echo "$headful_msg" >&6; }
23729
23730
23731
23732
23733
23734  # Choose cacerts source file
23735
23736# Check whether --with-cacerts-file was given.
23737if test "${with_cacerts_file+set}" = set; then :
23738  withval=$with_cacerts_file;
23739fi
23740
23741  if test "x$with_cacerts_file" != x; then
23742    CACERTS_FILE=$with_cacerts_file
23743  fi
23744
23745
23746  # Enable or disable unlimited crypto
23747  # Check whether --enable-unlimited-crypto was given.
23748if test "${enable_unlimited_crypto+set}" = set; then :
23749  enableval=$enable_unlimited_crypto;
23750else
23751  enable_unlimited_crypto=no
23752fi
23753
23754  if test "x$enable_unlimited_crypto" = "xyes"; then
23755    UNLIMITED_CRYPTO=true
23756  else
23757    UNLIMITED_CRYPTO=false
23758  fi
23759
23760
23761  # Should we build the serviceability agent (SA)?
23762  INCLUDE_SA=true
23763  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
23764    INCLUDE_SA=false
23765  fi
23766  if test "x$OPENJDK_TARGET_OS" = xaix ; then
23767    INCLUDE_SA=false
23768  fi
23769
23770
23771  # Compress jars
23772  COMPRESS_JARS=false
23773
23774
23775
23776  # Setup default copyright year. Mostly overridden when building close to a new year.
23777
23778# Check whether --with-copyright-year was given.
23779if test "${with_copyright_year+set}" = set; then :
23780  withval=$with_copyright_year;
23781fi
23782
23783  if test "x$with_copyright_year" = xyes; then
23784    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23785  elif test "x$with_copyright_year" != x; then
23786    COPYRIGHT_YEAR="$with_copyright_year"
23787  else
23788    COPYRIGHT_YEAR=`date +'%Y'`
23789  fi
23790
23791
23792
23793  # Check whether --enable-keep-packaged-modules was given.
23794if test "${enable_keep_packaged_modules+set}" = set; then :
23795  enableval=$enable_keep_packaged_modules;
23796fi
23797
23798
23799  if test "x$enable_keep_packaged_modules" = "xyes"; then
23800    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23801$as_echo_n "checking if packaged modules are kept... " >&6; }
23802    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23803$as_echo "yes" >&6; }
23804    JLINK_KEEP_PACKAGED_MODULES=true
23805  elif test "x$enable_keep_packaged_modules" = "xno"; then
23806    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23807$as_echo_n "checking if packaged modules are kept... " >&6; }
23808    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23809$as_echo "no" >&6; }
23810    JLINK_KEEP_PACKAGED_MODULES=false
23811  elif test "x$enable_keep_packaged_modules" = "x"; then
23812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
23813$as_echo "yes (default)" >&6; }
23814    JLINK_KEEP_PACKAGED_MODULES=true
23815  else
23816    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
23817  fi
23818
23819
23820
23821
23822  # Warn user that old version arguments are deprecated.
23823
23824
23825# Check whether --with-milestone was given.
23826if test "${with_milestone+set}" = set; then :
23827  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23828$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23829fi
23830
23831
23832
23833
23834# Check whether --with-update-version was given.
23835if test "${with_update_version+set}" = set; then :
23836  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23837$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23838fi
23839
23840
23841
23842
23843# Check whether --with-user-release-suffix was given.
23844if test "${with_user_release_suffix+set}" = set; then :
23845  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
23846$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23847fi
23848
23849
23850
23851
23852# Check whether --with-build-number was given.
23853if test "${with_build_number+set}" = set; then :
23854  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23855$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23856fi
23857
23858
23859
23860  # Source the version numbers file
23861  . $AUTOCONF_DIR/version-numbers
23862
23863  # Some non-version number information is set in that file
23864
23865
23866
23867
23868
23869
23870
23871
23872
23873  # Override version from arguments
23874
23875  # If --with-version-string is set, process it first. It is possible to
23876  # override parts with more specific flags, since these are processed later.
23877
23878# Check whether --with-version-string was given.
23879if test "${with_version_string+set}" = set; then :
23880  withval=$with_version_string;
23881fi
23882
23883  if test "x$with_version_string" = xyes; then
23884    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23885  elif test "x$with_version_string" != x; then
23886    # Additional [] needed to keep m4 from mangling shell constructs.
23887    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23888      VERSION_MAJOR=${BASH_REMATCH[1]}
23889      VERSION_MINOR=${BASH_REMATCH[3]}
23890      VERSION_SECURITY=${BASH_REMATCH[5]}
23891      VERSION_PATCH=${BASH_REMATCH[7]}
23892      VERSION_PRE=${BASH_REMATCH[9]}
23893      version_plus_separator=${BASH_REMATCH[11]}
23894      VERSION_BUILD=${BASH_REMATCH[12]}
23895      VERSION_OPT=${BASH_REMATCH[14]}
23896      # Unspecified numerical fields are interpreted as 0.
23897      if test "x$VERSION_MINOR" = x; then
23898        VERSION_MINOR=0
23899      fi
23900      if test "x$VERSION_SECURITY" = x; then
23901        VERSION_SECURITY=0
23902      fi
23903      if test "x$VERSION_PATCH" = x; then
23904        VERSION_PATCH=0
23905      fi
23906      if test "x$version_plus_separator" != x \
23907          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23908        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23909      fi
23910      # Stop the version part process from setting default values.
23911      # We still allow them to explicitely override though.
23912      NO_DEFAULT_VERSION_PARTS=true
23913    else
23914      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23915    fi
23916  fi
23917
23918
23919# Check whether --with-version-pre was given.
23920if test "${with_version_pre+set}" = set; then :
23921  withval=$with_version_pre; with_version_pre_present=true
23922else
23923  with_version_pre_present=false
23924fi
23925
23926
23927  if test "x$with_version_pre_present" = xtrue; then
23928    if test "x$with_version_pre" = xyes; then
23929      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23930    elif test "x$with_version_pre" = xno; then
23931      # Interpret --without-* as empty string instead of the literal "no"
23932      VERSION_PRE=
23933    else
23934      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23935       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23936      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23937        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23938$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23939      fi
23940    fi
23941  else
23942    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23943      # Default is to use "internal" as pre
23944      VERSION_PRE="internal"
23945    fi
23946  fi
23947
23948
23949# Check whether --with-version-opt was given.
23950if test "${with_version_opt+set}" = set; then :
23951  withval=$with_version_opt; with_version_opt_present=true
23952else
23953  with_version_opt_present=false
23954fi
23955
23956
23957  if test "x$with_version_opt_present" = xtrue; then
23958    if test "x$with_version_opt" = xyes; then
23959      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23960    elif test "x$with_version_opt" = xno; then
23961      # Interpret --without-* as empty string instead of the literal "no"
23962      VERSION_OPT=
23963    else
23964      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23965       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23966      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23967        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23968$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23969      fi
23970    fi
23971  else
23972    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23973      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23974      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23975      # Outer [ ] to quote m4.
23976       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23977      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
23978    fi
23979  fi
23980
23981
23982# Check whether --with-version-build was given.
23983if test "${with_version_build+set}" = set; then :
23984  withval=$with_version_build; with_version_build_present=true
23985else
23986  with_version_build_present=false
23987fi
23988
23989
23990  if test "x$with_version_build_present" = xtrue; then
23991    if test "x$with_version_build" = xyes; then
23992      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23993    elif test "x$with_version_build" = xno; then
23994      # Interpret --without-* as empty string instead of the literal "no"
23995      VERSION_BUILD=
23996    elif test "x$with_version_build" = x; then
23997      VERSION_BUILD=
23998    else
23999
24000  # Additional [] needed to keep m4 from mangling shell constructs.
24001  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24002    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24003  fi
24004  # Extract the version number without leading zeros.
24005  cleaned_value=${BASH_REMATCH[1]}
24006  if test "x$cleaned_value" = x; then
24007    # Special case for zero
24008    cleaned_value=${BASH_REMATCH[2]}
24009  fi
24010
24011  if test $cleaned_value -gt 255; then
24012    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24013  fi
24014  if test "x$cleaned_value" != "x$with_version_build"; then
24015    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24016$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24017  fi
24018  VERSION_BUILD=$cleaned_value
24019
24020    fi
24021  else
24022    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24023      # Default is to not have a build number.
24024      VERSION_BUILD=""
24025      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24026      VERSION_BUILD=0
24027    fi
24028  fi
24029
24030
24031# Check whether --with-version-major was given.
24032if test "${with_version_major+set}" = set; then :
24033  withval=$with_version_major; with_version_major_present=true
24034else
24035  with_version_major_present=false
24036fi
24037
24038
24039  if test "x$with_version_major_present" = xtrue; then
24040    if test "x$with_version_major" = xyes; then
24041      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24042    else
24043
24044  # Additional [] needed to keep m4 from mangling shell constructs.
24045  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24046    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24047  fi
24048  # Extract the version number without leading zeros.
24049  cleaned_value=${BASH_REMATCH[1]}
24050  if test "x$cleaned_value" = x; then
24051    # Special case for zero
24052    cleaned_value=${BASH_REMATCH[2]}
24053  fi
24054
24055  if test $cleaned_value -gt 255; then
24056    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24057  fi
24058  if test "x$cleaned_value" != "x$with_version_major"; then
24059    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24060$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24061  fi
24062  VERSION_MAJOR=$cleaned_value
24063
24064    fi
24065  else
24066    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24067      # Default is to get value from version-numbers
24068      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24069    fi
24070  fi
24071
24072
24073# Check whether --with-version-minor was given.
24074if test "${with_version_minor+set}" = set; then :
24075  withval=$with_version_minor; with_version_minor_present=true
24076else
24077  with_version_minor_present=false
24078fi
24079
24080
24081  if test "x$with_version_minor_present" = xtrue; then
24082    if test "x$with_version_minor" = xyes; then
24083      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24084    elif test "x$with_version_minor" = xno; then
24085      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24086      VERSION_MINOR=0
24087    elif test "x$with_version_minor" = x; then
24088      VERSION_MINOR=0
24089    else
24090
24091  # Additional [] needed to keep m4 from mangling shell constructs.
24092  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24093    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24094  fi
24095  # Extract the version number without leading zeros.
24096  cleaned_value=${BASH_REMATCH[1]}
24097  if test "x$cleaned_value" = x; then
24098    # Special case for zero
24099    cleaned_value=${BASH_REMATCH[2]}
24100  fi
24101
24102  if test $cleaned_value -gt 255; then
24103    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24104  fi
24105  if test "x$cleaned_value" != "x$with_version_minor"; then
24106    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24107$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24108  fi
24109  VERSION_MINOR=$cleaned_value
24110
24111    fi
24112  else
24113    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24114      # Default is 0, if unspecified
24115      VERSION_MINOR=0
24116    fi
24117  fi
24118
24119
24120# Check whether --with-version-security was given.
24121if test "${with_version_security+set}" = set; then :
24122  withval=$with_version_security; with_version_security_present=true
24123else
24124  with_version_security_present=false
24125fi
24126
24127
24128  if test "x$with_version_security_present" = xtrue; then
24129    if test "x$with_version_security" = xyes; then
24130      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24131    elif test "x$with_version_security" = xno; then
24132      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24133      VERSION_SECURITY=0
24134    elif test "x$with_version_security" = x; then
24135      VERSION_SECURITY=0
24136    else
24137
24138  # Additional [] needed to keep m4 from mangling shell constructs.
24139  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24140    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24141  fi
24142  # Extract the version number without leading zeros.
24143  cleaned_value=${BASH_REMATCH[1]}
24144  if test "x$cleaned_value" = x; then
24145    # Special case for zero
24146    cleaned_value=${BASH_REMATCH[2]}
24147  fi
24148
24149  if test $cleaned_value -gt 255; then
24150    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24151  fi
24152  if test "x$cleaned_value" != "x$with_version_security"; then
24153    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24154$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24155  fi
24156  VERSION_SECURITY=$cleaned_value
24157
24158    fi
24159  else
24160    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24161      # Default is 0, if unspecified
24162      VERSION_SECURITY=0
24163    fi
24164  fi
24165
24166
24167# Check whether --with-version-patch was given.
24168if test "${with_version_patch+set}" = set; then :
24169  withval=$with_version_patch; with_version_patch_present=true
24170else
24171  with_version_patch_present=false
24172fi
24173
24174
24175  if test "x$with_version_patch_present" = xtrue; then
24176    if test "x$with_version_patch" = xyes; then
24177      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24178    elif test "x$with_version_patch" = xno; then
24179      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24180      VERSION_PATCH=0
24181    elif test "x$with_version_patch" = x; then
24182      VERSION_PATCH=0
24183    else
24184
24185  # Additional [] needed to keep m4 from mangling shell constructs.
24186  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24187    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24188  fi
24189  # Extract the version number without leading zeros.
24190  cleaned_value=${BASH_REMATCH[1]}
24191  if test "x$cleaned_value" = x; then
24192    # Special case for zero
24193    cleaned_value=${BASH_REMATCH[2]}
24194  fi
24195
24196  if test $cleaned_value -gt 255; then
24197    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24198  fi
24199  if test "x$cleaned_value" != "x$with_version_patch"; then
24200    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24201$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24202  fi
24203  VERSION_PATCH=$cleaned_value
24204
24205    fi
24206  else
24207    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24208      # Default is 0, if unspecified
24209      VERSION_PATCH=0
24210    fi
24211  fi
24212
24213  # Calculate derived version properties
24214
24215  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24216  if test "x$VERSION_PRE" = x; then
24217    VERSION_IS_GA=true
24218  else
24219    VERSION_IS_GA=false
24220  fi
24221
24222  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24223  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24224
24225  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24226  # Strip trailing zeroes from stripped_version_number
24227  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24228  VERSION_NUMBER=$stripped_version_number
24229
24230  # The complete version string, with additional build information
24231  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24232    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24233  else
24234    # If either build or opt is set, we need a + separator
24235    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24236  fi
24237
24238  # The short version string, just VERSION_NUMBER and PRE, if present.
24239  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24240
24241  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24242$as_echo_n "checking for version string... " >&6; }
24243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24244$as_echo "$VERSION_STRING" >&6; }
24245
24246
24247
24248
24249
24250
24251
24252
24253
24254
24255
24256
24257
24258
24259
24260###############################################################################
24261#
24262# Setup BootJDK, used to bootstrap the build.
24263#
24264###############################################################################
24265
24266
24267  BOOT_JDK_FOUND=no
24268
24269# Check whether --with-boot-jdk was given.
24270if test "${with_boot_jdk+set}" = set; then :
24271  withval=$with_boot_jdk;
24272fi
24273
24274
24275  # We look for the Boot JDK through various means, going from more certain to
24276  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24277  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24278  # must check if this is indeed valid; otherwise we'll continue looking.
24279
24280  # Test: Is bootjdk explicitely set by command line arguments?
24281
24282  if test "x$BOOT_JDK_FOUND" = xno; then
24283    # Now execute the test
24284
24285  if test "x$with_boot_jdk" != x; then
24286    BOOT_JDK=$with_boot_jdk
24287    BOOT_JDK_FOUND=maybe
24288    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24289$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24290  fi
24291
24292
24293    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24294    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24295      # Do we have a bin/java?
24296      if test ! -x "$BOOT_JDK/bin/java"; then
24297        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24298$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24299        BOOT_JDK_FOUND=no
24300      else
24301        # Do we have a bin/javac?
24302        if test ! -x "$BOOT_JDK/bin/javac"; then
24303          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24304$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24305          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24306$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24307          BOOT_JDK_FOUND=no
24308        else
24309          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24310          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24311
24312          # Extra M4 quote needed to protect [] in grep expression.
24313          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24314          if test "x$FOUND_CORRECT_VERSION" = x; then
24315            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24316$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24317            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24318$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24319            BOOT_JDK_FOUND=no
24320          else
24321            # We're done! :-)
24322            BOOT_JDK_FOUND=yes
24323
24324  # Only process if variable expands to non-empty
24325
24326  if test "x$BOOT_JDK" != x; then
24327    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24328
24329  # Input might be given as Windows format, start by converting to
24330  # unix format.
24331  path="$BOOT_JDK"
24332  new_path=`$CYGPATH -u "$path"`
24333
24334  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24335  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24336  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24337  # "foo.exe" is OK but "foo" is an error.
24338  #
24339  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24340  # It is also a way to make sure we got the proper file name for the real test later on.
24341  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24342  if test "x$test_shortpath" = x; then
24343    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24344$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24345    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24346  fi
24347
24348  # Call helper function which possibly converts this using DOS-style short mode.
24349  # If so, the updated path is stored in $new_path.
24350
24351  input_path="$new_path"
24352  # Check if we need to convert this using DOS-style short mode. If the path
24353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24354  # take no chances and rewrite it.
24355  # Note: m4 eats our [], so we need to use [ and ] instead.
24356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24357  if test "x$has_forbidden_chars" != x; then
24358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24359    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24360    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24361    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24362      # Going to short mode and back again did indeed matter. Since short mode is
24363      # case insensitive, let's make it lowercase to improve readability.
24364      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24365      # Now convert it back to Unix-style (cygpath)
24366      input_path=`$CYGPATH -u "$shortmode_path"`
24367      new_path="$input_path"
24368    fi
24369  fi
24370
24371  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24372  if test "x$test_cygdrive_prefix" = x; then
24373    # As a simple fix, exclude /usr/bin since it's not a real path.
24374    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24375      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24376      # a path prefixed by /cygdrive for fixpath to work.
24377      new_path="$CYGWIN_ROOT_PATH$input_path"
24378    fi
24379  fi
24380
24381
24382  if test "x$path" != "x$new_path"; then
24383    BOOT_JDK="$new_path"
24384    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24385$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24386  fi
24387
24388    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24389
24390  path="$BOOT_JDK"
24391  has_colon=`$ECHO $path | $GREP ^.:`
24392  new_path="$path"
24393  if test "x$has_colon" = x; then
24394    # Not in mixed or Windows style, start by that.
24395    new_path=`cmd //c echo $path`
24396  fi
24397
24398
24399  input_path="$new_path"
24400  # Check if we need to convert this using DOS-style short mode. If the path
24401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24402  # take no chances and rewrite it.
24403  # Note: m4 eats our [], so we need to use [ and ] instead.
24404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24405  if test "x$has_forbidden_chars" != x; then
24406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24407    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24408  fi
24409
24410
24411  windows_path="$new_path"
24412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24413    unix_path=`$CYGPATH -u "$windows_path"`
24414    new_path="$unix_path"
24415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24417    new_path="$unix_path"
24418  fi
24419
24420  if test "x$path" != "x$new_path"; then
24421    BOOT_JDK="$new_path"
24422    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24423$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24424  fi
24425
24426  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24427  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24428
24429    else
24430      # We're on a unix platform. Hooray! :)
24431      path="$BOOT_JDK"
24432      has_space=`$ECHO "$path" | $GREP " "`
24433      if test "x$has_space" != x; then
24434        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24435$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24436        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24437      fi
24438
24439      # Use eval to expand a potential ~
24440      eval path="$path"
24441      if test ! -f "$path" && test ! -d "$path"; then
24442        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24443      fi
24444
24445      if test -d "$path"; then
24446        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24447      else
24448        dir="`$DIRNAME "$path"`"
24449        base="`$BASENAME "$path"`"
24450        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24451      fi
24452    fi
24453  fi
24454
24455            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24456$as_echo_n "checking for Boot JDK... " >&6; }
24457            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24458$as_echo "$BOOT_JDK" >&6; }
24459            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24460$as_echo_n "checking Boot JDK version... " >&6; }
24461            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24462            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24463$as_echo "$BOOT_JDK_VERSION" >&6; }
24464          fi # end check jdk version
24465        fi # end check javac
24466      fi # end check java
24467    fi # end check boot jdk found
24468  fi
24469
24470  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24471    # Having specified an argument which is incorrect will produce an instant failure;
24472    # we should not go on looking
24473    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24474  fi
24475
24476  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24477
24478  if test "x$BOOT_JDK_FOUND" = xno; then
24479    # Now execute the test
24480
24481  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24482    # First check at user selected default
24483
24484  if test "x$BOOT_JDK_FOUND" = xno; then
24485    # Now execute the test
24486
24487  if test -x /usr/libexec/java_home; then
24488    BOOT_JDK=`/usr/libexec/java_home `
24489    BOOT_JDK_FOUND=maybe
24490    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24491$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24492  fi
24493
24494
24495    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24496    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24497      # Do we have a bin/java?
24498      if test ! -x "$BOOT_JDK/bin/java"; then
24499        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24500$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24501        BOOT_JDK_FOUND=no
24502      else
24503        # Do we have a bin/javac?
24504        if test ! -x "$BOOT_JDK/bin/javac"; then
24505          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24506$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24507          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24508$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24509          BOOT_JDK_FOUND=no
24510        else
24511          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24512          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24513
24514          # Extra M4 quote needed to protect [] in grep expression.
24515          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24516          if test "x$FOUND_CORRECT_VERSION" = x; then
24517            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24518$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24519            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24520$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24521            BOOT_JDK_FOUND=no
24522          else
24523            # We're done! :-)
24524            BOOT_JDK_FOUND=yes
24525
24526  # Only process if variable expands to non-empty
24527
24528  if test "x$BOOT_JDK" != x; then
24529    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24530
24531  # Input might be given as Windows format, start by converting to
24532  # unix format.
24533  path="$BOOT_JDK"
24534  new_path=`$CYGPATH -u "$path"`
24535
24536  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24537  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24538  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24539  # "foo.exe" is OK but "foo" is an error.
24540  #
24541  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24542  # It is also a way to make sure we got the proper file name for the real test later on.
24543  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24544  if test "x$test_shortpath" = x; then
24545    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24546$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24547    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24548  fi
24549
24550  # Call helper function which possibly converts this using DOS-style short mode.
24551  # If so, the updated path is stored in $new_path.
24552
24553  input_path="$new_path"
24554  # Check if we need to convert this using DOS-style short mode. If the path
24555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24556  # take no chances and rewrite it.
24557  # Note: m4 eats our [], so we need to use [ and ] instead.
24558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24559  if test "x$has_forbidden_chars" != x; then
24560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24561    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24562    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24563    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24564      # Going to short mode and back again did indeed matter. Since short mode is
24565      # case insensitive, let's make it lowercase to improve readability.
24566      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24567      # Now convert it back to Unix-style (cygpath)
24568      input_path=`$CYGPATH -u "$shortmode_path"`
24569      new_path="$input_path"
24570    fi
24571  fi
24572
24573  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24574  if test "x$test_cygdrive_prefix" = x; then
24575    # As a simple fix, exclude /usr/bin since it's not a real path.
24576    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24577      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24578      # a path prefixed by /cygdrive for fixpath to work.
24579      new_path="$CYGWIN_ROOT_PATH$input_path"
24580    fi
24581  fi
24582
24583
24584  if test "x$path" != "x$new_path"; then
24585    BOOT_JDK="$new_path"
24586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24587$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24588  fi
24589
24590    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24591
24592  path="$BOOT_JDK"
24593  has_colon=`$ECHO $path | $GREP ^.:`
24594  new_path="$path"
24595  if test "x$has_colon" = x; then
24596    # Not in mixed or Windows style, start by that.
24597    new_path=`cmd //c echo $path`
24598  fi
24599
24600
24601  input_path="$new_path"
24602  # Check if we need to convert this using DOS-style short mode. If the path
24603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24604  # take no chances and rewrite it.
24605  # Note: m4 eats our [], so we need to use [ and ] instead.
24606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24607  if test "x$has_forbidden_chars" != x; then
24608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24609    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24610  fi
24611
24612
24613  windows_path="$new_path"
24614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24615    unix_path=`$CYGPATH -u "$windows_path"`
24616    new_path="$unix_path"
24617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24619    new_path="$unix_path"
24620  fi
24621
24622  if test "x$path" != "x$new_path"; then
24623    BOOT_JDK="$new_path"
24624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24625$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24626  fi
24627
24628  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24629  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24630
24631    else
24632      # We're on a unix platform. Hooray! :)
24633      path="$BOOT_JDK"
24634      has_space=`$ECHO "$path" | $GREP " "`
24635      if test "x$has_space" != x; then
24636        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24637$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24638        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24639      fi
24640
24641      # Use eval to expand a potential ~
24642      eval path="$path"
24643      if test ! -f "$path" && test ! -d "$path"; then
24644        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24645      fi
24646
24647      if test -d "$path"; then
24648        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24649      else
24650        dir="`$DIRNAME "$path"`"
24651        base="`$BASENAME "$path"`"
24652        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24653      fi
24654    fi
24655  fi
24656
24657            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24658$as_echo_n "checking for Boot JDK... " >&6; }
24659            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24660$as_echo "$BOOT_JDK" >&6; }
24661            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24662$as_echo_n "checking Boot JDK version... " >&6; }
24663            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24664            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24665$as_echo "$BOOT_JDK_VERSION" >&6; }
24666          fi # end check jdk version
24667        fi # end check javac
24668      fi # end check java
24669    fi # end check boot jdk found
24670  fi
24671
24672    # If that did not work out (e.g. too old), try explicit versions instead
24673
24674  if test "x$BOOT_JDK_FOUND" = xno; then
24675    # Now execute the test
24676
24677  if test -x /usr/libexec/java_home; then
24678    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24679    BOOT_JDK_FOUND=maybe
24680    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24681$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24682  fi
24683
24684
24685    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24686    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24687      # Do we have a bin/java?
24688      if test ! -x "$BOOT_JDK/bin/java"; then
24689        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24690$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24691        BOOT_JDK_FOUND=no
24692      else
24693        # Do we have a bin/javac?
24694        if test ! -x "$BOOT_JDK/bin/javac"; then
24695          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24696$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24697          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24698$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24699          BOOT_JDK_FOUND=no
24700        else
24701          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24702          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24703
24704          # Extra M4 quote needed to protect [] in grep expression.
24705          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24706          if test "x$FOUND_CORRECT_VERSION" = x; then
24707            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24708$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24709            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24710$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24711            BOOT_JDK_FOUND=no
24712          else
24713            # We're done! :-)
24714            BOOT_JDK_FOUND=yes
24715
24716  # Only process if variable expands to non-empty
24717
24718  if test "x$BOOT_JDK" != x; then
24719    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24720
24721  # Input might be given as Windows format, start by converting to
24722  # unix format.
24723  path="$BOOT_JDK"
24724  new_path=`$CYGPATH -u "$path"`
24725
24726  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24727  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24728  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24729  # "foo.exe" is OK but "foo" is an error.
24730  #
24731  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24732  # It is also a way to make sure we got the proper file name for the real test later on.
24733  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24734  if test "x$test_shortpath" = x; then
24735    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24736$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24737    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24738  fi
24739
24740  # Call helper function which possibly converts this using DOS-style short mode.
24741  # If so, the updated path is stored in $new_path.
24742
24743  input_path="$new_path"
24744  # Check if we need to convert this using DOS-style short mode. If the path
24745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24746  # take no chances and rewrite it.
24747  # Note: m4 eats our [], so we need to use [ and ] instead.
24748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24749  if test "x$has_forbidden_chars" != x; then
24750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24751    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24752    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24753    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24754      # Going to short mode and back again did indeed matter. Since short mode is
24755      # case insensitive, let's make it lowercase to improve readability.
24756      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24757      # Now convert it back to Unix-style (cygpath)
24758      input_path=`$CYGPATH -u "$shortmode_path"`
24759      new_path="$input_path"
24760    fi
24761  fi
24762
24763  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24764  if test "x$test_cygdrive_prefix" = x; then
24765    # As a simple fix, exclude /usr/bin since it's not a real path.
24766    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24767      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24768      # a path prefixed by /cygdrive for fixpath to work.
24769      new_path="$CYGWIN_ROOT_PATH$input_path"
24770    fi
24771  fi
24772
24773
24774  if test "x$path" != "x$new_path"; then
24775    BOOT_JDK="$new_path"
24776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24777$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24778  fi
24779
24780    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24781
24782  path="$BOOT_JDK"
24783  has_colon=`$ECHO $path | $GREP ^.:`
24784  new_path="$path"
24785  if test "x$has_colon" = x; then
24786    # Not in mixed or Windows style, start by that.
24787    new_path=`cmd //c echo $path`
24788  fi
24789
24790
24791  input_path="$new_path"
24792  # Check if we need to convert this using DOS-style short mode. If the path
24793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24794  # take no chances and rewrite it.
24795  # Note: m4 eats our [], so we need to use [ and ] instead.
24796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24797  if test "x$has_forbidden_chars" != x; then
24798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24799    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24800  fi
24801
24802
24803  windows_path="$new_path"
24804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24805    unix_path=`$CYGPATH -u "$windows_path"`
24806    new_path="$unix_path"
24807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24809    new_path="$unix_path"
24810  fi
24811
24812  if test "x$path" != "x$new_path"; then
24813    BOOT_JDK="$new_path"
24814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24815$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24816  fi
24817
24818  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24819  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24820
24821    else
24822      # We're on a unix platform. Hooray! :)
24823      path="$BOOT_JDK"
24824      has_space=`$ECHO "$path" | $GREP " "`
24825      if test "x$has_space" != x; then
24826        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24827$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24828        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24829      fi
24830
24831      # Use eval to expand a potential ~
24832      eval path="$path"
24833      if test ! -f "$path" && test ! -d "$path"; then
24834        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24835      fi
24836
24837      if test -d "$path"; then
24838        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24839      else
24840        dir="`$DIRNAME "$path"`"
24841        base="`$BASENAME "$path"`"
24842        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24843      fi
24844    fi
24845  fi
24846
24847            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24848$as_echo_n "checking for Boot JDK... " >&6; }
24849            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24850$as_echo "$BOOT_JDK" >&6; }
24851            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24852$as_echo_n "checking Boot JDK version... " >&6; }
24853            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24854            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24855$as_echo "$BOOT_JDK_VERSION" >&6; }
24856          fi # end check jdk version
24857        fi # end check javac
24858      fi # end check java
24859    fi # end check boot jdk found
24860  fi
24861
24862
24863  if test "x$BOOT_JDK_FOUND" = xno; then
24864    # Now execute the test
24865
24866  if test -x /usr/libexec/java_home; then
24867    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24868    BOOT_JDK_FOUND=maybe
24869    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24870$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24871  fi
24872
24873
24874    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24875    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24876      # Do we have a bin/java?
24877      if test ! -x "$BOOT_JDK/bin/java"; then
24878        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24879$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24880        BOOT_JDK_FOUND=no
24881      else
24882        # Do we have a bin/javac?
24883        if test ! -x "$BOOT_JDK/bin/javac"; then
24884          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24885$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24886          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24887$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24888          BOOT_JDK_FOUND=no
24889        else
24890          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24891          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24892
24893          # Extra M4 quote needed to protect [] in grep expression.
24894          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24895          if test "x$FOUND_CORRECT_VERSION" = x; then
24896            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24897$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24898            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24899$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24900            BOOT_JDK_FOUND=no
24901          else
24902            # We're done! :-)
24903            BOOT_JDK_FOUND=yes
24904
24905  # Only process if variable expands to non-empty
24906
24907  if test "x$BOOT_JDK" != x; then
24908    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24909
24910  # Input might be given as Windows format, start by converting to
24911  # unix format.
24912  path="$BOOT_JDK"
24913  new_path=`$CYGPATH -u "$path"`
24914
24915  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24916  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24917  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24918  # "foo.exe" is OK but "foo" is an error.
24919  #
24920  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24921  # It is also a way to make sure we got the proper file name for the real test later on.
24922  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24923  if test "x$test_shortpath" = x; then
24924    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24925$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24926    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24927  fi
24928
24929  # Call helper function which possibly converts this using DOS-style short mode.
24930  # If so, the updated path is stored in $new_path.
24931
24932  input_path="$new_path"
24933  # Check if we need to convert this using DOS-style short mode. If the path
24934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24935  # take no chances and rewrite it.
24936  # Note: m4 eats our [], so we need to use [ and ] instead.
24937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24938  if test "x$has_forbidden_chars" != x; then
24939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24940    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24941    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24942    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24943      # Going to short mode and back again did indeed matter. Since short mode is
24944      # case insensitive, let's make it lowercase to improve readability.
24945      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24946      # Now convert it back to Unix-style (cygpath)
24947      input_path=`$CYGPATH -u "$shortmode_path"`
24948      new_path="$input_path"
24949    fi
24950  fi
24951
24952  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24953  if test "x$test_cygdrive_prefix" = x; then
24954    # As a simple fix, exclude /usr/bin since it's not a real path.
24955    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24956      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24957      # a path prefixed by /cygdrive for fixpath to work.
24958      new_path="$CYGWIN_ROOT_PATH$input_path"
24959    fi
24960  fi
24961
24962
24963  if test "x$path" != "x$new_path"; then
24964    BOOT_JDK="$new_path"
24965    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24966$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24967  fi
24968
24969    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24970
24971  path="$BOOT_JDK"
24972  has_colon=`$ECHO $path | $GREP ^.:`
24973  new_path="$path"
24974  if test "x$has_colon" = x; then
24975    # Not in mixed or Windows style, start by that.
24976    new_path=`cmd //c echo $path`
24977  fi
24978
24979
24980  input_path="$new_path"
24981  # Check if we need to convert this using DOS-style short mode. If the path
24982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24983  # take no chances and rewrite it.
24984  # Note: m4 eats our [], so we need to use [ and ] instead.
24985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24986  if test "x$has_forbidden_chars" != x; then
24987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24988    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24989  fi
24990
24991
24992  windows_path="$new_path"
24993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24994    unix_path=`$CYGPATH -u "$windows_path"`
24995    new_path="$unix_path"
24996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24998    new_path="$unix_path"
24999  fi
25000
25001  if test "x$path" != "x$new_path"; then
25002    BOOT_JDK="$new_path"
25003    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25004$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25005  fi
25006
25007  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25008  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25009
25010    else
25011      # We're on a unix platform. Hooray! :)
25012      path="$BOOT_JDK"
25013      has_space=`$ECHO "$path" | $GREP " "`
25014      if test "x$has_space" != x; then
25015        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25016$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25017        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25018      fi
25019
25020      # Use eval to expand a potential ~
25021      eval path="$path"
25022      if test ! -f "$path" && test ! -d "$path"; then
25023        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25024      fi
25025
25026      if test -d "$path"; then
25027        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25028      else
25029        dir="`$DIRNAME "$path"`"
25030        base="`$BASENAME "$path"`"
25031        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25032      fi
25033    fi
25034  fi
25035
25036            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25037$as_echo_n "checking for Boot JDK... " >&6; }
25038            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25039$as_echo "$BOOT_JDK" >&6; }
25040            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25041$as_echo_n "checking Boot JDK version... " >&6; }
25042            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25043            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25044$as_echo "$BOOT_JDK_VERSION" >&6; }
25045          fi # end check jdk version
25046        fi # end check javac
25047      fi # end check java
25048    fi # end check boot jdk found
25049  fi
25050
25051
25052  if test "x$BOOT_JDK_FOUND" = xno; then
25053    # Now execute the test
25054
25055  if test -x /usr/libexec/java_home; then
25056    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25057    BOOT_JDK_FOUND=maybe
25058    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25059$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25060  fi
25061
25062
25063    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25064    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25065      # Do we have a bin/java?
25066      if test ! -x "$BOOT_JDK/bin/java"; then
25067        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25069        BOOT_JDK_FOUND=no
25070      else
25071        # Do we have a bin/javac?
25072        if test ! -x "$BOOT_JDK/bin/javac"; then
25073          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25074$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25075          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25076$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25077          BOOT_JDK_FOUND=no
25078        else
25079          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25080          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25081
25082          # Extra M4 quote needed to protect [] in grep expression.
25083          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25084          if test "x$FOUND_CORRECT_VERSION" = x; then
25085            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25086$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25087            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25088$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25089            BOOT_JDK_FOUND=no
25090          else
25091            # We're done! :-)
25092            BOOT_JDK_FOUND=yes
25093
25094  # Only process if variable expands to non-empty
25095
25096  if test "x$BOOT_JDK" != x; then
25097    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25098
25099  # Input might be given as Windows format, start by converting to
25100  # unix format.
25101  path="$BOOT_JDK"
25102  new_path=`$CYGPATH -u "$path"`
25103
25104  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25105  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25106  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25107  # "foo.exe" is OK but "foo" is an error.
25108  #
25109  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25110  # It is also a way to make sure we got the proper file name for the real test later on.
25111  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25112  if test "x$test_shortpath" = x; then
25113    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25114$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25115    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25116  fi
25117
25118  # Call helper function which possibly converts this using DOS-style short mode.
25119  # If so, the updated path is stored in $new_path.
25120
25121  input_path="$new_path"
25122  # Check if we need to convert this using DOS-style short mode. If the path
25123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25124  # take no chances and rewrite it.
25125  # Note: m4 eats our [], so we need to use [ and ] instead.
25126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25127  if test "x$has_forbidden_chars" != x; then
25128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25129    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25130    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25131    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25132      # Going to short mode and back again did indeed matter. Since short mode is
25133      # case insensitive, let's make it lowercase to improve readability.
25134      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25135      # Now convert it back to Unix-style (cygpath)
25136      input_path=`$CYGPATH -u "$shortmode_path"`
25137      new_path="$input_path"
25138    fi
25139  fi
25140
25141  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25142  if test "x$test_cygdrive_prefix" = x; then
25143    # As a simple fix, exclude /usr/bin since it's not a real path.
25144    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25145      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25146      # a path prefixed by /cygdrive for fixpath to work.
25147      new_path="$CYGWIN_ROOT_PATH$input_path"
25148    fi
25149  fi
25150
25151
25152  if test "x$path" != "x$new_path"; then
25153    BOOT_JDK="$new_path"
25154    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25155$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25156  fi
25157
25158    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25159
25160  path="$BOOT_JDK"
25161  has_colon=`$ECHO $path | $GREP ^.:`
25162  new_path="$path"
25163  if test "x$has_colon" = x; then
25164    # Not in mixed or Windows style, start by that.
25165    new_path=`cmd //c echo $path`
25166  fi
25167
25168
25169  input_path="$new_path"
25170  # Check if we need to convert this using DOS-style short mode. If the path
25171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25172  # take no chances and rewrite it.
25173  # Note: m4 eats our [], so we need to use [ and ] instead.
25174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25175  if test "x$has_forbidden_chars" != x; then
25176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25177    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25178  fi
25179
25180
25181  windows_path="$new_path"
25182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25183    unix_path=`$CYGPATH -u "$windows_path"`
25184    new_path="$unix_path"
25185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25187    new_path="$unix_path"
25188  fi
25189
25190  if test "x$path" != "x$new_path"; then
25191    BOOT_JDK="$new_path"
25192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25193$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25194  fi
25195
25196  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25197  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25198
25199    else
25200      # We're on a unix platform. Hooray! :)
25201      path="$BOOT_JDK"
25202      has_space=`$ECHO "$path" | $GREP " "`
25203      if test "x$has_space" != x; then
25204        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25205$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25206        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25207      fi
25208
25209      # Use eval to expand a potential ~
25210      eval path="$path"
25211      if test ! -f "$path" && test ! -d "$path"; then
25212        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25213      fi
25214
25215      if test -d "$path"; then
25216        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25217      else
25218        dir="`$DIRNAME "$path"`"
25219        base="`$BASENAME "$path"`"
25220        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25221      fi
25222    fi
25223  fi
25224
25225            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25226$as_echo_n "checking for Boot JDK... " >&6; }
25227            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25228$as_echo "$BOOT_JDK" >&6; }
25229            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25230$as_echo_n "checking Boot JDK version... " >&6; }
25231            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25232            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25233$as_echo "$BOOT_JDK_VERSION" >&6; }
25234          fi # end check jdk version
25235        fi # end check javac
25236      fi # end check java
25237    fi # end check boot jdk found
25238  fi
25239
25240  fi
25241
25242
25243    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25244    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25245      # Do we have a bin/java?
25246      if test ! -x "$BOOT_JDK/bin/java"; then
25247        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25248$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25249        BOOT_JDK_FOUND=no
25250      else
25251        # Do we have a bin/javac?
25252        if test ! -x "$BOOT_JDK/bin/javac"; then
25253          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25254$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25255          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25256$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25257          BOOT_JDK_FOUND=no
25258        else
25259          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25260          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25261
25262          # Extra M4 quote needed to protect [] in grep expression.
25263          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25264          if test "x$FOUND_CORRECT_VERSION" = x; then
25265            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25266$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25267            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25268$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25269            BOOT_JDK_FOUND=no
25270          else
25271            # We're done! :-)
25272            BOOT_JDK_FOUND=yes
25273
25274  # Only process if variable expands to non-empty
25275
25276  if test "x$BOOT_JDK" != x; then
25277    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25278
25279  # Input might be given as Windows format, start by converting to
25280  # unix format.
25281  path="$BOOT_JDK"
25282  new_path=`$CYGPATH -u "$path"`
25283
25284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25287  # "foo.exe" is OK but "foo" is an error.
25288  #
25289  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25290  # It is also a way to make sure we got the proper file name for the real test later on.
25291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25292  if test "x$test_shortpath" = x; then
25293    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25294$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25295    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25296  fi
25297
25298  # Call helper function which possibly converts this using DOS-style short mode.
25299  # If so, the updated path is stored in $new_path.
25300
25301  input_path="$new_path"
25302  # Check if we need to convert this using DOS-style short mode. If the path
25303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25304  # take no chances and rewrite it.
25305  # Note: m4 eats our [], so we need to use [ and ] instead.
25306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25307  if test "x$has_forbidden_chars" != x; then
25308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25309    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25310    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25311    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25312      # Going to short mode and back again did indeed matter. Since short mode is
25313      # case insensitive, let's make it lowercase to improve readability.
25314      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25315      # Now convert it back to Unix-style (cygpath)
25316      input_path=`$CYGPATH -u "$shortmode_path"`
25317      new_path="$input_path"
25318    fi
25319  fi
25320
25321  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25322  if test "x$test_cygdrive_prefix" = x; then
25323    # As a simple fix, exclude /usr/bin since it's not a real path.
25324    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25325      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25326      # a path prefixed by /cygdrive for fixpath to work.
25327      new_path="$CYGWIN_ROOT_PATH$input_path"
25328    fi
25329  fi
25330
25331
25332  if test "x$path" != "x$new_path"; then
25333    BOOT_JDK="$new_path"
25334    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25335$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25336  fi
25337
25338    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25339
25340  path="$BOOT_JDK"
25341  has_colon=`$ECHO $path | $GREP ^.:`
25342  new_path="$path"
25343  if test "x$has_colon" = x; then
25344    # Not in mixed or Windows style, start by that.
25345    new_path=`cmd //c echo $path`
25346  fi
25347
25348
25349  input_path="$new_path"
25350  # Check if we need to convert this using DOS-style short mode. If the path
25351  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25352  # take no chances and rewrite it.
25353  # Note: m4 eats our [], so we need to use [ and ] instead.
25354  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25355  if test "x$has_forbidden_chars" != x; then
25356    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25357    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25358  fi
25359
25360
25361  windows_path="$new_path"
25362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25363    unix_path=`$CYGPATH -u "$windows_path"`
25364    new_path="$unix_path"
25365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25367    new_path="$unix_path"
25368  fi
25369
25370  if test "x$path" != "x$new_path"; then
25371    BOOT_JDK="$new_path"
25372    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25373$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25374  fi
25375
25376  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25377  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25378
25379    else
25380      # We're on a unix platform. Hooray! :)
25381      path="$BOOT_JDK"
25382      has_space=`$ECHO "$path" | $GREP " "`
25383      if test "x$has_space" != x; then
25384        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25385$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25386        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25387      fi
25388
25389      # Use eval to expand a potential ~
25390      eval path="$path"
25391      if test ! -f "$path" && test ! -d "$path"; then
25392        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25393      fi
25394
25395      if test -d "$path"; then
25396        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25397      else
25398        dir="`$DIRNAME "$path"`"
25399        base="`$BASENAME "$path"`"
25400        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25401      fi
25402    fi
25403  fi
25404
25405            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25406$as_echo_n "checking for Boot JDK... " >&6; }
25407            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25408$as_echo "$BOOT_JDK" >&6; }
25409            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25410$as_echo_n "checking Boot JDK version... " >&6; }
25411            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25412            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25413$as_echo "$BOOT_JDK_VERSION" >&6; }
25414          fi # end check jdk version
25415        fi # end check javac
25416      fi # end check java
25417    fi # end check boot jdk found
25418  fi
25419
25420
25421  # Test: Is $JAVA_HOME set?
25422
25423  if test "x$BOOT_JDK_FOUND" = xno; then
25424    # Now execute the test
25425
25426  if test "x$JAVA_HOME" != x; then
25427    JAVA_HOME_PROCESSED="$JAVA_HOME"
25428
25429  # Only process if variable expands to non-empty
25430
25431  if test "x$JAVA_HOME_PROCESSED" != x; then
25432    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25433
25434  # Input might be given as Windows format, start by converting to
25435  # unix format.
25436  path="$JAVA_HOME_PROCESSED"
25437  new_path=`$CYGPATH -u "$path"`
25438
25439  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25440  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25441  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25442  # "foo.exe" is OK but "foo" is an error.
25443  #
25444  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25445  # It is also a way to make sure we got the proper file name for the real test later on.
25446  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25447  if test "x$test_shortpath" = x; then
25448    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25449$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25450    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25451  fi
25452
25453  # Call helper function which possibly converts this using DOS-style short mode.
25454  # If so, the updated path is stored in $new_path.
25455
25456  input_path="$new_path"
25457  # Check if we need to convert this using DOS-style short mode. If the path
25458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25459  # take no chances and rewrite it.
25460  # Note: m4 eats our [], so we need to use [ and ] instead.
25461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25462  if test "x$has_forbidden_chars" != x; then
25463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25464    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25465    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25466    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25467      # Going to short mode and back again did indeed matter. Since short mode is
25468      # case insensitive, let's make it lowercase to improve readability.
25469      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25470      # Now convert it back to Unix-style (cygpath)
25471      input_path=`$CYGPATH -u "$shortmode_path"`
25472      new_path="$input_path"
25473    fi
25474  fi
25475
25476  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25477  if test "x$test_cygdrive_prefix" = x; then
25478    # As a simple fix, exclude /usr/bin since it's not a real path.
25479    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25480      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25481      # a path prefixed by /cygdrive for fixpath to work.
25482      new_path="$CYGWIN_ROOT_PATH$input_path"
25483    fi
25484  fi
25485
25486
25487  if test "x$path" != "x$new_path"; then
25488    JAVA_HOME_PROCESSED="$new_path"
25489    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25490$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25491  fi
25492
25493    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25494
25495  path="$JAVA_HOME_PROCESSED"
25496  has_colon=`$ECHO $path | $GREP ^.:`
25497  new_path="$path"
25498  if test "x$has_colon" = x; then
25499    # Not in mixed or Windows style, start by that.
25500    new_path=`cmd //c echo $path`
25501  fi
25502
25503
25504  input_path="$new_path"
25505  # Check if we need to convert this using DOS-style short mode. If the path
25506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25507  # take no chances and rewrite it.
25508  # Note: m4 eats our [], so we need to use [ and ] instead.
25509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25510  if test "x$has_forbidden_chars" != x; then
25511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25512    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25513  fi
25514
25515
25516  windows_path="$new_path"
25517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25518    unix_path=`$CYGPATH -u "$windows_path"`
25519    new_path="$unix_path"
25520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25522    new_path="$unix_path"
25523  fi
25524
25525  if test "x$path" != "x$new_path"; then
25526    JAVA_HOME_PROCESSED="$new_path"
25527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25528$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25529  fi
25530
25531  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25532  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25533
25534    else
25535      # We're on a unix platform. Hooray! :)
25536      path="$JAVA_HOME_PROCESSED"
25537      has_space=`$ECHO "$path" | $GREP " "`
25538      if test "x$has_space" != x; then
25539        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25540$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25541        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25542      fi
25543
25544      # Use eval to expand a potential ~
25545      eval path="$path"
25546      if test ! -f "$path" && test ! -d "$path"; then
25547        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
25548      fi
25549
25550      if test -d "$path"; then
25551        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
25552      else
25553        dir="`$DIRNAME "$path"`"
25554        base="`$BASENAME "$path"`"
25555        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
25556      fi
25557    fi
25558  fi
25559
25560    if test ! -d "$JAVA_HOME_PROCESSED"; then
25561      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
25562$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
25563    else
25564      # Aha, the user has set a JAVA_HOME
25565      # let us use that as the Boot JDK.
25566      BOOT_JDK="$JAVA_HOME_PROCESSED"
25567      BOOT_JDK_FOUND=maybe
25568      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
25569$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
25570    fi
25571  fi
25572
25573
25574    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25575    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25576      # Do we have a bin/java?
25577      if test ! -x "$BOOT_JDK/bin/java"; then
25578        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25579$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25580        BOOT_JDK_FOUND=no
25581      else
25582        # Do we have a bin/javac?
25583        if test ! -x "$BOOT_JDK/bin/javac"; then
25584          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25586          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25587$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25588          BOOT_JDK_FOUND=no
25589        else
25590          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25591          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25592
25593          # Extra M4 quote needed to protect [] in grep expression.
25594          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25595          if test "x$FOUND_CORRECT_VERSION" = x; then
25596            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25597$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25598            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25599$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25600            BOOT_JDK_FOUND=no
25601          else
25602            # We're done! :-)
25603            BOOT_JDK_FOUND=yes
25604
25605  # Only process if variable expands to non-empty
25606
25607  if test "x$BOOT_JDK" != x; then
25608    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25609
25610  # Input might be given as Windows format, start by converting to
25611  # unix format.
25612  path="$BOOT_JDK"
25613  new_path=`$CYGPATH -u "$path"`
25614
25615  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25616  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25617  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25618  # "foo.exe" is OK but "foo" is an error.
25619  #
25620  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25621  # It is also a way to make sure we got the proper file name for the real test later on.
25622  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25623  if test "x$test_shortpath" = x; then
25624    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25625$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25626    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25627  fi
25628
25629  # Call helper function which possibly converts this using DOS-style short mode.
25630  # If so, the updated path is stored in $new_path.
25631
25632  input_path="$new_path"
25633  # Check if we need to convert this using DOS-style short mode. If the path
25634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25635  # take no chances and rewrite it.
25636  # Note: m4 eats our [], so we need to use [ and ] instead.
25637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25638  if test "x$has_forbidden_chars" != x; then
25639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25640    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25641    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25642    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25643      # Going to short mode and back again did indeed matter. Since short mode is
25644      # case insensitive, let's make it lowercase to improve readability.
25645      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25646      # Now convert it back to Unix-style (cygpath)
25647      input_path=`$CYGPATH -u "$shortmode_path"`
25648      new_path="$input_path"
25649    fi
25650  fi
25651
25652  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25653  if test "x$test_cygdrive_prefix" = x; then
25654    # As a simple fix, exclude /usr/bin since it's not a real path.
25655    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25656      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25657      # a path prefixed by /cygdrive for fixpath to work.
25658      new_path="$CYGWIN_ROOT_PATH$input_path"
25659    fi
25660  fi
25661
25662
25663  if test "x$path" != "x$new_path"; then
25664    BOOT_JDK="$new_path"
25665    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25666$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25667  fi
25668
25669    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25670
25671  path="$BOOT_JDK"
25672  has_colon=`$ECHO $path | $GREP ^.:`
25673  new_path="$path"
25674  if test "x$has_colon" = x; then
25675    # Not in mixed or Windows style, start by that.
25676    new_path=`cmd //c echo $path`
25677  fi
25678
25679
25680  input_path="$new_path"
25681  # Check if we need to convert this using DOS-style short mode. If the path
25682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25683  # take no chances and rewrite it.
25684  # Note: m4 eats our [], so we need to use [ and ] instead.
25685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25686  if test "x$has_forbidden_chars" != x; then
25687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25688    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25689  fi
25690
25691
25692  windows_path="$new_path"
25693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25694    unix_path=`$CYGPATH -u "$windows_path"`
25695    new_path="$unix_path"
25696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25698    new_path="$unix_path"
25699  fi
25700
25701  if test "x$path" != "x$new_path"; then
25702    BOOT_JDK="$new_path"
25703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25704$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25705  fi
25706
25707  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25708  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25709
25710    else
25711      # We're on a unix platform. Hooray! :)
25712      path="$BOOT_JDK"
25713      has_space=`$ECHO "$path" | $GREP " "`
25714      if test "x$has_space" != x; then
25715        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25716$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25717        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25718      fi
25719
25720      # Use eval to expand a potential ~
25721      eval path="$path"
25722      if test ! -f "$path" && test ! -d "$path"; then
25723        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25724      fi
25725
25726      if test -d "$path"; then
25727        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25728      else
25729        dir="`$DIRNAME "$path"`"
25730        base="`$BASENAME "$path"`"
25731        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25732      fi
25733    fi
25734  fi
25735
25736            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25737$as_echo_n "checking for Boot JDK... " >&6; }
25738            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25739$as_echo "$BOOT_JDK" >&6; }
25740            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25741$as_echo_n "checking Boot JDK version... " >&6; }
25742            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25743            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25744$as_echo "$BOOT_JDK_VERSION" >&6; }
25745          fi # end check jdk version
25746        fi # end check javac
25747      fi # end check java
25748    fi # end check boot jdk found
25749  fi
25750
25751
25752  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25753
25754  if test "x$BOOT_JDK_FOUND" = xno; then
25755    # Now execute the test
25756
25757  # Extract the first word of "javac", so it can be a program name with args.
25758set dummy javac; ac_word=$2
25759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25760$as_echo_n "checking for $ac_word... " >&6; }
25761if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25762  $as_echo_n "(cached) " >&6
25763else
25764  case $JAVAC_CHECK in
25765  [\\/]* | ?:[\\/]*)
25766  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25767  ;;
25768  *)
25769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25770for as_dir in $PATH
25771do
25772  IFS=$as_save_IFS
25773  test -z "$as_dir" && as_dir=.
25774    for ac_exec_ext in '' $ac_executable_extensions; do
25775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25776    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25778    break 2
25779  fi
25780done
25781  done
25782IFS=$as_save_IFS
25783
25784  ;;
25785esac
25786fi
25787JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25788if test -n "$JAVAC_CHECK"; then
25789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25790$as_echo "$JAVAC_CHECK" >&6; }
25791else
25792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25793$as_echo "no" >&6; }
25794fi
25795
25796
25797  # Extract the first word of "java", so it can be a program name with args.
25798set dummy java; ac_word=$2
25799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25800$as_echo_n "checking for $ac_word... " >&6; }
25801if ${ac_cv_path_JAVA_CHECK+:} false; then :
25802  $as_echo_n "(cached) " >&6
25803else
25804  case $JAVA_CHECK in
25805  [\\/]* | ?:[\\/]*)
25806  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25807  ;;
25808  *)
25809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25810for as_dir in $PATH
25811do
25812  IFS=$as_save_IFS
25813  test -z "$as_dir" && as_dir=.
25814    for ac_exec_ext in '' $ac_executable_extensions; do
25815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25816    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25818    break 2
25819  fi
25820done
25821  done
25822IFS=$as_save_IFS
25823
25824  ;;
25825esac
25826fi
25827JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25828if test -n "$JAVA_CHECK"; then
25829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25830$as_echo "$JAVA_CHECK" >&6; }
25831else
25832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25833$as_echo "no" >&6; }
25834fi
25835
25836
25837  BINARY="$JAVAC_CHECK"
25838  if test "x$JAVAC_CHECK" = x; then
25839    BINARY="$JAVA_CHECK"
25840  fi
25841  if test "x$BINARY" != x; then
25842    # So there is a java(c) binary, it might be part of a JDK.
25843    # Lets find the JDK/JRE directory by following symbolic links.
25844    # Linux/GNU systems often have links from /usr/bin/java to
25845    # /etc/alternatives/java to the real JDK binary.
25846
25847  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25848    # Follow a chain of symbolic links. Use readlink
25849    # where it exists, else fall back to horribly
25850    # complicated shell code.
25851    if test "x$READLINK_TESTED" != yes; then
25852      # On MacOSX there is a readlink tool with a different
25853      # purpose than the GNU readlink tool. Check the found readlink.
25854      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25855      if test "x$ISGNU" = x; then
25856        # A readlink that we do not know how to use.
25857        # Are there other non-GNU readlinks out there?
25858        READLINK_TESTED=yes
25859        READLINK=
25860      fi
25861    fi
25862
25863    if test "x$READLINK" != x; then
25864      BINARY=`$READLINK -f $BINARY`
25865    else
25866      # Save the current directory for restoring afterwards
25867      STARTDIR=$PWD
25868      COUNTER=0
25869      sym_link_dir=`$DIRNAME $BINARY`
25870      sym_link_file=`$BASENAME $BINARY`
25871      cd $sym_link_dir
25872      # Use -P flag to resolve symlinks in directories.
25873      cd `$THEPWDCMD -P`
25874      sym_link_dir=`$THEPWDCMD -P`
25875      # Resolve file symlinks
25876      while test $COUNTER -lt 20; do
25877        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25878        if test "x$ISLINK" == x; then
25879          # This is not a symbolic link! We are done!
25880          break
25881        fi
25882        # Again resolve directory symlinks since the target of the just found
25883        # link could be in a different directory
25884        cd `$DIRNAME $ISLINK`
25885        sym_link_dir=`$THEPWDCMD -P`
25886        sym_link_file=`$BASENAME $ISLINK`
25887        let COUNTER=COUNTER+1
25888      done
25889      cd $STARTDIR
25890      BINARY=$sym_link_dir/$sym_link_file
25891    fi
25892  fi
25893
25894    BOOT_JDK=`dirname "$BINARY"`
25895    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25896    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25897      # Looks like we found ourselves an JDK
25898      BOOT_JDK_FOUND=maybe
25899      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25900$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25901    fi
25902  fi
25903
25904
25905    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25906    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25907      # Do we have a bin/java?
25908      if test ! -x "$BOOT_JDK/bin/java"; then
25909        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25910$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25911        BOOT_JDK_FOUND=no
25912      else
25913        # Do we have a bin/javac?
25914        if test ! -x "$BOOT_JDK/bin/javac"; then
25915          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25916$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25917          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25918$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25919          BOOT_JDK_FOUND=no
25920        else
25921          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25922          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25923
25924          # Extra M4 quote needed to protect [] in grep expression.
25925          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25926          if test "x$FOUND_CORRECT_VERSION" = x; then
25927            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25928$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25929            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25930$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25931            BOOT_JDK_FOUND=no
25932          else
25933            # We're done! :-)
25934            BOOT_JDK_FOUND=yes
25935
25936  # Only process if variable expands to non-empty
25937
25938  if test "x$BOOT_JDK" != x; then
25939    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25940
25941  # Input might be given as Windows format, start by converting to
25942  # unix format.
25943  path="$BOOT_JDK"
25944  new_path=`$CYGPATH -u "$path"`
25945
25946  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25947  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25948  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25949  # "foo.exe" is OK but "foo" is an error.
25950  #
25951  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25952  # It is also a way to make sure we got the proper file name for the real test later on.
25953  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25954  if test "x$test_shortpath" = x; then
25955    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25956$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25957    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25958  fi
25959
25960  # Call helper function which possibly converts this using DOS-style short mode.
25961  # If so, the updated path is stored in $new_path.
25962
25963  input_path="$new_path"
25964  # Check if we need to convert this using DOS-style short mode. If the path
25965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25966  # take no chances and rewrite it.
25967  # Note: m4 eats our [], so we need to use [ and ] instead.
25968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25969  if test "x$has_forbidden_chars" != x; then
25970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25971    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25972    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25973    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25974      # Going to short mode and back again did indeed matter. Since short mode is
25975      # case insensitive, let's make it lowercase to improve readability.
25976      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25977      # Now convert it back to Unix-style (cygpath)
25978      input_path=`$CYGPATH -u "$shortmode_path"`
25979      new_path="$input_path"
25980    fi
25981  fi
25982
25983  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25984  if test "x$test_cygdrive_prefix" = x; then
25985    # As a simple fix, exclude /usr/bin since it's not a real path.
25986    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25987      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25988      # a path prefixed by /cygdrive for fixpath to work.
25989      new_path="$CYGWIN_ROOT_PATH$input_path"
25990    fi
25991  fi
25992
25993
25994  if test "x$path" != "x$new_path"; then
25995    BOOT_JDK="$new_path"
25996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25997$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25998  fi
25999
26000    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26001
26002  path="$BOOT_JDK"
26003  has_colon=`$ECHO $path | $GREP ^.:`
26004  new_path="$path"
26005  if test "x$has_colon" = x; then
26006    # Not in mixed or Windows style, start by that.
26007    new_path=`cmd //c echo $path`
26008  fi
26009
26010
26011  input_path="$new_path"
26012  # Check if we need to convert this using DOS-style short mode. If the path
26013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26014  # take no chances and rewrite it.
26015  # Note: m4 eats our [], so we need to use [ and ] instead.
26016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26017  if test "x$has_forbidden_chars" != x; then
26018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26019    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26020  fi
26021
26022
26023  windows_path="$new_path"
26024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26025    unix_path=`$CYGPATH -u "$windows_path"`
26026    new_path="$unix_path"
26027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26029    new_path="$unix_path"
26030  fi
26031
26032  if test "x$path" != "x$new_path"; then
26033    BOOT_JDK="$new_path"
26034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26035$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26036  fi
26037
26038  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26039  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26040
26041    else
26042      # We're on a unix platform. Hooray! :)
26043      path="$BOOT_JDK"
26044      has_space=`$ECHO "$path" | $GREP " "`
26045      if test "x$has_space" != x; then
26046        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26047$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26048        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26049      fi
26050
26051      # Use eval to expand a potential ~
26052      eval path="$path"
26053      if test ! -f "$path" && test ! -d "$path"; then
26054        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26055      fi
26056
26057      if test -d "$path"; then
26058        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26059      else
26060        dir="`$DIRNAME "$path"`"
26061        base="`$BASENAME "$path"`"
26062        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26063      fi
26064    fi
26065  fi
26066
26067            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26068$as_echo_n "checking for Boot JDK... " >&6; }
26069            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26070$as_echo "$BOOT_JDK" >&6; }
26071            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26072$as_echo_n "checking Boot JDK version... " >&6; }
26073            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26074            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26075$as_echo "$BOOT_JDK_VERSION" >&6; }
26076          fi # end check jdk version
26077        fi # end check javac
26078      fi # end check java
26079    fi # end check boot jdk found
26080  fi
26081
26082
26083  # Test: Is there a JDK installed in default, well-known locations?
26084
26085  if test "x$BOOT_JDK_FOUND" = xno; then
26086    # Now execute the test
26087
26088  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26089
26090  if test "x$BOOT_JDK_FOUND" = xno; then
26091    # Now execute the test
26092
26093  if test "x$ProgramW6432" != x; then
26094    VIRTUAL_DIR="$ProgramW6432/Java"
26095
26096  windows_path="$VIRTUAL_DIR"
26097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26098    unix_path=`$CYGPATH -u "$windows_path"`
26099    VIRTUAL_DIR="$unix_path"
26100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26102    VIRTUAL_DIR="$unix_path"
26103  fi
26104
26105
26106  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26107  BOOT_JDK_SUFFIX=""
26108  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26109  if test "x$ALL_JDKS_FOUND" != x; then
26110    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26111
26112  if test "x$BOOT_JDK_FOUND" = xno; then
26113    # Now execute the test
26114
26115        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26116        if test -d "$BOOT_JDK"; then
26117          BOOT_JDK_FOUND=maybe
26118          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26119$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26120        fi
26121
26122
26123    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26124    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26125      # Do we have a bin/java?
26126      if test ! -x "$BOOT_JDK/bin/java"; then
26127        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26128$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26129        BOOT_JDK_FOUND=no
26130      else
26131        # Do we have a bin/javac?
26132        if test ! -x "$BOOT_JDK/bin/javac"; then
26133          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26134$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26135          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26136$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26137          BOOT_JDK_FOUND=no
26138        else
26139          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26140          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26141
26142          # Extra M4 quote needed to protect [] in grep expression.
26143          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26144          if test "x$FOUND_CORRECT_VERSION" = x; then
26145            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26146$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26147            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26148$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26149            BOOT_JDK_FOUND=no
26150          else
26151            # We're done! :-)
26152            BOOT_JDK_FOUND=yes
26153
26154  # Only process if variable expands to non-empty
26155
26156  if test "x$BOOT_JDK" != x; then
26157    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26158
26159  # Input might be given as Windows format, start by converting to
26160  # unix format.
26161  path="$BOOT_JDK"
26162  new_path=`$CYGPATH -u "$path"`
26163
26164  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26165  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26166  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26167  # "foo.exe" is OK but "foo" is an error.
26168  #
26169  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26170  # It is also a way to make sure we got the proper file name for the real test later on.
26171  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26172  if test "x$test_shortpath" = x; then
26173    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26174$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26175    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26176  fi
26177
26178  # Call helper function which possibly converts this using DOS-style short mode.
26179  # If so, the updated path is stored in $new_path.
26180
26181  input_path="$new_path"
26182  # Check if we need to convert this using DOS-style short mode. If the path
26183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26184  # take no chances and rewrite it.
26185  # Note: m4 eats our [], so we need to use [ and ] instead.
26186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26187  if test "x$has_forbidden_chars" != x; then
26188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26189    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26190    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26191    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26192      # Going to short mode and back again did indeed matter. Since short mode is
26193      # case insensitive, let's make it lowercase to improve readability.
26194      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26195      # Now convert it back to Unix-style (cygpath)
26196      input_path=`$CYGPATH -u "$shortmode_path"`
26197      new_path="$input_path"
26198    fi
26199  fi
26200
26201  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26202  if test "x$test_cygdrive_prefix" = x; then
26203    # As a simple fix, exclude /usr/bin since it's not a real path.
26204    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26205      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26206      # a path prefixed by /cygdrive for fixpath to work.
26207      new_path="$CYGWIN_ROOT_PATH$input_path"
26208    fi
26209  fi
26210
26211
26212  if test "x$path" != "x$new_path"; then
26213    BOOT_JDK="$new_path"
26214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26215$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26216  fi
26217
26218    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26219
26220  path="$BOOT_JDK"
26221  has_colon=`$ECHO $path | $GREP ^.:`
26222  new_path="$path"
26223  if test "x$has_colon" = x; then
26224    # Not in mixed or Windows style, start by that.
26225    new_path=`cmd //c echo $path`
26226  fi
26227
26228
26229  input_path="$new_path"
26230  # Check if we need to convert this using DOS-style short mode. If the path
26231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26232  # take no chances and rewrite it.
26233  # Note: m4 eats our [], so we need to use [ and ] instead.
26234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26235  if test "x$has_forbidden_chars" != x; then
26236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26237    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26238  fi
26239
26240
26241  windows_path="$new_path"
26242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26243    unix_path=`$CYGPATH -u "$windows_path"`
26244    new_path="$unix_path"
26245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26247    new_path="$unix_path"
26248  fi
26249
26250  if test "x$path" != "x$new_path"; then
26251    BOOT_JDK="$new_path"
26252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26253$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26254  fi
26255
26256  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26257  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26258
26259    else
26260      # We're on a unix platform. Hooray! :)
26261      path="$BOOT_JDK"
26262      has_space=`$ECHO "$path" | $GREP " "`
26263      if test "x$has_space" != x; then
26264        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26265$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26266        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26267      fi
26268
26269      # Use eval to expand a potential ~
26270      eval path="$path"
26271      if test ! -f "$path" && test ! -d "$path"; then
26272        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26273      fi
26274
26275      if test -d "$path"; then
26276        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26277      else
26278        dir="`$DIRNAME "$path"`"
26279        base="`$BASENAME "$path"`"
26280        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26281      fi
26282    fi
26283  fi
26284
26285            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26286$as_echo_n "checking for Boot JDK... " >&6; }
26287            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26288$as_echo "$BOOT_JDK" >&6; }
26289            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26290$as_echo_n "checking Boot JDK version... " >&6; }
26291            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26292            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26293$as_echo "$BOOT_JDK_VERSION" >&6; }
26294          fi # end check jdk version
26295        fi # end check javac
26296      fi # end check java
26297    fi # end check boot jdk found
26298  fi
26299
26300    done
26301  fi
26302
26303  fi
26304
26305
26306    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26307    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26308      # Do we have a bin/java?
26309      if test ! -x "$BOOT_JDK/bin/java"; then
26310        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26311$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26312        BOOT_JDK_FOUND=no
26313      else
26314        # Do we have a bin/javac?
26315        if test ! -x "$BOOT_JDK/bin/javac"; then
26316          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26317$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26318          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26319$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26320          BOOT_JDK_FOUND=no
26321        else
26322          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26323          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26324
26325          # Extra M4 quote needed to protect [] in grep expression.
26326          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26327          if test "x$FOUND_CORRECT_VERSION" = x; then
26328            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26329$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26330            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26331$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26332            BOOT_JDK_FOUND=no
26333          else
26334            # We're done! :-)
26335            BOOT_JDK_FOUND=yes
26336
26337  # Only process if variable expands to non-empty
26338
26339  if test "x$BOOT_JDK" != x; then
26340    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26341
26342  # Input might be given as Windows format, start by converting to
26343  # unix format.
26344  path="$BOOT_JDK"
26345  new_path=`$CYGPATH -u "$path"`
26346
26347  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26348  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26349  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26350  # "foo.exe" is OK but "foo" is an error.
26351  #
26352  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26353  # It is also a way to make sure we got the proper file name for the real test later on.
26354  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26355  if test "x$test_shortpath" = x; then
26356    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26357$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26358    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26359  fi
26360
26361  # Call helper function which possibly converts this using DOS-style short mode.
26362  # If so, the updated path is stored in $new_path.
26363
26364  input_path="$new_path"
26365  # Check if we need to convert this using DOS-style short mode. If the path
26366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26367  # take no chances and rewrite it.
26368  # Note: m4 eats our [], so we need to use [ and ] instead.
26369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26370  if test "x$has_forbidden_chars" != x; then
26371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26372    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26373    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26374    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26375      # Going to short mode and back again did indeed matter. Since short mode is
26376      # case insensitive, let's make it lowercase to improve readability.
26377      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26378      # Now convert it back to Unix-style (cygpath)
26379      input_path=`$CYGPATH -u "$shortmode_path"`
26380      new_path="$input_path"
26381    fi
26382  fi
26383
26384  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26385  if test "x$test_cygdrive_prefix" = x; then
26386    # As a simple fix, exclude /usr/bin since it's not a real path.
26387    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26388      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26389      # a path prefixed by /cygdrive for fixpath to work.
26390      new_path="$CYGWIN_ROOT_PATH$input_path"
26391    fi
26392  fi
26393
26394
26395  if test "x$path" != "x$new_path"; then
26396    BOOT_JDK="$new_path"
26397    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26398$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26399  fi
26400
26401    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26402
26403  path="$BOOT_JDK"
26404  has_colon=`$ECHO $path | $GREP ^.:`
26405  new_path="$path"
26406  if test "x$has_colon" = x; then
26407    # Not in mixed or Windows style, start by that.
26408    new_path=`cmd //c echo $path`
26409  fi
26410
26411
26412  input_path="$new_path"
26413  # Check if we need to convert this using DOS-style short mode. If the path
26414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26415  # take no chances and rewrite it.
26416  # Note: m4 eats our [], so we need to use [ and ] instead.
26417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26418  if test "x$has_forbidden_chars" != x; then
26419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26420    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26421  fi
26422
26423
26424  windows_path="$new_path"
26425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26426    unix_path=`$CYGPATH -u "$windows_path"`
26427    new_path="$unix_path"
26428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26430    new_path="$unix_path"
26431  fi
26432
26433  if test "x$path" != "x$new_path"; then
26434    BOOT_JDK="$new_path"
26435    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26436$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26437  fi
26438
26439  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26440  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26441
26442    else
26443      # We're on a unix platform. Hooray! :)
26444      path="$BOOT_JDK"
26445      has_space=`$ECHO "$path" | $GREP " "`
26446      if test "x$has_space" != x; then
26447        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26448$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26449        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26450      fi
26451
26452      # Use eval to expand a potential ~
26453      eval path="$path"
26454      if test ! -f "$path" && test ! -d "$path"; then
26455        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26456      fi
26457
26458      if test -d "$path"; then
26459        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26460      else
26461        dir="`$DIRNAME "$path"`"
26462        base="`$BASENAME "$path"`"
26463        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26464      fi
26465    fi
26466  fi
26467
26468            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26469$as_echo_n "checking for Boot JDK... " >&6; }
26470            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26471$as_echo "$BOOT_JDK" >&6; }
26472            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26473$as_echo_n "checking Boot JDK version... " >&6; }
26474            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26475            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26476$as_echo "$BOOT_JDK_VERSION" >&6; }
26477          fi # end check jdk version
26478        fi # end check javac
26479      fi # end check java
26480    fi # end check boot jdk found
26481  fi
26482
26483
26484  if test "x$BOOT_JDK_FOUND" = xno; then
26485    # Now execute the test
26486
26487  if test "x$PROGRAMW6432" != x; then
26488    VIRTUAL_DIR="$PROGRAMW6432/Java"
26489
26490  windows_path="$VIRTUAL_DIR"
26491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26492    unix_path=`$CYGPATH -u "$windows_path"`
26493    VIRTUAL_DIR="$unix_path"
26494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26496    VIRTUAL_DIR="$unix_path"
26497  fi
26498
26499
26500  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26501  BOOT_JDK_SUFFIX=""
26502  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26503  if test "x$ALL_JDKS_FOUND" != x; then
26504    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26505
26506  if test "x$BOOT_JDK_FOUND" = xno; then
26507    # Now execute the test
26508
26509        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26510        if test -d "$BOOT_JDK"; then
26511          BOOT_JDK_FOUND=maybe
26512          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26513$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26514        fi
26515
26516
26517    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26518    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26519      # Do we have a bin/java?
26520      if test ! -x "$BOOT_JDK/bin/java"; then
26521        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26522$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26523        BOOT_JDK_FOUND=no
26524      else
26525        # Do we have a bin/javac?
26526        if test ! -x "$BOOT_JDK/bin/javac"; then
26527          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26529          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26530$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26531          BOOT_JDK_FOUND=no
26532        else
26533          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26534          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26535
26536          # Extra M4 quote needed to protect [] in grep expression.
26537          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26538          if test "x$FOUND_CORRECT_VERSION" = x; then
26539            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26540$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26541            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26542$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26543            BOOT_JDK_FOUND=no
26544          else
26545            # We're done! :-)
26546            BOOT_JDK_FOUND=yes
26547
26548  # Only process if variable expands to non-empty
26549
26550  if test "x$BOOT_JDK" != x; then
26551    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26552
26553  # Input might be given as Windows format, start by converting to
26554  # unix format.
26555  path="$BOOT_JDK"
26556  new_path=`$CYGPATH -u "$path"`
26557
26558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26561  # "foo.exe" is OK but "foo" is an error.
26562  #
26563  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26564  # It is also a way to make sure we got the proper file name for the real test later on.
26565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26566  if test "x$test_shortpath" = x; then
26567    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26568$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26569    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26570  fi
26571
26572  # Call helper function which possibly converts this using DOS-style short mode.
26573  # If so, the updated path is stored in $new_path.
26574
26575  input_path="$new_path"
26576  # Check if we need to convert this using DOS-style short mode. If the path
26577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26578  # take no chances and rewrite it.
26579  # Note: m4 eats our [], so we need to use [ and ] instead.
26580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26581  if test "x$has_forbidden_chars" != x; then
26582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26586      # Going to short mode and back again did indeed matter. Since short mode is
26587      # case insensitive, let's make it lowercase to improve readability.
26588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26589      # Now convert it back to Unix-style (cygpath)
26590      input_path=`$CYGPATH -u "$shortmode_path"`
26591      new_path="$input_path"
26592    fi
26593  fi
26594
26595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26596  if test "x$test_cygdrive_prefix" = x; then
26597    # As a simple fix, exclude /usr/bin since it's not a real path.
26598    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26600      # a path prefixed by /cygdrive for fixpath to work.
26601      new_path="$CYGWIN_ROOT_PATH$input_path"
26602    fi
26603  fi
26604
26605
26606  if test "x$path" != "x$new_path"; then
26607    BOOT_JDK="$new_path"
26608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26609$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26610  fi
26611
26612    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26613
26614  path="$BOOT_JDK"
26615  has_colon=`$ECHO $path | $GREP ^.:`
26616  new_path="$path"
26617  if test "x$has_colon" = x; then
26618    # Not in mixed or Windows style, start by that.
26619    new_path=`cmd //c echo $path`
26620  fi
26621
26622
26623  input_path="$new_path"
26624  # Check if we need to convert this using DOS-style short mode. If the path
26625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26626  # take no chances and rewrite it.
26627  # Note: m4 eats our [], so we need to use [ and ] instead.
26628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26629  if test "x$has_forbidden_chars" != x; then
26630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26632  fi
26633
26634
26635  windows_path="$new_path"
26636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26637    unix_path=`$CYGPATH -u "$windows_path"`
26638    new_path="$unix_path"
26639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26641    new_path="$unix_path"
26642  fi
26643
26644  if test "x$path" != "x$new_path"; then
26645    BOOT_JDK="$new_path"
26646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26647$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26648  fi
26649
26650  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26651  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26652
26653    else
26654      # We're on a unix platform. Hooray! :)
26655      path="$BOOT_JDK"
26656      has_space=`$ECHO "$path" | $GREP " "`
26657      if test "x$has_space" != x; then
26658        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26659$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26660        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26661      fi
26662
26663      # Use eval to expand a potential ~
26664      eval path="$path"
26665      if test ! -f "$path" && test ! -d "$path"; then
26666        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26667      fi
26668
26669      if test -d "$path"; then
26670        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26671      else
26672        dir="`$DIRNAME "$path"`"
26673        base="`$BASENAME "$path"`"
26674        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26675      fi
26676    fi
26677  fi
26678
26679            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26680$as_echo_n "checking for Boot JDK... " >&6; }
26681            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26682$as_echo "$BOOT_JDK" >&6; }
26683            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26684$as_echo_n "checking Boot JDK version... " >&6; }
26685            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26686            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26687$as_echo "$BOOT_JDK_VERSION" >&6; }
26688          fi # end check jdk version
26689        fi # end check javac
26690      fi # end check java
26691    fi # end check boot jdk found
26692  fi
26693
26694    done
26695  fi
26696
26697  fi
26698
26699
26700    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26701    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26702      # Do we have a bin/java?
26703      if test ! -x "$BOOT_JDK/bin/java"; then
26704        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26706        BOOT_JDK_FOUND=no
26707      else
26708        # Do we have a bin/javac?
26709        if test ! -x "$BOOT_JDK/bin/javac"; then
26710          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26711$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26712          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26713$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26714          BOOT_JDK_FOUND=no
26715        else
26716          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26717          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26718
26719          # Extra M4 quote needed to protect [] in grep expression.
26720          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26721          if test "x$FOUND_CORRECT_VERSION" = x; then
26722            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26723$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26724            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26725$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26726            BOOT_JDK_FOUND=no
26727          else
26728            # We're done! :-)
26729            BOOT_JDK_FOUND=yes
26730
26731  # Only process if variable expands to non-empty
26732
26733  if test "x$BOOT_JDK" != x; then
26734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26735
26736  # Input might be given as Windows format, start by converting to
26737  # unix format.
26738  path="$BOOT_JDK"
26739  new_path=`$CYGPATH -u "$path"`
26740
26741  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26742  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26743  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26744  # "foo.exe" is OK but "foo" is an error.
26745  #
26746  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26747  # It is also a way to make sure we got the proper file name for the real test later on.
26748  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26749  if test "x$test_shortpath" = x; then
26750    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26751$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26752    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26753  fi
26754
26755  # Call helper function which possibly converts this using DOS-style short mode.
26756  # If so, the updated path is stored in $new_path.
26757
26758  input_path="$new_path"
26759  # Check if we need to convert this using DOS-style short mode. If the path
26760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26761  # take no chances and rewrite it.
26762  # Note: m4 eats our [], so we need to use [ and ] instead.
26763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26764  if test "x$has_forbidden_chars" != x; then
26765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26769      # Going to short mode and back again did indeed matter. Since short mode is
26770      # case insensitive, let's make it lowercase to improve readability.
26771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26772      # Now convert it back to Unix-style (cygpath)
26773      input_path=`$CYGPATH -u "$shortmode_path"`
26774      new_path="$input_path"
26775    fi
26776  fi
26777
26778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26779  if test "x$test_cygdrive_prefix" = x; then
26780    # As a simple fix, exclude /usr/bin since it's not a real path.
26781    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26783      # a path prefixed by /cygdrive for fixpath to work.
26784      new_path="$CYGWIN_ROOT_PATH$input_path"
26785    fi
26786  fi
26787
26788
26789  if test "x$path" != "x$new_path"; then
26790    BOOT_JDK="$new_path"
26791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26792$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26793  fi
26794
26795    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26796
26797  path="$BOOT_JDK"
26798  has_colon=`$ECHO $path | $GREP ^.:`
26799  new_path="$path"
26800  if test "x$has_colon" = x; then
26801    # Not in mixed or Windows style, start by that.
26802    new_path=`cmd //c echo $path`
26803  fi
26804
26805
26806  input_path="$new_path"
26807  # Check if we need to convert this using DOS-style short mode. If the path
26808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26809  # take no chances and rewrite it.
26810  # Note: m4 eats our [], so we need to use [ and ] instead.
26811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26812  if test "x$has_forbidden_chars" != x; then
26813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26814    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26815  fi
26816
26817
26818  windows_path="$new_path"
26819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26820    unix_path=`$CYGPATH -u "$windows_path"`
26821    new_path="$unix_path"
26822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26824    new_path="$unix_path"
26825  fi
26826
26827  if test "x$path" != "x$new_path"; then
26828    BOOT_JDK="$new_path"
26829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26830$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26831  fi
26832
26833  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26834  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26835
26836    else
26837      # We're on a unix platform. Hooray! :)
26838      path="$BOOT_JDK"
26839      has_space=`$ECHO "$path" | $GREP " "`
26840      if test "x$has_space" != x; then
26841        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26842$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26843        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26844      fi
26845
26846      # Use eval to expand a potential ~
26847      eval path="$path"
26848      if test ! -f "$path" && test ! -d "$path"; then
26849        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26850      fi
26851
26852      if test -d "$path"; then
26853        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26854      else
26855        dir="`$DIRNAME "$path"`"
26856        base="`$BASENAME "$path"`"
26857        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26858      fi
26859    fi
26860  fi
26861
26862            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26863$as_echo_n "checking for Boot JDK... " >&6; }
26864            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26865$as_echo "$BOOT_JDK" >&6; }
26866            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26867$as_echo_n "checking Boot JDK version... " >&6; }
26868            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26869            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26870$as_echo "$BOOT_JDK_VERSION" >&6; }
26871          fi # end check jdk version
26872        fi # end check javac
26873      fi # end check java
26874    fi # end check boot jdk found
26875  fi
26876
26877
26878  if test "x$BOOT_JDK_FOUND" = xno; then
26879    # Now execute the test
26880
26881  if test "x$PROGRAMFILES" != x; then
26882    VIRTUAL_DIR="$PROGRAMFILES/Java"
26883
26884  windows_path="$VIRTUAL_DIR"
26885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26886    unix_path=`$CYGPATH -u "$windows_path"`
26887    VIRTUAL_DIR="$unix_path"
26888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26890    VIRTUAL_DIR="$unix_path"
26891  fi
26892
26893
26894  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26895  BOOT_JDK_SUFFIX=""
26896  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26897  if test "x$ALL_JDKS_FOUND" != x; then
26898    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26899
26900  if test "x$BOOT_JDK_FOUND" = xno; then
26901    # Now execute the test
26902
26903        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26904        if test -d "$BOOT_JDK"; then
26905          BOOT_JDK_FOUND=maybe
26906          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26907$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26908        fi
26909
26910
26911    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26912    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26913      # Do we have a bin/java?
26914      if test ! -x "$BOOT_JDK/bin/java"; then
26915        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26916$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26917        BOOT_JDK_FOUND=no
26918      else
26919        # Do we have a bin/javac?
26920        if test ! -x "$BOOT_JDK/bin/javac"; then
26921          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26922$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26923          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26924$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26925          BOOT_JDK_FOUND=no
26926        else
26927          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26928          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26929
26930          # Extra M4 quote needed to protect [] in grep expression.
26931          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26932          if test "x$FOUND_CORRECT_VERSION" = x; then
26933            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26934$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26935            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26936$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26937            BOOT_JDK_FOUND=no
26938          else
26939            # We're done! :-)
26940            BOOT_JDK_FOUND=yes
26941
26942  # Only process if variable expands to non-empty
26943
26944  if test "x$BOOT_JDK" != x; then
26945    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26946
26947  # Input might be given as Windows format, start by converting to
26948  # unix format.
26949  path="$BOOT_JDK"
26950  new_path=`$CYGPATH -u "$path"`
26951
26952  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26953  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26954  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26955  # "foo.exe" is OK but "foo" is an error.
26956  #
26957  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26958  # It is also a way to make sure we got the proper file name for the real test later on.
26959  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26960  if test "x$test_shortpath" = x; then
26961    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26962$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26963    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26964  fi
26965
26966  # Call helper function which possibly converts this using DOS-style short mode.
26967  # If so, the updated path is stored in $new_path.
26968
26969  input_path="$new_path"
26970  # Check if we need to convert this using DOS-style short mode. If the path
26971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26972  # take no chances and rewrite it.
26973  # Note: m4 eats our [], so we need to use [ and ] instead.
26974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26975  if test "x$has_forbidden_chars" != x; then
26976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26977    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26978    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26979    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26980      # Going to short mode and back again did indeed matter. Since short mode is
26981      # case insensitive, let's make it lowercase to improve readability.
26982      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26983      # Now convert it back to Unix-style (cygpath)
26984      input_path=`$CYGPATH -u "$shortmode_path"`
26985      new_path="$input_path"
26986    fi
26987  fi
26988
26989  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26990  if test "x$test_cygdrive_prefix" = x; then
26991    # As a simple fix, exclude /usr/bin since it's not a real path.
26992    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26993      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26994      # a path prefixed by /cygdrive for fixpath to work.
26995      new_path="$CYGWIN_ROOT_PATH$input_path"
26996    fi
26997  fi
26998
26999
27000  if test "x$path" != "x$new_path"; then
27001    BOOT_JDK="$new_path"
27002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27003$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27004  fi
27005
27006    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27007
27008  path="$BOOT_JDK"
27009  has_colon=`$ECHO $path | $GREP ^.:`
27010  new_path="$path"
27011  if test "x$has_colon" = x; then
27012    # Not in mixed or Windows style, start by that.
27013    new_path=`cmd //c echo $path`
27014  fi
27015
27016
27017  input_path="$new_path"
27018  # Check if we need to convert this using DOS-style short mode. If the path
27019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27020  # take no chances and rewrite it.
27021  # Note: m4 eats our [], so we need to use [ and ] instead.
27022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27023  if test "x$has_forbidden_chars" != x; then
27024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27025    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27026  fi
27027
27028
27029  windows_path="$new_path"
27030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27031    unix_path=`$CYGPATH -u "$windows_path"`
27032    new_path="$unix_path"
27033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27035    new_path="$unix_path"
27036  fi
27037
27038  if test "x$path" != "x$new_path"; then
27039    BOOT_JDK="$new_path"
27040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27041$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27042  fi
27043
27044  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27045  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27046
27047    else
27048      # We're on a unix platform. Hooray! :)
27049      path="$BOOT_JDK"
27050      has_space=`$ECHO "$path" | $GREP " "`
27051      if test "x$has_space" != x; then
27052        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27053$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27054        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27055      fi
27056
27057      # Use eval to expand a potential ~
27058      eval path="$path"
27059      if test ! -f "$path" && test ! -d "$path"; then
27060        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27061      fi
27062
27063      if test -d "$path"; then
27064        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27065      else
27066        dir="`$DIRNAME "$path"`"
27067        base="`$BASENAME "$path"`"
27068        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27069      fi
27070    fi
27071  fi
27072
27073            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27074$as_echo_n "checking for Boot JDK... " >&6; }
27075            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27076$as_echo "$BOOT_JDK" >&6; }
27077            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27078$as_echo_n "checking Boot JDK version... " >&6; }
27079            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27080            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27081$as_echo "$BOOT_JDK_VERSION" >&6; }
27082          fi # end check jdk version
27083        fi # end check javac
27084      fi # end check java
27085    fi # end check boot jdk found
27086  fi
27087
27088    done
27089  fi
27090
27091  fi
27092
27093
27094    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27095    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27096      # Do we have a bin/java?
27097      if test ! -x "$BOOT_JDK/bin/java"; then
27098        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27099$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27100        BOOT_JDK_FOUND=no
27101      else
27102        # Do we have a bin/javac?
27103        if test ! -x "$BOOT_JDK/bin/javac"; then
27104          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27105$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27106          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27107$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27108          BOOT_JDK_FOUND=no
27109        else
27110          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27111          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27112
27113          # Extra M4 quote needed to protect [] in grep expression.
27114          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27115          if test "x$FOUND_CORRECT_VERSION" = x; then
27116            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27117$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27118            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27119$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27120            BOOT_JDK_FOUND=no
27121          else
27122            # We're done! :-)
27123            BOOT_JDK_FOUND=yes
27124
27125  # Only process if variable expands to non-empty
27126
27127  if test "x$BOOT_JDK" != x; then
27128    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27129
27130  # Input might be given as Windows format, start by converting to
27131  # unix format.
27132  path="$BOOT_JDK"
27133  new_path=`$CYGPATH -u "$path"`
27134
27135  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27136  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27137  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27138  # "foo.exe" is OK but "foo" is an error.
27139  #
27140  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27141  # It is also a way to make sure we got the proper file name for the real test later on.
27142  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27143  if test "x$test_shortpath" = x; then
27144    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27145$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27146    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27147  fi
27148
27149  # Call helper function which possibly converts this using DOS-style short mode.
27150  # If so, the updated path is stored in $new_path.
27151
27152  input_path="$new_path"
27153  # Check if we need to convert this using DOS-style short mode. If the path
27154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27155  # take no chances and rewrite it.
27156  # Note: m4 eats our [], so we need to use [ and ] instead.
27157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27158  if test "x$has_forbidden_chars" != x; then
27159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27160    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27161    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27162    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27163      # Going to short mode and back again did indeed matter. Since short mode is
27164      # case insensitive, let's make it lowercase to improve readability.
27165      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27166      # Now convert it back to Unix-style (cygpath)
27167      input_path=`$CYGPATH -u "$shortmode_path"`
27168      new_path="$input_path"
27169    fi
27170  fi
27171
27172  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27173  if test "x$test_cygdrive_prefix" = x; then
27174    # As a simple fix, exclude /usr/bin since it's not a real path.
27175    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27176      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27177      # a path prefixed by /cygdrive for fixpath to work.
27178      new_path="$CYGWIN_ROOT_PATH$input_path"
27179    fi
27180  fi
27181
27182
27183  if test "x$path" != "x$new_path"; then
27184    BOOT_JDK="$new_path"
27185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27186$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27187  fi
27188
27189    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27190
27191  path="$BOOT_JDK"
27192  has_colon=`$ECHO $path | $GREP ^.:`
27193  new_path="$path"
27194  if test "x$has_colon" = x; then
27195    # Not in mixed or Windows style, start by that.
27196    new_path=`cmd //c echo $path`
27197  fi
27198
27199
27200  input_path="$new_path"
27201  # Check if we need to convert this using DOS-style short mode. If the path
27202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27203  # take no chances and rewrite it.
27204  # Note: m4 eats our [], so we need to use [ and ] instead.
27205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27206  if test "x$has_forbidden_chars" != x; then
27207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27208    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27209  fi
27210
27211
27212  windows_path="$new_path"
27213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27214    unix_path=`$CYGPATH -u "$windows_path"`
27215    new_path="$unix_path"
27216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27218    new_path="$unix_path"
27219  fi
27220
27221  if test "x$path" != "x$new_path"; then
27222    BOOT_JDK="$new_path"
27223    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27224$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27225  fi
27226
27227  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27228  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27229
27230    else
27231      # We're on a unix platform. Hooray! :)
27232      path="$BOOT_JDK"
27233      has_space=`$ECHO "$path" | $GREP " "`
27234      if test "x$has_space" != x; then
27235        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27236$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27237        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27238      fi
27239
27240      # Use eval to expand a potential ~
27241      eval path="$path"
27242      if test ! -f "$path" && test ! -d "$path"; then
27243        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27244      fi
27245
27246      if test -d "$path"; then
27247        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27248      else
27249        dir="`$DIRNAME "$path"`"
27250        base="`$BASENAME "$path"`"
27251        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27252      fi
27253    fi
27254  fi
27255
27256            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27257$as_echo_n "checking for Boot JDK... " >&6; }
27258            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27259$as_echo "$BOOT_JDK" >&6; }
27260            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27261$as_echo_n "checking Boot JDK version... " >&6; }
27262            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27263            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27264$as_echo "$BOOT_JDK_VERSION" >&6; }
27265          fi # end check jdk version
27266        fi # end check javac
27267      fi # end check java
27268    fi # end check boot jdk found
27269  fi
27270
27271
27272  if test "x$BOOT_JDK_FOUND" = xno; then
27273    # Now execute the test
27274
27275  if test "x$ProgramFiles" != x; then
27276    VIRTUAL_DIR="$ProgramFiles/Java"
27277
27278  windows_path="$VIRTUAL_DIR"
27279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27280    unix_path=`$CYGPATH -u "$windows_path"`
27281    VIRTUAL_DIR="$unix_path"
27282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27284    VIRTUAL_DIR="$unix_path"
27285  fi
27286
27287
27288  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27289  BOOT_JDK_SUFFIX=""
27290  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27291  if test "x$ALL_JDKS_FOUND" != x; then
27292    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27293
27294  if test "x$BOOT_JDK_FOUND" = xno; then
27295    # Now execute the test
27296
27297        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27298        if test -d "$BOOT_JDK"; then
27299          BOOT_JDK_FOUND=maybe
27300          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27301$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27302        fi
27303
27304
27305    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27306    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27307      # Do we have a bin/java?
27308      if test ! -x "$BOOT_JDK/bin/java"; then
27309        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27310$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27311        BOOT_JDK_FOUND=no
27312      else
27313        # Do we have a bin/javac?
27314        if test ! -x "$BOOT_JDK/bin/javac"; then
27315          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27316$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27317          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27318$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27319          BOOT_JDK_FOUND=no
27320        else
27321          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27322          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27323
27324          # Extra M4 quote needed to protect [] in grep expression.
27325          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27326          if test "x$FOUND_CORRECT_VERSION" = x; then
27327            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27328$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27329            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27330$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27331            BOOT_JDK_FOUND=no
27332          else
27333            # We're done! :-)
27334            BOOT_JDK_FOUND=yes
27335
27336  # Only process if variable expands to non-empty
27337
27338  if test "x$BOOT_JDK" != x; then
27339    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27340
27341  # Input might be given as Windows format, start by converting to
27342  # unix format.
27343  path="$BOOT_JDK"
27344  new_path=`$CYGPATH -u "$path"`
27345
27346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27349  # "foo.exe" is OK but "foo" is an error.
27350  #
27351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27352  # It is also a way to make sure we got the proper file name for the real test later on.
27353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27354  if test "x$test_shortpath" = x; then
27355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27356$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27357    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27358  fi
27359
27360  # Call helper function which possibly converts this using DOS-style short mode.
27361  # If so, the updated path is stored in $new_path.
27362
27363  input_path="$new_path"
27364  # Check if we need to convert this using DOS-style short mode. If the path
27365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27366  # take no chances and rewrite it.
27367  # Note: m4 eats our [], so we need to use [ and ] instead.
27368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27369  if test "x$has_forbidden_chars" != x; then
27370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27374      # Going to short mode and back again did indeed matter. Since short mode is
27375      # case insensitive, let's make it lowercase to improve readability.
27376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27377      # Now convert it back to Unix-style (cygpath)
27378      input_path=`$CYGPATH -u "$shortmode_path"`
27379      new_path="$input_path"
27380    fi
27381  fi
27382
27383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27384  if test "x$test_cygdrive_prefix" = x; then
27385    # As a simple fix, exclude /usr/bin since it's not a real path.
27386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27388      # a path prefixed by /cygdrive for fixpath to work.
27389      new_path="$CYGWIN_ROOT_PATH$input_path"
27390    fi
27391  fi
27392
27393
27394  if test "x$path" != "x$new_path"; then
27395    BOOT_JDK="$new_path"
27396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27397$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27398  fi
27399
27400    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27401
27402  path="$BOOT_JDK"
27403  has_colon=`$ECHO $path | $GREP ^.:`
27404  new_path="$path"
27405  if test "x$has_colon" = x; then
27406    # Not in mixed or Windows style, start by that.
27407    new_path=`cmd //c echo $path`
27408  fi
27409
27410
27411  input_path="$new_path"
27412  # Check if we need to convert this using DOS-style short mode. If the path
27413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27414  # take no chances and rewrite it.
27415  # Note: m4 eats our [], so we need to use [ and ] instead.
27416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27417  if test "x$has_forbidden_chars" != x; then
27418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27420  fi
27421
27422
27423  windows_path="$new_path"
27424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27425    unix_path=`$CYGPATH -u "$windows_path"`
27426    new_path="$unix_path"
27427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27429    new_path="$unix_path"
27430  fi
27431
27432  if test "x$path" != "x$new_path"; then
27433    BOOT_JDK="$new_path"
27434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27435$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27436  fi
27437
27438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27440
27441    else
27442      # We're on a unix platform. Hooray! :)
27443      path="$BOOT_JDK"
27444      has_space=`$ECHO "$path" | $GREP " "`
27445      if test "x$has_space" != x; then
27446        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27447$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27448        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27449      fi
27450
27451      # Use eval to expand a potential ~
27452      eval path="$path"
27453      if test ! -f "$path" && test ! -d "$path"; then
27454        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27455      fi
27456
27457      if test -d "$path"; then
27458        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27459      else
27460        dir="`$DIRNAME "$path"`"
27461        base="`$BASENAME "$path"`"
27462        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27463      fi
27464    fi
27465  fi
27466
27467            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27468$as_echo_n "checking for Boot JDK... " >&6; }
27469            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27470$as_echo "$BOOT_JDK" >&6; }
27471            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27472$as_echo_n "checking Boot JDK version... " >&6; }
27473            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27474            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27475$as_echo "$BOOT_JDK_VERSION" >&6; }
27476          fi # end check jdk version
27477        fi # end check javac
27478      fi # end check java
27479    fi # end check boot jdk found
27480  fi
27481
27482    done
27483  fi
27484
27485  fi
27486
27487
27488    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27489    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27490      # Do we have a bin/java?
27491      if test ! -x "$BOOT_JDK/bin/java"; then
27492        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27493$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27494        BOOT_JDK_FOUND=no
27495      else
27496        # Do we have a bin/javac?
27497        if test ! -x "$BOOT_JDK/bin/javac"; then
27498          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27499$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27500          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27501$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27502          BOOT_JDK_FOUND=no
27503        else
27504          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27505          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27506
27507          # Extra M4 quote needed to protect [] in grep expression.
27508          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27509          if test "x$FOUND_CORRECT_VERSION" = x; then
27510            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27511$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27512            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27513$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27514            BOOT_JDK_FOUND=no
27515          else
27516            # We're done! :-)
27517            BOOT_JDK_FOUND=yes
27518
27519  # Only process if variable expands to non-empty
27520
27521  if test "x$BOOT_JDK" != x; then
27522    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27523
27524  # Input might be given as Windows format, start by converting to
27525  # unix format.
27526  path="$BOOT_JDK"
27527  new_path=`$CYGPATH -u "$path"`
27528
27529  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27530  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27531  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27532  # "foo.exe" is OK but "foo" is an error.
27533  #
27534  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27535  # It is also a way to make sure we got the proper file name for the real test later on.
27536  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27537  if test "x$test_shortpath" = x; then
27538    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27539$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27540    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27541  fi
27542
27543  # Call helper function which possibly converts this using DOS-style short mode.
27544  # If so, the updated path is stored in $new_path.
27545
27546  input_path="$new_path"
27547  # Check if we need to convert this using DOS-style short mode. If the path
27548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27549  # take no chances and rewrite it.
27550  # Note: m4 eats our [], so we need to use [ and ] instead.
27551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27552  if test "x$has_forbidden_chars" != x; then
27553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27554    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27555    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27556    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27557      # Going to short mode and back again did indeed matter. Since short mode is
27558      # case insensitive, let's make it lowercase to improve readability.
27559      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27560      # Now convert it back to Unix-style (cygpath)
27561      input_path=`$CYGPATH -u "$shortmode_path"`
27562      new_path="$input_path"
27563    fi
27564  fi
27565
27566  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27567  if test "x$test_cygdrive_prefix" = x; then
27568    # As a simple fix, exclude /usr/bin since it's not a real path.
27569    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27570      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27571      # a path prefixed by /cygdrive for fixpath to work.
27572      new_path="$CYGWIN_ROOT_PATH$input_path"
27573    fi
27574  fi
27575
27576
27577  if test "x$path" != "x$new_path"; then
27578    BOOT_JDK="$new_path"
27579    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27580$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27581  fi
27582
27583    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27584
27585  path="$BOOT_JDK"
27586  has_colon=`$ECHO $path | $GREP ^.:`
27587  new_path="$path"
27588  if test "x$has_colon" = x; then
27589    # Not in mixed or Windows style, start by that.
27590    new_path=`cmd //c echo $path`
27591  fi
27592
27593
27594  input_path="$new_path"
27595  # Check if we need to convert this using DOS-style short mode. If the path
27596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27597  # take no chances and rewrite it.
27598  # Note: m4 eats our [], so we need to use [ and ] instead.
27599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27600  if test "x$has_forbidden_chars" != x; then
27601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27602    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27603  fi
27604
27605
27606  windows_path="$new_path"
27607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27608    unix_path=`$CYGPATH -u "$windows_path"`
27609    new_path="$unix_path"
27610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27612    new_path="$unix_path"
27613  fi
27614
27615  if test "x$path" != "x$new_path"; then
27616    BOOT_JDK="$new_path"
27617    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27618$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27619  fi
27620
27621  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27622  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27623
27624    else
27625      # We're on a unix platform. Hooray! :)
27626      path="$BOOT_JDK"
27627      has_space=`$ECHO "$path" | $GREP " "`
27628      if test "x$has_space" != x; then
27629        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27630$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27631        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27632      fi
27633
27634      # Use eval to expand a potential ~
27635      eval path="$path"
27636      if test ! -f "$path" && test ! -d "$path"; then
27637        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27638      fi
27639
27640      if test -d "$path"; then
27641        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27642      else
27643        dir="`$DIRNAME "$path"`"
27644        base="`$BASENAME "$path"`"
27645        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27646      fi
27647    fi
27648  fi
27649
27650            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27651$as_echo_n "checking for Boot JDK... " >&6; }
27652            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27653$as_echo "$BOOT_JDK" >&6; }
27654            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27655$as_echo_n "checking Boot JDK version... " >&6; }
27656            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27657            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27658$as_echo "$BOOT_JDK_VERSION" >&6; }
27659          fi # end check jdk version
27660        fi # end check javac
27661      fi # end check java
27662    fi # end check boot jdk found
27663  fi
27664
27665
27666  if test "x$BOOT_JDK_FOUND" = xno; then
27667    # Now execute the test
27668
27669  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27670  BOOT_JDK_SUFFIX=""
27671  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27672  if test "x$ALL_JDKS_FOUND" != x; then
27673    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27674
27675  if test "x$BOOT_JDK_FOUND" = xno; then
27676    # Now execute the test
27677
27678        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27679        if test -d "$BOOT_JDK"; then
27680          BOOT_JDK_FOUND=maybe
27681          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27682$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27683        fi
27684
27685
27686    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27687    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27688      # Do we have a bin/java?
27689      if test ! -x "$BOOT_JDK/bin/java"; then
27690        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27691$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27692        BOOT_JDK_FOUND=no
27693      else
27694        # Do we have a bin/javac?
27695        if test ! -x "$BOOT_JDK/bin/javac"; then
27696          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27697$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27698          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27699$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27700          BOOT_JDK_FOUND=no
27701        else
27702          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27703          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27704
27705          # Extra M4 quote needed to protect [] in grep expression.
27706          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27707          if test "x$FOUND_CORRECT_VERSION" = x; then
27708            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27709$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27710            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27711$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27712            BOOT_JDK_FOUND=no
27713          else
27714            # We're done! :-)
27715            BOOT_JDK_FOUND=yes
27716
27717  # Only process if variable expands to non-empty
27718
27719  if test "x$BOOT_JDK" != x; then
27720    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27721
27722  # Input might be given as Windows format, start by converting to
27723  # unix format.
27724  path="$BOOT_JDK"
27725  new_path=`$CYGPATH -u "$path"`
27726
27727  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27728  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27729  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27730  # "foo.exe" is OK but "foo" is an error.
27731  #
27732  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27733  # It is also a way to make sure we got the proper file name for the real test later on.
27734  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27735  if test "x$test_shortpath" = x; then
27736    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27737$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27738    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27739  fi
27740
27741  # Call helper function which possibly converts this using DOS-style short mode.
27742  # If so, the updated path is stored in $new_path.
27743
27744  input_path="$new_path"
27745  # Check if we need to convert this using DOS-style short mode. If the path
27746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27747  # take no chances and rewrite it.
27748  # Note: m4 eats our [], so we need to use [ and ] instead.
27749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27750  if test "x$has_forbidden_chars" != x; then
27751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27752    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27753    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27754    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27755      # Going to short mode and back again did indeed matter. Since short mode is
27756      # case insensitive, let's make it lowercase to improve readability.
27757      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27758      # Now convert it back to Unix-style (cygpath)
27759      input_path=`$CYGPATH -u "$shortmode_path"`
27760      new_path="$input_path"
27761    fi
27762  fi
27763
27764  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27765  if test "x$test_cygdrive_prefix" = x; then
27766    # As a simple fix, exclude /usr/bin since it's not a real path.
27767    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27768      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27769      # a path prefixed by /cygdrive for fixpath to work.
27770      new_path="$CYGWIN_ROOT_PATH$input_path"
27771    fi
27772  fi
27773
27774
27775  if test "x$path" != "x$new_path"; then
27776    BOOT_JDK="$new_path"
27777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27778$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27779  fi
27780
27781    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27782
27783  path="$BOOT_JDK"
27784  has_colon=`$ECHO $path | $GREP ^.:`
27785  new_path="$path"
27786  if test "x$has_colon" = x; then
27787    # Not in mixed or Windows style, start by that.
27788    new_path=`cmd //c echo $path`
27789  fi
27790
27791
27792  input_path="$new_path"
27793  # Check if we need to convert this using DOS-style short mode. If the path
27794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27795  # take no chances and rewrite it.
27796  # Note: m4 eats our [], so we need to use [ and ] instead.
27797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27798  if test "x$has_forbidden_chars" != x; then
27799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27800    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27801  fi
27802
27803
27804  windows_path="$new_path"
27805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27806    unix_path=`$CYGPATH -u "$windows_path"`
27807    new_path="$unix_path"
27808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27810    new_path="$unix_path"
27811  fi
27812
27813  if test "x$path" != "x$new_path"; then
27814    BOOT_JDK="$new_path"
27815    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27816$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27817  fi
27818
27819  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27820  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27821
27822    else
27823      # We're on a unix platform. Hooray! :)
27824      path="$BOOT_JDK"
27825      has_space=`$ECHO "$path" | $GREP " "`
27826      if test "x$has_space" != x; then
27827        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27828$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27829        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27830      fi
27831
27832      # Use eval to expand a potential ~
27833      eval path="$path"
27834      if test ! -f "$path" && test ! -d "$path"; then
27835        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27836      fi
27837
27838      if test -d "$path"; then
27839        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27840      else
27841        dir="`$DIRNAME "$path"`"
27842        base="`$BASENAME "$path"`"
27843        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27844      fi
27845    fi
27846  fi
27847
27848            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27849$as_echo_n "checking for Boot JDK... " >&6; }
27850            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27851$as_echo "$BOOT_JDK" >&6; }
27852            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27853$as_echo_n "checking Boot JDK version... " >&6; }
27854            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27855            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27856$as_echo "$BOOT_JDK_VERSION" >&6; }
27857          fi # end check jdk version
27858        fi # end check javac
27859      fi # end check java
27860    fi # end check boot jdk found
27861  fi
27862
27863    done
27864  fi
27865
27866
27867    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27868    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27869      # Do we have a bin/java?
27870      if test ! -x "$BOOT_JDK/bin/java"; then
27871        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27872$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27873        BOOT_JDK_FOUND=no
27874      else
27875        # Do we have a bin/javac?
27876        if test ! -x "$BOOT_JDK/bin/javac"; then
27877          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27878$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27879          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27880$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27881          BOOT_JDK_FOUND=no
27882        else
27883          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27884          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27885
27886          # Extra M4 quote needed to protect [] in grep expression.
27887          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27888          if test "x$FOUND_CORRECT_VERSION" = x; then
27889            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27890$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27891            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27892$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27893            BOOT_JDK_FOUND=no
27894          else
27895            # We're done! :-)
27896            BOOT_JDK_FOUND=yes
27897
27898  # Only process if variable expands to non-empty
27899
27900  if test "x$BOOT_JDK" != x; then
27901    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27902
27903  # Input might be given as Windows format, start by converting to
27904  # unix format.
27905  path="$BOOT_JDK"
27906  new_path=`$CYGPATH -u "$path"`
27907
27908  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27909  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27910  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27911  # "foo.exe" is OK but "foo" is an error.
27912  #
27913  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27914  # It is also a way to make sure we got the proper file name for the real test later on.
27915  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27916  if test "x$test_shortpath" = x; then
27917    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27918$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27919    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27920  fi
27921
27922  # Call helper function which possibly converts this using DOS-style short mode.
27923  # If so, the updated path is stored in $new_path.
27924
27925  input_path="$new_path"
27926  # Check if we need to convert this using DOS-style short mode. If the path
27927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27928  # take no chances and rewrite it.
27929  # Note: m4 eats our [], so we need to use [ and ] instead.
27930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27931  if test "x$has_forbidden_chars" != x; then
27932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27933    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27934    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27935    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27936      # Going to short mode and back again did indeed matter. Since short mode is
27937      # case insensitive, let's make it lowercase to improve readability.
27938      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27939      # Now convert it back to Unix-style (cygpath)
27940      input_path=`$CYGPATH -u "$shortmode_path"`
27941      new_path="$input_path"
27942    fi
27943  fi
27944
27945  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27946  if test "x$test_cygdrive_prefix" = x; then
27947    # As a simple fix, exclude /usr/bin since it's not a real path.
27948    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27949      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27950      # a path prefixed by /cygdrive for fixpath to work.
27951      new_path="$CYGWIN_ROOT_PATH$input_path"
27952    fi
27953  fi
27954
27955
27956  if test "x$path" != "x$new_path"; then
27957    BOOT_JDK="$new_path"
27958    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27959$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27960  fi
27961
27962    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27963
27964  path="$BOOT_JDK"
27965  has_colon=`$ECHO $path | $GREP ^.:`
27966  new_path="$path"
27967  if test "x$has_colon" = x; then
27968    # Not in mixed or Windows style, start by that.
27969    new_path=`cmd //c echo $path`
27970  fi
27971
27972
27973  input_path="$new_path"
27974  # Check if we need to convert this using DOS-style short mode. If the path
27975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27976  # take no chances and rewrite it.
27977  # Note: m4 eats our [], so we need to use [ and ] instead.
27978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27979  if test "x$has_forbidden_chars" != x; then
27980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27982  fi
27983
27984
27985  windows_path="$new_path"
27986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27987    unix_path=`$CYGPATH -u "$windows_path"`
27988    new_path="$unix_path"
27989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27991    new_path="$unix_path"
27992  fi
27993
27994  if test "x$path" != "x$new_path"; then
27995    BOOT_JDK="$new_path"
27996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27997$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27998  fi
27999
28000  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28001  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28002
28003    else
28004      # We're on a unix platform. Hooray! :)
28005      path="$BOOT_JDK"
28006      has_space=`$ECHO "$path" | $GREP " "`
28007      if test "x$has_space" != x; then
28008        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28009$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28010        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28011      fi
28012
28013      # Use eval to expand a potential ~
28014      eval path="$path"
28015      if test ! -f "$path" && test ! -d "$path"; then
28016        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28017      fi
28018
28019      if test -d "$path"; then
28020        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28021      else
28022        dir="`$DIRNAME "$path"`"
28023        base="`$BASENAME "$path"`"
28024        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28025      fi
28026    fi
28027  fi
28028
28029            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28030$as_echo_n "checking for Boot JDK... " >&6; }
28031            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28032$as_echo "$BOOT_JDK" >&6; }
28033            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28034$as_echo_n "checking Boot JDK version... " >&6; }
28035            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28036            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28037$as_echo "$BOOT_JDK_VERSION" >&6; }
28038          fi # end check jdk version
28039        fi # end check javac
28040      fi # end check java
28041    fi # end check boot jdk found
28042  fi
28043
28044  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28045
28046  if test "x$BOOT_JDK_FOUND" = xno; then
28047    # Now execute the test
28048
28049  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28050  BOOT_JDK_SUFFIX="/Contents/Home"
28051  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28052  if test "x$ALL_JDKS_FOUND" != x; then
28053    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28054
28055  if test "x$BOOT_JDK_FOUND" = xno; then
28056    # Now execute the test
28057
28058        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28059        if test -d "$BOOT_JDK"; then
28060          BOOT_JDK_FOUND=maybe
28061          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28062$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28063        fi
28064
28065
28066    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28067    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28068      # Do we have a bin/java?
28069      if test ! -x "$BOOT_JDK/bin/java"; then
28070        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28071$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28072        BOOT_JDK_FOUND=no
28073      else
28074        # Do we have a bin/javac?
28075        if test ! -x "$BOOT_JDK/bin/javac"; then
28076          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28077$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28078          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28079$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28080          BOOT_JDK_FOUND=no
28081        else
28082          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28083          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28084
28085          # Extra M4 quote needed to protect [] in grep expression.
28086          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28087          if test "x$FOUND_CORRECT_VERSION" = x; then
28088            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28089$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28090            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28091$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28092            BOOT_JDK_FOUND=no
28093          else
28094            # We're done! :-)
28095            BOOT_JDK_FOUND=yes
28096
28097  # Only process if variable expands to non-empty
28098
28099  if test "x$BOOT_JDK" != x; then
28100    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28101
28102  # Input might be given as Windows format, start by converting to
28103  # unix format.
28104  path="$BOOT_JDK"
28105  new_path=`$CYGPATH -u "$path"`
28106
28107  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28108  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28109  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28110  # "foo.exe" is OK but "foo" is an error.
28111  #
28112  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28113  # It is also a way to make sure we got the proper file name for the real test later on.
28114  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28115  if test "x$test_shortpath" = x; then
28116    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28117$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28118    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28119  fi
28120
28121  # Call helper function which possibly converts this using DOS-style short mode.
28122  # If so, the updated path is stored in $new_path.
28123
28124  input_path="$new_path"
28125  # Check if we need to convert this using DOS-style short mode. If the path
28126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28127  # take no chances and rewrite it.
28128  # Note: m4 eats our [], so we need to use [ and ] instead.
28129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28130  if test "x$has_forbidden_chars" != x; then
28131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28132    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28133    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28134    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28135      # Going to short mode and back again did indeed matter. Since short mode is
28136      # case insensitive, let's make it lowercase to improve readability.
28137      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28138      # Now convert it back to Unix-style (cygpath)
28139      input_path=`$CYGPATH -u "$shortmode_path"`
28140      new_path="$input_path"
28141    fi
28142  fi
28143
28144  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28145  if test "x$test_cygdrive_prefix" = x; then
28146    # As a simple fix, exclude /usr/bin since it's not a real path.
28147    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28148      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28149      # a path prefixed by /cygdrive for fixpath to work.
28150      new_path="$CYGWIN_ROOT_PATH$input_path"
28151    fi
28152  fi
28153
28154
28155  if test "x$path" != "x$new_path"; then
28156    BOOT_JDK="$new_path"
28157    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28158$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28159  fi
28160
28161    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28162
28163  path="$BOOT_JDK"
28164  has_colon=`$ECHO $path | $GREP ^.:`
28165  new_path="$path"
28166  if test "x$has_colon" = x; then
28167    # Not in mixed or Windows style, start by that.
28168    new_path=`cmd //c echo $path`
28169  fi
28170
28171
28172  input_path="$new_path"
28173  # Check if we need to convert this using DOS-style short mode. If the path
28174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28175  # take no chances and rewrite it.
28176  # Note: m4 eats our [], so we need to use [ and ] instead.
28177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28178  if test "x$has_forbidden_chars" != x; then
28179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28180    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28181  fi
28182
28183
28184  windows_path="$new_path"
28185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28186    unix_path=`$CYGPATH -u "$windows_path"`
28187    new_path="$unix_path"
28188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28190    new_path="$unix_path"
28191  fi
28192
28193  if test "x$path" != "x$new_path"; then
28194    BOOT_JDK="$new_path"
28195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28196$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28197  fi
28198
28199  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28200  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28201
28202    else
28203      # We're on a unix platform. Hooray! :)
28204      path="$BOOT_JDK"
28205      has_space=`$ECHO "$path" | $GREP " "`
28206      if test "x$has_space" != x; then
28207        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28208$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28209        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28210      fi
28211
28212      # Use eval to expand a potential ~
28213      eval path="$path"
28214      if test ! -f "$path" && test ! -d "$path"; then
28215        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28216      fi
28217
28218      if test -d "$path"; then
28219        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28220      else
28221        dir="`$DIRNAME "$path"`"
28222        base="`$BASENAME "$path"`"
28223        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28224      fi
28225    fi
28226  fi
28227
28228            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28229$as_echo_n "checking for Boot JDK... " >&6; }
28230            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28231$as_echo "$BOOT_JDK" >&6; }
28232            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28233$as_echo_n "checking Boot JDK version... " >&6; }
28234            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28235            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28236$as_echo "$BOOT_JDK_VERSION" >&6; }
28237          fi # end check jdk version
28238        fi # end check javac
28239      fi # end check java
28240    fi # end check boot jdk found
28241  fi
28242
28243    done
28244  fi
28245
28246
28247    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28248    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28249      # Do we have a bin/java?
28250      if test ! -x "$BOOT_JDK/bin/java"; then
28251        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28252$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28253        BOOT_JDK_FOUND=no
28254      else
28255        # Do we have a bin/javac?
28256        if test ! -x "$BOOT_JDK/bin/javac"; then
28257          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28258$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28259          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28260$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28261          BOOT_JDK_FOUND=no
28262        else
28263          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28264          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28265
28266          # Extra M4 quote needed to protect [] in grep expression.
28267          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28268          if test "x$FOUND_CORRECT_VERSION" = x; then
28269            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28271            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28272$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28273            BOOT_JDK_FOUND=no
28274          else
28275            # We're done! :-)
28276            BOOT_JDK_FOUND=yes
28277
28278  # Only process if variable expands to non-empty
28279
28280  if test "x$BOOT_JDK" != x; then
28281    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28282
28283  # Input might be given as Windows format, start by converting to
28284  # unix format.
28285  path="$BOOT_JDK"
28286  new_path=`$CYGPATH -u "$path"`
28287
28288  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28289  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28290  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28291  # "foo.exe" is OK but "foo" is an error.
28292  #
28293  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28294  # It is also a way to make sure we got the proper file name for the real test later on.
28295  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28296  if test "x$test_shortpath" = x; then
28297    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28298$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28299    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28300  fi
28301
28302  # Call helper function which possibly converts this using DOS-style short mode.
28303  # If so, the updated path is stored in $new_path.
28304
28305  input_path="$new_path"
28306  # Check if we need to convert this using DOS-style short mode. If the path
28307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28308  # take no chances and rewrite it.
28309  # Note: m4 eats our [], so we need to use [ and ] instead.
28310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28311  if test "x$has_forbidden_chars" != x; then
28312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28313    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28314    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28315    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28316      # Going to short mode and back again did indeed matter. Since short mode is
28317      # case insensitive, let's make it lowercase to improve readability.
28318      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28319      # Now convert it back to Unix-style (cygpath)
28320      input_path=`$CYGPATH -u "$shortmode_path"`
28321      new_path="$input_path"
28322    fi
28323  fi
28324
28325  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28326  if test "x$test_cygdrive_prefix" = x; then
28327    # As a simple fix, exclude /usr/bin since it's not a real path.
28328    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28329      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28330      # a path prefixed by /cygdrive for fixpath to work.
28331      new_path="$CYGWIN_ROOT_PATH$input_path"
28332    fi
28333  fi
28334
28335
28336  if test "x$path" != "x$new_path"; then
28337    BOOT_JDK="$new_path"
28338    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28339$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28340  fi
28341
28342    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28343
28344  path="$BOOT_JDK"
28345  has_colon=`$ECHO $path | $GREP ^.:`
28346  new_path="$path"
28347  if test "x$has_colon" = x; then
28348    # Not in mixed or Windows style, start by that.
28349    new_path=`cmd //c echo $path`
28350  fi
28351
28352
28353  input_path="$new_path"
28354  # Check if we need to convert this using DOS-style short mode. If the path
28355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28356  # take no chances and rewrite it.
28357  # Note: m4 eats our [], so we need to use [ and ] instead.
28358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28359  if test "x$has_forbidden_chars" != x; then
28360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28361    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28362  fi
28363
28364
28365  windows_path="$new_path"
28366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28367    unix_path=`$CYGPATH -u "$windows_path"`
28368    new_path="$unix_path"
28369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28371    new_path="$unix_path"
28372  fi
28373
28374  if test "x$path" != "x$new_path"; then
28375    BOOT_JDK="$new_path"
28376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28377$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28378  fi
28379
28380  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28381  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28382
28383    else
28384      # We're on a unix platform. Hooray! :)
28385      path="$BOOT_JDK"
28386      has_space=`$ECHO "$path" | $GREP " "`
28387      if test "x$has_space" != x; then
28388        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28389$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28390        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28391      fi
28392
28393      # Use eval to expand a potential ~
28394      eval path="$path"
28395      if test ! -f "$path" && test ! -d "$path"; then
28396        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28397      fi
28398
28399      if test -d "$path"; then
28400        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28401      else
28402        dir="`$DIRNAME "$path"`"
28403        base="`$BASENAME "$path"`"
28404        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28405      fi
28406    fi
28407  fi
28408
28409            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28410$as_echo_n "checking for Boot JDK... " >&6; }
28411            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28412$as_echo "$BOOT_JDK" >&6; }
28413            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28414$as_echo_n "checking Boot JDK version... " >&6; }
28415            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28416            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28417$as_echo "$BOOT_JDK_VERSION" >&6; }
28418          fi # end check jdk version
28419        fi # end check javac
28420      fi # end check java
28421    fi # end check boot jdk found
28422  fi
28423
28424
28425  if test "x$BOOT_JDK_FOUND" = xno; then
28426    # Now execute the test
28427
28428  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28429  BOOT_JDK_SUFFIX="/Contents/Home"
28430  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28431  if test "x$ALL_JDKS_FOUND" != x; then
28432    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28433
28434  if test "x$BOOT_JDK_FOUND" = xno; then
28435    # Now execute the test
28436
28437        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28438        if test -d "$BOOT_JDK"; then
28439          BOOT_JDK_FOUND=maybe
28440          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28441$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28442        fi
28443
28444
28445    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28446    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28447      # Do we have a bin/java?
28448      if test ! -x "$BOOT_JDK/bin/java"; then
28449        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28450$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28451        BOOT_JDK_FOUND=no
28452      else
28453        # Do we have a bin/javac?
28454        if test ! -x "$BOOT_JDK/bin/javac"; then
28455          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28456$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28457          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28458$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28459          BOOT_JDK_FOUND=no
28460        else
28461          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28462          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28463
28464          # Extra M4 quote needed to protect [] in grep expression.
28465          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28466          if test "x$FOUND_CORRECT_VERSION" = x; then
28467            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28468$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28469            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28470$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28471            BOOT_JDK_FOUND=no
28472          else
28473            # We're done! :-)
28474            BOOT_JDK_FOUND=yes
28475
28476  # Only process if variable expands to non-empty
28477
28478  if test "x$BOOT_JDK" != x; then
28479    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28480
28481  # Input might be given as Windows format, start by converting to
28482  # unix format.
28483  path="$BOOT_JDK"
28484  new_path=`$CYGPATH -u "$path"`
28485
28486  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28487  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28488  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28489  # "foo.exe" is OK but "foo" is an error.
28490  #
28491  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28492  # It is also a way to make sure we got the proper file name for the real test later on.
28493  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28494  if test "x$test_shortpath" = x; then
28495    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28496$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28497    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28498  fi
28499
28500  # Call helper function which possibly converts this using DOS-style short mode.
28501  # If so, the updated path is stored in $new_path.
28502
28503  input_path="$new_path"
28504  # Check if we need to convert this using DOS-style short mode. If the path
28505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28506  # take no chances and rewrite it.
28507  # Note: m4 eats our [], so we need to use [ and ] instead.
28508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28509  if test "x$has_forbidden_chars" != x; then
28510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28511    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28512    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28513    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28514      # Going to short mode and back again did indeed matter. Since short mode is
28515      # case insensitive, let's make it lowercase to improve readability.
28516      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28517      # Now convert it back to Unix-style (cygpath)
28518      input_path=`$CYGPATH -u "$shortmode_path"`
28519      new_path="$input_path"
28520    fi
28521  fi
28522
28523  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28524  if test "x$test_cygdrive_prefix" = x; then
28525    # As a simple fix, exclude /usr/bin since it's not a real path.
28526    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28527      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28528      # a path prefixed by /cygdrive for fixpath to work.
28529      new_path="$CYGWIN_ROOT_PATH$input_path"
28530    fi
28531  fi
28532
28533
28534  if test "x$path" != "x$new_path"; then
28535    BOOT_JDK="$new_path"
28536    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28537$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28538  fi
28539
28540    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28541
28542  path="$BOOT_JDK"
28543  has_colon=`$ECHO $path | $GREP ^.:`
28544  new_path="$path"
28545  if test "x$has_colon" = x; then
28546    # Not in mixed or Windows style, start by that.
28547    new_path=`cmd //c echo $path`
28548  fi
28549
28550
28551  input_path="$new_path"
28552  # Check if we need to convert this using DOS-style short mode. If the path
28553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28554  # take no chances and rewrite it.
28555  # Note: m4 eats our [], so we need to use [ and ] instead.
28556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28557  if test "x$has_forbidden_chars" != x; then
28558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28559    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28560  fi
28561
28562
28563  windows_path="$new_path"
28564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28565    unix_path=`$CYGPATH -u "$windows_path"`
28566    new_path="$unix_path"
28567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28569    new_path="$unix_path"
28570  fi
28571
28572  if test "x$path" != "x$new_path"; then
28573    BOOT_JDK="$new_path"
28574    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28575$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28576  fi
28577
28578  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28579  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28580
28581    else
28582      # We're on a unix platform. Hooray! :)
28583      path="$BOOT_JDK"
28584      has_space=`$ECHO "$path" | $GREP " "`
28585      if test "x$has_space" != x; then
28586        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28587$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28588        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28589      fi
28590
28591      # Use eval to expand a potential ~
28592      eval path="$path"
28593      if test ! -f "$path" && test ! -d "$path"; then
28594        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28595      fi
28596
28597      if test -d "$path"; then
28598        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28599      else
28600        dir="`$DIRNAME "$path"`"
28601        base="`$BASENAME "$path"`"
28602        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28603      fi
28604    fi
28605  fi
28606
28607            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28608$as_echo_n "checking for Boot JDK... " >&6; }
28609            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28610$as_echo "$BOOT_JDK" >&6; }
28611            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28612$as_echo_n "checking Boot JDK version... " >&6; }
28613            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28614            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28615$as_echo "$BOOT_JDK_VERSION" >&6; }
28616          fi # end check jdk version
28617        fi # end check javac
28618      fi # end check java
28619    fi # end check boot jdk found
28620  fi
28621
28622    done
28623  fi
28624
28625
28626    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28627    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28628      # Do we have a bin/java?
28629      if test ! -x "$BOOT_JDK/bin/java"; then
28630        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28631$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28632        BOOT_JDK_FOUND=no
28633      else
28634        # Do we have a bin/javac?
28635        if test ! -x "$BOOT_JDK/bin/javac"; then
28636          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28637$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28638          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28639$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28640          BOOT_JDK_FOUND=no
28641        else
28642          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28643          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28644
28645          # Extra M4 quote needed to protect [] in grep expression.
28646          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28647          if test "x$FOUND_CORRECT_VERSION" = x; then
28648            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28649$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28650            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28651$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28652            BOOT_JDK_FOUND=no
28653          else
28654            # We're done! :-)
28655            BOOT_JDK_FOUND=yes
28656
28657  # Only process if variable expands to non-empty
28658
28659  if test "x$BOOT_JDK" != x; then
28660    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28661
28662  # Input might be given as Windows format, start by converting to
28663  # unix format.
28664  path="$BOOT_JDK"
28665  new_path=`$CYGPATH -u "$path"`
28666
28667  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28668  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28669  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28670  # "foo.exe" is OK but "foo" is an error.
28671  #
28672  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28673  # It is also a way to make sure we got the proper file name for the real test later on.
28674  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28675  if test "x$test_shortpath" = x; then
28676    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28677$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28678    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28679  fi
28680
28681  # Call helper function which possibly converts this using DOS-style short mode.
28682  # If so, the updated path is stored in $new_path.
28683
28684  input_path="$new_path"
28685  # Check if we need to convert this using DOS-style short mode. If the path
28686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28687  # take no chances and rewrite it.
28688  # Note: m4 eats our [], so we need to use [ and ] instead.
28689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28690  if test "x$has_forbidden_chars" != x; then
28691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28695      # Going to short mode and back again did indeed matter. Since short mode is
28696      # case insensitive, let's make it lowercase to improve readability.
28697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28698      # Now convert it back to Unix-style (cygpath)
28699      input_path=`$CYGPATH -u "$shortmode_path"`
28700      new_path="$input_path"
28701    fi
28702  fi
28703
28704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28705  if test "x$test_cygdrive_prefix" = x; then
28706    # As a simple fix, exclude /usr/bin since it's not a real path.
28707    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28709      # a path prefixed by /cygdrive for fixpath to work.
28710      new_path="$CYGWIN_ROOT_PATH$input_path"
28711    fi
28712  fi
28713
28714
28715  if test "x$path" != "x$new_path"; then
28716    BOOT_JDK="$new_path"
28717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28718$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28719  fi
28720
28721    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28722
28723  path="$BOOT_JDK"
28724  has_colon=`$ECHO $path | $GREP ^.:`
28725  new_path="$path"
28726  if test "x$has_colon" = x; then
28727    # Not in mixed or Windows style, start by that.
28728    new_path=`cmd //c echo $path`
28729  fi
28730
28731
28732  input_path="$new_path"
28733  # Check if we need to convert this using DOS-style short mode. If the path
28734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28735  # take no chances and rewrite it.
28736  # Note: m4 eats our [], so we need to use [ and ] instead.
28737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28738  if test "x$has_forbidden_chars" != x; then
28739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28740    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28741  fi
28742
28743
28744  windows_path="$new_path"
28745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28746    unix_path=`$CYGPATH -u "$windows_path"`
28747    new_path="$unix_path"
28748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28750    new_path="$unix_path"
28751  fi
28752
28753  if test "x$path" != "x$new_path"; then
28754    BOOT_JDK="$new_path"
28755    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28756$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28757  fi
28758
28759  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28760  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28761
28762    else
28763      # We're on a unix platform. Hooray! :)
28764      path="$BOOT_JDK"
28765      has_space=`$ECHO "$path" | $GREP " "`
28766      if test "x$has_space" != x; then
28767        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28768$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28769        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28770      fi
28771
28772      # Use eval to expand a potential ~
28773      eval path="$path"
28774      if test ! -f "$path" && test ! -d "$path"; then
28775        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28776      fi
28777
28778      if test -d "$path"; then
28779        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28780      else
28781        dir="`$DIRNAME "$path"`"
28782        base="`$BASENAME "$path"`"
28783        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28784      fi
28785    fi
28786  fi
28787
28788            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28789$as_echo_n "checking for Boot JDK... " >&6; }
28790            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28791$as_echo "$BOOT_JDK" >&6; }
28792            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28793$as_echo_n "checking Boot JDK version... " >&6; }
28794            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28795            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28796$as_echo "$BOOT_JDK_VERSION" >&6; }
28797          fi # end check jdk version
28798        fi # end check javac
28799      fi # end check java
28800    fi # end check boot jdk found
28801  fi
28802
28803  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28804
28805  if test "x$BOOT_JDK_FOUND" = xno; then
28806    # Now execute the test
28807
28808  BOOT_JDK_PREFIX="/usr/lib/jvm"
28809  BOOT_JDK_SUFFIX=""
28810  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28811  if test "x$ALL_JDKS_FOUND" != x; then
28812    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28813
28814  if test "x$BOOT_JDK_FOUND" = xno; then
28815    # Now execute the test
28816
28817        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28818        if test -d "$BOOT_JDK"; then
28819          BOOT_JDK_FOUND=maybe
28820          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28821$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28822        fi
28823
28824
28825    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28826    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28827      # Do we have a bin/java?
28828      if test ! -x "$BOOT_JDK/bin/java"; then
28829        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28830$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28831        BOOT_JDK_FOUND=no
28832      else
28833        # Do we have a bin/javac?
28834        if test ! -x "$BOOT_JDK/bin/javac"; then
28835          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28836$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28837          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28838$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28839          BOOT_JDK_FOUND=no
28840        else
28841          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28842          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28843
28844          # Extra M4 quote needed to protect [] in grep expression.
28845          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28846          if test "x$FOUND_CORRECT_VERSION" = x; then
28847            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28848$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28849            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28850$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28851            BOOT_JDK_FOUND=no
28852          else
28853            # We're done! :-)
28854            BOOT_JDK_FOUND=yes
28855
28856  # Only process if variable expands to non-empty
28857
28858  if test "x$BOOT_JDK" != x; then
28859    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28860
28861  # Input might be given as Windows format, start by converting to
28862  # unix format.
28863  path="$BOOT_JDK"
28864  new_path=`$CYGPATH -u "$path"`
28865
28866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28869  # "foo.exe" is OK but "foo" is an error.
28870  #
28871  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28872  # It is also a way to make sure we got the proper file name for the real test later on.
28873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28874  if test "x$test_shortpath" = x; then
28875    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28876$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28877    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28878  fi
28879
28880  # Call helper function which possibly converts this using DOS-style short mode.
28881  # If so, the updated path is stored in $new_path.
28882
28883  input_path="$new_path"
28884  # Check if we need to convert this using DOS-style short mode. If the path
28885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28886  # take no chances and rewrite it.
28887  # Note: m4 eats our [], so we need to use [ and ] instead.
28888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28889  if test "x$has_forbidden_chars" != x; then
28890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28894      # Going to short mode and back again did indeed matter. Since short mode is
28895      # case insensitive, let's make it lowercase to improve readability.
28896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28897      # Now convert it back to Unix-style (cygpath)
28898      input_path=`$CYGPATH -u "$shortmode_path"`
28899      new_path="$input_path"
28900    fi
28901  fi
28902
28903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28904  if test "x$test_cygdrive_prefix" = x; then
28905    # As a simple fix, exclude /usr/bin since it's not a real path.
28906    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28908      # a path prefixed by /cygdrive for fixpath to work.
28909      new_path="$CYGWIN_ROOT_PATH$input_path"
28910    fi
28911  fi
28912
28913
28914  if test "x$path" != "x$new_path"; then
28915    BOOT_JDK="$new_path"
28916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28917$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28918  fi
28919
28920    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28921
28922  path="$BOOT_JDK"
28923  has_colon=`$ECHO $path | $GREP ^.:`
28924  new_path="$path"
28925  if test "x$has_colon" = x; then
28926    # Not in mixed or Windows style, start by that.
28927    new_path=`cmd //c echo $path`
28928  fi
28929
28930
28931  input_path="$new_path"
28932  # Check if we need to convert this using DOS-style short mode. If the path
28933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28934  # take no chances and rewrite it.
28935  # Note: m4 eats our [], so we need to use [ and ] instead.
28936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28937  if test "x$has_forbidden_chars" != x; then
28938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28940  fi
28941
28942
28943  windows_path="$new_path"
28944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28945    unix_path=`$CYGPATH -u "$windows_path"`
28946    new_path="$unix_path"
28947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28949    new_path="$unix_path"
28950  fi
28951
28952  if test "x$path" != "x$new_path"; then
28953    BOOT_JDK="$new_path"
28954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28955$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28956  fi
28957
28958  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28959  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28960
28961    else
28962      # We're on a unix platform. Hooray! :)
28963      path="$BOOT_JDK"
28964      has_space=`$ECHO "$path" | $GREP " "`
28965      if test "x$has_space" != x; then
28966        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28967$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28968        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28969      fi
28970
28971      # Use eval to expand a potential ~
28972      eval path="$path"
28973      if test ! -f "$path" && test ! -d "$path"; then
28974        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28975      fi
28976
28977      if test -d "$path"; then
28978        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28979      else
28980        dir="`$DIRNAME "$path"`"
28981        base="`$BASENAME "$path"`"
28982        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28983      fi
28984    fi
28985  fi
28986
28987            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28988$as_echo_n "checking for Boot JDK... " >&6; }
28989            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28990$as_echo "$BOOT_JDK" >&6; }
28991            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28992$as_echo_n "checking Boot JDK version... " >&6; }
28993            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28994            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28995$as_echo "$BOOT_JDK_VERSION" >&6; }
28996          fi # end check jdk version
28997        fi # end check javac
28998      fi # end check java
28999    fi # end check boot jdk found
29000  fi
29001
29002    done
29003  fi
29004
29005
29006    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29007    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29008      # Do we have a bin/java?
29009      if test ! -x "$BOOT_JDK/bin/java"; then
29010        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29011$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29012        BOOT_JDK_FOUND=no
29013      else
29014        # Do we have a bin/javac?
29015        if test ! -x "$BOOT_JDK/bin/javac"; then
29016          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29017$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29018          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29019$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29020          BOOT_JDK_FOUND=no
29021        else
29022          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29023          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29024
29025          # Extra M4 quote needed to protect [] in grep expression.
29026          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29027          if test "x$FOUND_CORRECT_VERSION" = x; then
29028            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29029$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29030            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29031$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29032            BOOT_JDK_FOUND=no
29033          else
29034            # We're done! :-)
29035            BOOT_JDK_FOUND=yes
29036
29037  # Only process if variable expands to non-empty
29038
29039  if test "x$BOOT_JDK" != x; then
29040    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29041
29042  # Input might be given as Windows format, start by converting to
29043  # unix format.
29044  path="$BOOT_JDK"
29045  new_path=`$CYGPATH -u "$path"`
29046
29047  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29048  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29049  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29050  # "foo.exe" is OK but "foo" is an error.
29051  #
29052  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29053  # It is also a way to make sure we got the proper file name for the real test later on.
29054  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29055  if test "x$test_shortpath" = x; then
29056    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29057$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29058    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29059  fi
29060
29061  # Call helper function which possibly converts this using DOS-style short mode.
29062  # If so, the updated path is stored in $new_path.
29063
29064  input_path="$new_path"
29065  # Check if we need to convert this using DOS-style short mode. If the path
29066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29067  # take no chances and rewrite it.
29068  # Note: m4 eats our [], so we need to use [ and ] instead.
29069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29070  if test "x$has_forbidden_chars" != x; then
29071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29072    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29073    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29074    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29075      # Going to short mode and back again did indeed matter. Since short mode is
29076      # case insensitive, let's make it lowercase to improve readability.
29077      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29078      # Now convert it back to Unix-style (cygpath)
29079      input_path=`$CYGPATH -u "$shortmode_path"`
29080      new_path="$input_path"
29081    fi
29082  fi
29083
29084  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29085  if test "x$test_cygdrive_prefix" = x; then
29086    # As a simple fix, exclude /usr/bin since it's not a real path.
29087    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29088      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29089      # a path prefixed by /cygdrive for fixpath to work.
29090      new_path="$CYGWIN_ROOT_PATH$input_path"
29091    fi
29092  fi
29093
29094
29095  if test "x$path" != "x$new_path"; then
29096    BOOT_JDK="$new_path"
29097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29098$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29099  fi
29100
29101    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29102
29103  path="$BOOT_JDK"
29104  has_colon=`$ECHO $path | $GREP ^.:`
29105  new_path="$path"
29106  if test "x$has_colon" = x; then
29107    # Not in mixed or Windows style, start by that.
29108    new_path=`cmd //c echo $path`
29109  fi
29110
29111
29112  input_path="$new_path"
29113  # Check if we need to convert this using DOS-style short mode. If the path
29114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29115  # take no chances and rewrite it.
29116  # Note: m4 eats our [], so we need to use [ and ] instead.
29117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29118  if test "x$has_forbidden_chars" != x; then
29119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29120    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29121  fi
29122
29123
29124  windows_path="$new_path"
29125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29126    unix_path=`$CYGPATH -u "$windows_path"`
29127    new_path="$unix_path"
29128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29130    new_path="$unix_path"
29131  fi
29132
29133  if test "x$path" != "x$new_path"; then
29134    BOOT_JDK="$new_path"
29135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29136$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29137  fi
29138
29139  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29140  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29141
29142    else
29143      # We're on a unix platform. Hooray! :)
29144      path="$BOOT_JDK"
29145      has_space=`$ECHO "$path" | $GREP " "`
29146      if test "x$has_space" != x; then
29147        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29148$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29149        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29150      fi
29151
29152      # Use eval to expand a potential ~
29153      eval path="$path"
29154      if test ! -f "$path" && test ! -d "$path"; then
29155        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29156      fi
29157
29158      if test -d "$path"; then
29159        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29160      else
29161        dir="`$DIRNAME "$path"`"
29162        base="`$BASENAME "$path"`"
29163        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29164      fi
29165    fi
29166  fi
29167
29168            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29169$as_echo_n "checking for Boot JDK... " >&6; }
29170            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29171$as_echo "$BOOT_JDK" >&6; }
29172            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29173$as_echo_n "checking Boot JDK version... " >&6; }
29174            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29175            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29176$as_echo "$BOOT_JDK_VERSION" >&6; }
29177          fi # end check jdk version
29178        fi # end check javac
29179      fi # end check java
29180    fi # end check boot jdk found
29181  fi
29182
29183  fi
29184
29185
29186    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29187    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29188      # Do we have a bin/java?
29189      if test ! -x "$BOOT_JDK/bin/java"; then
29190        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29192        BOOT_JDK_FOUND=no
29193      else
29194        # Do we have a bin/javac?
29195        if test ! -x "$BOOT_JDK/bin/javac"; then
29196          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29198          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29199$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29200          BOOT_JDK_FOUND=no
29201        else
29202          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29203          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29204
29205          # Extra M4 quote needed to protect [] in grep expression.
29206          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29207          if test "x$FOUND_CORRECT_VERSION" = x; then
29208            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29209$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29210            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29211$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29212            BOOT_JDK_FOUND=no
29213          else
29214            # We're done! :-)
29215            BOOT_JDK_FOUND=yes
29216
29217  # Only process if variable expands to non-empty
29218
29219  if test "x$BOOT_JDK" != x; then
29220    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29221
29222  # Input might be given as Windows format, start by converting to
29223  # unix format.
29224  path="$BOOT_JDK"
29225  new_path=`$CYGPATH -u "$path"`
29226
29227  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29228  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29229  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29230  # "foo.exe" is OK but "foo" is an error.
29231  #
29232  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29233  # It is also a way to make sure we got the proper file name for the real test later on.
29234  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29235  if test "x$test_shortpath" = x; then
29236    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29237$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29238    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29239  fi
29240
29241  # Call helper function which possibly converts this using DOS-style short mode.
29242  # If so, the updated path is stored in $new_path.
29243
29244  input_path="$new_path"
29245  # Check if we need to convert this using DOS-style short mode. If the path
29246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29247  # take no chances and rewrite it.
29248  # Note: m4 eats our [], so we need to use [ and ] instead.
29249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29250  if test "x$has_forbidden_chars" != x; then
29251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29252    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29253    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29254    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29255      # Going to short mode and back again did indeed matter. Since short mode is
29256      # case insensitive, let's make it lowercase to improve readability.
29257      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29258      # Now convert it back to Unix-style (cygpath)
29259      input_path=`$CYGPATH -u "$shortmode_path"`
29260      new_path="$input_path"
29261    fi
29262  fi
29263
29264  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29265  if test "x$test_cygdrive_prefix" = x; then
29266    # As a simple fix, exclude /usr/bin since it's not a real path.
29267    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29268      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29269      # a path prefixed by /cygdrive for fixpath to work.
29270      new_path="$CYGWIN_ROOT_PATH$input_path"
29271    fi
29272  fi
29273
29274
29275  if test "x$path" != "x$new_path"; then
29276    BOOT_JDK="$new_path"
29277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29278$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29279  fi
29280
29281    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29282
29283  path="$BOOT_JDK"
29284  has_colon=`$ECHO $path | $GREP ^.:`
29285  new_path="$path"
29286  if test "x$has_colon" = x; then
29287    # Not in mixed or Windows style, start by that.
29288    new_path=`cmd //c echo $path`
29289  fi
29290
29291
29292  input_path="$new_path"
29293  # Check if we need to convert this using DOS-style short mode. If the path
29294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29295  # take no chances and rewrite it.
29296  # Note: m4 eats our [], so we need to use [ and ] instead.
29297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29298  if test "x$has_forbidden_chars" != x; then
29299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29300    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29301  fi
29302
29303
29304  windows_path="$new_path"
29305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29306    unix_path=`$CYGPATH -u "$windows_path"`
29307    new_path="$unix_path"
29308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29310    new_path="$unix_path"
29311  fi
29312
29313  if test "x$path" != "x$new_path"; then
29314    BOOT_JDK="$new_path"
29315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29316$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29317  fi
29318
29319  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29320  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29321
29322    else
29323      # We're on a unix platform. Hooray! :)
29324      path="$BOOT_JDK"
29325      has_space=`$ECHO "$path" | $GREP " "`
29326      if test "x$has_space" != x; then
29327        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29328$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29329        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29330      fi
29331
29332      # Use eval to expand a potential ~
29333      eval path="$path"
29334      if test ! -f "$path" && test ! -d "$path"; then
29335        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29336      fi
29337
29338      if test -d "$path"; then
29339        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29340      else
29341        dir="`$DIRNAME "$path"`"
29342        base="`$BASENAME "$path"`"
29343        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29344      fi
29345    fi
29346  fi
29347
29348            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29349$as_echo_n "checking for Boot JDK... " >&6; }
29350            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29351$as_echo "$BOOT_JDK" >&6; }
29352            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29353$as_echo_n "checking Boot JDK version... " >&6; }
29354            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29355            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29356$as_echo "$BOOT_JDK_VERSION" >&6; }
29357          fi # end check jdk version
29358        fi # end check javac
29359      fi # end check java
29360    fi # end check boot jdk found
29361  fi
29362
29363
29364  # If we haven't found anything yet, we've truly lost. Give up.
29365  if test "x$BOOT_JDK_FOUND" = xno; then
29366
29367  # Print a helpful message on how to acquire the necessary build dependency.
29368  # openjdk is the help tag: freetype, cups, alsa etc
29369  MISSING_DEPENDENCY=openjdk
29370
29371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29372    cygwin_help $MISSING_DEPENDENCY
29373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29374    msys_help $MISSING_DEPENDENCY
29375  else
29376    PKGHANDLER_COMMAND=
29377
29378    case $PKGHANDLER in
29379      apt-get)
29380        apt_help     $MISSING_DEPENDENCY ;;
29381      yum)
29382        yum_help     $MISSING_DEPENDENCY ;;
29383      port)
29384        port_help    $MISSING_DEPENDENCY ;;
29385      pkgutil)
29386        pkgutil_help $MISSING_DEPENDENCY ;;
29387      pkgadd)
29388        pkgadd_help  $MISSING_DEPENDENCY ;;
29389    esac
29390
29391    if test "x$PKGHANDLER_COMMAND" != x; then
29392      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29393    fi
29394  fi
29395
29396    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29397$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29398    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29399$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29400    as_fn_error $? "Cannot continue" "$LINENO" 5
29401  fi
29402
29403
29404
29405  # Setup tools from the Boot JDK.
29406
29407  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29408
29409  # Publish this variable in the help.
29410
29411
29412  if [ -z "${JAVA+x}" ]; then
29413    # The variable is not set by user, try to locate tool using the code snippet
29414
29415      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29416$as_echo_n "checking for java in Boot JDK... " >&6; }
29417      JAVA=$BOOT_JDK/bin/java
29418      if test ! -x $JAVA; then
29419        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29420$as_echo "not found" >&6; }
29421        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29422$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29423        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29424      fi
29425      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29426$as_echo "ok" >&6; }
29427
29428
29429  else
29430    # The variable is set, but is it from the command line or the environment?
29431
29432    # Try to remove the string !JAVA! from our list.
29433    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29434    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29435      # If it failed, the variable was not from the command line. Ignore it,
29436      # but warn the user (except for BASH, which is always set by the calling BASH).
29437      if test "xJAVA" != xBASH; then
29438        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29439$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29440      fi
29441      # Try to locate tool using the code snippet
29442
29443      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29444$as_echo_n "checking for java in Boot JDK... " >&6; }
29445      JAVA=$BOOT_JDK/bin/java
29446      if test ! -x $JAVA; then
29447        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29448$as_echo "not found" >&6; }
29449        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29450$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29451        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29452      fi
29453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29454$as_echo "ok" >&6; }
29455
29456
29457    else
29458      # If it succeeded, then it was overridden by the user. We will use it
29459      # for the tool.
29460
29461      # First remove it from the list of overridden variables, so we can test
29462      # for unknown variables in the end.
29463      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29464
29465      # Check if we try to supply an empty value
29466      if test "x$JAVA" = x; then
29467        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29468$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29469        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29470$as_echo_n "checking for JAVA... " >&6; }
29471        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29472$as_echo "disabled" >&6; }
29473      else
29474        # Check if the provided tool contains a complete path.
29475        tool_specified="$JAVA"
29476        tool_basename="${tool_specified##*/}"
29477        if test "x$tool_basename" = "x$tool_specified"; then
29478          # A command without a complete path is provided, search $PATH.
29479          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29480$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29481          # Extract the first word of "$tool_basename", so it can be a program name with args.
29482set dummy $tool_basename; ac_word=$2
29483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29484$as_echo_n "checking for $ac_word... " >&6; }
29485if ${ac_cv_path_JAVA+:} false; then :
29486  $as_echo_n "(cached) " >&6
29487else
29488  case $JAVA in
29489  [\\/]* | ?:[\\/]*)
29490  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29491  ;;
29492  *)
29493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29494for as_dir in $PATH
29495do
29496  IFS=$as_save_IFS
29497  test -z "$as_dir" && as_dir=.
29498    for ac_exec_ext in '' $ac_executable_extensions; do
29499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29500    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29502    break 2
29503  fi
29504done
29505  done
29506IFS=$as_save_IFS
29507
29508  ;;
29509esac
29510fi
29511JAVA=$ac_cv_path_JAVA
29512if test -n "$JAVA"; then
29513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
29514$as_echo "$JAVA" >&6; }
29515else
29516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29517$as_echo "no" >&6; }
29518fi
29519
29520
29521          if test "x$JAVA" = x; then
29522            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29523          fi
29524        else
29525          # Otherwise we believe it is a complete path. Use it as it is.
29526          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
29527$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
29528          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29529$as_echo_n "checking for JAVA... " >&6; }
29530          if test ! -x "$tool_specified"; then
29531            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29532$as_echo "not found" >&6; }
29533            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
29534          fi
29535          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29536$as_echo "$tool_specified" >&6; }
29537        fi
29538      fi
29539    fi
29540
29541  fi
29542
29543
29544
29545  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29546
29547  # Publish this variable in the help.
29548
29549
29550  if [ -z "${JAVAC+x}" ]; then
29551    # The variable is not set by user, try to locate tool using the code snippet
29552
29553      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29554$as_echo_n "checking for javac in Boot JDK... " >&6; }
29555      JAVAC=$BOOT_JDK/bin/javac
29556      if test ! -x $JAVAC; then
29557        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29558$as_echo "not found" >&6; }
29559        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29560$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29561        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29562      fi
29563      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29564$as_echo "ok" >&6; }
29565
29566
29567  else
29568    # The variable is set, but is it from the command line or the environment?
29569
29570    # Try to remove the string !JAVAC! from our list.
29571    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
29572    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29573      # If it failed, the variable was not from the command line. Ignore it,
29574      # but warn the user (except for BASH, which is always set by the calling BASH).
29575      if test "xJAVAC" != xBASH; then
29576        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29577$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29578      fi
29579      # Try to locate tool using the code snippet
29580
29581      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29582$as_echo_n "checking for javac in Boot JDK... " >&6; }
29583      JAVAC=$BOOT_JDK/bin/javac
29584      if test ! -x $JAVAC; then
29585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29586$as_echo "not found" >&6; }
29587        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29588$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29589        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29590      fi
29591      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29592$as_echo "ok" >&6; }
29593
29594
29595    else
29596      # If it succeeded, then it was overridden by the user. We will use it
29597      # for the tool.
29598
29599      # First remove it from the list of overridden variables, so we can test
29600      # for unknown variables in the end.
29601      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29602
29603      # Check if we try to supply an empty value
29604      if test "x$JAVAC" = x; then
29605        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29606$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29607        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29608$as_echo_n "checking for JAVAC... " >&6; }
29609        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29610$as_echo "disabled" >&6; }
29611      else
29612        # Check if the provided tool contains a complete path.
29613        tool_specified="$JAVAC"
29614        tool_basename="${tool_specified##*/}"
29615        if test "x$tool_basename" = "x$tool_specified"; then
29616          # A command without a complete path is provided, search $PATH.
29617          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29618$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29619          # Extract the first word of "$tool_basename", so it can be a program name with args.
29620set dummy $tool_basename; ac_word=$2
29621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29622$as_echo_n "checking for $ac_word... " >&6; }
29623if ${ac_cv_path_JAVAC+:} false; then :
29624  $as_echo_n "(cached) " >&6
29625else
29626  case $JAVAC in
29627  [\\/]* | ?:[\\/]*)
29628  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29629  ;;
29630  *)
29631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29632for as_dir in $PATH
29633do
29634  IFS=$as_save_IFS
29635  test -z "$as_dir" && as_dir=.
29636    for ac_exec_ext in '' $ac_executable_extensions; do
29637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29638    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29640    break 2
29641  fi
29642done
29643  done
29644IFS=$as_save_IFS
29645
29646  ;;
29647esac
29648fi
29649JAVAC=$ac_cv_path_JAVAC
29650if test -n "$JAVAC"; then
29651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29652$as_echo "$JAVAC" >&6; }
29653else
29654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29655$as_echo "no" >&6; }
29656fi
29657
29658
29659          if test "x$JAVAC" = x; then
29660            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29661          fi
29662        else
29663          # Otherwise we believe it is a complete path. Use it as it is.
29664          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29665$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29666          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29667$as_echo_n "checking for JAVAC... " >&6; }
29668          if test ! -x "$tool_specified"; then
29669            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29670$as_echo "not found" >&6; }
29671            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29672          fi
29673          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29674$as_echo "$tool_specified" >&6; }
29675        fi
29676      fi
29677    fi
29678
29679  fi
29680
29681
29682
29683  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29684
29685  # Publish this variable in the help.
29686
29687
29688  if [ -z "${JAVAH+x}" ]; then
29689    # The variable is not set by user, try to locate tool using the code snippet
29690
29691      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29692$as_echo_n "checking for javah in Boot JDK... " >&6; }
29693      JAVAH=$BOOT_JDK/bin/javah
29694      if test ! -x $JAVAH; then
29695        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29696$as_echo "not found" >&6; }
29697        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29698$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29699        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29700      fi
29701      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29702$as_echo "ok" >&6; }
29703
29704
29705  else
29706    # The variable is set, but is it from the command line or the environment?
29707
29708    # Try to remove the string !JAVAH! from our list.
29709    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29710    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29711      # If it failed, the variable was not from the command line. Ignore it,
29712      # but warn the user (except for BASH, which is always set by the calling BASH).
29713      if test "xJAVAH" != xBASH; then
29714        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29715$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29716      fi
29717      # Try to locate tool using the code snippet
29718
29719      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29720$as_echo_n "checking for javah in Boot JDK... " >&6; }
29721      JAVAH=$BOOT_JDK/bin/javah
29722      if test ! -x $JAVAH; then
29723        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29724$as_echo "not found" >&6; }
29725        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29726$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29727        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29728      fi
29729      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29730$as_echo "ok" >&6; }
29731
29732
29733    else
29734      # If it succeeded, then it was overridden by the user. We will use it
29735      # for the tool.
29736
29737      # First remove it from the list of overridden variables, so we can test
29738      # for unknown variables in the end.
29739      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29740
29741      # Check if we try to supply an empty value
29742      if test "x$JAVAH" = x; then
29743        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29744$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29745        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29746$as_echo_n "checking for JAVAH... " >&6; }
29747        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29748$as_echo "disabled" >&6; }
29749      else
29750        # Check if the provided tool contains a complete path.
29751        tool_specified="$JAVAH"
29752        tool_basename="${tool_specified##*/}"
29753        if test "x$tool_basename" = "x$tool_specified"; then
29754          # A command without a complete path is provided, search $PATH.
29755          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29756$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29757          # Extract the first word of "$tool_basename", so it can be a program name with args.
29758set dummy $tool_basename; ac_word=$2
29759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29760$as_echo_n "checking for $ac_word... " >&6; }
29761if ${ac_cv_path_JAVAH+:} false; then :
29762  $as_echo_n "(cached) " >&6
29763else
29764  case $JAVAH in
29765  [\\/]* | ?:[\\/]*)
29766  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29767  ;;
29768  *)
29769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29770for as_dir in $PATH
29771do
29772  IFS=$as_save_IFS
29773  test -z "$as_dir" && as_dir=.
29774    for ac_exec_ext in '' $ac_executable_extensions; do
29775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29776    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29778    break 2
29779  fi
29780done
29781  done
29782IFS=$as_save_IFS
29783
29784  ;;
29785esac
29786fi
29787JAVAH=$ac_cv_path_JAVAH
29788if test -n "$JAVAH"; then
29789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29790$as_echo "$JAVAH" >&6; }
29791else
29792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29793$as_echo "no" >&6; }
29794fi
29795
29796
29797          if test "x$JAVAH" = x; then
29798            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29799          fi
29800        else
29801          # Otherwise we believe it is a complete path. Use it as it is.
29802          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29803$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29804          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29805$as_echo_n "checking for JAVAH... " >&6; }
29806          if test ! -x "$tool_specified"; then
29807            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29808$as_echo "not found" >&6; }
29809            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29810          fi
29811          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29812$as_echo "$tool_specified" >&6; }
29813        fi
29814      fi
29815    fi
29816
29817  fi
29818
29819
29820
29821  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29822
29823  # Publish this variable in the help.
29824
29825
29826  if [ -z "${JAR+x}" ]; then
29827    # The variable is not set by user, try to locate tool using the code snippet
29828
29829      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29830$as_echo_n "checking for jar in Boot JDK... " >&6; }
29831      JAR=$BOOT_JDK/bin/jar
29832      if test ! -x $JAR; then
29833        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29834$as_echo "not found" >&6; }
29835        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29836$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29837        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29838      fi
29839      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29840$as_echo "ok" >&6; }
29841
29842
29843  else
29844    # The variable is set, but is it from the command line or the environment?
29845
29846    # Try to remove the string !JAR! from our list.
29847    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29848    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29849      # If it failed, the variable was not from the command line. Ignore it,
29850      # but warn the user (except for BASH, which is always set by the calling BASH).
29851      if test "xJAR" != xBASH; then
29852        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29853$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29854      fi
29855      # Try to locate tool using the code snippet
29856
29857      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29858$as_echo_n "checking for jar in Boot JDK... " >&6; }
29859      JAR=$BOOT_JDK/bin/jar
29860      if test ! -x $JAR; then
29861        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29862$as_echo "not found" >&6; }
29863        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29864$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29865        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29866      fi
29867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29868$as_echo "ok" >&6; }
29869
29870
29871    else
29872      # If it succeeded, then it was overridden by the user. We will use it
29873      # for the tool.
29874
29875      # First remove it from the list of overridden variables, so we can test
29876      # for unknown variables in the end.
29877      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29878
29879      # Check if we try to supply an empty value
29880      if test "x$JAR" = x; then
29881        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29882$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29883        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29884$as_echo_n "checking for JAR... " >&6; }
29885        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29886$as_echo "disabled" >&6; }
29887      else
29888        # Check if the provided tool contains a complete path.
29889        tool_specified="$JAR"
29890        tool_basename="${tool_specified##*/}"
29891        if test "x$tool_basename" = "x$tool_specified"; then
29892          # A command without a complete path is provided, search $PATH.
29893          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29894$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29895          # Extract the first word of "$tool_basename", so it can be a program name with args.
29896set dummy $tool_basename; ac_word=$2
29897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29898$as_echo_n "checking for $ac_word... " >&6; }
29899if ${ac_cv_path_JAR+:} false; then :
29900  $as_echo_n "(cached) " >&6
29901else
29902  case $JAR in
29903  [\\/]* | ?:[\\/]*)
29904  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29905  ;;
29906  *)
29907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29908for as_dir in $PATH
29909do
29910  IFS=$as_save_IFS
29911  test -z "$as_dir" && as_dir=.
29912    for ac_exec_ext in '' $ac_executable_extensions; do
29913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29914    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29916    break 2
29917  fi
29918done
29919  done
29920IFS=$as_save_IFS
29921
29922  ;;
29923esac
29924fi
29925JAR=$ac_cv_path_JAR
29926if test -n "$JAR"; then
29927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29928$as_echo "$JAR" >&6; }
29929else
29930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29931$as_echo "no" >&6; }
29932fi
29933
29934
29935          if test "x$JAR" = x; then
29936            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29937          fi
29938        else
29939          # Otherwise we believe it is a complete path. Use it as it is.
29940          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29941$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29942          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29943$as_echo_n "checking for JAR... " >&6; }
29944          if test ! -x "$tool_specified"; then
29945            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29946$as_echo "not found" >&6; }
29947            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29948          fi
29949          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29950$as_echo "$tool_specified" >&6; }
29951        fi
29952      fi
29953    fi
29954
29955  fi
29956
29957
29958
29959  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29960
29961  # Publish this variable in the help.
29962
29963
29964  if [ -z "${JARSIGNER+x}" ]; then
29965    # The variable is not set by user, try to locate tool using the code snippet
29966
29967      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29968$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29969      JARSIGNER=$BOOT_JDK/bin/jarsigner
29970      if test ! -x $JARSIGNER; then
29971        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29972$as_echo "not found" >&6; }
29973        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29974$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29975        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29976      fi
29977      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29978$as_echo "ok" >&6; }
29979
29980
29981  else
29982    # The variable is set, but is it from the command line or the environment?
29983
29984    # Try to remove the string !JARSIGNER! from our list.
29985    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29986    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29987      # If it failed, the variable was not from the command line. Ignore it,
29988      # but warn the user (except for BASH, which is always set by the calling BASH).
29989      if test "xJARSIGNER" != xBASH; then
29990        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29991$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29992      fi
29993      # Try to locate tool using the code snippet
29994
29995      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29996$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29997      JARSIGNER=$BOOT_JDK/bin/jarsigner
29998      if test ! -x $JARSIGNER; then
29999        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30000$as_echo "not found" >&6; }
30001        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30002$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30003        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30004      fi
30005      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30006$as_echo "ok" >&6; }
30007
30008
30009    else
30010      # If it succeeded, then it was overridden by the user. We will use it
30011      # for the tool.
30012
30013      # First remove it from the list of overridden variables, so we can test
30014      # for unknown variables in the end.
30015      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30016
30017      # Check if we try to supply an empty value
30018      if test "x$JARSIGNER" = x; then
30019        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30020$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30021        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30022$as_echo_n "checking for JARSIGNER... " >&6; }
30023        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30024$as_echo "disabled" >&6; }
30025      else
30026        # Check if the provided tool contains a complete path.
30027        tool_specified="$JARSIGNER"
30028        tool_basename="${tool_specified##*/}"
30029        if test "x$tool_basename" = "x$tool_specified"; then
30030          # A command without a complete path is provided, search $PATH.
30031          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30032$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30033          # Extract the first word of "$tool_basename", so it can be a program name with args.
30034set dummy $tool_basename; ac_word=$2
30035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30036$as_echo_n "checking for $ac_word... " >&6; }
30037if ${ac_cv_path_JARSIGNER+:} false; then :
30038  $as_echo_n "(cached) " >&6
30039else
30040  case $JARSIGNER in
30041  [\\/]* | ?:[\\/]*)
30042  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30043  ;;
30044  *)
30045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30046for as_dir in $PATH
30047do
30048  IFS=$as_save_IFS
30049  test -z "$as_dir" && as_dir=.
30050    for ac_exec_ext in '' $ac_executable_extensions; do
30051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30052    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30054    break 2
30055  fi
30056done
30057  done
30058IFS=$as_save_IFS
30059
30060  ;;
30061esac
30062fi
30063JARSIGNER=$ac_cv_path_JARSIGNER
30064if test -n "$JARSIGNER"; then
30065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30066$as_echo "$JARSIGNER" >&6; }
30067else
30068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30069$as_echo "no" >&6; }
30070fi
30071
30072
30073          if test "x$JARSIGNER" = x; then
30074            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30075          fi
30076        else
30077          # Otherwise we believe it is a complete path. Use it as it is.
30078          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30079$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30080          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30081$as_echo_n "checking for JARSIGNER... " >&6; }
30082          if test ! -x "$tool_specified"; then
30083            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30084$as_echo "not found" >&6; }
30085            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30086          fi
30087          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30088$as_echo "$tool_specified" >&6; }
30089        fi
30090      fi
30091    fi
30092
30093  fi
30094
30095
30096
30097  # Finally, set some other options...
30098
30099  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30100  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30101
30102
30103
30104  $ECHO "Check if jvm arg is ok: -Xpatch:foo=bar" >&5
30105  $ECHO "Command: $JAVA -Xpatch:foo=bar -version" >&5
30106  OUTPUT=`$JAVA -Xpatch:foo=bar -version 2>&1`
30107  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
30108  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
30109  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30110    dummy="$dummy -Xpatch:foo=bar"
30111    JVM_ARG_OK=true
30112  else
30113    $ECHO "Arg failed:" >&5
30114    $ECHO "$OUTPUT" >&5
30115    JVM_ARG_OK=false
30116  fi
30117
30118  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30119$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30120  if test "x$JVM_ARG_OK" = "xtrue"; then
30121    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30122$as_echo "yes" >&6; }
30123    BOOT_JDK_MODULAR="true"
30124  else
30125    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30126$as_echo "no" >&6; }
30127    BOOT_JDK_MODULAR="false"
30128  fi
30129
30130
30131
30132
30133  # Check if the boot jdk is 32 or 64 bit
30134  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30135    BOOT_JDK_BITS="64"
30136  else
30137    BOOT_JDK_BITS="32"
30138  fi
30139  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30140$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30142$as_echo "$BOOT_JDK_BITS" >&6; }
30143
30144
30145
30146
30147# Check whether --with-build-jdk was given.
30148if test "${with_build_jdk+set}" = set; then :
30149  withval=$with_build_jdk;
30150fi
30151
30152
30153  CREATE_BUILDJDK_FOR_HOST=false
30154  BUILD_JDK_FOUND="no"
30155  if test "x$with_build_jdk" != "x"; then
30156
30157  if test "x$BUILD_JDK_FOUND" = xno; then
30158    # Execute the test
30159
30160       if test "x$with_build_jdk" != x; then
30161         BUILD_JDK=$with_build_jdk
30162         BUILD_JDK_FOUND=maybe
30163         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30164$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30165       fi
30166
30167    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30168    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30169      # Do we have a bin/java?
30170      if test ! -x "$BUILD_JDK/bin/java"; then
30171        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30172$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30173        BUILD_JDK_FOUND=no
30174      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30175        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30176$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30177        BUILD_JDK_FOUND=no
30178      elif test ! -x "$BUILD_JDK/bin/javac"; then
30179        # Do we have a bin/javac?
30180        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30181$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30182        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30183$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30184        BUILD_JDK_FOUND=no
30185      else
30186        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30187        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | head -n 1`
30188
30189        # Extra M4 quote needed to protect [] in grep expression.
30190        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30191        if test "x$FOUND_CORRECT_VERSION" = x; then
30192          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30193$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30194          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30195$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30196          BUILD_JDK_FOUND=no
30197        else
30198          # We're done!
30199          BUILD_JDK_FOUND=yes
30200
30201  # Only process if variable expands to non-empty
30202
30203  if test "x$BUILD_JDK" != x; then
30204    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30205
30206  # Input might be given as Windows format, start by converting to
30207  # unix format.
30208  path="$BUILD_JDK"
30209  new_path=`$CYGPATH -u "$path"`
30210
30211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30214  # "foo.exe" is OK but "foo" is an error.
30215  #
30216  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30217  # It is also a way to make sure we got the proper file name for the real test later on.
30218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30219  if test "x$test_shortpath" = x; then
30220    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30221$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30222    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30223  fi
30224
30225  # Call helper function which possibly converts this using DOS-style short mode.
30226  # If so, the updated path is stored in $new_path.
30227
30228  input_path="$new_path"
30229  # Check if we need to convert this using DOS-style short mode. If the path
30230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30231  # take no chances and rewrite it.
30232  # Note: m4 eats our [], so we need to use [ and ] instead.
30233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30234  if test "x$has_forbidden_chars" != x; then
30235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30236    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30237    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30238    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30239      # Going to short mode and back again did indeed matter. Since short mode is
30240      # case insensitive, let's make it lowercase to improve readability.
30241      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30242      # Now convert it back to Unix-style (cygpath)
30243      input_path=`$CYGPATH -u "$shortmode_path"`
30244      new_path="$input_path"
30245    fi
30246  fi
30247
30248  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30249  if test "x$test_cygdrive_prefix" = x; then
30250    # As a simple fix, exclude /usr/bin since it's not a real path.
30251    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30252      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30253      # a path prefixed by /cygdrive for fixpath to work.
30254      new_path="$CYGWIN_ROOT_PATH$input_path"
30255    fi
30256  fi
30257
30258
30259  if test "x$path" != "x$new_path"; then
30260    BUILD_JDK="$new_path"
30261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30262$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30263  fi
30264
30265    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30266
30267  path="$BUILD_JDK"
30268  has_colon=`$ECHO $path | $GREP ^.:`
30269  new_path="$path"
30270  if test "x$has_colon" = x; then
30271    # Not in mixed or Windows style, start by that.
30272    new_path=`cmd //c echo $path`
30273  fi
30274
30275
30276  input_path="$new_path"
30277  # Check if we need to convert this using DOS-style short mode. If the path
30278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30279  # take no chances and rewrite it.
30280  # Note: m4 eats our [], so we need to use [ and ] instead.
30281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30282  if test "x$has_forbidden_chars" != x; then
30283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30284    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30285  fi
30286
30287
30288  windows_path="$new_path"
30289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30290    unix_path=`$CYGPATH -u "$windows_path"`
30291    new_path="$unix_path"
30292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30294    new_path="$unix_path"
30295  fi
30296
30297  if test "x$path" != "x$new_path"; then
30298    BUILD_JDK="$new_path"
30299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30300$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30301  fi
30302
30303  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30304  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30305
30306    else
30307      # We're on a unix platform. Hooray! :)
30308      path="$BUILD_JDK"
30309      has_space=`$ECHO "$path" | $GREP " "`
30310      if test "x$has_space" != x; then
30311        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30312$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30313        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30314      fi
30315
30316      # Use eval to expand a potential ~
30317      eval path="$path"
30318      if test ! -f "$path" && test ! -d "$path"; then
30319        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30320      fi
30321
30322      if test -d "$path"; then
30323        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30324      else
30325        dir="`$DIRNAME "$path"`"
30326        base="`$BASENAME "$path"`"
30327        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30328      fi
30329    fi
30330  fi
30331
30332          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30333$as_echo_n "checking for Build JDK... " >&6; }
30334          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30335$as_echo "$BUILD_JDK" >&6; }
30336          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30337$as_echo_n "checking Build JDK version... " >&6; }
30338          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30339          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30340$as_echo "$BUILD_JDK_VERSION" >&6; }
30341        fi # end check jdk version
30342      fi # end check java
30343    fi # end check build jdk found
30344  fi
30345
30346  else
30347    if test "x$COMPILE_TYPE" = "xcross"; then
30348      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30349      BUILD_JDK_FOUND=yes
30350      CREATE_BUILDJDK=true
30351      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30352$as_echo_n "checking for Build JDK... " >&6; }
30353      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30354$as_echo "yes, will build it for the host platform" >&6; }
30355    else
30356      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30357      BUILD_JDK_FOUND=yes
30358      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30359$as_echo_n "checking for Build JDK... " >&6; }
30360      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30361$as_echo "yes, will use output dir" >&6; }
30362    fi
30363  fi
30364
30365  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30366    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30367$as_echo_n "checking for Build JDK... " >&6; }
30368    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30369$as_echo "no" >&6; }
30370    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30371  fi
30372
30373
30374
30375
30376
30377###############################################################################
30378#
30379# Configure the sources to use. We can add or override individual directories.
30380#
30381###############################################################################
30382
30383
30384  # Where are the sources.
30385  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30386  CORBA_TOPDIR="$SRC_ROOT/corba"
30387  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30388  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30389  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30390  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30391  JDK_TOPDIR="$SRC_ROOT/jdk"
30392
30393
30394
30395
30396
30397
30398
30399
30400
30401  # This feature is no longer supported.
30402
30403
30404
30405# Check whether --with-add-source-root was given.
30406if test "${with_add_source_root+set}" = set; then :
30407  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
30408$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30409fi
30410
30411
30412
30413
30414# Check whether --with-override-source-root was given.
30415if test "${with_override_source_root+set}" = set; then :
30416  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
30417$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30418fi
30419
30420
30421
30422
30423# Check whether --with-adds-and-overrides was given.
30424if test "${with_adds_and_overrides+set}" = set; then :
30425  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
30426$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30427fi
30428
30429
30430
30431
30432# Check whether --with-override-langtools was given.
30433if test "${with_override_langtools+set}" = set; then :
30434  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30435$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30436fi
30437
30438
30439
30440
30441# Check whether --with-override-corba was given.
30442if test "${with_override_corba+set}" = set; then :
30443  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30444$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30445fi
30446
30447
30448
30449
30450# Check whether --with-override-jaxp was given.
30451if test "${with_override_jaxp+set}" = set; then :
30452  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30453$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30454fi
30455
30456
30457
30458
30459# Check whether --with-override-jaxws was given.
30460if test "${with_override_jaxws+set}" = set; then :
30461  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30462$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30463fi
30464
30465
30466
30467
30468# Check whether --with-override-hotspot was given.
30469if test "${with_override_hotspot+set}" = set; then :
30470  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30471$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30472fi
30473
30474
30475
30476
30477# Check whether --with-override-nashorn was given.
30478if test "${with_override_nashorn+set}" = set; then :
30479  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30480$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30481fi
30482
30483
30484
30485
30486# Check whether --with-override-jdk was given.
30487if test "${with_override_jdk+set}" = set; then :
30488  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30489$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30490fi
30491
30492
30493
30494
30495  BUILD_OUTPUT="$OUTPUT_ROOT"
30496
30497
30498  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
30499  BUILD_HOTSPOT=true
30500
30501
30502
30503# Check whether --with-import-hotspot was given.
30504if test "${with_import_hotspot+set}" = set; then :
30505  withval=$with_import_hotspot;
30506fi
30507
30508  if test "x$with_import_hotspot" != x; then
30509    CURDIR="$PWD"
30510    cd "$with_import_hotspot"
30511    HOTSPOT_DIST="`pwd`"
30512    cd "$CURDIR"
30513    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
30514      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
30515    fi
30516    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
30517$as_echo_n "checking if hotspot should be imported... " >&6; }
30518    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
30519$as_echo "yes from $HOTSPOT_DIST" >&6; }
30520    BUILD_HOTSPOT=false
30521  fi
30522
30523  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
30524
30525
30526
30527
30528# Check whether --with-import-modules was given.
30529if test "${with_import_modules+set}" = set; then :
30530  withval=$with_import_modules;
30531fi
30532
30533
30534  if test "x$with_import_modules" != x \
30535      && test "x$with_import_modules" != "xno"; then
30536    if test -d "$with_import_modules"; then
30537      IMPORT_MODULES_TOPDIR="$with_import_modules"
30538
30539  # Only process if variable expands to non-empty
30540
30541  if test "x$IMPORT_MODULES_TOPDIR" != x; then
30542    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30543
30544  # Input might be given as Windows format, start by converting to
30545  # unix format.
30546  path="$IMPORT_MODULES_TOPDIR"
30547  new_path=`$CYGPATH -u "$path"`
30548
30549  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30550  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30551  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30552  # "foo.exe" is OK but "foo" is an error.
30553  #
30554  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30555  # It is also a way to make sure we got the proper file name for the real test later on.
30556  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30557  if test "x$test_shortpath" = x; then
30558    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30559$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30560    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
30561  fi
30562
30563  # Call helper function which possibly converts this using DOS-style short mode.
30564  # If so, the updated path is stored in $new_path.
30565
30566  input_path="$new_path"
30567  # Check if we need to convert this using DOS-style short mode. If the path
30568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30569  # take no chances and rewrite it.
30570  # Note: m4 eats our [], so we need to use [ and ] instead.
30571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30572  if test "x$has_forbidden_chars" != x; then
30573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30574    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30575    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30576    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30577      # Going to short mode and back again did indeed matter. Since short mode is
30578      # case insensitive, let's make it lowercase to improve readability.
30579      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30580      # Now convert it back to Unix-style (cygpath)
30581      input_path=`$CYGPATH -u "$shortmode_path"`
30582      new_path="$input_path"
30583    fi
30584  fi
30585
30586  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30587  if test "x$test_cygdrive_prefix" = x; then
30588    # As a simple fix, exclude /usr/bin since it's not a real path.
30589    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30590      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30591      # a path prefixed by /cygdrive for fixpath to work.
30592      new_path="$CYGWIN_ROOT_PATH$input_path"
30593    fi
30594  fi
30595
30596
30597  if test "x$path" != "x$new_path"; then
30598    IMPORT_MODULES_TOPDIR="$new_path"
30599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30600$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30601  fi
30602
30603    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30604
30605  path="$IMPORT_MODULES_TOPDIR"
30606  has_colon=`$ECHO $path | $GREP ^.:`
30607  new_path="$path"
30608  if test "x$has_colon" = x; then
30609    # Not in mixed or Windows style, start by that.
30610    new_path=`cmd //c echo $path`
30611  fi
30612
30613
30614  input_path="$new_path"
30615  # Check if we need to convert this using DOS-style short mode. If the path
30616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30617  # take no chances and rewrite it.
30618  # Note: m4 eats our [], so we need to use [ and ] instead.
30619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30620  if test "x$has_forbidden_chars" != x; then
30621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30622    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30623  fi
30624
30625
30626  windows_path="$new_path"
30627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30628    unix_path=`$CYGPATH -u "$windows_path"`
30629    new_path="$unix_path"
30630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30632    new_path="$unix_path"
30633  fi
30634
30635  if test "x$path" != "x$new_path"; then
30636    IMPORT_MODULES_TOPDIR="$new_path"
30637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30638$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30639  fi
30640
30641  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30642  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30643
30644    else
30645      # We're on a unix platform. Hooray! :)
30646      path="$IMPORT_MODULES_TOPDIR"
30647      has_space=`$ECHO "$path" | $GREP " "`
30648      if test "x$has_space" != x; then
30649        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30650$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30651        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30652      fi
30653
30654      # Use eval to expand a potential ~
30655      eval path="$path"
30656      if test ! -f "$path" && test ! -d "$path"; then
30657        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
30658      fi
30659
30660      if test -d "$path"; then
30661        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
30662      else
30663        dir="`$DIRNAME "$path"`"
30664        base="`$BASENAME "$path"`"
30665        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
30666      fi
30667    fi
30668  fi
30669
30670    elif test -e "$with_import_modules"; then
30671      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
30672      $RM -rf "$IMPORT_MODULES_TOPDIR"
30673      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
30674      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
30675        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30676      fi
30677    else
30678      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30679    fi
30680  fi
30681
30682  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
30683    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
30684  fi
30685  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
30686    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
30687  fi
30688  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
30689    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
30690  fi
30691  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
30692    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
30693  fi
30694  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
30695    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
30696  fi
30697  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
30698    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
30699  fi
30700
30701
30702
30703
30704
30705
30706
30707
30708
30709###############################################################################
30710#
30711# Setup the toolchain (compilers etc), i.e. tools used to compile and process
30712# native code.
30713#
30714###############################################################################
30715
30716# See if we are doing a complete static build or not
30717
30718  # Check whether --enable-static-build was given.
30719if test "${enable_static_build+set}" = set; then :
30720  enableval=$enable_static_build;
30721fi
30722
30723  STATIC_BUILD=false
30724  if test "x$enable_static_build" = "xyes"; then
30725    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30726$as_echo_n "checking if static build is enabled... " >&6; }
30727    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30728$as_echo "yes" >&6; }
30729    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
30730      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
30731    fi
30732    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
30733    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
30734    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
30735    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30736    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30737    STATIC_BUILD=true
30738  elif test "x$enable_static_build" = "xno"; then
30739    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30740$as_echo_n "checking if static build is enabled... " >&6; }
30741    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30742$as_echo "no" >&6; }
30743  elif test "x$enable_static_build" != "x"; then
30744    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
30745  fi
30746
30747
30748
30749
30750# First determine the toolchain type (compiler family)
30751
30752
30753# Check whether --with-toolchain-type was given.
30754if test "${with_toolchain_type+set}" = set; then :
30755  withval=$with_toolchain_type;
30756fi
30757
30758
30759  # Use indirect variable referencing
30760  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
30761  VALID_TOOLCHAINS=${!toolchain_var_name}
30762
30763  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30764    if test -n "$XCODEBUILD"; then
30765      # On Mac OS X, default toolchain to clang after Xcode 5
30766      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
30767      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
30768      if test $? -ne 0; then
30769        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
30770      fi
30771      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
30772          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
30773          $CUT -f 1 -d .`
30774      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
30775$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
30776      if test $XCODE_MAJOR_VERSION -ge 5; then
30777          DEFAULT_TOOLCHAIN="clang"
30778      else
30779          DEFAULT_TOOLCHAIN="gcc"
30780      fi
30781    else
30782      # If Xcode is not installed, but the command line tools are
30783      # then we can't run xcodebuild. On these systems we should
30784      # default to clang
30785      DEFAULT_TOOLCHAIN="clang"
30786    fi
30787  else
30788    # First toolchain type in the list is the default
30789    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
30790  fi
30791
30792  if test "x$with_toolchain_type" = xlist; then
30793    # List all toolchains
30794    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
30795$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
30796    for toolchain in $VALID_TOOLCHAINS; do
30797      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
30798      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30799      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
30800    done
30801
30802    exit 0
30803  elif test "x$with_toolchain_type" != x; then
30804    # User override; check that it is valid
30805    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
30806      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
30807$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
30808      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
30809$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
30810      as_fn_error $? "Cannot continue." "$LINENO" 5
30811    fi
30812    TOOLCHAIN_TYPE=$with_toolchain_type
30813  else
30814    # No flag given, use default
30815    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
30816  fi
30817
30818
30819  TOOLCHAIN_CC_BINARY_clang="clang"
30820  TOOLCHAIN_CC_BINARY_gcc="gcc"
30821  TOOLCHAIN_CC_BINARY_microsoft="cl"
30822  TOOLCHAIN_CC_BINARY_solstudio="cc"
30823  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
30824
30825  TOOLCHAIN_CXX_BINARY_clang="clang++"
30826  TOOLCHAIN_CXX_BINARY_gcc="g++"
30827  TOOLCHAIN_CXX_BINARY_microsoft="cl"
30828  TOOLCHAIN_CXX_BINARY_solstudio="CC"
30829  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
30830
30831  # Use indirect variable referencing
30832  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
30833  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30834  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
30835  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
30836  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
30837  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
30838  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
30839  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
30840
30841
30842  # Define filename patterns
30843  if test "x$OPENJDK_TARGET_OS" = xwindows; then
30844    LIBRARY_PREFIX=
30845    SHARED_LIBRARY_SUFFIX='.dll'
30846    STATIC_LIBRARY_SUFFIX='.lib'
30847    SHARED_LIBRARY='$1.dll'
30848    STATIC_LIBRARY='$1.lib'
30849    OBJ_SUFFIX='.obj'
30850    EXE_SUFFIX='.exe'
30851  else
30852    LIBRARY_PREFIX=lib
30853    SHARED_LIBRARY_SUFFIX='.so'
30854    STATIC_LIBRARY_SUFFIX='.a'
30855    SHARED_LIBRARY='lib$1.so'
30856    STATIC_LIBRARY='lib$1.a'
30857    OBJ_SUFFIX='.o'
30858    EXE_SUFFIX=''
30859    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30860      # For full static builds, we're overloading the SHARED_LIBRARY
30861      # variables in order to limit the amount of changes required.
30862      # It would be better to remove SHARED and just use LIBRARY and
30863      # LIBRARY_SUFFIX for libraries that can be built either
30864      # shared or static and use STATIC_* for libraries that are
30865      # always built statically.
30866      if test "x$STATIC_BUILD" = xtrue; then
30867        SHARED_LIBRARY='lib$1.a'
30868        SHARED_LIBRARY_SUFFIX='.a'
30869      else
30870        SHARED_LIBRARY='lib$1.dylib'
30871        SHARED_LIBRARY_SUFFIX='.dylib'
30872      fi
30873    fi
30874  fi
30875
30876
30877
30878
30879
30880
30881
30882
30883
30884
30885  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
30886    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
30887$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
30888  else
30889    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
30890$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
30891  fi
30892
30893
30894# User supplied flags should be used when configure detects compilers
30895
30896  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
30897    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
30898$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
30899  fi
30900
30901  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
30902    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
30903$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
30904  fi
30905
30906  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
30907    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
30908$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
30909  fi
30910
30911
30912# Check whether --with-extra-cflags was given.
30913if test "${with_extra_cflags+set}" = set; then :
30914  withval=$with_extra_cflags;
30915fi
30916
30917
30918
30919# Check whether --with-extra-cxxflags was given.
30920if test "${with_extra_cxxflags+set}" = set; then :
30921  withval=$with_extra_cxxflags;
30922fi
30923
30924
30925
30926# Check whether --with-extra-ldflags was given.
30927if test "${with_extra_ldflags+set}" = set; then :
30928  withval=$with_extra_ldflags;
30929fi
30930
30931
30932  EXTRA_CFLAGS="$with_extra_cflags"
30933  EXTRA_CXXFLAGS="$with_extra_cxxflags"
30934  EXTRA_LDFLAGS="$with_extra_ldflags"
30935
30936  # Hotspot needs these set in their legacy form
30937  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
30938  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
30939  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
30940
30941
30942
30943
30944
30945
30946
30947
30948
30949  # The global CFLAGS and LDLAGS variables are used by configure tests and
30950  # should include the extra parameters
30951  CFLAGS="$EXTRA_CFLAGS"
30952  CXXFLAGS="$EXTRA_CXXFLAGS"
30953  LDFLAGS="$EXTRA_LDFLAGS"
30954  CPPFLAGS=""
30955
30956# The sysroot cflags are needed for configure to be able to run the compilers
30957
30958  if test "x$SYSROOT" != "x"; then
30959    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30960      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30961        # Solaris Studio does not have a concept of sysroot. Instead we must
30962        # make sure the default include and lib dirs are appended to each
30963        # compile and link command line. Must also add -I-xbuiltin to enable
30964        # inlining of system functions and intrinsics.
30965        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
30966        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
30967            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
30968            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
30969      fi
30970    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
30971      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
30972      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
30973    elif test "x$TOOLCHAIN_TYPE" = xclang; then
30974      SYSROOT_CFLAGS="-isysroot $SYSROOT"
30975      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
30976    fi
30977    # Propagate the sysroot args to hotspot
30978    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
30979    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
30980    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
30981    # The global CFLAGS and LDFLAGS variables need these for configure to function
30982    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
30983    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
30984    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
30985    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
30986  fi
30987
30988  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30989    # We also need -iframework<path>/System/Library/Frameworks
30990    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30991    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30992    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
30993    # set this here so it doesn't have to be peppered throughout the forest
30994    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30995    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30996  fi
30997
30998
30999
31000
31001
31002# Then detect the actual binaries needed
31003
31004  # FIXME: Is this needed?
31005  ac_ext=cpp
31006ac_cpp='$CXXCPP $CPPFLAGS'
31007ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31008ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31009ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31010
31011
31012  # Store the CFLAGS etc passed to the configure script.
31013  ORG_CFLAGS="$CFLAGS"
31014  ORG_CXXFLAGS="$CXXFLAGS"
31015
31016  # autoconf magic only relies on PATH, so update it if tools dir is specified
31017  OLD_PATH="$PATH"
31018
31019  # On Windows, we need to detect the visual studio installation first.
31020  # This will change the PATH, but we need to keep that new PATH even
31021  # after toolchain detection is done, since the compiler (on x86) uses
31022  # it for DLL resolution in runtime.
31023  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31024      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31025
31026  # Store path to cygwin link.exe to help excluding it when searching for
31027  # VS linker. This must be done before changing the PATH when looking for VS.
31028  # Extract the first word of "link", so it can be a program name with args.
31029set dummy link; ac_word=$2
31030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31031$as_echo_n "checking for $ac_word... " >&6; }
31032if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31033  $as_echo_n "(cached) " >&6
31034else
31035  case $CYGWIN_LINK in
31036  [\\/]* | ?:[\\/]*)
31037  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31038  ;;
31039  *)
31040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31041for as_dir in $PATH
31042do
31043  IFS=$as_save_IFS
31044  test -z "$as_dir" && as_dir=.
31045    for ac_exec_ext in '' $ac_executable_extensions; do
31046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31047    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31049    break 2
31050  fi
31051done
31052  done
31053IFS=$as_save_IFS
31054
31055  ;;
31056esac
31057fi
31058CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31059if test -n "$CYGWIN_LINK"; then
31060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31061$as_echo "$CYGWIN_LINK" >&6; }
31062else
31063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31064$as_echo "no" >&6; }
31065fi
31066
31067
31068  if test "x$CYGWIN_LINK" != x; then
31069    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31070$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31071    "$CYGWIN_LINK" --version > /dev/null
31072    if test $? -eq 0 ; then
31073      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31074$as_echo "yes" >&6; }
31075    else
31076      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31077$as_echo "no" >&6; }
31078      # This might be the VS linker. Don't exclude it later on.
31079      CYGWIN_LINK=""
31080    fi
31081  fi
31082
31083  # First-hand choice is to locate and run the vsvars bat file.
31084
31085
31086# Check whether --with-toolchain-version was given.
31087if test "${with_toolchain_version+set}" = set; then :
31088  withval=$with_toolchain_version;
31089fi
31090
31091
31092  if test "x$with_toolchain_version" = xlist; then
31093    # List all toolchains
31094    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31095$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31096    for version in $VALID_VS_VERSIONS; do
31097      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31098      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31099    done
31100
31101    exit 0
31102  elif test "x$DEVKIT_VS_VERSION" != x; then
31103    VS_VERSION=$DEVKIT_VS_VERSION
31104    TOOLCHAIN_VERSION=$VS_VERSION
31105    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31106    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31107    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31108    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31109    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31110    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31111
31112    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31113    # can still be exported as INCLUDE for compiler invocations without
31114    # SYSROOT_CFLAGS
31115    OLDIFS="$IFS"
31116    IFS=";"
31117    for i in $DEVKIT_VS_INCLUDE; do
31118      ipath=$i
31119
31120  unix_path="$ipath"
31121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31122    windows_path=`$CYGPATH -m "$unix_path"`
31123    ipath="$windows_path"
31124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31125    windows_path=`cmd //c echo $unix_path`
31126    ipath="$windows_path"
31127  fi
31128
31129      VS_INCLUDE="$VS_INCLUDE;$ipath"
31130    done
31131    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31132    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31133    for i in $DEVKIT_VS_LIB; do
31134      libpath=$i
31135
31136  unix_path="$libpath"
31137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31138    windows_path=`$CYGPATH -m "$unix_path"`
31139    libpath="$windows_path"
31140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31141    windows_path=`cmd //c echo $unix_path`
31142    libpath="$windows_path"
31143  fi
31144
31145      VS_LIB="$VS_LIB;$libpath"
31146    done
31147    IFS="$OLDIFS"
31148
31149    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31150$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31151
31152  elif test "x$with_toolchain_version" != x; then
31153    # User override; check that it is valid
31154    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31155      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31156$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31157      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31158$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31159      as_fn_error $? "Cannot continue." "$LINENO" 5
31160    fi
31161    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31162  else
31163    # No flag given, use default
31164    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31165  fi
31166
31167  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31168
31169  VS_VERSION="$VS_VERSION"
31170  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31171  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31172  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31173  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31174
31175  # When using --with-tools-dir, assume it points to the correct and default
31176  # version of Visual Studio or that --with-toolchain-version was also set.
31177  if test "x$with_tools_dir" != x; then
31178
31179  if test "x$VS_ENV_CMD" = x; then
31180    VS_VERSION="${VS_VERSION}"
31181    VS_BASE="$with_tools_dir/../.."
31182    METHOD="--with-tools-dir"
31183
31184    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31185      VCVARSFILE="vc/bin/vcvars32.bat"
31186    else
31187      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31188    fi
31189
31190
31191  windows_path="$VS_BASE"
31192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31193    unix_path=`$CYGPATH -u "$windows_path"`
31194    VS_BASE="$unix_path"
31195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31197    VS_BASE="$unix_path"
31198  fi
31199
31200    if test -d "$VS_BASE"; then
31201      if test -f "$VS_BASE/$VCVARSFILE"; then
31202        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31203$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31204        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31205        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31206        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31207        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31208      else
31209        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31210$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31211        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31212$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31213      fi
31214    fi
31215  fi
31216
31217
31218  if test "x$VS_ENV_CMD" = x; then
31219    VS_VERSION="${VS_VERSION}"
31220    VS_BASE="$with_tools_dir/../../.."
31221    METHOD="--with-tools-dir"
31222
31223    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31224      VCVARSFILE="vc/bin/vcvars32.bat"
31225    else
31226      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31227    fi
31228
31229
31230  windows_path="$VS_BASE"
31231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31232    unix_path=`$CYGPATH -u "$windows_path"`
31233    VS_BASE="$unix_path"
31234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31236    VS_BASE="$unix_path"
31237  fi
31238
31239    if test -d "$VS_BASE"; then
31240      if test -f "$VS_BASE/$VCVARSFILE"; then
31241        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31242$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31243        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31244        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31245        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31246        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31247      else
31248        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31249$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31250        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31251$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31252      fi
31253    fi
31254  fi
31255
31256    if test "x$VS_ENV_CMD" = x; then
31257      # Having specified an argument which is incorrect will produce an instant failure;
31258      # we should not go on looking
31259      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31260$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31261      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31262$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31263      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31264$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31265      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31266    fi
31267  fi
31268
31269  VS_ENV_CMD=""
31270  VS_ENV_ARGS=""
31271
31272  if test "x$VS_COMNTOOLS" != x; then
31273
31274  if test "x$VS_ENV_CMD" = x; then
31275    VS_VERSION="${VS_VERSION}"
31276    VS_BASE="$VS_COMNTOOLS/../.."
31277    METHOD="$VS_COMNTOOLS_VAR variable"
31278
31279    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31280      VCVARSFILE="vc/bin/vcvars32.bat"
31281    else
31282      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31283    fi
31284
31285
31286  windows_path="$VS_BASE"
31287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31288    unix_path=`$CYGPATH -u "$windows_path"`
31289    VS_BASE="$unix_path"
31290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31292    VS_BASE="$unix_path"
31293  fi
31294
31295    if test -d "$VS_BASE"; then
31296      if test -f "$VS_BASE/$VCVARSFILE"; then
31297        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31298$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31299        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31300        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31301        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31302        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31303      else
31304        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31305$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31306        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31307$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31308      fi
31309    fi
31310  fi
31311
31312  fi
31313  if test "x$PROGRAMFILES" != x; then
31314
31315  if test "x$VS_ENV_CMD" = x; then
31316    VS_VERSION="${VS_VERSION}"
31317    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31318    METHOD="well-known name"
31319
31320    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31321      VCVARSFILE="vc/bin/vcvars32.bat"
31322    else
31323      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31324    fi
31325
31326
31327  windows_path="$VS_BASE"
31328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31329    unix_path=`$CYGPATH -u "$windows_path"`
31330    VS_BASE="$unix_path"
31331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31333    VS_BASE="$unix_path"
31334  fi
31335
31336    if test -d "$VS_BASE"; then
31337      if test -f "$VS_BASE/$VCVARSFILE"; then
31338        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31339$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31340        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31341        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31342        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31343        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31344      else
31345        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31346$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31347        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31348$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31349      fi
31350    fi
31351  fi
31352
31353  fi
31354  # Work around the insanely named ProgramFiles(x86) env variable
31355  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31356  if test "x$PROGRAMFILES_X86" != x; then
31357
31358  if test "x$VS_ENV_CMD" = x; then
31359    VS_VERSION="${VS_VERSION}"
31360    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31361    METHOD="well-known name"
31362
31363    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31364      VCVARSFILE="vc/bin/vcvars32.bat"
31365    else
31366      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31367    fi
31368
31369
31370  windows_path="$VS_BASE"
31371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31372    unix_path=`$CYGPATH -u "$windows_path"`
31373    VS_BASE="$unix_path"
31374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31376    VS_BASE="$unix_path"
31377  fi
31378
31379    if test -d "$VS_BASE"; then
31380      if test -f "$VS_BASE/$VCVARSFILE"; then
31381        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31382$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31383        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31384        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31385        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31386        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31387      else
31388        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31389$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31390        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31391$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31392      fi
31393    fi
31394  fi
31395
31396  fi
31397
31398  if test "x$VS_ENV_CMD" = x; then
31399    VS_VERSION="${VS_VERSION}"
31400    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31401    METHOD="well-known name"
31402
31403    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31404      VCVARSFILE="vc/bin/vcvars32.bat"
31405    else
31406      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31407    fi
31408
31409
31410  windows_path="$VS_BASE"
31411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31412    unix_path=`$CYGPATH -u "$windows_path"`
31413    VS_BASE="$unix_path"
31414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31416    VS_BASE="$unix_path"
31417  fi
31418
31419    if test -d "$VS_BASE"; then
31420      if test -f "$VS_BASE/$VCVARSFILE"; then
31421        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31422$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31423        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31424        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31425        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31426        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31427      else
31428        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31429$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31430        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31431$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31432      fi
31433    fi
31434  fi
31435
31436
31437  if test "x$VS_ENV_CMD" = x; then
31438    VS_VERSION="${VS_VERSION}"
31439    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31440    METHOD="well-known name"
31441
31442    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31443      VCVARSFILE="vc/bin/vcvars32.bat"
31444    else
31445      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31446    fi
31447
31448
31449  windows_path="$VS_BASE"
31450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31451    unix_path=`$CYGPATH -u "$windows_path"`
31452    VS_BASE="$unix_path"
31453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31455    VS_BASE="$unix_path"
31456  fi
31457
31458    if test -d "$VS_BASE"; then
31459      if test -f "$VS_BASE/$VCVARSFILE"; then
31460        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31461$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31462        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31463        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31464        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31465        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31466      else
31467        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31468$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31469        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31470$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31471      fi
31472    fi
31473  fi
31474
31475
31476  if test "x$SDK_INSTALL_DIR" != x; then
31477    if test "x$ProgramW6432" != x; then
31478
31479  if test "x$VS_ENV_CMD" = x; then
31480    VS_VERSION="${VS_VERSION}"
31481    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31482    METHOD="well-known name"
31483
31484  windows_path="$WIN_SDK_BASE"
31485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31486    unix_path=`$CYGPATH -u "$windows_path"`
31487    WIN_SDK_BASE="$unix_path"
31488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31490    WIN_SDK_BASE="$unix_path"
31491  fi
31492
31493    if test -d "$WIN_SDK_BASE"; then
31494      # There have been cases of partial or broken SDK installations. A missing
31495      # lib dir is not going to work.
31496      if test ! -d "$WIN_SDK_BASE/lib"; then
31497        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31498$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31499        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31500$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31501      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31502        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31503$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31504        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31505        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31506          VS_ENV_ARGS="/x86"
31507        else
31508          VS_ENV_ARGS="/x64"
31509        fi
31510        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31511        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31512        # TODO: improve detection for other versions of SDK
31513        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31514      else
31515        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31516$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31517        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31518$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31519      fi
31520    fi
31521  fi
31522
31523    fi
31524    if test "x$PROGRAMW6432" != x; then
31525
31526  if test "x$VS_ENV_CMD" = x; then
31527    VS_VERSION="${VS_VERSION}"
31528    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
31529    METHOD="well-known name"
31530
31531  windows_path="$WIN_SDK_BASE"
31532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31533    unix_path=`$CYGPATH -u "$windows_path"`
31534    WIN_SDK_BASE="$unix_path"
31535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31537    WIN_SDK_BASE="$unix_path"
31538  fi
31539
31540    if test -d "$WIN_SDK_BASE"; then
31541      # There have been cases of partial or broken SDK installations. A missing
31542      # lib dir is not going to work.
31543      if test ! -d "$WIN_SDK_BASE/lib"; then
31544        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31545$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31546        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31547$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31548      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31549        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31550$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31551        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31552        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31553          VS_ENV_ARGS="/x86"
31554        else
31555          VS_ENV_ARGS="/x64"
31556        fi
31557        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31558        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31559        # TODO: improve detection for other versions of SDK
31560        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31561      else
31562        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31563$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31564        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31565$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31566      fi
31567    fi
31568  fi
31569
31570    fi
31571    if test "x$PROGRAMFILES" != x; then
31572
31573  if test "x$VS_ENV_CMD" = x; then
31574    VS_VERSION="${VS_VERSION}"
31575    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
31576    METHOD="well-known name"
31577
31578  windows_path="$WIN_SDK_BASE"
31579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31580    unix_path=`$CYGPATH -u "$windows_path"`
31581    WIN_SDK_BASE="$unix_path"
31582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31584    WIN_SDK_BASE="$unix_path"
31585  fi
31586
31587    if test -d "$WIN_SDK_BASE"; then
31588      # There have been cases of partial or broken SDK installations. A missing
31589      # lib dir is not going to work.
31590      if test ! -d "$WIN_SDK_BASE/lib"; then
31591        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31592$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31593        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31594$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31595      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31596        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31597$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31598        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31599        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31600          VS_ENV_ARGS="/x86"
31601        else
31602          VS_ENV_ARGS="/x64"
31603        fi
31604        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31605        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31606        # TODO: improve detection for other versions of SDK
31607        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31608      else
31609        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31610$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31611        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31612$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31613      fi
31614    fi
31615  fi
31616
31617    fi
31618
31619  if test "x$VS_ENV_CMD" = x; then
31620    VS_VERSION="${VS_VERSION}"
31621    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
31622    METHOD="well-known name"
31623
31624  windows_path="$WIN_SDK_BASE"
31625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31626    unix_path=`$CYGPATH -u "$windows_path"`
31627    WIN_SDK_BASE="$unix_path"
31628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31630    WIN_SDK_BASE="$unix_path"
31631  fi
31632
31633    if test -d "$WIN_SDK_BASE"; then
31634      # There have been cases of partial or broken SDK installations. A missing
31635      # lib dir is not going to work.
31636      if test ! -d "$WIN_SDK_BASE/lib"; then
31637        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31638$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31639        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31640$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31641      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31642        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31643$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31644        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31645        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31646          VS_ENV_ARGS="/x86"
31647        else
31648          VS_ENV_ARGS="/x64"
31649        fi
31650        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31651        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31652        # TODO: improve detection for other versions of SDK
31653        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31654      else
31655        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31656$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31657        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31658$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31659      fi
31660    fi
31661  fi
31662
31663
31664  if test "x$VS_ENV_CMD" = x; then
31665    VS_VERSION="${VS_VERSION}"
31666    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
31667    METHOD="well-known name"
31668
31669  windows_path="$WIN_SDK_BASE"
31670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31671    unix_path=`$CYGPATH -u "$windows_path"`
31672    WIN_SDK_BASE="$unix_path"
31673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31675    WIN_SDK_BASE="$unix_path"
31676  fi
31677
31678    if test -d "$WIN_SDK_BASE"; then
31679      # There have been cases of partial or broken SDK installations. A missing
31680      # lib dir is not going to work.
31681      if test ! -d "$WIN_SDK_BASE/lib"; then
31682        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31683$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31684        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31685$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31686      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31687        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31688$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31689        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31690        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31691          VS_ENV_ARGS="/x86"
31692        else
31693          VS_ENV_ARGS="/x64"
31694        fi
31695        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31696        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31697        # TODO: improve detection for other versions of SDK
31698        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31699      else
31700        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31701$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31702        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31703$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31704      fi
31705    fi
31706  fi
31707
31708  fi
31709
31710    if test "x$VS_ENV_CMD" != x; then
31711      TOOLCHAIN_VERSION=$VS_VERSION
31712      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31713      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31714      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31715      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31716      # The rest of the variables are already evaled while probing
31717      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
31718$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
31719      break
31720    fi
31721  done
31722
31723
31724  # If we have a devkit, skip all of the below.
31725  if test "x$DEVKIT_VS_VERSION" = x; then
31726    if test "x$VS_ENV_CMD" != x; then
31727      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
31728
31729  # Only process if variable expands to non-empty
31730
31731  if test "x$VS_ENV_CMD" != x; then
31732    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31733
31734  # First separate the path from the arguments. This will split at the first
31735  # space.
31736  complete="$VS_ENV_CMD"
31737  path="${complete%% *}"
31738  tmp="$complete EOL"
31739  arguments="${tmp#* }"
31740
31741  # Input might be given as Windows format, start by converting to
31742  # unix format.
31743  new_path=`$CYGPATH -u "$path"`
31744
31745  # Now try to locate executable using which
31746  new_path=`$WHICH "$new_path" 2> /dev/null`
31747  # bat and cmd files are not always considered executable in cygwin causing which
31748  # to not find them
31749  if test "x$new_path" = x \
31750      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31751      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31752    new_path=`$CYGPATH -u "$path"`
31753  fi
31754  if test "x$new_path" = x; then
31755    # Oops. Which didn't find the executable.
31756    # The splitting of arguments from the executable at a space might have been incorrect,
31757    # since paths with space are more likely in Windows. Give it another try with the whole
31758    # argument.
31759    path="$complete"
31760    arguments="EOL"
31761    new_path=`$CYGPATH -u "$path"`
31762    new_path=`$WHICH "$new_path" 2> /dev/null`
31763    # bat and cmd files are not always considered executable in cygwin causing which
31764    # to not find them
31765    if test "x$new_path" = x \
31766        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31767        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31768      new_path=`$CYGPATH -u "$path"`
31769    fi
31770    if test "x$new_path" = x; then
31771      # It's still not found. Now this is an unrecoverable error.
31772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31773$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31774      has_space=`$ECHO "$complete" | $GREP " "`
31775      if test "x$has_space" != x; then
31776        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31777$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31778      fi
31779      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31780    fi
31781  fi
31782
31783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31786  # "foo.exe" is OK but "foo" is an error.
31787  #
31788  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31789  # It is also a way to make sure we got the proper file name for the real test later on.
31790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31791  if test "x$test_shortpath" = x; then
31792    # Short path failed, file does not exist as specified.
31793    # Try adding .exe or .cmd
31794    if test -f "${new_path}.exe"; then
31795      input_to_shortpath="${new_path}.exe"
31796    elif test -f "${new_path}.cmd"; then
31797      input_to_shortpath="${new_path}.cmd"
31798    else
31799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
31800$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
31801      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31802$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31803      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31804    fi
31805  else
31806    input_to_shortpath="$new_path"
31807  fi
31808
31809  # Call helper function which possibly converts this using DOS-style short mode.
31810  # If so, the updated path is stored in $new_path.
31811  new_path="$input_to_shortpath"
31812
31813  input_path="$input_to_shortpath"
31814  # Check if we need to convert this using DOS-style short mode. If the path
31815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31816  # take no chances and rewrite it.
31817  # Note: m4 eats our [], so we need to use [ and ] instead.
31818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31819  if test "x$has_forbidden_chars" != x; then
31820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31824      # Going to short mode and back again did indeed matter. Since short mode is
31825      # case insensitive, let's make it lowercase to improve readability.
31826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31827      # Now convert it back to Unix-style (cygpath)
31828      input_path=`$CYGPATH -u "$shortmode_path"`
31829      new_path="$input_path"
31830    fi
31831  fi
31832
31833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31834  if test "x$test_cygdrive_prefix" = x; then
31835    # As a simple fix, exclude /usr/bin since it's not a real path.
31836    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31838      # a path prefixed by /cygdrive for fixpath to work.
31839      new_path="$CYGWIN_ROOT_PATH$input_path"
31840    fi
31841  fi
31842
31843  # remove trailing .exe if any
31844  new_path="${new_path/%.exe/}"
31845
31846    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31847
31848  # First separate the path from the arguments. This will split at the first
31849  # space.
31850  complete="$VS_ENV_CMD"
31851  path="${complete%% *}"
31852  tmp="$complete EOL"
31853  arguments="${tmp#* }"
31854
31855  # Input might be given as Windows format, start by converting to
31856  # unix format.
31857  new_path="$path"
31858
31859  windows_path="$new_path"
31860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31861    unix_path=`$CYGPATH -u "$windows_path"`
31862    new_path="$unix_path"
31863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31865    new_path="$unix_path"
31866  fi
31867
31868
31869  # Now try to locate executable using which
31870  new_path=`$WHICH "$new_path" 2> /dev/null`
31871
31872  if test "x$new_path" = x; then
31873    # Oops. Which didn't find the executable.
31874    # The splitting of arguments from the executable at a space might have been incorrect,
31875    # since paths with space are more likely in Windows. Give it another try with the whole
31876    # argument.
31877    path="$complete"
31878    arguments="EOL"
31879    new_path="$path"
31880
31881  windows_path="$new_path"
31882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31883    unix_path=`$CYGPATH -u "$windows_path"`
31884    new_path="$unix_path"
31885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31887    new_path="$unix_path"
31888  fi
31889
31890
31891    new_path=`$WHICH "$new_path" 2> /dev/null`
31892    # bat and cmd files are not always considered executable in MSYS causing which
31893    # to not find them
31894    if test "x$new_path" = x \
31895        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31896        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31897      new_path="$path"
31898
31899  windows_path="$new_path"
31900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31901    unix_path=`$CYGPATH -u "$windows_path"`
31902    new_path="$unix_path"
31903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31905    new_path="$unix_path"
31906  fi
31907
31908    fi
31909
31910    if test "x$new_path" = x; then
31911      # It's still not found. Now this is an unrecoverable error.
31912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31913$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31914      has_space=`$ECHO "$complete" | $GREP " "`
31915      if test "x$has_space" != x; then
31916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31918      fi
31919      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31920    fi
31921  fi
31922
31923  # Now new_path has a complete unix path to the binary
31924  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31925    # Keep paths in /bin as-is, but remove trailing .exe if any
31926    new_path="${new_path/%.exe/}"
31927    # Do not save /bin paths to all_fixpath_prefixes!
31928  else
31929    # Not in mixed or Windows style, start by that.
31930    new_path=`cmd //c echo $new_path`
31931
31932  input_path="$new_path"
31933  # Check if we need to convert this using DOS-style short mode. If the path
31934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31935  # take no chances and rewrite it.
31936  # Note: m4 eats our [], so we need to use [ and ] instead.
31937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31938  if test "x$has_forbidden_chars" != x; then
31939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31940    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31941  fi
31942
31943    # Output is in $new_path
31944
31945  windows_path="$new_path"
31946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31947    unix_path=`$CYGPATH -u "$windows_path"`
31948    new_path="$unix_path"
31949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31951    new_path="$unix_path"
31952  fi
31953
31954    # remove trailing .exe if any
31955    new_path="${new_path/%.exe/}"
31956
31957    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31958    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31959  fi
31960
31961    else
31962      # We're on a unix platform. Hooray! :)
31963      # First separate the path from the arguments. This will split at the first
31964      # space.
31965      complete="$VS_ENV_CMD"
31966      path="${complete%% *}"
31967      tmp="$complete EOL"
31968      arguments="${tmp#* }"
31969
31970      # Cannot rely on the command "which" here since it doesn't always work.
31971      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31972      if test -z "$is_absolute_path"; then
31973        # Path to executable is not absolute. Find it.
31974        IFS_save="$IFS"
31975        IFS=:
31976        for p in $PATH; do
31977          if test -f "$p/$path" && test -x "$p/$path"; then
31978            new_path="$p/$path"
31979            break
31980          fi
31981        done
31982        IFS="$IFS_save"
31983      else
31984        # This is an absolute path, we can use it without further modifications.
31985        new_path="$path"
31986      fi
31987
31988      if test "x$new_path" = x; then
31989        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31990$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31991        has_space=`$ECHO "$complete" | $GREP " "`
31992        if test "x$has_space" != x; then
31993          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31994$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31995        fi
31996        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31997      fi
31998    fi
31999
32000    # Now join together the path and the arguments once again
32001    if test "x$arguments" != xEOL; then
32002      new_complete="$new_path ${arguments% *}"
32003    else
32004      new_complete="$new_path"
32005    fi
32006
32007    if test "x$complete" != "x$new_complete"; then
32008      VS_ENV_CMD="$new_complete"
32009      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32010$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32011    fi
32012  fi
32013
32014
32015      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32016      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32017$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32018
32019      # We need to create a couple of temporary files.
32020      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32021      $MKDIR -p $VS_ENV_TMP_DIR
32022
32023      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32024      # Instead create a shell script which will set the relevant variables when run.
32025      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32026
32027  unix_path="$WINPATH_VS_ENV_CMD"
32028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32029    windows_path=`$CYGPATH -m "$unix_path"`
32030    WINPATH_VS_ENV_CMD="$windows_path"
32031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32032    windows_path=`cmd //c echo $unix_path`
32033    WINPATH_VS_ENV_CMD="$windows_path"
32034  fi
32035
32036      WINPATH_BASH="$BASH"
32037
32038  unix_path="$WINPATH_BASH"
32039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32040    windows_path=`$CYGPATH -m "$unix_path"`
32041    WINPATH_BASH="$windows_path"
32042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32043    windows_path=`cmd //c echo $unix_path`
32044    WINPATH_BASH="$windows_path"
32045  fi
32046
32047
32048      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32049      # script (executable by bash) that will setup the important variables.
32050      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32051      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32052      # This will end up something like:
32053      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32054      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32055      # These will end up something like:
32056      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32057      # The trailing space for everyone except PATH is no typo, but is needed due
32058      # to trailing \ in the Windows paths. These will be stripped later.
32059      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32060          >> $EXTRACT_VC_ENV_BAT_FILE
32061      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32062          >> $EXTRACT_VC_ENV_BAT_FILE
32063      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32064          >> $EXTRACT_VC_ENV_BAT_FILE
32065      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32066          >> $EXTRACT_VC_ENV_BAT_FILE
32067      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32068          >> $EXTRACT_VC_ENV_BAT_FILE
32069      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32070          >> $EXTRACT_VC_ENV_BAT_FILE
32071
32072      # Now execute the newly created bat file.
32073      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32074      # Change directory so we don't need to mess with Windows paths in redirects.
32075      cd $VS_ENV_TMP_DIR
32076      cmd /c extract-vs-env.bat | $CAT
32077      cd $CURDIR
32078
32079      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32080        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32081$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32082        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32083$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32084        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32085$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32086        as_fn_error $? "Cannot continue" "$LINENO" 5
32087      fi
32088
32089      # Now set all paths and other env variables. This will allow the rest of
32090      # the configure script to find and run the compiler in the proper way.
32091      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32092$as_echo "$as_me: Setting extracted environment variables" >&6;}
32093      . $VS_ENV_TMP_DIR/set-vs-env.sh
32094      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32095      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32096    else
32097      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32098      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32099$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32100    fi
32101  fi
32102
32103  # At this point, we should have correct variables in the environment, or we can't continue.
32104  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32105$as_echo_n "checking for Visual Studio variables... " >&6; }
32106
32107  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32108      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32109    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32110      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32111$as_echo "present but broken" >&6; }
32112      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32113    else
32114      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32115$as_echo "ok" >&6; }
32116      # Remove any trailing "\" ";" and " " from the variables.
32117      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32118      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32119      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32120      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32121      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32122      # Remove any paths containing # (typically F#) as that messes up make. This
32123      # is needed if visual studio was installed with F# support.
32124      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32125
32126
32127
32128
32129
32130      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32131      OLDIFS="$IFS"
32132      IFS=";"
32133      for i in $VS_INCLUDE; do
32134        ipath=$i
32135        # Only process non-empty elements
32136        if test "x$ipath" != x; then
32137          IFS="$OLDIFS"
32138          # Check that directory exists before calling fixup_path
32139          testpath=$ipath
32140
32141  windows_path="$testpath"
32142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32143    unix_path=`$CYGPATH -u "$windows_path"`
32144    testpath="$unix_path"
32145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32147    testpath="$unix_path"
32148  fi
32149
32150          if test -d "$testpath"; then
32151
32152  # Only process if variable expands to non-empty
32153
32154  if test "x$ipath" != x; then
32155    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32156
32157  # Input might be given as Windows format, start by converting to
32158  # unix format.
32159  path="$ipath"
32160  new_path=`$CYGPATH -u "$path"`
32161
32162  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32163  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32164  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32165  # "foo.exe" is OK but "foo" is an error.
32166  #
32167  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32168  # It is also a way to make sure we got the proper file name for the real test later on.
32169  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32170  if test "x$test_shortpath" = x; then
32171    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32172$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32173    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32174  fi
32175
32176  # Call helper function which possibly converts this using DOS-style short mode.
32177  # If so, the updated path is stored in $new_path.
32178
32179  input_path="$new_path"
32180  # Check if we need to convert this using DOS-style short mode. If the path
32181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32182  # take no chances and rewrite it.
32183  # Note: m4 eats our [], so we need to use [ and ] instead.
32184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32185  if test "x$has_forbidden_chars" != x; then
32186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32187    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32188    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32189    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32190      # Going to short mode and back again did indeed matter. Since short mode is
32191      # case insensitive, let's make it lowercase to improve readability.
32192      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32193      # Now convert it back to Unix-style (cygpath)
32194      input_path=`$CYGPATH -u "$shortmode_path"`
32195      new_path="$input_path"
32196    fi
32197  fi
32198
32199  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32200  if test "x$test_cygdrive_prefix" = x; then
32201    # As a simple fix, exclude /usr/bin since it's not a real path.
32202    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32203      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32204      # a path prefixed by /cygdrive for fixpath to work.
32205      new_path="$CYGWIN_ROOT_PATH$input_path"
32206    fi
32207  fi
32208
32209
32210  if test "x$path" != "x$new_path"; then
32211    ipath="$new_path"
32212    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32213$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32214  fi
32215
32216    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32217
32218  path="$ipath"
32219  has_colon=`$ECHO $path | $GREP ^.:`
32220  new_path="$path"
32221  if test "x$has_colon" = x; then
32222    # Not in mixed or Windows style, start by that.
32223    new_path=`cmd //c echo $path`
32224  fi
32225
32226
32227  input_path="$new_path"
32228  # Check if we need to convert this using DOS-style short mode. If the path
32229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32230  # take no chances and rewrite it.
32231  # Note: m4 eats our [], so we need to use [ and ] instead.
32232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32233  if test "x$has_forbidden_chars" != x; then
32234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32236  fi
32237
32238
32239  windows_path="$new_path"
32240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32241    unix_path=`$CYGPATH -u "$windows_path"`
32242    new_path="$unix_path"
32243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32245    new_path="$unix_path"
32246  fi
32247
32248  if test "x$path" != "x$new_path"; then
32249    ipath="$new_path"
32250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32251$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32252  fi
32253
32254  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32255  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32256
32257    else
32258      # We're on a unix platform. Hooray! :)
32259      path="$ipath"
32260      has_space=`$ECHO "$path" | $GREP " "`
32261      if test "x$has_space" != x; then
32262        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32263$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32264        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32265      fi
32266
32267      # Use eval to expand a potential ~
32268      eval path="$path"
32269      if test ! -f "$path" && test ! -d "$path"; then
32270        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32271      fi
32272
32273      if test -d "$path"; then
32274        ipath="`cd "$path"; $THEPWDCMD -L`"
32275      else
32276        dir="`$DIRNAME "$path"`"
32277        base="`$BASENAME "$path"`"
32278        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32279      fi
32280    fi
32281  fi
32282
32283            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32284          fi
32285          IFS=";"
32286        fi
32287      done
32288      # Convert VS_LIB into SYSROOT_LDFLAGS
32289      for i in $VS_LIB; do
32290        libpath=$i
32291        # Only process non-empty elements
32292        if test "x$libpath" != x; then
32293          IFS="$OLDIFS"
32294          # Check that directory exists before calling fixup_path
32295          testpath=$libpath
32296
32297  windows_path="$testpath"
32298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32299    unix_path=`$CYGPATH -u "$windows_path"`
32300    testpath="$unix_path"
32301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32303    testpath="$unix_path"
32304  fi
32305
32306          if test -d "$testpath"; then
32307
32308  # Only process if variable expands to non-empty
32309
32310  if test "x$libpath" != x; then
32311    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32312
32313  # Input might be given as Windows format, start by converting to
32314  # unix format.
32315  path="$libpath"
32316  new_path=`$CYGPATH -u "$path"`
32317
32318  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32319  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32320  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32321  # "foo.exe" is OK but "foo" is an error.
32322  #
32323  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32324  # It is also a way to make sure we got the proper file name for the real test later on.
32325  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32326  if test "x$test_shortpath" = x; then
32327    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32328$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32329    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32330  fi
32331
32332  # Call helper function which possibly converts this using DOS-style short mode.
32333  # If so, the updated path is stored in $new_path.
32334
32335  input_path="$new_path"
32336  # Check if we need to convert this using DOS-style short mode. If the path
32337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32338  # take no chances and rewrite it.
32339  # Note: m4 eats our [], so we need to use [ and ] instead.
32340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32341  if test "x$has_forbidden_chars" != x; then
32342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32343    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32344    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32345    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32346      # Going to short mode and back again did indeed matter. Since short mode is
32347      # case insensitive, let's make it lowercase to improve readability.
32348      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32349      # Now convert it back to Unix-style (cygpath)
32350      input_path=`$CYGPATH -u "$shortmode_path"`
32351      new_path="$input_path"
32352    fi
32353  fi
32354
32355  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32356  if test "x$test_cygdrive_prefix" = x; then
32357    # As a simple fix, exclude /usr/bin since it's not a real path.
32358    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32359      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32360      # a path prefixed by /cygdrive for fixpath to work.
32361      new_path="$CYGWIN_ROOT_PATH$input_path"
32362    fi
32363  fi
32364
32365
32366  if test "x$path" != "x$new_path"; then
32367    libpath="$new_path"
32368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32369$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32370  fi
32371
32372    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32373
32374  path="$libpath"
32375  has_colon=`$ECHO $path | $GREP ^.:`
32376  new_path="$path"
32377  if test "x$has_colon" = x; then
32378    # Not in mixed or Windows style, start by that.
32379    new_path=`cmd //c echo $path`
32380  fi
32381
32382
32383  input_path="$new_path"
32384  # Check if we need to convert this using DOS-style short mode. If the path
32385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32386  # take no chances and rewrite it.
32387  # Note: m4 eats our [], so we need to use [ and ] instead.
32388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32389  if test "x$has_forbidden_chars" != x; then
32390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32391    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32392  fi
32393
32394
32395  windows_path="$new_path"
32396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32397    unix_path=`$CYGPATH -u "$windows_path"`
32398    new_path="$unix_path"
32399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32401    new_path="$unix_path"
32402  fi
32403
32404  if test "x$path" != "x$new_path"; then
32405    libpath="$new_path"
32406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32407$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32408  fi
32409
32410  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32411  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32412
32413    else
32414      # We're on a unix platform. Hooray! :)
32415      path="$libpath"
32416      has_space=`$ECHO "$path" | $GREP " "`
32417      if test "x$has_space" != x; then
32418        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32419$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32420        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32421      fi
32422
32423      # Use eval to expand a potential ~
32424      eval path="$path"
32425      if test ! -f "$path" && test ! -d "$path"; then
32426        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32427      fi
32428
32429      if test -d "$path"; then
32430        libpath="`cd "$path"; $THEPWDCMD -L`"
32431      else
32432        dir="`$DIRNAME "$path"`"
32433        base="`$BASENAME "$path"`"
32434        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32435      fi
32436    fi
32437  fi
32438
32439            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32440          fi
32441          IFS=";"
32442        fi
32443      done
32444      IFS="$OLDIFS"
32445    fi
32446  else
32447    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32448$as_echo "not found" >&6; }
32449
32450    if test "x$VS_ENV_CMD" = x; then
32451      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32452$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32453      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32454$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32455    else
32456      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32457$as_echo "$as_me: Running the extraction script failed." >&6;}
32458    fi
32459    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32460$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32461    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32462$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32463    as_fn_error $? "Cannot continue" "$LINENO" 5
32464  fi
32465
32466    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32467    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32468    PATH="$VS_PATH"
32469    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32470    export INCLUDE="$VS_INCLUDE"
32471    export LIB="$VS_LIB"
32472  else
32473    if test "x$XCODE_VERSION_OUTPUT" != x; then
32474      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32475      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32476      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32477    else
32478      # Currently we do not define this for other toolchains. This might change as the need arise.
32479      TOOLCHAIN_VERSION=
32480    fi
32481  fi
32482
32483
32484  # For solaris we really need solaris tools, and not the GNU equivalent.
32485  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
32486  # so add that to path before starting to probe.
32487  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
32488  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
32489    PATH="/usr/ccs/bin:$PATH"
32490  fi
32491
32492  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32493  # override all other locations.
32494  if test "x$TOOLCHAIN_PATH" != x; then
32495    PATH=$TOOLCHAIN_PATH:$PATH
32496  fi
32497
32498
32499  #
32500  # Setup the compilers (CC and CXX)
32501  #
32502
32503  COMPILER_NAME=C
32504  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32505
32506  if test "x$CC" != x; then
32507    # User has supplied compiler name already, always let that override.
32508    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
32509$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
32510    if test "x`basename $CC`" = "x$CC"; then
32511      # A command without a complete path is provided, search $PATH.
32512
32513      for ac_prog in $CC
32514do
32515  # Extract the first word of "$ac_prog", so it can be a program name with args.
32516set dummy $ac_prog; ac_word=$2
32517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32518$as_echo_n "checking for $ac_word... " >&6; }
32519if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32520  $as_echo_n "(cached) " >&6
32521else
32522  case $POTENTIAL_CC in
32523  [\\/]* | ?:[\\/]*)
32524  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32525  ;;
32526  *)
32527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32528for as_dir in $PATH
32529do
32530  IFS=$as_save_IFS
32531  test -z "$as_dir" && as_dir=.
32532    for ac_exec_ext in '' $ac_executable_extensions; do
32533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32534    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32536    break 2
32537  fi
32538done
32539  done
32540IFS=$as_save_IFS
32541
32542  ;;
32543esac
32544fi
32545POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32546if test -n "$POTENTIAL_CC"; then
32547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32548$as_echo "$POTENTIAL_CC" >&6; }
32549else
32550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32551$as_echo "no" >&6; }
32552fi
32553
32554
32555  test -n "$POTENTIAL_CC" && break
32556done
32557
32558      if test "x$POTENTIAL_CC" != x; then
32559        CC=$POTENTIAL_CC
32560      else
32561        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
32562      fi
32563    else
32564      # Otherwise it might already be a complete path
32565      if test ! -x "$CC"; then
32566        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
32567      fi
32568    fi
32569  else
32570    # No user supplied value. Locate compiler ourselves.
32571
32572    # If we are cross compiling, assume cross compilation tools follows the
32573    # cross compilation standard where they are prefixed with the autoconf
32574    # standard name for the target. For example the binary
32575    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32576    # If we are not cross compiling, then the default compiler name will be
32577    # used.
32578
32579    CC=
32580    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32581    # before checking the rest of the PATH.
32582    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32583    # step, this should not be necessary.
32584    if test -n "$TOOLCHAIN_PATH"; then
32585      PATH_save="$PATH"
32586      PATH="$TOOLCHAIN_PATH"
32587      for ac_prog in $SEARCH_LIST
32588do
32589  # Extract the first word of "$ac_prog", so it can be a program name with args.
32590set dummy $ac_prog; ac_word=$2
32591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32592$as_echo_n "checking for $ac_word... " >&6; }
32593if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
32594  $as_echo_n "(cached) " >&6
32595else
32596  case $TOOLCHAIN_PATH_CC in
32597  [\\/]* | ?:[\\/]*)
32598  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
32599  ;;
32600  *)
32601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32602for as_dir in $PATH
32603do
32604  IFS=$as_save_IFS
32605  test -z "$as_dir" && as_dir=.
32606    for ac_exec_ext in '' $ac_executable_extensions; do
32607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32608    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
32609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32610    break 2
32611  fi
32612done
32613  done
32614IFS=$as_save_IFS
32615
32616  ;;
32617esac
32618fi
32619TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
32620if test -n "$TOOLCHAIN_PATH_CC"; then
32621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
32622$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
32623else
32624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32625$as_echo "no" >&6; }
32626fi
32627
32628
32629  test -n "$TOOLCHAIN_PATH_CC" && break
32630done
32631
32632      CC=$TOOLCHAIN_PATH_CC
32633      PATH="$PATH_save"
32634    fi
32635
32636    # AC_PATH_PROGS can't be run multiple times with the same variable,
32637    # so create a new name for this run.
32638    if test "x$CC" = x; then
32639      for ac_prog in $SEARCH_LIST
32640do
32641  # Extract the first word of "$ac_prog", so it can be a program name with args.
32642set dummy $ac_prog; ac_word=$2
32643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32644$as_echo_n "checking for $ac_word... " >&6; }
32645if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32646  $as_echo_n "(cached) " >&6
32647else
32648  case $POTENTIAL_CC in
32649  [\\/]* | ?:[\\/]*)
32650  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32651  ;;
32652  *)
32653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32654for as_dir in $PATH
32655do
32656  IFS=$as_save_IFS
32657  test -z "$as_dir" && as_dir=.
32658    for ac_exec_ext in '' $ac_executable_extensions; do
32659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32660    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32662    break 2
32663  fi
32664done
32665  done
32666IFS=$as_save_IFS
32667
32668  ;;
32669esac
32670fi
32671POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32672if test -n "$POTENTIAL_CC"; then
32673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32674$as_echo "$POTENTIAL_CC" >&6; }
32675else
32676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32677$as_echo "no" >&6; }
32678fi
32679
32680
32681  test -n "$POTENTIAL_CC" && break
32682done
32683
32684      CC=$POTENTIAL_CC
32685    fi
32686
32687    if test "x$CC" = x; then
32688
32689  # Print a helpful message on how to acquire the necessary build dependency.
32690  # devkit is the help tag: freetype, cups, alsa etc
32691  MISSING_DEPENDENCY=devkit
32692
32693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32694    cygwin_help $MISSING_DEPENDENCY
32695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32696    msys_help $MISSING_DEPENDENCY
32697  else
32698    PKGHANDLER_COMMAND=
32699
32700    case $PKGHANDLER in
32701      apt-get)
32702        apt_help     $MISSING_DEPENDENCY ;;
32703      yum)
32704        yum_help     $MISSING_DEPENDENCY ;;
32705      port)
32706        port_help    $MISSING_DEPENDENCY ;;
32707      pkgutil)
32708        pkgutil_help $MISSING_DEPENDENCY ;;
32709      pkgadd)
32710        pkgadd_help  $MISSING_DEPENDENCY ;;
32711    esac
32712
32713    if test "x$PKGHANDLER_COMMAND" != x; then
32714      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32715    fi
32716  fi
32717
32718      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
32719    fi
32720  fi
32721
32722  # Now we have a compiler binary in CC. Make sure it's okay.
32723
32724  # Only process if variable expands to non-empty
32725
32726  if test "x$CC" != x; then
32727    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32728
32729  # First separate the path from the arguments. This will split at the first
32730  # space.
32731  complete="$CC"
32732  path="${complete%% *}"
32733  tmp="$complete EOL"
32734  arguments="${tmp#* }"
32735
32736  # Input might be given as Windows format, start by converting to
32737  # unix format.
32738  new_path=`$CYGPATH -u "$path"`
32739
32740  # Now try to locate executable using which
32741  new_path=`$WHICH "$new_path" 2> /dev/null`
32742  # bat and cmd files are not always considered executable in cygwin causing which
32743  # to not find them
32744  if test "x$new_path" = x \
32745      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32746      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32747    new_path=`$CYGPATH -u "$path"`
32748  fi
32749  if test "x$new_path" = x; then
32750    # Oops. Which didn't find the executable.
32751    # The splitting of arguments from the executable at a space might have been incorrect,
32752    # since paths with space are more likely in Windows. Give it another try with the whole
32753    # argument.
32754    path="$complete"
32755    arguments="EOL"
32756    new_path=`$CYGPATH -u "$path"`
32757    new_path=`$WHICH "$new_path" 2> /dev/null`
32758    # bat and cmd files are not always considered executable in cygwin causing which
32759    # to not find them
32760    if test "x$new_path" = x \
32761        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32762        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32763      new_path=`$CYGPATH -u "$path"`
32764    fi
32765    if test "x$new_path" = x; then
32766      # It's still not found. Now this is an unrecoverable error.
32767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32768$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32769      has_space=`$ECHO "$complete" | $GREP " "`
32770      if test "x$has_space" != x; then
32771        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32772$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32773      fi
32774      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32775    fi
32776  fi
32777
32778  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32779  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32780  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32781  # "foo.exe" is OK but "foo" is an error.
32782  #
32783  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32784  # It is also a way to make sure we got the proper file name for the real test later on.
32785  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32786  if test "x$test_shortpath" = x; then
32787    # Short path failed, file does not exist as specified.
32788    # Try adding .exe or .cmd
32789    if test -f "${new_path}.exe"; then
32790      input_to_shortpath="${new_path}.exe"
32791    elif test -f "${new_path}.cmd"; then
32792      input_to_shortpath="${new_path}.cmd"
32793    else
32794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
32795$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
32796      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32797$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32798      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32799    fi
32800  else
32801    input_to_shortpath="$new_path"
32802  fi
32803
32804  # Call helper function which possibly converts this using DOS-style short mode.
32805  # If so, the updated path is stored in $new_path.
32806  new_path="$input_to_shortpath"
32807
32808  input_path="$input_to_shortpath"
32809  # Check if we need to convert this using DOS-style short mode. If the path
32810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32811  # take no chances and rewrite it.
32812  # Note: m4 eats our [], so we need to use [ and ] instead.
32813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32814  if test "x$has_forbidden_chars" != x; then
32815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32819      # Going to short mode and back again did indeed matter. Since short mode is
32820      # case insensitive, let's make it lowercase to improve readability.
32821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32822      # Now convert it back to Unix-style (cygpath)
32823      input_path=`$CYGPATH -u "$shortmode_path"`
32824      new_path="$input_path"
32825    fi
32826  fi
32827
32828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32829  if test "x$test_cygdrive_prefix" = x; then
32830    # As a simple fix, exclude /usr/bin since it's not a real path.
32831    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32833      # a path prefixed by /cygdrive for fixpath to work.
32834      new_path="$CYGWIN_ROOT_PATH$input_path"
32835    fi
32836  fi
32837
32838  # remove trailing .exe if any
32839  new_path="${new_path/%.exe/}"
32840
32841    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32842
32843  # First separate the path from the arguments. This will split at the first
32844  # space.
32845  complete="$CC"
32846  path="${complete%% *}"
32847  tmp="$complete EOL"
32848  arguments="${tmp#* }"
32849
32850  # Input might be given as Windows format, start by converting to
32851  # unix format.
32852  new_path="$path"
32853
32854  windows_path="$new_path"
32855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32856    unix_path=`$CYGPATH -u "$windows_path"`
32857    new_path="$unix_path"
32858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32860    new_path="$unix_path"
32861  fi
32862
32863
32864  # Now try to locate executable using which
32865  new_path=`$WHICH "$new_path" 2> /dev/null`
32866
32867  if test "x$new_path" = x; then
32868    # Oops. Which didn't find the executable.
32869    # The splitting of arguments from the executable at a space might have been incorrect,
32870    # since paths with space are more likely in Windows. Give it another try with the whole
32871    # argument.
32872    path="$complete"
32873    arguments="EOL"
32874    new_path="$path"
32875
32876  windows_path="$new_path"
32877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32878    unix_path=`$CYGPATH -u "$windows_path"`
32879    new_path="$unix_path"
32880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32882    new_path="$unix_path"
32883  fi
32884
32885
32886    new_path=`$WHICH "$new_path" 2> /dev/null`
32887    # bat and cmd files are not always considered executable in MSYS causing which
32888    # to not find them
32889    if test "x$new_path" = x \
32890        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32891        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32892      new_path="$path"
32893
32894  windows_path="$new_path"
32895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32896    unix_path=`$CYGPATH -u "$windows_path"`
32897    new_path="$unix_path"
32898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32900    new_path="$unix_path"
32901  fi
32902
32903    fi
32904
32905    if test "x$new_path" = x; then
32906      # It's still not found. Now this is an unrecoverable error.
32907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32908$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32909      has_space=`$ECHO "$complete" | $GREP " "`
32910      if test "x$has_space" != x; then
32911        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32912$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32913      fi
32914      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32915    fi
32916  fi
32917
32918  # Now new_path has a complete unix path to the binary
32919  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32920    # Keep paths in /bin as-is, but remove trailing .exe if any
32921    new_path="${new_path/%.exe/}"
32922    # Do not save /bin paths to all_fixpath_prefixes!
32923  else
32924    # Not in mixed or Windows style, start by that.
32925    new_path=`cmd //c echo $new_path`
32926
32927  input_path="$new_path"
32928  # Check if we need to convert this using DOS-style short mode. If the path
32929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32930  # take no chances and rewrite it.
32931  # Note: m4 eats our [], so we need to use [ and ] instead.
32932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32933  if test "x$has_forbidden_chars" != x; then
32934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32935    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32936  fi
32937
32938    # Output is in $new_path
32939
32940  windows_path="$new_path"
32941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32942    unix_path=`$CYGPATH -u "$windows_path"`
32943    new_path="$unix_path"
32944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32946    new_path="$unix_path"
32947  fi
32948
32949    # remove trailing .exe if any
32950    new_path="${new_path/%.exe/}"
32951
32952    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32953    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32954  fi
32955
32956    else
32957      # We're on a unix platform. Hooray! :)
32958      # First separate the path from the arguments. This will split at the first
32959      # space.
32960      complete="$CC"
32961      path="${complete%% *}"
32962      tmp="$complete EOL"
32963      arguments="${tmp#* }"
32964
32965      # Cannot rely on the command "which" here since it doesn't always work.
32966      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32967      if test -z "$is_absolute_path"; then
32968        # Path to executable is not absolute. Find it.
32969        IFS_save="$IFS"
32970        IFS=:
32971        for p in $PATH; do
32972          if test -f "$p/$path" && test -x "$p/$path"; then
32973            new_path="$p/$path"
32974            break
32975          fi
32976        done
32977        IFS="$IFS_save"
32978      else
32979        # This is an absolute path, we can use it without further modifications.
32980        new_path="$path"
32981      fi
32982
32983      if test "x$new_path" = x; then
32984        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32985$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32986        has_space=`$ECHO "$complete" | $GREP " "`
32987        if test "x$has_space" != x; then
32988          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32989$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32990        fi
32991        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32992      fi
32993    fi
32994
32995    # Now join together the path and the arguments once again
32996    if test "x$arguments" != xEOL; then
32997      new_complete="$new_path ${arguments% *}"
32998    else
32999      new_complete="$new_path"
33000    fi
33001
33002    if test "x$complete" != "x$new_complete"; then
33003      CC="$new_complete"
33004      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33005$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33006    fi
33007  fi
33008
33009  TEST_COMPILER="$CC"
33010
33011  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33012$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33013  SYMLINK_ORIGINAL="$TEST_COMPILER"
33014
33015  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33016    # Follow a chain of symbolic links. Use readlink
33017    # where it exists, else fall back to horribly
33018    # complicated shell code.
33019    if test "x$READLINK_TESTED" != yes; then
33020      # On MacOSX there is a readlink tool with a different
33021      # purpose than the GNU readlink tool. Check the found readlink.
33022      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33023      if test "x$ISGNU" = x; then
33024        # A readlink that we do not know how to use.
33025        # Are there other non-GNU readlinks out there?
33026        READLINK_TESTED=yes
33027        READLINK=
33028      fi
33029    fi
33030
33031    if test "x$READLINK" != x; then
33032      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33033    else
33034      # Save the current directory for restoring afterwards
33035      STARTDIR=$PWD
33036      COUNTER=0
33037      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33038      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33039      cd $sym_link_dir
33040      # Use -P flag to resolve symlinks in directories.
33041      cd `$THEPWDCMD -P`
33042      sym_link_dir=`$THEPWDCMD -P`
33043      # Resolve file symlinks
33044      while test $COUNTER -lt 20; do
33045        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33046        if test "x$ISLINK" == x; then
33047          # This is not a symbolic link! We are done!
33048          break
33049        fi
33050        # Again resolve directory symlinks since the target of the just found
33051        # link could be in a different directory
33052        cd `$DIRNAME $ISLINK`
33053        sym_link_dir=`$THEPWDCMD -P`
33054        sym_link_file=`$BASENAME $ISLINK`
33055        let COUNTER=COUNTER+1
33056      done
33057      cd $STARTDIR
33058      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33059    fi
33060  fi
33061
33062  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33063    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33064$as_echo "no symlink" >&6; }
33065  else
33066    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33067$as_echo "$SYMLINK_ORIGINAL" >&6; }
33068
33069    # We can't handle ccache by gcc wrappers, since we need to know if we're
33070    # using ccache. Instead ccache usage must be controlled by a configure option.
33071    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33072    if test "x$COMPILER_BASENAME" = "xccache"; then
33073      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33074$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33075      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33076    fi
33077  fi
33078
33079
33080  COMPILER=$CC
33081  COMPILER_NAME=$COMPILER_NAME
33082
33083  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33084    # cc -V output typically looks like
33085    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33086    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33087    # Check that this is likely to be the Solaris Studio cc.
33088    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33089    if test $? -ne 0; then
33090      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33091      { $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
33092$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33093      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33094$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33095      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33096$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33097      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33098    fi
33099    # Remove usage instructions (if present), and
33100    # collapse compiler output into a single line
33101    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33102        $SED -e 's/ *[Uu]sage:.*//'`
33103    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33104        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33105  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33106    # xlc -qversion output typically looks like
33107    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33108    #     Version: 11.01.0000.0015
33109    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33110    # Check that this is likely to be the IBM XL C compiler.
33111    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33112    if test $? -ne 0; then
33113      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33114      { $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
33115$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33116      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33117$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33118      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33119$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33120      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33121    fi
33122    # Collapse compiler output into a single line
33123    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33124    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33125        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33126  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33127    # There is no specific version flag, but all output starts with a version string.
33128    # First line typically looks something like:
33129    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33130    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33131    # Check that this is likely to be Microsoft CL.EXE.
33132    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33133    if test $? -ne 0; then
33134      { $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
33135$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33136      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33137$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33138      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33139    fi
33140    # Collapse compiler output into a single line
33141    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33142    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33143        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33144  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33145    # gcc --version output typically looks like
33146    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33147    #     Copyright (C) 2013 Free Software Foundation, Inc.
33148    #     This is free software; see the source for copying conditions.  There is NO
33149    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33150    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33151    # Check that this is likely to be GCC.
33152    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33153    if test $? -ne 0; then
33154      { $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
33155$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33156      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33157$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33158      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33159    fi
33160    # Remove Copyright and legalese from version string, and
33161    # collapse into a single line
33162    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33163        $SED -e 's/ *Copyright .*//'`
33164    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33165        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33166  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33167    # clang --version output typically looks like
33168    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33169    #    clang version 3.3 (tags/RELEASE_33/final)
33170    # or
33171    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33172    #    Target: x86_64-pc-linux-gnu
33173    #    Thread model: posix
33174    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33175    # Check that this is likely to be clang
33176    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33177    if test $? -ne 0; then
33178      { $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
33179$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33180      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33181$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33182      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33183    fi
33184    # Collapse compiler output into a single line
33185    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33186    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33187        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33188  else
33189      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33190  fi
33191  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33192  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33193  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33194  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33195
33196  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33197$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33198
33199
33200  # Now that we have resolved CC ourself, let autoconf have its go at it
33201  ac_ext=c
33202ac_cpp='$CPP $CPPFLAGS'
33203ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33204ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33205ac_compiler_gnu=$ac_cv_c_compiler_gnu
33206if test -n "$ac_tool_prefix"; then
33207  for ac_prog in $CC
33208  do
33209    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33210set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33212$as_echo_n "checking for $ac_word... " >&6; }
33213if ${ac_cv_prog_CC+:} false; then :
33214  $as_echo_n "(cached) " >&6
33215else
33216  if test -n "$CC"; then
33217  ac_cv_prog_CC="$CC" # Let the user override the test.
33218else
33219as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33220for as_dir in $PATH
33221do
33222  IFS=$as_save_IFS
33223  test -z "$as_dir" && as_dir=.
33224    for ac_exec_ext in '' $ac_executable_extensions; do
33225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33226    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33228    break 2
33229  fi
33230done
33231  done
33232IFS=$as_save_IFS
33233
33234fi
33235fi
33236CC=$ac_cv_prog_CC
33237if test -n "$CC"; then
33238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33239$as_echo "$CC" >&6; }
33240else
33241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33242$as_echo "no" >&6; }
33243fi
33244
33245
33246    test -n "$CC" && break
33247  done
33248fi
33249if test -z "$CC"; then
33250  ac_ct_CC=$CC
33251  for ac_prog in $CC
33252do
33253  # Extract the first word of "$ac_prog", so it can be a program name with args.
33254set dummy $ac_prog; ac_word=$2
33255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33256$as_echo_n "checking for $ac_word... " >&6; }
33257if ${ac_cv_prog_ac_ct_CC+:} false; then :
33258  $as_echo_n "(cached) " >&6
33259else
33260  if test -n "$ac_ct_CC"; then
33261  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33262else
33263as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33264for as_dir in $PATH
33265do
33266  IFS=$as_save_IFS
33267  test -z "$as_dir" && as_dir=.
33268    for ac_exec_ext in '' $ac_executable_extensions; do
33269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33270    ac_cv_prog_ac_ct_CC="$ac_prog"
33271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33272    break 2
33273  fi
33274done
33275  done
33276IFS=$as_save_IFS
33277
33278fi
33279fi
33280ac_ct_CC=$ac_cv_prog_ac_ct_CC
33281if test -n "$ac_ct_CC"; then
33282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33283$as_echo "$ac_ct_CC" >&6; }
33284else
33285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33286$as_echo "no" >&6; }
33287fi
33288
33289
33290  test -n "$ac_ct_CC" && break
33291done
33292
33293  if test "x$ac_ct_CC" = x; then
33294    CC=""
33295  else
33296    case $cross_compiling:$ac_tool_warned in
33297yes:)
33298{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33299$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33300ac_tool_warned=yes ;;
33301esac
33302    CC=$ac_ct_CC
33303  fi
33304fi
33305
33306
33307test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33308$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33309as_fn_error $? "no acceptable C compiler found in \$PATH
33310See \`config.log' for more details" "$LINENO" 5; }
33311
33312# Provide some information about the compiler.
33313$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33314set X $ac_compile
33315ac_compiler=$2
33316for ac_option in --version -v -V -qversion; do
33317  { { ac_try="$ac_compiler $ac_option >&5"
33318case "(($ac_try" in
33319  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33320  *) ac_try_echo=$ac_try;;
33321esac
33322eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33323$as_echo "$ac_try_echo"; } >&5
33324  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33325  ac_status=$?
33326  if test -s conftest.err; then
33327    sed '10a\
33328... rest of stderr output deleted ...
33329         10q' conftest.err >conftest.er1
33330    cat conftest.er1 >&5
33331  fi
33332  rm -f conftest.er1 conftest.err
33333  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33334  test $ac_status = 0; }
33335done
33336
33337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33338/* end confdefs.h.  */
33339
33340int
33341main ()
33342{
33343
33344  ;
33345  return 0;
33346}
33347_ACEOF
33348ac_clean_files_save=$ac_clean_files
33349ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33350# Try to create an executable without -o first, disregard a.out.
33351# It will help us diagnose broken compilers, and finding out an intuition
33352# of exeext.
33353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33354$as_echo_n "checking whether the C compiler works... " >&6; }
33355ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33356
33357# The possible output files:
33358ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33359
33360ac_rmfiles=
33361for ac_file in $ac_files
33362do
33363  case $ac_file in
33364    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33365    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33366  esac
33367done
33368rm -f $ac_rmfiles
33369
33370if { { ac_try="$ac_link_default"
33371case "(($ac_try" in
33372  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33373  *) ac_try_echo=$ac_try;;
33374esac
33375eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33376$as_echo "$ac_try_echo"; } >&5
33377  (eval "$ac_link_default") 2>&5
33378  ac_status=$?
33379  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33380  test $ac_status = 0; }; then :
33381  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33382# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33383# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33384# so that the user can short-circuit this test for compilers unknown to
33385# Autoconf.
33386for ac_file in $ac_files ''
33387do
33388  test -f "$ac_file" || continue
33389  case $ac_file in
33390    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33391	;;
33392    [ab].out )
33393	# We found the default executable, but exeext='' is most
33394	# certainly right.
33395	break;;
33396    *.* )
33397	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33398	then :; else
33399	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33400	fi
33401	# We set ac_cv_exeext here because the later test for it is not
33402	# safe: cross compilers may not add the suffix if given an `-o'
33403	# argument, so we may need to know it at that point already.
33404	# Even if this section looks crufty: it has the advantage of
33405	# actually working.
33406	break;;
33407    * )
33408	break;;
33409  esac
33410done
33411test "$ac_cv_exeext" = no && ac_cv_exeext=
33412
33413else
33414  ac_file=''
33415fi
33416if test -z "$ac_file"; then :
33417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33418$as_echo "no" >&6; }
33419$as_echo "$as_me: failed program was:" >&5
33420sed 's/^/| /' conftest.$ac_ext >&5
33421
33422{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33423$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33424as_fn_error 77 "C compiler cannot create executables
33425See \`config.log' for more details" "$LINENO" 5; }
33426else
33427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33428$as_echo "yes" >&6; }
33429fi
33430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33431$as_echo_n "checking for C compiler default output file name... " >&6; }
33432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33433$as_echo "$ac_file" >&6; }
33434ac_exeext=$ac_cv_exeext
33435
33436rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33437ac_clean_files=$ac_clean_files_save
33438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33439$as_echo_n "checking for suffix of executables... " >&6; }
33440if { { ac_try="$ac_link"
33441case "(($ac_try" in
33442  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33443  *) ac_try_echo=$ac_try;;
33444esac
33445eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33446$as_echo "$ac_try_echo"; } >&5
33447  (eval "$ac_link") 2>&5
33448  ac_status=$?
33449  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33450  test $ac_status = 0; }; then :
33451  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33452# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33453# work properly (i.e., refer to `conftest.exe'), while it won't with
33454# `rm'.
33455for ac_file in conftest.exe conftest conftest.*; do
33456  test -f "$ac_file" || continue
33457  case $ac_file in
33458    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33459    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33460	  break;;
33461    * ) break;;
33462  esac
33463done
33464else
33465  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33466$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33467as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33468See \`config.log' for more details" "$LINENO" 5; }
33469fi
33470rm -f conftest conftest$ac_cv_exeext
33471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33472$as_echo "$ac_cv_exeext" >&6; }
33473
33474rm -f conftest.$ac_ext
33475EXEEXT=$ac_cv_exeext
33476ac_exeext=$EXEEXT
33477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33478/* end confdefs.h.  */
33479#include <stdio.h>
33480int
33481main ()
33482{
33483FILE *f = fopen ("conftest.out", "w");
33484 return ferror (f) || fclose (f) != 0;
33485
33486  ;
33487  return 0;
33488}
33489_ACEOF
33490ac_clean_files="$ac_clean_files conftest.out"
33491# Check that the compiler produces executables we can run.  If not, either
33492# the compiler is broken, or we cross compile.
33493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33494$as_echo_n "checking whether we are cross compiling... " >&6; }
33495if test "$cross_compiling" != yes; then
33496  { { ac_try="$ac_link"
33497case "(($ac_try" in
33498  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33499  *) ac_try_echo=$ac_try;;
33500esac
33501eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33502$as_echo "$ac_try_echo"; } >&5
33503  (eval "$ac_link") 2>&5
33504  ac_status=$?
33505  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33506  test $ac_status = 0; }
33507  if { ac_try='./conftest$ac_cv_exeext'
33508  { { case "(($ac_try" in
33509  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33510  *) ac_try_echo=$ac_try;;
33511esac
33512eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33513$as_echo "$ac_try_echo"; } >&5
33514  (eval "$ac_try") 2>&5
33515  ac_status=$?
33516  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33517  test $ac_status = 0; }; }; then
33518    cross_compiling=no
33519  else
33520    if test "$cross_compiling" = maybe; then
33521	cross_compiling=yes
33522    else
33523	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33524$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33525as_fn_error $? "cannot run C compiled programs.
33526If you meant to cross compile, use \`--host'.
33527See \`config.log' for more details" "$LINENO" 5; }
33528    fi
33529  fi
33530fi
33531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
33532$as_echo "$cross_compiling" >&6; }
33533
33534rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
33535ac_clean_files=$ac_clean_files_save
33536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
33537$as_echo_n "checking for suffix of object files... " >&6; }
33538if ${ac_cv_objext+:} false; then :
33539  $as_echo_n "(cached) " >&6
33540else
33541  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33542/* end confdefs.h.  */
33543
33544int
33545main ()
33546{
33547
33548  ;
33549  return 0;
33550}
33551_ACEOF
33552rm -f conftest.o conftest.obj
33553if { { ac_try="$ac_compile"
33554case "(($ac_try" in
33555  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33556  *) ac_try_echo=$ac_try;;
33557esac
33558eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33559$as_echo "$ac_try_echo"; } >&5
33560  (eval "$ac_compile") 2>&5
33561  ac_status=$?
33562  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33563  test $ac_status = 0; }; then :
33564  for ac_file in conftest.o conftest.obj conftest.*; do
33565  test -f "$ac_file" || continue;
33566  case $ac_file in
33567    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
33568    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
33569       break;;
33570  esac
33571done
33572else
33573  $as_echo "$as_me: failed program was:" >&5
33574sed 's/^/| /' conftest.$ac_ext >&5
33575
33576{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33577$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33578as_fn_error $? "cannot compute suffix of object files: cannot compile
33579See \`config.log' for more details" "$LINENO" 5; }
33580fi
33581rm -f conftest.$ac_cv_objext conftest.$ac_ext
33582fi
33583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
33584$as_echo "$ac_cv_objext" >&6; }
33585OBJEXT=$ac_cv_objext
33586ac_objext=$OBJEXT
33587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
33588$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
33589if ${ac_cv_c_compiler_gnu+:} false; then :
33590  $as_echo_n "(cached) " >&6
33591else
33592  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33593/* end confdefs.h.  */
33594
33595int
33596main ()
33597{
33598#ifndef __GNUC__
33599       choke me
33600#endif
33601
33602  ;
33603  return 0;
33604}
33605_ACEOF
33606if ac_fn_c_try_compile "$LINENO"; then :
33607  ac_compiler_gnu=yes
33608else
33609  ac_compiler_gnu=no
33610fi
33611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33612ac_cv_c_compiler_gnu=$ac_compiler_gnu
33613
33614fi
33615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
33616$as_echo "$ac_cv_c_compiler_gnu" >&6; }
33617if test $ac_compiler_gnu = yes; then
33618  GCC=yes
33619else
33620  GCC=
33621fi
33622ac_test_CFLAGS=${CFLAGS+set}
33623ac_save_CFLAGS=$CFLAGS
33624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
33625$as_echo_n "checking whether $CC accepts -g... " >&6; }
33626if ${ac_cv_prog_cc_g+:} false; then :
33627  $as_echo_n "(cached) " >&6
33628else
33629  ac_save_c_werror_flag=$ac_c_werror_flag
33630   ac_c_werror_flag=yes
33631   ac_cv_prog_cc_g=no
33632   CFLAGS="-g"
33633   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33634/* end confdefs.h.  */
33635
33636int
33637main ()
33638{
33639
33640  ;
33641  return 0;
33642}
33643_ACEOF
33644if ac_fn_c_try_compile "$LINENO"; then :
33645  ac_cv_prog_cc_g=yes
33646else
33647  CFLAGS=""
33648      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33649/* end confdefs.h.  */
33650
33651int
33652main ()
33653{
33654
33655  ;
33656  return 0;
33657}
33658_ACEOF
33659if ac_fn_c_try_compile "$LINENO"; then :
33660
33661else
33662  ac_c_werror_flag=$ac_save_c_werror_flag
33663	 CFLAGS="-g"
33664	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33665/* end confdefs.h.  */
33666
33667int
33668main ()
33669{
33670
33671  ;
33672  return 0;
33673}
33674_ACEOF
33675if ac_fn_c_try_compile "$LINENO"; then :
33676  ac_cv_prog_cc_g=yes
33677fi
33678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33679fi
33680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33681fi
33682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33683   ac_c_werror_flag=$ac_save_c_werror_flag
33684fi
33685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
33686$as_echo "$ac_cv_prog_cc_g" >&6; }
33687if test "$ac_test_CFLAGS" = set; then
33688  CFLAGS=$ac_save_CFLAGS
33689elif test $ac_cv_prog_cc_g = yes; then
33690  if test "$GCC" = yes; then
33691    CFLAGS="-g -O2"
33692  else
33693    CFLAGS="-g"
33694  fi
33695else
33696  if test "$GCC" = yes; then
33697    CFLAGS="-O2"
33698  else
33699    CFLAGS=
33700  fi
33701fi
33702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
33703$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
33704if ${ac_cv_prog_cc_c89+:} false; then :
33705  $as_echo_n "(cached) " >&6
33706else
33707  ac_cv_prog_cc_c89=no
33708ac_save_CC=$CC
33709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33710/* end confdefs.h.  */
33711#include <stdarg.h>
33712#include <stdio.h>
33713struct stat;
33714/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
33715struct buf { int x; };
33716FILE * (*rcsopen) (struct buf *, struct stat *, int);
33717static char *e (p, i)
33718     char **p;
33719     int i;
33720{
33721  return p[i];
33722}
33723static char *f (char * (*g) (char **, int), char **p, ...)
33724{
33725  char *s;
33726  va_list v;
33727  va_start (v,p);
33728  s = g (p, va_arg (v,int));
33729  va_end (v);
33730  return s;
33731}
33732
33733/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
33734   function prototypes and stuff, but not '\xHH' hex character constants.
33735   These don't provoke an error unfortunately, instead are silently treated
33736   as 'x'.  The following induces an error, until -std is added to get
33737   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
33738   array size at least.  It's necessary to write '\x00'==0 to get something
33739   that's true only with -std.  */
33740int osf4_cc_array ['\x00' == 0 ? 1 : -1];
33741
33742/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
33743   inside strings and character constants.  */
33744#define FOO(x) 'x'
33745int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
33746
33747int test (int i, double x);
33748struct s1 {int (*f) (int a);};
33749struct s2 {int (*f) (double a);};
33750int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
33751int argc;
33752char **argv;
33753int
33754main ()
33755{
33756return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
33757  ;
33758  return 0;
33759}
33760_ACEOF
33761for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
33762	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
33763do
33764  CC="$ac_save_CC $ac_arg"
33765  if ac_fn_c_try_compile "$LINENO"; then :
33766  ac_cv_prog_cc_c89=$ac_arg
33767fi
33768rm -f core conftest.err conftest.$ac_objext
33769  test "x$ac_cv_prog_cc_c89" != "xno" && break
33770done
33771rm -f conftest.$ac_ext
33772CC=$ac_save_CC
33773
33774fi
33775# AC_CACHE_VAL
33776case "x$ac_cv_prog_cc_c89" in
33777  x)
33778    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
33779$as_echo "none needed" >&6; } ;;
33780  xno)
33781    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
33782$as_echo "unsupported" >&6; } ;;
33783  *)
33784    CC="$CC $ac_cv_prog_cc_c89"
33785    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
33786$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
33787esac
33788if test "x$ac_cv_prog_cc_c89" != xno; then :
33789
33790fi
33791
33792ac_ext=cpp
33793ac_cpp='$CXXCPP $CPPFLAGS'
33794ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33795ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33796ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33797
33798
33799
33800  COMPILER_NAME=C++
33801  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
33802
33803  if test "x$CXX" != x; then
33804    # User has supplied compiler name already, always let that override.
33805    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
33806$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
33807    if test "x`basename $CXX`" = "x$CXX"; then
33808      # A command without a complete path is provided, search $PATH.
33809
33810      for ac_prog in $CXX
33811do
33812  # Extract the first word of "$ac_prog", so it can be a program name with args.
33813set dummy $ac_prog; ac_word=$2
33814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33815$as_echo_n "checking for $ac_word... " >&6; }
33816if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33817  $as_echo_n "(cached) " >&6
33818else
33819  case $POTENTIAL_CXX in
33820  [\\/]* | ?:[\\/]*)
33821  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33822  ;;
33823  *)
33824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33825for as_dir in $PATH
33826do
33827  IFS=$as_save_IFS
33828  test -z "$as_dir" && as_dir=.
33829    for ac_exec_ext in '' $ac_executable_extensions; do
33830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33831    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33833    break 2
33834  fi
33835done
33836  done
33837IFS=$as_save_IFS
33838
33839  ;;
33840esac
33841fi
33842POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33843if test -n "$POTENTIAL_CXX"; then
33844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33845$as_echo "$POTENTIAL_CXX" >&6; }
33846else
33847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33848$as_echo "no" >&6; }
33849fi
33850
33851
33852  test -n "$POTENTIAL_CXX" && break
33853done
33854
33855      if test "x$POTENTIAL_CXX" != x; then
33856        CXX=$POTENTIAL_CXX
33857      else
33858        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33859      fi
33860    else
33861      # Otherwise it might already be a complete path
33862      if test ! -x "$CXX"; then
33863        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33864      fi
33865    fi
33866  else
33867    # No user supplied value. Locate compiler ourselves.
33868
33869    # If we are cross compiling, assume cross compilation tools follows the
33870    # cross compilation standard where they are prefixed with the autoconf
33871    # standard name for the target. For example the binary
33872    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33873    # If we are not cross compiling, then the default compiler name will be
33874    # used.
33875
33876    CXX=
33877    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33878    # before checking the rest of the PATH.
33879    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33880    # step, this should not be necessary.
33881    if test -n "$TOOLCHAIN_PATH"; then
33882      PATH_save="$PATH"
33883      PATH="$TOOLCHAIN_PATH"
33884      for ac_prog in $SEARCH_LIST
33885do
33886  # Extract the first word of "$ac_prog", so it can be a program name with args.
33887set dummy $ac_prog; ac_word=$2
33888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33889$as_echo_n "checking for $ac_word... " >&6; }
33890if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33891  $as_echo_n "(cached) " >&6
33892else
33893  case $TOOLCHAIN_PATH_CXX in
33894  [\\/]* | ?:[\\/]*)
33895  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33896  ;;
33897  *)
33898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33899for as_dir in $PATH
33900do
33901  IFS=$as_save_IFS
33902  test -z "$as_dir" && as_dir=.
33903    for ac_exec_ext in '' $ac_executable_extensions; do
33904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33905    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33907    break 2
33908  fi
33909done
33910  done
33911IFS=$as_save_IFS
33912
33913  ;;
33914esac
33915fi
33916TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33917if test -n "$TOOLCHAIN_PATH_CXX"; then
33918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33919$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33920else
33921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33922$as_echo "no" >&6; }
33923fi
33924
33925
33926  test -n "$TOOLCHAIN_PATH_CXX" && break
33927done
33928
33929      CXX=$TOOLCHAIN_PATH_CXX
33930      PATH="$PATH_save"
33931    fi
33932
33933    # AC_PATH_PROGS can't be run multiple times with the same variable,
33934    # so create a new name for this run.
33935    if test "x$CXX" = x; then
33936      for ac_prog in $SEARCH_LIST
33937do
33938  # Extract the first word of "$ac_prog", so it can be a program name with args.
33939set dummy $ac_prog; ac_word=$2
33940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33941$as_echo_n "checking for $ac_word... " >&6; }
33942if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33943  $as_echo_n "(cached) " >&6
33944else
33945  case $POTENTIAL_CXX in
33946  [\\/]* | ?:[\\/]*)
33947  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33948  ;;
33949  *)
33950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33951for as_dir in $PATH
33952do
33953  IFS=$as_save_IFS
33954  test -z "$as_dir" && as_dir=.
33955    for ac_exec_ext in '' $ac_executable_extensions; do
33956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33957    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33959    break 2
33960  fi
33961done
33962  done
33963IFS=$as_save_IFS
33964
33965  ;;
33966esac
33967fi
33968POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33969if test -n "$POTENTIAL_CXX"; then
33970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33971$as_echo "$POTENTIAL_CXX" >&6; }
33972else
33973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33974$as_echo "no" >&6; }
33975fi
33976
33977
33978  test -n "$POTENTIAL_CXX" && break
33979done
33980
33981      CXX=$POTENTIAL_CXX
33982    fi
33983
33984    if test "x$CXX" = x; then
33985
33986  # Print a helpful message on how to acquire the necessary build dependency.
33987  # devkit is the help tag: freetype, cups, alsa etc
33988  MISSING_DEPENDENCY=devkit
33989
33990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33991    cygwin_help $MISSING_DEPENDENCY
33992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33993    msys_help $MISSING_DEPENDENCY
33994  else
33995    PKGHANDLER_COMMAND=
33996
33997    case $PKGHANDLER in
33998      apt-get)
33999        apt_help     $MISSING_DEPENDENCY ;;
34000      yum)
34001        yum_help     $MISSING_DEPENDENCY ;;
34002      port)
34003        port_help    $MISSING_DEPENDENCY ;;
34004      pkgutil)
34005        pkgutil_help $MISSING_DEPENDENCY ;;
34006      pkgadd)
34007        pkgadd_help  $MISSING_DEPENDENCY ;;
34008    esac
34009
34010    if test "x$PKGHANDLER_COMMAND" != x; then
34011      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34012    fi
34013  fi
34014
34015      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34016    fi
34017  fi
34018
34019  # Now we have a compiler binary in CXX. Make sure it's okay.
34020
34021  # Only process if variable expands to non-empty
34022
34023  if test "x$CXX" != x; then
34024    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34025
34026  # First separate the path from the arguments. This will split at the first
34027  # space.
34028  complete="$CXX"
34029  path="${complete%% *}"
34030  tmp="$complete EOL"
34031  arguments="${tmp#* }"
34032
34033  # Input might be given as Windows format, start by converting to
34034  # unix format.
34035  new_path=`$CYGPATH -u "$path"`
34036
34037  # Now try to locate executable using which
34038  new_path=`$WHICH "$new_path" 2> /dev/null`
34039  # bat and cmd files are not always considered executable in cygwin causing which
34040  # to not find them
34041  if test "x$new_path" = x \
34042      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34043      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34044    new_path=`$CYGPATH -u "$path"`
34045  fi
34046  if test "x$new_path" = x; then
34047    # Oops. Which didn't find the executable.
34048    # The splitting of arguments from the executable at a space might have been incorrect,
34049    # since paths with space are more likely in Windows. Give it another try with the whole
34050    # argument.
34051    path="$complete"
34052    arguments="EOL"
34053    new_path=`$CYGPATH -u "$path"`
34054    new_path=`$WHICH "$new_path" 2> /dev/null`
34055    # bat and cmd files are not always considered executable in cygwin causing which
34056    # to not find them
34057    if test "x$new_path" = x \
34058        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34059        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34060      new_path=`$CYGPATH -u "$path"`
34061    fi
34062    if test "x$new_path" = x; then
34063      # It's still not found. Now this is an unrecoverable error.
34064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34065$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34066      has_space=`$ECHO "$complete" | $GREP " "`
34067      if test "x$has_space" != x; then
34068        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34069$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34070      fi
34071      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34072    fi
34073  fi
34074
34075  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34076  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34077  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34078  # "foo.exe" is OK but "foo" is an error.
34079  #
34080  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34081  # It is also a way to make sure we got the proper file name for the real test later on.
34082  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34083  if test "x$test_shortpath" = x; then
34084    # Short path failed, file does not exist as specified.
34085    # Try adding .exe or .cmd
34086    if test -f "${new_path}.exe"; then
34087      input_to_shortpath="${new_path}.exe"
34088    elif test -f "${new_path}.cmd"; then
34089      input_to_shortpath="${new_path}.cmd"
34090    else
34091      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34092$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34093      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34094$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34095      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34096    fi
34097  else
34098    input_to_shortpath="$new_path"
34099  fi
34100
34101  # Call helper function which possibly converts this using DOS-style short mode.
34102  # If so, the updated path is stored in $new_path.
34103  new_path="$input_to_shortpath"
34104
34105  input_path="$input_to_shortpath"
34106  # Check if we need to convert this using DOS-style short mode. If the path
34107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34108  # take no chances and rewrite it.
34109  # Note: m4 eats our [], so we need to use [ and ] instead.
34110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34111  if test "x$has_forbidden_chars" != x; then
34112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34113    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34114    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34115    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34116      # Going to short mode and back again did indeed matter. Since short mode is
34117      # case insensitive, let's make it lowercase to improve readability.
34118      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34119      # Now convert it back to Unix-style (cygpath)
34120      input_path=`$CYGPATH -u "$shortmode_path"`
34121      new_path="$input_path"
34122    fi
34123  fi
34124
34125  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34126  if test "x$test_cygdrive_prefix" = x; then
34127    # As a simple fix, exclude /usr/bin since it's not a real path.
34128    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34129      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34130      # a path prefixed by /cygdrive for fixpath to work.
34131      new_path="$CYGWIN_ROOT_PATH$input_path"
34132    fi
34133  fi
34134
34135  # remove trailing .exe if any
34136  new_path="${new_path/%.exe/}"
34137
34138    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34139
34140  # First separate the path from the arguments. This will split at the first
34141  # space.
34142  complete="$CXX"
34143  path="${complete%% *}"
34144  tmp="$complete EOL"
34145  arguments="${tmp#* }"
34146
34147  # Input might be given as Windows format, start by converting to
34148  # unix format.
34149  new_path="$path"
34150
34151  windows_path="$new_path"
34152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34153    unix_path=`$CYGPATH -u "$windows_path"`
34154    new_path="$unix_path"
34155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34157    new_path="$unix_path"
34158  fi
34159
34160
34161  # Now try to locate executable using which
34162  new_path=`$WHICH "$new_path" 2> /dev/null`
34163
34164  if test "x$new_path" = x; then
34165    # Oops. Which didn't find the executable.
34166    # The splitting of arguments from the executable at a space might have been incorrect,
34167    # since paths with space are more likely in Windows. Give it another try with the whole
34168    # argument.
34169    path="$complete"
34170    arguments="EOL"
34171    new_path="$path"
34172
34173  windows_path="$new_path"
34174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34175    unix_path=`$CYGPATH -u "$windows_path"`
34176    new_path="$unix_path"
34177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34179    new_path="$unix_path"
34180  fi
34181
34182
34183    new_path=`$WHICH "$new_path" 2> /dev/null`
34184    # bat and cmd files are not always considered executable in MSYS causing which
34185    # to not find them
34186    if test "x$new_path" = x \
34187        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34188        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34189      new_path="$path"
34190
34191  windows_path="$new_path"
34192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34193    unix_path=`$CYGPATH -u "$windows_path"`
34194    new_path="$unix_path"
34195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34197    new_path="$unix_path"
34198  fi
34199
34200    fi
34201
34202    if test "x$new_path" = x; then
34203      # It's still not found. Now this is an unrecoverable error.
34204      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34205$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34206      has_space=`$ECHO "$complete" | $GREP " "`
34207      if test "x$has_space" != x; then
34208        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34209$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34210      fi
34211      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34212    fi
34213  fi
34214
34215  # Now new_path has a complete unix path to the binary
34216  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34217    # Keep paths in /bin as-is, but remove trailing .exe if any
34218    new_path="${new_path/%.exe/}"
34219    # Do not save /bin paths to all_fixpath_prefixes!
34220  else
34221    # Not in mixed or Windows style, start by that.
34222    new_path=`cmd //c echo $new_path`
34223
34224  input_path="$new_path"
34225  # Check if we need to convert this using DOS-style short mode. If the path
34226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34227  # take no chances and rewrite it.
34228  # Note: m4 eats our [], so we need to use [ and ] instead.
34229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34230  if test "x$has_forbidden_chars" != x; then
34231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34232    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34233  fi
34234
34235    # Output is in $new_path
34236
34237  windows_path="$new_path"
34238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34239    unix_path=`$CYGPATH -u "$windows_path"`
34240    new_path="$unix_path"
34241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34243    new_path="$unix_path"
34244  fi
34245
34246    # remove trailing .exe if any
34247    new_path="${new_path/%.exe/}"
34248
34249    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34250    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34251  fi
34252
34253    else
34254      # We're on a unix platform. Hooray! :)
34255      # First separate the path from the arguments. This will split at the first
34256      # space.
34257      complete="$CXX"
34258      path="${complete%% *}"
34259      tmp="$complete EOL"
34260      arguments="${tmp#* }"
34261
34262      # Cannot rely on the command "which" here since it doesn't always work.
34263      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34264      if test -z "$is_absolute_path"; then
34265        # Path to executable is not absolute. Find it.
34266        IFS_save="$IFS"
34267        IFS=:
34268        for p in $PATH; do
34269          if test -f "$p/$path" && test -x "$p/$path"; then
34270            new_path="$p/$path"
34271            break
34272          fi
34273        done
34274        IFS="$IFS_save"
34275      else
34276        # This is an absolute path, we can use it without further modifications.
34277        new_path="$path"
34278      fi
34279
34280      if test "x$new_path" = x; then
34281        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34282$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34283        has_space=`$ECHO "$complete" | $GREP " "`
34284        if test "x$has_space" != x; then
34285          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34286$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34287        fi
34288        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34289      fi
34290    fi
34291
34292    # Now join together the path and the arguments once again
34293    if test "x$arguments" != xEOL; then
34294      new_complete="$new_path ${arguments% *}"
34295    else
34296      new_complete="$new_path"
34297    fi
34298
34299    if test "x$complete" != "x$new_complete"; then
34300      CXX="$new_complete"
34301      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34302$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34303    fi
34304  fi
34305
34306  TEST_COMPILER="$CXX"
34307
34308  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34309$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34310  SYMLINK_ORIGINAL="$TEST_COMPILER"
34311
34312  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34313    # Follow a chain of symbolic links. Use readlink
34314    # where it exists, else fall back to horribly
34315    # complicated shell code.
34316    if test "x$READLINK_TESTED" != yes; then
34317      # On MacOSX there is a readlink tool with a different
34318      # purpose than the GNU readlink tool. Check the found readlink.
34319      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34320      if test "x$ISGNU" = x; then
34321        # A readlink that we do not know how to use.
34322        # Are there other non-GNU readlinks out there?
34323        READLINK_TESTED=yes
34324        READLINK=
34325      fi
34326    fi
34327
34328    if test "x$READLINK" != x; then
34329      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34330    else
34331      # Save the current directory for restoring afterwards
34332      STARTDIR=$PWD
34333      COUNTER=0
34334      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34335      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34336      cd $sym_link_dir
34337      # Use -P flag to resolve symlinks in directories.
34338      cd `$THEPWDCMD -P`
34339      sym_link_dir=`$THEPWDCMD -P`
34340      # Resolve file symlinks
34341      while test $COUNTER -lt 20; do
34342        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34343        if test "x$ISLINK" == x; then
34344          # This is not a symbolic link! We are done!
34345          break
34346        fi
34347        # Again resolve directory symlinks since the target of the just found
34348        # link could be in a different directory
34349        cd `$DIRNAME $ISLINK`
34350        sym_link_dir=`$THEPWDCMD -P`
34351        sym_link_file=`$BASENAME $ISLINK`
34352        let COUNTER=COUNTER+1
34353      done
34354      cd $STARTDIR
34355      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34356    fi
34357  fi
34358
34359  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34360    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34361$as_echo "no symlink" >&6; }
34362  else
34363    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34364$as_echo "$SYMLINK_ORIGINAL" >&6; }
34365
34366    # We can't handle ccache by gcc wrappers, since we need to know if we're
34367    # using ccache. Instead ccache usage must be controlled by a configure option.
34368    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34369    if test "x$COMPILER_BASENAME" = "xccache"; then
34370      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34371$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34372      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34373    fi
34374  fi
34375
34376
34377  COMPILER=$CXX
34378  COMPILER_NAME=$COMPILER_NAME
34379
34380  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34381    # cc -V output typically looks like
34382    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34383    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34384    # Check that this is likely to be the Solaris Studio cc.
34385    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34386    if test $? -ne 0; then
34387      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34388      { $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
34389$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34390      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34391$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34392      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34393$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34394      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34395    fi
34396    # Remove usage instructions (if present), and
34397    # collapse compiler output into a single line
34398    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34399        $SED -e 's/ *[Uu]sage:.*//'`
34400    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34401        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34402  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34403    # xlc -qversion output typically looks like
34404    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34405    #     Version: 11.01.0000.0015
34406    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34407    # Check that this is likely to be the IBM XL C compiler.
34408    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34409    if test $? -ne 0; then
34410      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34411      { $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
34412$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34413      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34414$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34415      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34416$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34417      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34418    fi
34419    # Collapse compiler output into a single line
34420    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34421    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34422        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34423  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34424    # There is no specific version flag, but all output starts with a version string.
34425    # First line typically looks something like:
34426    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34427    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34428    # Check that this is likely to be Microsoft CL.EXE.
34429    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34430    if test $? -ne 0; then
34431      { $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
34432$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34433      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34434$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34435      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34436    fi
34437    # Collapse compiler output into a single line
34438    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34439    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34440        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34441  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34442    # gcc --version output typically looks like
34443    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34444    #     Copyright (C) 2013 Free Software Foundation, Inc.
34445    #     This is free software; see the source for copying conditions.  There is NO
34446    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34447    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34448    # Check that this is likely to be GCC.
34449    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34450    if test $? -ne 0; then
34451      { $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
34452$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34453      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34454$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34455      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34456    fi
34457    # Remove Copyright and legalese from version string, and
34458    # collapse into a single line
34459    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34460        $SED -e 's/ *Copyright .*//'`
34461    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34462        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34463  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34464    # clang --version output typically looks like
34465    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34466    #    clang version 3.3 (tags/RELEASE_33/final)
34467    # or
34468    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34469    #    Target: x86_64-pc-linux-gnu
34470    #    Thread model: posix
34471    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34472    # Check that this is likely to be clang
34473    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34474    if test $? -ne 0; then
34475      { $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
34476$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34477      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34478$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34479      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34480    fi
34481    # Collapse compiler output into a single line
34482    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34483    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34484        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34485  else
34486      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34487  fi
34488  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34489  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34490  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34491  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34492
34493  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34494$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34495
34496
34497  # Now that we have resolved CXX ourself, let autoconf have its go at it
34498  ac_ext=cpp
34499ac_cpp='$CXXCPP $CPPFLAGS'
34500ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34501ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34502ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34503if test -z "$CXX"; then
34504  if test -n "$CCC"; then
34505    CXX=$CCC
34506  else
34507    if test -n "$ac_tool_prefix"; then
34508  for ac_prog in $CXX
34509  do
34510    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34511set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34513$as_echo_n "checking for $ac_word... " >&6; }
34514if ${ac_cv_prog_CXX+:} false; then :
34515  $as_echo_n "(cached) " >&6
34516else
34517  if test -n "$CXX"; then
34518  ac_cv_prog_CXX="$CXX" # Let the user override the test.
34519else
34520as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34521for as_dir in $PATH
34522do
34523  IFS=$as_save_IFS
34524  test -z "$as_dir" && as_dir=.
34525    for ac_exec_ext in '' $ac_executable_extensions; do
34526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34527    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34529    break 2
34530  fi
34531done
34532  done
34533IFS=$as_save_IFS
34534
34535fi
34536fi
34537CXX=$ac_cv_prog_CXX
34538if test -n "$CXX"; then
34539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34540$as_echo "$CXX" >&6; }
34541else
34542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34543$as_echo "no" >&6; }
34544fi
34545
34546
34547    test -n "$CXX" && break
34548  done
34549fi
34550if test -z "$CXX"; then
34551  ac_ct_CXX=$CXX
34552  for ac_prog in $CXX
34553do
34554  # Extract the first word of "$ac_prog", so it can be a program name with args.
34555set dummy $ac_prog; ac_word=$2
34556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34557$as_echo_n "checking for $ac_word... " >&6; }
34558if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34559  $as_echo_n "(cached) " >&6
34560else
34561  if test -n "$ac_ct_CXX"; then
34562  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34563else
34564as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34565for as_dir in $PATH
34566do
34567  IFS=$as_save_IFS
34568  test -z "$as_dir" && as_dir=.
34569    for ac_exec_ext in '' $ac_executable_extensions; do
34570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34571    ac_cv_prog_ac_ct_CXX="$ac_prog"
34572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34573    break 2
34574  fi
34575done
34576  done
34577IFS=$as_save_IFS
34578
34579fi
34580fi
34581ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34582if test -n "$ac_ct_CXX"; then
34583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34584$as_echo "$ac_ct_CXX" >&6; }
34585else
34586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34587$as_echo "no" >&6; }
34588fi
34589
34590
34591  test -n "$ac_ct_CXX" && break
34592done
34593
34594  if test "x$ac_ct_CXX" = x; then
34595    CXX="g++"
34596  else
34597    case $cross_compiling:$ac_tool_warned in
34598yes:)
34599{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34600$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34601ac_tool_warned=yes ;;
34602esac
34603    CXX=$ac_ct_CXX
34604  fi
34605fi
34606
34607  fi
34608fi
34609# Provide some information about the compiler.
34610$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34611set X $ac_compile
34612ac_compiler=$2
34613for ac_option in --version -v -V -qversion; do
34614  { { ac_try="$ac_compiler $ac_option >&5"
34615case "(($ac_try" in
34616  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34617  *) ac_try_echo=$ac_try;;
34618esac
34619eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34620$as_echo "$ac_try_echo"; } >&5
34621  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34622  ac_status=$?
34623  if test -s conftest.err; then
34624    sed '10a\
34625... rest of stderr output deleted ...
34626         10q' conftest.err >conftest.er1
34627    cat conftest.er1 >&5
34628  fi
34629  rm -f conftest.er1 conftest.err
34630  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34631  test $ac_status = 0; }
34632done
34633
34634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34635$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34636if ${ac_cv_cxx_compiler_gnu+:} false; then :
34637  $as_echo_n "(cached) " >&6
34638else
34639  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34640/* end confdefs.h.  */
34641
34642int
34643main ()
34644{
34645#ifndef __GNUC__
34646       choke me
34647#endif
34648
34649  ;
34650  return 0;
34651}
34652_ACEOF
34653if ac_fn_cxx_try_compile "$LINENO"; then :
34654  ac_compiler_gnu=yes
34655else
34656  ac_compiler_gnu=no
34657fi
34658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34659ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34660
34661fi
34662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34663$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34664if test $ac_compiler_gnu = yes; then
34665  GXX=yes
34666else
34667  GXX=
34668fi
34669ac_test_CXXFLAGS=${CXXFLAGS+set}
34670ac_save_CXXFLAGS=$CXXFLAGS
34671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34672$as_echo_n "checking whether $CXX accepts -g... " >&6; }
34673if ${ac_cv_prog_cxx_g+:} false; then :
34674  $as_echo_n "(cached) " >&6
34675else
34676  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34677   ac_cxx_werror_flag=yes
34678   ac_cv_prog_cxx_g=no
34679   CXXFLAGS="-g"
34680   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34681/* end confdefs.h.  */
34682
34683int
34684main ()
34685{
34686
34687  ;
34688  return 0;
34689}
34690_ACEOF
34691if ac_fn_cxx_try_compile "$LINENO"; then :
34692  ac_cv_prog_cxx_g=yes
34693else
34694  CXXFLAGS=""
34695      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34696/* end confdefs.h.  */
34697
34698int
34699main ()
34700{
34701
34702  ;
34703  return 0;
34704}
34705_ACEOF
34706if ac_fn_cxx_try_compile "$LINENO"; then :
34707
34708else
34709  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34710	 CXXFLAGS="-g"
34711	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34712/* end confdefs.h.  */
34713
34714int
34715main ()
34716{
34717
34718  ;
34719  return 0;
34720}
34721_ACEOF
34722if ac_fn_cxx_try_compile "$LINENO"; then :
34723  ac_cv_prog_cxx_g=yes
34724fi
34725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34726fi
34727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34728fi
34729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34730   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34731fi
34732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34733$as_echo "$ac_cv_prog_cxx_g" >&6; }
34734if test "$ac_test_CXXFLAGS" = set; then
34735  CXXFLAGS=$ac_save_CXXFLAGS
34736elif test $ac_cv_prog_cxx_g = yes; then
34737  if test "$GXX" = yes; then
34738    CXXFLAGS="-g -O2"
34739  else
34740    CXXFLAGS="-g"
34741  fi
34742else
34743  if test "$GXX" = yes; then
34744    CXXFLAGS="-O2"
34745  else
34746    CXXFLAGS=
34747  fi
34748fi
34749ac_ext=cpp
34750ac_cpp='$CXXCPP $CPPFLAGS'
34751ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34752ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34753ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34754
34755
34756  # This is the compiler version number on the form X.Y[.Z]
34757
34758
34759
34760
34761  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
34762    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
34763$as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
34764    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
34765$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
34766  fi
34767
34768  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
34769  if  [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
34770    { $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
34771$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;}
34772  fi
34773
34774  if  [[  "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
34775    { $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
34776$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
34777  fi
34778
34779  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
34780
34781
34782  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
34783
34784
34785
34786
34787
34788
34789
34790
34791
34792
34793
34794
34795
34796
34797
34798
34799
34800
34801
34802
34803
34804
34805
34806
34807
34808
34809
34810
34811
34812
34813
34814
34815
34816
34817
34818
34819
34820
34821
34822
34823
34824
34825    # Execute function body
34826
34827  # Need to assign to a variable since m4 is blocked from modifying parts in [].
34828  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
34829
34830  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
34831    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
34832  fi
34833
34834  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
34835    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
34836  fi
34837
34838  # Version comparison method inspired by http://stackoverflow.com/a/24067243
34839  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
34840
34841  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
34842    :
34843
34844  else
34845    :
34846
34847          { $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
34848$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
34849
34850
34851  fi
34852
34853
34854
34855
34856
34857
34858
34859
34860
34861
34862
34863
34864  fi
34865
34866  #
34867  # Setup the preprocessor (CPP and CXXCPP)
34868  #
34869  ac_ext=c
34870ac_cpp='$CPP $CPPFLAGS'
34871ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34872ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34873ac_compiler_gnu=$ac_cv_c_compiler_gnu
34874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34875$as_echo_n "checking how to run the C preprocessor... " >&6; }
34876# On Suns, sometimes $CPP names a directory.
34877if test -n "$CPP" && test -d "$CPP"; then
34878  CPP=
34879fi
34880if test -z "$CPP"; then
34881  if ${ac_cv_prog_CPP+:} false; then :
34882  $as_echo_n "(cached) " >&6
34883else
34884      # Double quotes because CPP needs to be expanded
34885    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34886    do
34887      ac_preproc_ok=false
34888for ac_c_preproc_warn_flag in '' yes
34889do
34890  # Use a header file that comes with gcc, so configuring glibc
34891  # with a fresh cross-compiler works.
34892  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34893  # <limits.h> exists even on freestanding compilers.
34894  # On the NeXT, cc -E runs the code through the compiler's parser,
34895  # not just through cpp. "Syntax error" is here to catch this case.
34896  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34897/* end confdefs.h.  */
34898#ifdef __STDC__
34899# include <limits.h>
34900#else
34901# include <assert.h>
34902#endif
34903		     Syntax error
34904_ACEOF
34905if ac_fn_c_try_cpp "$LINENO"; then :
34906
34907else
34908  # Broken: fails on valid input.
34909continue
34910fi
34911rm -f conftest.err conftest.i conftest.$ac_ext
34912
34913  # OK, works on sane cases.  Now check whether nonexistent headers
34914  # can be detected and how.
34915  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34916/* end confdefs.h.  */
34917#include <ac_nonexistent.h>
34918_ACEOF
34919if ac_fn_c_try_cpp "$LINENO"; then :
34920  # Broken: success on invalid input.
34921continue
34922else
34923  # Passes both tests.
34924ac_preproc_ok=:
34925break
34926fi
34927rm -f conftest.err conftest.i conftest.$ac_ext
34928
34929done
34930# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34931rm -f conftest.i conftest.err conftest.$ac_ext
34932if $ac_preproc_ok; then :
34933  break
34934fi
34935
34936    done
34937    ac_cv_prog_CPP=$CPP
34938
34939fi
34940  CPP=$ac_cv_prog_CPP
34941else
34942  ac_cv_prog_CPP=$CPP
34943fi
34944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34945$as_echo "$CPP" >&6; }
34946ac_preproc_ok=false
34947for ac_c_preproc_warn_flag in '' yes
34948do
34949  # Use a header file that comes with gcc, so configuring glibc
34950  # with a fresh cross-compiler works.
34951  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34952  # <limits.h> exists even on freestanding compilers.
34953  # On the NeXT, cc -E runs the code through the compiler's parser,
34954  # not just through cpp. "Syntax error" is here to catch this case.
34955  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34956/* end confdefs.h.  */
34957#ifdef __STDC__
34958# include <limits.h>
34959#else
34960# include <assert.h>
34961#endif
34962		     Syntax error
34963_ACEOF
34964if ac_fn_c_try_cpp "$LINENO"; then :
34965
34966else
34967  # Broken: fails on valid input.
34968continue
34969fi
34970rm -f conftest.err conftest.i conftest.$ac_ext
34971
34972  # OK, works on sane cases.  Now check whether nonexistent headers
34973  # can be detected and how.
34974  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34975/* end confdefs.h.  */
34976#include <ac_nonexistent.h>
34977_ACEOF
34978if ac_fn_c_try_cpp "$LINENO"; then :
34979  # Broken: success on invalid input.
34980continue
34981else
34982  # Passes both tests.
34983ac_preproc_ok=:
34984break
34985fi
34986rm -f conftest.err conftest.i conftest.$ac_ext
34987
34988done
34989# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34990rm -f conftest.i conftest.err conftest.$ac_ext
34991if $ac_preproc_ok; then :
34992
34993else
34994  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34995$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34996as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34997See \`config.log' for more details" "$LINENO" 5; }
34998fi
34999
35000ac_ext=cpp
35001ac_cpp='$CXXCPP $CPPFLAGS'
35002ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35003ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35004ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35005
35006
35007  # Only process if variable expands to non-empty
35008
35009  if test "x$CPP" != x; then
35010    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35011
35012  # First separate the path from the arguments. This will split at the first
35013  # space.
35014  complete="$CPP"
35015  path="${complete%% *}"
35016  tmp="$complete EOL"
35017  arguments="${tmp#* }"
35018
35019  # Input might be given as Windows format, start by converting to
35020  # unix format.
35021  new_path=`$CYGPATH -u "$path"`
35022
35023  # Now try to locate executable using which
35024  new_path=`$WHICH "$new_path" 2> /dev/null`
35025  # bat and cmd files are not always considered executable in cygwin causing which
35026  # to not find them
35027  if test "x$new_path" = x \
35028      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35029      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35030    new_path=`$CYGPATH -u "$path"`
35031  fi
35032  if test "x$new_path" = x; then
35033    # Oops. Which didn't find the executable.
35034    # The splitting of arguments from the executable at a space might have been incorrect,
35035    # since paths with space are more likely in Windows. Give it another try with the whole
35036    # argument.
35037    path="$complete"
35038    arguments="EOL"
35039    new_path=`$CYGPATH -u "$path"`
35040    new_path=`$WHICH "$new_path" 2> /dev/null`
35041    # bat and cmd files are not always considered executable in cygwin causing which
35042    # to not find them
35043    if test "x$new_path" = x \
35044        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35045        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35046      new_path=`$CYGPATH -u "$path"`
35047    fi
35048    if test "x$new_path" = x; then
35049      # It's still not found. Now this is an unrecoverable error.
35050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35051$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35052      has_space=`$ECHO "$complete" | $GREP " "`
35053      if test "x$has_space" != x; then
35054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35056      fi
35057      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35058    fi
35059  fi
35060
35061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35064  # "foo.exe" is OK but "foo" is an error.
35065  #
35066  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35067  # It is also a way to make sure we got the proper file name for the real test later on.
35068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35069  if test "x$test_shortpath" = x; then
35070    # Short path failed, file does not exist as specified.
35071    # Try adding .exe or .cmd
35072    if test -f "${new_path}.exe"; then
35073      input_to_shortpath="${new_path}.exe"
35074    elif test -f "${new_path}.cmd"; then
35075      input_to_shortpath="${new_path}.cmd"
35076    else
35077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35078$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35079      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35080$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35081      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35082    fi
35083  else
35084    input_to_shortpath="$new_path"
35085  fi
35086
35087  # Call helper function which possibly converts this using DOS-style short mode.
35088  # If so, the updated path is stored in $new_path.
35089  new_path="$input_to_shortpath"
35090
35091  input_path="$input_to_shortpath"
35092  # Check if we need to convert this using DOS-style short mode. If the path
35093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35094  # take no chances and rewrite it.
35095  # Note: m4 eats our [], so we need to use [ and ] instead.
35096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35097  if test "x$has_forbidden_chars" != x; then
35098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35102      # Going to short mode and back again did indeed matter. Since short mode is
35103      # case insensitive, let's make it lowercase to improve readability.
35104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35105      # Now convert it back to Unix-style (cygpath)
35106      input_path=`$CYGPATH -u "$shortmode_path"`
35107      new_path="$input_path"
35108    fi
35109  fi
35110
35111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35112  if test "x$test_cygdrive_prefix" = x; then
35113    # As a simple fix, exclude /usr/bin since it's not a real path.
35114    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35116      # a path prefixed by /cygdrive for fixpath to work.
35117      new_path="$CYGWIN_ROOT_PATH$input_path"
35118    fi
35119  fi
35120
35121  # remove trailing .exe if any
35122  new_path="${new_path/%.exe/}"
35123
35124    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35125
35126  # First separate the path from the arguments. This will split at the first
35127  # space.
35128  complete="$CPP"
35129  path="${complete%% *}"
35130  tmp="$complete EOL"
35131  arguments="${tmp#* }"
35132
35133  # Input might be given as Windows format, start by converting to
35134  # unix format.
35135  new_path="$path"
35136
35137  windows_path="$new_path"
35138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35139    unix_path=`$CYGPATH -u "$windows_path"`
35140    new_path="$unix_path"
35141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35143    new_path="$unix_path"
35144  fi
35145
35146
35147  # Now try to locate executable using which
35148  new_path=`$WHICH "$new_path" 2> /dev/null`
35149
35150  if test "x$new_path" = x; then
35151    # Oops. Which didn't find the executable.
35152    # The splitting of arguments from the executable at a space might have been incorrect,
35153    # since paths with space are more likely in Windows. Give it another try with the whole
35154    # argument.
35155    path="$complete"
35156    arguments="EOL"
35157    new_path="$path"
35158
35159  windows_path="$new_path"
35160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35161    unix_path=`$CYGPATH -u "$windows_path"`
35162    new_path="$unix_path"
35163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35165    new_path="$unix_path"
35166  fi
35167
35168
35169    new_path=`$WHICH "$new_path" 2> /dev/null`
35170    # bat and cmd files are not always considered executable in MSYS causing which
35171    # to not find them
35172    if test "x$new_path" = x \
35173        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35174        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35175      new_path="$path"
35176
35177  windows_path="$new_path"
35178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35179    unix_path=`$CYGPATH -u "$windows_path"`
35180    new_path="$unix_path"
35181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35183    new_path="$unix_path"
35184  fi
35185
35186    fi
35187
35188    if test "x$new_path" = x; then
35189      # It's still not found. Now this is an unrecoverable error.
35190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35191$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35192      has_space=`$ECHO "$complete" | $GREP " "`
35193      if test "x$has_space" != x; then
35194        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35195$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35196      fi
35197      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35198    fi
35199  fi
35200
35201  # Now new_path has a complete unix path to the binary
35202  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35203    # Keep paths in /bin as-is, but remove trailing .exe if any
35204    new_path="${new_path/%.exe/}"
35205    # Do not save /bin paths to all_fixpath_prefixes!
35206  else
35207    # Not in mixed or Windows style, start by that.
35208    new_path=`cmd //c echo $new_path`
35209
35210  input_path="$new_path"
35211  # Check if we need to convert this using DOS-style short mode. If the path
35212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35213  # take no chances and rewrite it.
35214  # Note: m4 eats our [], so we need to use [ and ] instead.
35215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35216  if test "x$has_forbidden_chars" != x; then
35217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35218    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35219  fi
35220
35221    # Output is in $new_path
35222
35223  windows_path="$new_path"
35224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35225    unix_path=`$CYGPATH -u "$windows_path"`
35226    new_path="$unix_path"
35227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35229    new_path="$unix_path"
35230  fi
35231
35232    # remove trailing .exe if any
35233    new_path="${new_path/%.exe/}"
35234
35235    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35236    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35237  fi
35238
35239    else
35240      # We're on a unix platform. Hooray! :)
35241      # First separate the path from the arguments. This will split at the first
35242      # space.
35243      complete="$CPP"
35244      path="${complete%% *}"
35245      tmp="$complete EOL"
35246      arguments="${tmp#* }"
35247
35248      # Cannot rely on the command "which" here since it doesn't always work.
35249      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35250      if test -z "$is_absolute_path"; then
35251        # Path to executable is not absolute. Find it.
35252        IFS_save="$IFS"
35253        IFS=:
35254        for p in $PATH; do
35255          if test -f "$p/$path" && test -x "$p/$path"; then
35256            new_path="$p/$path"
35257            break
35258          fi
35259        done
35260        IFS="$IFS_save"
35261      else
35262        # This is an absolute path, we can use it without further modifications.
35263        new_path="$path"
35264      fi
35265
35266      if test "x$new_path" = x; then
35267        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35268$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35269        has_space=`$ECHO "$complete" | $GREP " "`
35270        if test "x$has_space" != x; then
35271          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35272$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35273        fi
35274        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35275      fi
35276    fi
35277
35278    # Now join together the path and the arguments once again
35279    if test "x$arguments" != xEOL; then
35280      new_complete="$new_path ${arguments% *}"
35281    else
35282      new_complete="$new_path"
35283    fi
35284
35285    if test "x$complete" != "x$new_complete"; then
35286      CPP="$new_complete"
35287      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35288$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35289    fi
35290  fi
35291
35292  ac_ext=cpp
35293ac_cpp='$CXXCPP $CPPFLAGS'
35294ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35295ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35296ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35298$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35299if test -z "$CXXCPP"; then
35300  if ${ac_cv_prog_CXXCPP+:} false; then :
35301  $as_echo_n "(cached) " >&6
35302else
35303      # Double quotes because CXXCPP needs to be expanded
35304    for CXXCPP in "$CXX -E" "/lib/cpp"
35305    do
35306      ac_preproc_ok=false
35307for ac_cxx_preproc_warn_flag in '' yes
35308do
35309  # Use a header file that comes with gcc, so configuring glibc
35310  # with a fresh cross-compiler works.
35311  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35312  # <limits.h> exists even on freestanding compilers.
35313  # On the NeXT, cc -E runs the code through the compiler's parser,
35314  # not just through cpp. "Syntax error" is here to catch this case.
35315  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35316/* end confdefs.h.  */
35317#ifdef __STDC__
35318# include <limits.h>
35319#else
35320# include <assert.h>
35321#endif
35322		     Syntax error
35323_ACEOF
35324if ac_fn_cxx_try_cpp "$LINENO"; then :
35325
35326else
35327  # Broken: fails on valid input.
35328continue
35329fi
35330rm -f conftest.err conftest.i conftest.$ac_ext
35331
35332  # OK, works on sane cases.  Now check whether nonexistent headers
35333  # can be detected and how.
35334  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35335/* end confdefs.h.  */
35336#include <ac_nonexistent.h>
35337_ACEOF
35338if ac_fn_cxx_try_cpp "$LINENO"; then :
35339  # Broken: success on invalid input.
35340continue
35341else
35342  # Passes both tests.
35343ac_preproc_ok=:
35344break
35345fi
35346rm -f conftest.err conftest.i conftest.$ac_ext
35347
35348done
35349# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35350rm -f conftest.i conftest.err conftest.$ac_ext
35351if $ac_preproc_ok; then :
35352  break
35353fi
35354
35355    done
35356    ac_cv_prog_CXXCPP=$CXXCPP
35357
35358fi
35359  CXXCPP=$ac_cv_prog_CXXCPP
35360else
35361  ac_cv_prog_CXXCPP=$CXXCPP
35362fi
35363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35364$as_echo "$CXXCPP" >&6; }
35365ac_preproc_ok=false
35366for ac_cxx_preproc_warn_flag in '' yes
35367do
35368  # Use a header file that comes with gcc, so configuring glibc
35369  # with a fresh cross-compiler works.
35370  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35371  # <limits.h> exists even on freestanding compilers.
35372  # On the NeXT, cc -E runs the code through the compiler's parser,
35373  # not just through cpp. "Syntax error" is here to catch this case.
35374  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35375/* end confdefs.h.  */
35376#ifdef __STDC__
35377# include <limits.h>
35378#else
35379# include <assert.h>
35380#endif
35381		     Syntax error
35382_ACEOF
35383if ac_fn_cxx_try_cpp "$LINENO"; then :
35384
35385else
35386  # Broken: fails on valid input.
35387continue
35388fi
35389rm -f conftest.err conftest.i conftest.$ac_ext
35390
35391  # OK, works on sane cases.  Now check whether nonexistent headers
35392  # can be detected and how.
35393  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35394/* end confdefs.h.  */
35395#include <ac_nonexistent.h>
35396_ACEOF
35397if ac_fn_cxx_try_cpp "$LINENO"; then :
35398  # Broken: success on invalid input.
35399continue
35400else
35401  # Passes both tests.
35402ac_preproc_ok=:
35403break
35404fi
35405rm -f conftest.err conftest.i conftest.$ac_ext
35406
35407done
35408# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35409rm -f conftest.i conftest.err conftest.$ac_ext
35410if $ac_preproc_ok; then :
35411
35412else
35413  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35414$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35415as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35416See \`config.log' for more details" "$LINENO" 5; }
35417fi
35418
35419ac_ext=cpp
35420ac_cpp='$CXXCPP $CPPFLAGS'
35421ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35422ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35423ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35424
35425
35426  # Only process if variable expands to non-empty
35427
35428  if test "x$CXXCPP" != x; then
35429    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35430
35431  # First separate the path from the arguments. This will split at the first
35432  # space.
35433  complete="$CXXCPP"
35434  path="${complete%% *}"
35435  tmp="$complete EOL"
35436  arguments="${tmp#* }"
35437
35438  # Input might be given as Windows format, start by converting to
35439  # unix format.
35440  new_path=`$CYGPATH -u "$path"`
35441
35442  # Now try to locate executable using which
35443  new_path=`$WHICH "$new_path" 2> /dev/null`
35444  # bat and cmd files are not always considered executable in cygwin causing which
35445  # to not find them
35446  if test "x$new_path" = x \
35447      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35448      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35449    new_path=`$CYGPATH -u "$path"`
35450  fi
35451  if test "x$new_path" = x; then
35452    # Oops. Which didn't find the executable.
35453    # The splitting of arguments from the executable at a space might have been incorrect,
35454    # since paths with space are more likely in Windows. Give it another try with the whole
35455    # argument.
35456    path="$complete"
35457    arguments="EOL"
35458    new_path=`$CYGPATH -u "$path"`
35459    new_path=`$WHICH "$new_path" 2> /dev/null`
35460    # bat and cmd files are not always considered executable in cygwin causing which
35461    # to not find them
35462    if test "x$new_path" = x \
35463        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35464        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35465      new_path=`$CYGPATH -u "$path"`
35466    fi
35467    if test "x$new_path" = x; then
35468      # It's still not found. Now this is an unrecoverable error.
35469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35470$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35471      has_space=`$ECHO "$complete" | $GREP " "`
35472      if test "x$has_space" != x; then
35473        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35474$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35475      fi
35476      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35477    fi
35478  fi
35479
35480  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35481  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35482  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35483  # "foo.exe" is OK but "foo" is an error.
35484  #
35485  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35486  # It is also a way to make sure we got the proper file name for the real test later on.
35487  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35488  if test "x$test_shortpath" = x; then
35489    # Short path failed, file does not exist as specified.
35490    # Try adding .exe or .cmd
35491    if test -f "${new_path}.exe"; then
35492      input_to_shortpath="${new_path}.exe"
35493    elif test -f "${new_path}.cmd"; then
35494      input_to_shortpath="${new_path}.cmd"
35495    else
35496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35497$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35498      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35499$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35500      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35501    fi
35502  else
35503    input_to_shortpath="$new_path"
35504  fi
35505
35506  # Call helper function which possibly converts this using DOS-style short mode.
35507  # If so, the updated path is stored in $new_path.
35508  new_path="$input_to_shortpath"
35509
35510  input_path="$input_to_shortpath"
35511  # Check if we need to convert this using DOS-style short mode. If the path
35512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35513  # take no chances and rewrite it.
35514  # Note: m4 eats our [], so we need to use [ and ] instead.
35515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35516  if test "x$has_forbidden_chars" != x; then
35517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35518    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35519    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35520    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35521      # Going to short mode and back again did indeed matter. Since short mode is
35522      # case insensitive, let's make it lowercase to improve readability.
35523      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35524      # Now convert it back to Unix-style (cygpath)
35525      input_path=`$CYGPATH -u "$shortmode_path"`
35526      new_path="$input_path"
35527    fi
35528  fi
35529
35530  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35531  if test "x$test_cygdrive_prefix" = x; then
35532    # As a simple fix, exclude /usr/bin since it's not a real path.
35533    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35534      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35535      # a path prefixed by /cygdrive for fixpath to work.
35536      new_path="$CYGWIN_ROOT_PATH$input_path"
35537    fi
35538  fi
35539
35540  # remove trailing .exe if any
35541  new_path="${new_path/%.exe/}"
35542
35543    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35544
35545  # First separate the path from the arguments. This will split at the first
35546  # space.
35547  complete="$CXXCPP"
35548  path="${complete%% *}"
35549  tmp="$complete EOL"
35550  arguments="${tmp#* }"
35551
35552  # Input might be given as Windows format, start by converting to
35553  # unix format.
35554  new_path="$path"
35555
35556  windows_path="$new_path"
35557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35558    unix_path=`$CYGPATH -u "$windows_path"`
35559    new_path="$unix_path"
35560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35562    new_path="$unix_path"
35563  fi
35564
35565
35566  # Now try to locate executable using which
35567  new_path=`$WHICH "$new_path" 2> /dev/null`
35568
35569  if test "x$new_path" = x; then
35570    # Oops. Which didn't find the executable.
35571    # The splitting of arguments from the executable at a space might have been incorrect,
35572    # since paths with space are more likely in Windows. Give it another try with the whole
35573    # argument.
35574    path="$complete"
35575    arguments="EOL"
35576    new_path="$path"
35577
35578  windows_path="$new_path"
35579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35580    unix_path=`$CYGPATH -u "$windows_path"`
35581    new_path="$unix_path"
35582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35584    new_path="$unix_path"
35585  fi
35586
35587
35588    new_path=`$WHICH "$new_path" 2> /dev/null`
35589    # bat and cmd files are not always considered executable in MSYS causing which
35590    # to not find them
35591    if test "x$new_path" = x \
35592        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35593        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35594      new_path="$path"
35595
35596  windows_path="$new_path"
35597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35598    unix_path=`$CYGPATH -u "$windows_path"`
35599    new_path="$unix_path"
35600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35602    new_path="$unix_path"
35603  fi
35604
35605    fi
35606
35607    if test "x$new_path" = x; then
35608      # It's still not found. Now this is an unrecoverable error.
35609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35610$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35611      has_space=`$ECHO "$complete" | $GREP " "`
35612      if test "x$has_space" != x; then
35613        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35614$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35615      fi
35616      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35617    fi
35618  fi
35619
35620  # Now new_path has a complete unix path to the binary
35621  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35622    # Keep paths in /bin as-is, but remove trailing .exe if any
35623    new_path="${new_path/%.exe/}"
35624    # Do not save /bin paths to all_fixpath_prefixes!
35625  else
35626    # Not in mixed or Windows style, start by that.
35627    new_path=`cmd //c echo $new_path`
35628
35629  input_path="$new_path"
35630  # Check if we need to convert this using DOS-style short mode. If the path
35631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35632  # take no chances and rewrite it.
35633  # Note: m4 eats our [], so we need to use [ and ] instead.
35634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35635  if test "x$has_forbidden_chars" != x; then
35636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35637    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35638  fi
35639
35640    # Output is in $new_path
35641
35642  windows_path="$new_path"
35643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35644    unix_path=`$CYGPATH -u "$windows_path"`
35645    new_path="$unix_path"
35646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35648    new_path="$unix_path"
35649  fi
35650
35651    # remove trailing .exe if any
35652    new_path="${new_path/%.exe/}"
35653
35654    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35655    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35656  fi
35657
35658    else
35659      # We're on a unix platform. Hooray! :)
35660      # First separate the path from the arguments. This will split at the first
35661      # space.
35662      complete="$CXXCPP"
35663      path="${complete%% *}"
35664      tmp="$complete EOL"
35665      arguments="${tmp#* }"
35666
35667      # Cannot rely on the command "which" here since it doesn't always work.
35668      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35669      if test -z "$is_absolute_path"; then
35670        # Path to executable is not absolute. Find it.
35671        IFS_save="$IFS"
35672        IFS=:
35673        for p in $PATH; do
35674          if test -f "$p/$path" && test -x "$p/$path"; then
35675            new_path="$p/$path"
35676            break
35677          fi
35678        done
35679        IFS="$IFS_save"
35680      else
35681        # This is an absolute path, we can use it without further modifications.
35682        new_path="$path"
35683      fi
35684
35685      if test "x$new_path" = x; then
35686        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35687$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35688        has_space=`$ECHO "$complete" | $GREP " "`
35689        if test "x$has_space" != x; then
35690          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35691$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35692        fi
35693        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35694      fi
35695    fi
35696
35697    # Now join together the path and the arguments once again
35698    if test "x$arguments" != xEOL; then
35699      new_complete="$new_path ${arguments% *}"
35700    else
35701      new_complete="$new_path"
35702    fi
35703
35704    if test "x$complete" != "x$new_complete"; then
35705      CXXCPP="$new_complete"
35706      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35707$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35708    fi
35709  fi
35710
35711
35712  #
35713  # Setup the linker (LD)
35714  #
35715  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35716    # In the Microsoft toolchain we have a separate LD command "link".
35717    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35718    # a cygwin program for something completely different.
35719    # Extract the first word of "link", so it can be a program name with args.
35720set dummy link; ac_word=$2
35721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35722$as_echo_n "checking for $ac_word... " >&6; }
35723if ${ac_cv_prog_LD+:} false; then :
35724  $as_echo_n "(cached) " >&6
35725else
35726  if test -n "$LD"; then
35727  ac_cv_prog_LD="$LD" # Let the user override the test.
35728else
35729  ac_prog_rejected=no
35730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35731for as_dir in $PATH
35732do
35733  IFS=$as_save_IFS
35734  test -z "$as_dir" && as_dir=.
35735    for ac_exec_ext in '' $ac_executable_extensions; do
35736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35737    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35738       ac_prog_rejected=yes
35739       continue
35740     fi
35741    ac_cv_prog_LD="link"
35742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35743    break 2
35744  fi
35745done
35746  done
35747IFS=$as_save_IFS
35748
35749if test $ac_prog_rejected = yes; then
35750  # We found a bogon in the path, so make sure we never use it.
35751  set dummy $ac_cv_prog_LD
35752  shift
35753  if test $# != 0; then
35754    # We chose a different compiler from the bogus one.
35755    # However, it has the same basename, so the bogon will be chosen
35756    # first if we set LD to just the basename; use the full file name.
35757    shift
35758    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35759  fi
35760fi
35761fi
35762fi
35763LD=$ac_cv_prog_LD
35764if test -n "$LD"; then
35765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35766$as_echo "$LD" >&6; }
35767else
35768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35769$as_echo "no" >&6; }
35770fi
35771
35772
35773
35774  # Only process if variable expands to non-empty
35775
35776  if test "x$LD" != x; then
35777    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35778
35779  # First separate the path from the arguments. This will split at the first
35780  # space.
35781  complete="$LD"
35782  path="${complete%% *}"
35783  tmp="$complete EOL"
35784  arguments="${tmp#* }"
35785
35786  # Input might be given as Windows format, start by converting to
35787  # unix format.
35788  new_path=`$CYGPATH -u "$path"`
35789
35790  # Now try to locate executable using which
35791  new_path=`$WHICH "$new_path" 2> /dev/null`
35792  # bat and cmd files are not always considered executable in cygwin causing which
35793  # to not find them
35794  if test "x$new_path" = x \
35795      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35796      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35797    new_path=`$CYGPATH -u "$path"`
35798  fi
35799  if test "x$new_path" = x; then
35800    # Oops. Which didn't find the executable.
35801    # The splitting of arguments from the executable at a space might have been incorrect,
35802    # since paths with space are more likely in Windows. Give it another try with the whole
35803    # argument.
35804    path="$complete"
35805    arguments="EOL"
35806    new_path=`$CYGPATH -u "$path"`
35807    new_path=`$WHICH "$new_path" 2> /dev/null`
35808    # bat and cmd files are not always considered executable in cygwin causing which
35809    # to not find them
35810    if test "x$new_path" = x \
35811        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35812        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35813      new_path=`$CYGPATH -u "$path"`
35814    fi
35815    if test "x$new_path" = x; then
35816      # It's still not found. Now this is an unrecoverable error.
35817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35818$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35819      has_space=`$ECHO "$complete" | $GREP " "`
35820      if test "x$has_space" != x; then
35821        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35822$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35823      fi
35824      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35825    fi
35826  fi
35827
35828  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35829  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35830  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35831  # "foo.exe" is OK but "foo" is an error.
35832  #
35833  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35834  # It is also a way to make sure we got the proper file name for the real test later on.
35835  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35836  if test "x$test_shortpath" = x; then
35837    # Short path failed, file does not exist as specified.
35838    # Try adding .exe or .cmd
35839    if test -f "${new_path}.exe"; then
35840      input_to_shortpath="${new_path}.exe"
35841    elif test -f "${new_path}.cmd"; then
35842      input_to_shortpath="${new_path}.cmd"
35843    else
35844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35845$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35846      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35847$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35848      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35849    fi
35850  else
35851    input_to_shortpath="$new_path"
35852  fi
35853
35854  # Call helper function which possibly converts this using DOS-style short mode.
35855  # If so, the updated path is stored in $new_path.
35856  new_path="$input_to_shortpath"
35857
35858  input_path="$input_to_shortpath"
35859  # Check if we need to convert this using DOS-style short mode. If the path
35860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35861  # take no chances and rewrite it.
35862  # Note: m4 eats our [], so we need to use [ and ] instead.
35863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35864  if test "x$has_forbidden_chars" != x; then
35865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35869      # Going to short mode and back again did indeed matter. Since short mode is
35870      # case insensitive, let's make it lowercase to improve readability.
35871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35872      # Now convert it back to Unix-style (cygpath)
35873      input_path=`$CYGPATH -u "$shortmode_path"`
35874      new_path="$input_path"
35875    fi
35876  fi
35877
35878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35879  if test "x$test_cygdrive_prefix" = x; then
35880    # As a simple fix, exclude /usr/bin since it's not a real path.
35881    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35883      # a path prefixed by /cygdrive for fixpath to work.
35884      new_path="$CYGWIN_ROOT_PATH$input_path"
35885    fi
35886  fi
35887
35888  # remove trailing .exe if any
35889  new_path="${new_path/%.exe/}"
35890
35891    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35892
35893  # First separate the path from the arguments. This will split at the first
35894  # space.
35895  complete="$LD"
35896  path="${complete%% *}"
35897  tmp="$complete EOL"
35898  arguments="${tmp#* }"
35899
35900  # Input might be given as Windows format, start by converting to
35901  # unix format.
35902  new_path="$path"
35903
35904  windows_path="$new_path"
35905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35906    unix_path=`$CYGPATH -u "$windows_path"`
35907    new_path="$unix_path"
35908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35910    new_path="$unix_path"
35911  fi
35912
35913
35914  # Now try to locate executable using which
35915  new_path=`$WHICH "$new_path" 2> /dev/null`
35916
35917  if test "x$new_path" = x; then
35918    # Oops. Which didn't find the executable.
35919    # The splitting of arguments from the executable at a space might have been incorrect,
35920    # since paths with space are more likely in Windows. Give it another try with the whole
35921    # argument.
35922    path="$complete"
35923    arguments="EOL"
35924    new_path="$path"
35925
35926  windows_path="$new_path"
35927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35928    unix_path=`$CYGPATH -u "$windows_path"`
35929    new_path="$unix_path"
35930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35932    new_path="$unix_path"
35933  fi
35934
35935
35936    new_path=`$WHICH "$new_path" 2> /dev/null`
35937    # bat and cmd files are not always considered executable in MSYS causing which
35938    # to not find them
35939    if test "x$new_path" = x \
35940        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35941        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35942      new_path="$path"
35943
35944  windows_path="$new_path"
35945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35946    unix_path=`$CYGPATH -u "$windows_path"`
35947    new_path="$unix_path"
35948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35950    new_path="$unix_path"
35951  fi
35952
35953    fi
35954
35955    if test "x$new_path" = x; then
35956      # It's still not found. Now this is an unrecoverable error.
35957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35958$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35959      has_space=`$ECHO "$complete" | $GREP " "`
35960      if test "x$has_space" != x; then
35961        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35962$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35963      fi
35964      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35965    fi
35966  fi
35967
35968  # Now new_path has a complete unix path to the binary
35969  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35970    # Keep paths in /bin as-is, but remove trailing .exe if any
35971    new_path="${new_path/%.exe/}"
35972    # Do not save /bin paths to all_fixpath_prefixes!
35973  else
35974    # Not in mixed or Windows style, start by that.
35975    new_path=`cmd //c echo $new_path`
35976
35977  input_path="$new_path"
35978  # Check if we need to convert this using DOS-style short mode. If the path
35979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35980  # take no chances and rewrite it.
35981  # Note: m4 eats our [], so we need to use [ and ] instead.
35982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35983  if test "x$has_forbidden_chars" != x; then
35984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35985    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35986  fi
35987
35988    # Output is in $new_path
35989
35990  windows_path="$new_path"
35991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35992    unix_path=`$CYGPATH -u "$windows_path"`
35993    new_path="$unix_path"
35994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35996    new_path="$unix_path"
35997  fi
35998
35999    # remove trailing .exe if any
36000    new_path="${new_path/%.exe/}"
36001
36002    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36003    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36004  fi
36005
36006    else
36007      # We're on a unix platform. Hooray! :)
36008      # First separate the path from the arguments. This will split at the first
36009      # space.
36010      complete="$LD"
36011      path="${complete%% *}"
36012      tmp="$complete EOL"
36013      arguments="${tmp#* }"
36014
36015      # Cannot rely on the command "which" here since it doesn't always work.
36016      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36017      if test -z "$is_absolute_path"; then
36018        # Path to executable is not absolute. Find it.
36019        IFS_save="$IFS"
36020        IFS=:
36021        for p in $PATH; do
36022          if test -f "$p/$path" && test -x "$p/$path"; then
36023            new_path="$p/$path"
36024            break
36025          fi
36026        done
36027        IFS="$IFS_save"
36028      else
36029        # This is an absolute path, we can use it without further modifications.
36030        new_path="$path"
36031      fi
36032
36033      if test "x$new_path" = x; then
36034        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36035$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36036        has_space=`$ECHO "$complete" | $GREP " "`
36037        if test "x$has_space" != x; then
36038          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36039$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36040        fi
36041        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36042      fi
36043    fi
36044
36045    # Now join together the path and the arguments once again
36046    if test "x$arguments" != xEOL; then
36047      new_complete="$new_path ${arguments% *}"
36048    else
36049      new_complete="$new_path"
36050    fi
36051
36052    if test "x$complete" != "x$new_complete"; then
36053      LD="$new_complete"
36054      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36055$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36056    fi
36057  fi
36058
36059    # Verify that we indeed succeeded with this trick.
36060    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36061$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36062    "$LD" --version > /dev/null
36063    if test $? -eq 0 ; then
36064      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36065$as_echo "no" >&6; }
36066      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36067    else
36068      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36069$as_echo "yes" >&6; }
36070    fi
36071    LDCXX="$LD"
36072  else
36073    # All other toolchains use the compiler to link.
36074    LD="$CC"
36075    LDCXX="$CXX"
36076  fi
36077
36078  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36079
36080
36081  #
36082  # Setup the assembler (AS)
36083  #
36084  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36085    # FIXME: should this really be solaris, or solstudio?
36086
36087
36088  # Publish this variable in the help.
36089
36090
36091  if [ -z "${AS+x}" ]; then
36092    # The variable is not set by user, try to locate tool using the code snippet
36093    for ac_prog in as
36094do
36095  # Extract the first word of "$ac_prog", so it can be a program name with args.
36096set dummy $ac_prog; ac_word=$2
36097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36098$as_echo_n "checking for $ac_word... " >&6; }
36099if ${ac_cv_path_AS+:} false; then :
36100  $as_echo_n "(cached) " >&6
36101else
36102  case $AS in
36103  [\\/]* | ?:[\\/]*)
36104  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36105  ;;
36106  *)
36107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36108for as_dir in $PATH
36109do
36110  IFS=$as_save_IFS
36111  test -z "$as_dir" && as_dir=.
36112    for ac_exec_ext in '' $ac_executable_extensions; do
36113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36114    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36116    break 2
36117  fi
36118done
36119  done
36120IFS=$as_save_IFS
36121
36122  ;;
36123esac
36124fi
36125AS=$ac_cv_path_AS
36126if test -n "$AS"; then
36127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36128$as_echo "$AS" >&6; }
36129else
36130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36131$as_echo "no" >&6; }
36132fi
36133
36134
36135  test -n "$AS" && break
36136done
36137
36138  else
36139    # The variable is set, but is it from the command line or the environment?
36140
36141    # Try to remove the string !AS! from our list.
36142    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36143    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36144      # If it failed, the variable was not from the command line. Ignore it,
36145      # but warn the user (except for BASH, which is always set by the calling BASH).
36146      if test "xAS" != xBASH; then
36147        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36148$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36149      fi
36150      # Try to locate tool using the code snippet
36151      for ac_prog in as
36152do
36153  # Extract the first word of "$ac_prog", so it can be a program name with args.
36154set dummy $ac_prog; ac_word=$2
36155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36156$as_echo_n "checking for $ac_word... " >&6; }
36157if ${ac_cv_path_AS+:} false; then :
36158  $as_echo_n "(cached) " >&6
36159else
36160  case $AS in
36161  [\\/]* | ?:[\\/]*)
36162  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36163  ;;
36164  *)
36165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36166for as_dir in $PATH
36167do
36168  IFS=$as_save_IFS
36169  test -z "$as_dir" && as_dir=.
36170    for ac_exec_ext in '' $ac_executable_extensions; do
36171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36172    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36174    break 2
36175  fi
36176done
36177  done
36178IFS=$as_save_IFS
36179
36180  ;;
36181esac
36182fi
36183AS=$ac_cv_path_AS
36184if test -n "$AS"; then
36185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36186$as_echo "$AS" >&6; }
36187else
36188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36189$as_echo "no" >&6; }
36190fi
36191
36192
36193  test -n "$AS" && break
36194done
36195
36196    else
36197      # If it succeeded, then it was overridden by the user. We will use it
36198      # for the tool.
36199
36200      # First remove it from the list of overridden variables, so we can test
36201      # for unknown variables in the end.
36202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36203
36204      # Check if we try to supply an empty value
36205      if test "x$AS" = x; then
36206        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36207$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36208        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36209$as_echo_n "checking for AS... " >&6; }
36210        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36211$as_echo "disabled" >&6; }
36212      else
36213        # Check if the provided tool contains a complete path.
36214        tool_specified="$AS"
36215        tool_basename="${tool_specified##*/}"
36216        if test "x$tool_basename" = "x$tool_specified"; then
36217          # A command without a complete path is provided, search $PATH.
36218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36219$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36220          # Extract the first word of "$tool_basename", so it can be a program name with args.
36221set dummy $tool_basename; ac_word=$2
36222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36223$as_echo_n "checking for $ac_word... " >&6; }
36224if ${ac_cv_path_AS+:} false; then :
36225  $as_echo_n "(cached) " >&6
36226else
36227  case $AS in
36228  [\\/]* | ?:[\\/]*)
36229  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36230  ;;
36231  *)
36232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36233for as_dir in $PATH
36234do
36235  IFS=$as_save_IFS
36236  test -z "$as_dir" && as_dir=.
36237    for ac_exec_ext in '' $ac_executable_extensions; do
36238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36239    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36241    break 2
36242  fi
36243done
36244  done
36245IFS=$as_save_IFS
36246
36247  ;;
36248esac
36249fi
36250AS=$ac_cv_path_AS
36251if test -n "$AS"; then
36252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36253$as_echo "$AS" >&6; }
36254else
36255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36256$as_echo "no" >&6; }
36257fi
36258
36259
36260          if test "x$AS" = x; then
36261            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36262          fi
36263        else
36264          # Otherwise we believe it is a complete path. Use it as it is.
36265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36266$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36267          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36268$as_echo_n "checking for AS... " >&6; }
36269          if test ! -x "$tool_specified"; then
36270            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36271$as_echo "not found" >&6; }
36272            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36273          fi
36274          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36275$as_echo "$tool_specified" >&6; }
36276        fi
36277      fi
36278    fi
36279
36280  fi
36281
36282
36283
36284  # Only process if variable expands to non-empty
36285
36286  if test "x$AS" != x; then
36287    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36288
36289  # First separate the path from the arguments. This will split at the first
36290  # space.
36291  complete="$AS"
36292  path="${complete%% *}"
36293  tmp="$complete EOL"
36294  arguments="${tmp#* }"
36295
36296  # Input might be given as Windows format, start by converting to
36297  # unix format.
36298  new_path=`$CYGPATH -u "$path"`
36299
36300  # Now try to locate executable using which
36301  new_path=`$WHICH "$new_path" 2> /dev/null`
36302  # bat and cmd files are not always considered executable in cygwin causing which
36303  # to not find them
36304  if test "x$new_path" = x \
36305      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36306      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36307    new_path=`$CYGPATH -u "$path"`
36308  fi
36309  if test "x$new_path" = x; then
36310    # Oops. Which didn't find the executable.
36311    # The splitting of arguments from the executable at a space might have been incorrect,
36312    # since paths with space are more likely in Windows. Give it another try with the whole
36313    # argument.
36314    path="$complete"
36315    arguments="EOL"
36316    new_path=`$CYGPATH -u "$path"`
36317    new_path=`$WHICH "$new_path" 2> /dev/null`
36318    # bat and cmd files are not always considered executable in cygwin causing which
36319    # to not find them
36320    if test "x$new_path" = x \
36321        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36322        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36323      new_path=`$CYGPATH -u "$path"`
36324    fi
36325    if test "x$new_path" = x; then
36326      # It's still not found. Now this is an unrecoverable error.
36327      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36328$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36329      has_space=`$ECHO "$complete" | $GREP " "`
36330      if test "x$has_space" != x; then
36331        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36332$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36333      fi
36334      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36335    fi
36336  fi
36337
36338  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36339  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36340  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36341  # "foo.exe" is OK but "foo" is an error.
36342  #
36343  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36344  # It is also a way to make sure we got the proper file name for the real test later on.
36345  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36346  if test "x$test_shortpath" = x; then
36347    # Short path failed, file does not exist as specified.
36348    # Try adding .exe or .cmd
36349    if test -f "${new_path}.exe"; then
36350      input_to_shortpath="${new_path}.exe"
36351    elif test -f "${new_path}.cmd"; then
36352      input_to_shortpath="${new_path}.cmd"
36353    else
36354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36355$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36356      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36357$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36358      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36359    fi
36360  else
36361    input_to_shortpath="$new_path"
36362  fi
36363
36364  # Call helper function which possibly converts this using DOS-style short mode.
36365  # If so, the updated path is stored in $new_path.
36366  new_path="$input_to_shortpath"
36367
36368  input_path="$input_to_shortpath"
36369  # Check if we need to convert this using DOS-style short mode. If the path
36370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36371  # take no chances and rewrite it.
36372  # Note: m4 eats our [], so we need to use [ and ] instead.
36373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36374  if test "x$has_forbidden_chars" != x; then
36375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36376    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36377    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36378    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36379      # Going to short mode and back again did indeed matter. Since short mode is
36380      # case insensitive, let's make it lowercase to improve readability.
36381      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36382      # Now convert it back to Unix-style (cygpath)
36383      input_path=`$CYGPATH -u "$shortmode_path"`
36384      new_path="$input_path"
36385    fi
36386  fi
36387
36388  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36389  if test "x$test_cygdrive_prefix" = x; then
36390    # As a simple fix, exclude /usr/bin since it's not a real path.
36391    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36392      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36393      # a path prefixed by /cygdrive for fixpath to work.
36394      new_path="$CYGWIN_ROOT_PATH$input_path"
36395    fi
36396  fi
36397
36398  # remove trailing .exe if any
36399  new_path="${new_path/%.exe/}"
36400
36401    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36402
36403  # First separate the path from the arguments. This will split at the first
36404  # space.
36405  complete="$AS"
36406  path="${complete%% *}"
36407  tmp="$complete EOL"
36408  arguments="${tmp#* }"
36409
36410  # Input might be given as Windows format, start by converting to
36411  # unix format.
36412  new_path="$path"
36413
36414  windows_path="$new_path"
36415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36416    unix_path=`$CYGPATH -u "$windows_path"`
36417    new_path="$unix_path"
36418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36420    new_path="$unix_path"
36421  fi
36422
36423
36424  # Now try to locate executable using which
36425  new_path=`$WHICH "$new_path" 2> /dev/null`
36426
36427  if test "x$new_path" = x; then
36428    # Oops. Which didn't find the executable.
36429    # The splitting of arguments from the executable at a space might have been incorrect,
36430    # since paths with space are more likely in Windows. Give it another try with the whole
36431    # argument.
36432    path="$complete"
36433    arguments="EOL"
36434    new_path="$path"
36435
36436  windows_path="$new_path"
36437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36438    unix_path=`$CYGPATH -u "$windows_path"`
36439    new_path="$unix_path"
36440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36442    new_path="$unix_path"
36443  fi
36444
36445
36446    new_path=`$WHICH "$new_path" 2> /dev/null`
36447    # bat and cmd files are not always considered executable in MSYS causing which
36448    # to not find them
36449    if test "x$new_path" = x \
36450        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36451        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36452      new_path="$path"
36453
36454  windows_path="$new_path"
36455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36456    unix_path=`$CYGPATH -u "$windows_path"`
36457    new_path="$unix_path"
36458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36460    new_path="$unix_path"
36461  fi
36462
36463    fi
36464
36465    if test "x$new_path" = x; then
36466      # It's still not found. Now this is an unrecoverable error.
36467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36468$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36469      has_space=`$ECHO "$complete" | $GREP " "`
36470      if test "x$has_space" != x; then
36471        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36472$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36473      fi
36474      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36475    fi
36476  fi
36477
36478  # Now new_path has a complete unix path to the binary
36479  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36480    # Keep paths in /bin as-is, but remove trailing .exe if any
36481    new_path="${new_path/%.exe/}"
36482    # Do not save /bin paths to all_fixpath_prefixes!
36483  else
36484    # Not in mixed or Windows style, start by that.
36485    new_path=`cmd //c echo $new_path`
36486
36487  input_path="$new_path"
36488  # Check if we need to convert this using DOS-style short mode. If the path
36489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36490  # take no chances and rewrite it.
36491  # Note: m4 eats our [], so we need to use [ and ] instead.
36492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36493  if test "x$has_forbidden_chars" != x; then
36494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36495    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36496  fi
36497
36498    # Output is in $new_path
36499
36500  windows_path="$new_path"
36501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36502    unix_path=`$CYGPATH -u "$windows_path"`
36503    new_path="$unix_path"
36504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36506    new_path="$unix_path"
36507  fi
36508
36509    # remove trailing .exe if any
36510    new_path="${new_path/%.exe/}"
36511
36512    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36513    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36514  fi
36515
36516    else
36517      # We're on a unix platform. Hooray! :)
36518      # First separate the path from the arguments. This will split at the first
36519      # space.
36520      complete="$AS"
36521      path="${complete%% *}"
36522      tmp="$complete EOL"
36523      arguments="${tmp#* }"
36524
36525      # Cannot rely on the command "which" here since it doesn't always work.
36526      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36527      if test -z "$is_absolute_path"; then
36528        # Path to executable is not absolute. Find it.
36529        IFS_save="$IFS"
36530        IFS=:
36531        for p in $PATH; do
36532          if test -f "$p/$path" && test -x "$p/$path"; then
36533            new_path="$p/$path"
36534            break
36535          fi
36536        done
36537        IFS="$IFS_save"
36538      else
36539        # This is an absolute path, we can use it without further modifications.
36540        new_path="$path"
36541      fi
36542
36543      if test "x$new_path" = x; then
36544        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36545$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36546        has_space=`$ECHO "$complete" | $GREP " "`
36547        if test "x$has_space" != x; then
36548          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36549$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36550        fi
36551        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36552      fi
36553    fi
36554
36555    # Now join together the path and the arguments once again
36556    if test "x$arguments" != xEOL; then
36557      new_complete="$new_path ${arguments% *}"
36558    else
36559      new_complete="$new_path"
36560    fi
36561
36562    if test "x$complete" != "x$new_complete"; then
36563      AS="$new_complete"
36564      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36565$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36566    fi
36567  fi
36568
36569  else
36570    # FIXME: is this correct for microsoft?
36571    AS="$CC -c"
36572  fi
36573
36574
36575  #
36576  # Setup the archiver (AR)
36577  #
36578  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36579    # The corresponding ar tool is lib.exe (used to create static libraries)
36580    # Extract the first word of "lib", so it can be a program name with args.
36581set dummy lib; ac_word=$2
36582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36583$as_echo_n "checking for $ac_word... " >&6; }
36584if ${ac_cv_prog_AR+:} false; then :
36585  $as_echo_n "(cached) " >&6
36586else
36587  if test -n "$AR"; then
36588  ac_cv_prog_AR="$AR" # Let the user override the test.
36589else
36590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36591for as_dir in $PATH
36592do
36593  IFS=$as_save_IFS
36594  test -z "$as_dir" && as_dir=.
36595    for ac_exec_ext in '' $ac_executable_extensions; do
36596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36597    ac_cv_prog_AR="lib"
36598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36599    break 2
36600  fi
36601done
36602  done
36603IFS=$as_save_IFS
36604
36605fi
36606fi
36607AR=$ac_cv_prog_AR
36608if test -n "$AR"; then
36609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36610$as_echo "$AR" >&6; }
36611else
36612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36613$as_echo "no" >&6; }
36614fi
36615
36616
36617  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
36618
36619
36620  # Publish this variable in the help.
36621
36622
36623  if [ -z "${AR+x}" ]; then
36624    # The variable is not set by user, try to locate tool using the code snippet
36625    if test -n "$ac_tool_prefix"; then
36626  for ac_prog in ar gcc-ar
36627  do
36628    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36629set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36631$as_echo_n "checking for $ac_word... " >&6; }
36632if ${ac_cv_prog_AR+:} false; then :
36633  $as_echo_n "(cached) " >&6
36634else
36635  if test -n "$AR"; then
36636  ac_cv_prog_AR="$AR" # Let the user override the test.
36637else
36638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36639for as_dir in $PATH
36640do
36641  IFS=$as_save_IFS
36642  test -z "$as_dir" && as_dir=.
36643    for ac_exec_ext in '' $ac_executable_extensions; do
36644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36645    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36647    break 2
36648  fi
36649done
36650  done
36651IFS=$as_save_IFS
36652
36653fi
36654fi
36655AR=$ac_cv_prog_AR
36656if test -n "$AR"; then
36657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36658$as_echo "$AR" >&6; }
36659else
36660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36661$as_echo "no" >&6; }
36662fi
36663
36664
36665    test -n "$AR" && break
36666  done
36667fi
36668if test -z "$AR"; then
36669  ac_ct_AR=$AR
36670  for ac_prog in ar gcc-ar
36671do
36672  # Extract the first word of "$ac_prog", so it can be a program name with args.
36673set dummy $ac_prog; ac_word=$2
36674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36675$as_echo_n "checking for $ac_word... " >&6; }
36676if ${ac_cv_prog_ac_ct_AR+:} false; then :
36677  $as_echo_n "(cached) " >&6
36678else
36679  if test -n "$ac_ct_AR"; then
36680  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36681else
36682as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36683for as_dir in $PATH
36684do
36685  IFS=$as_save_IFS
36686  test -z "$as_dir" && as_dir=.
36687    for ac_exec_ext in '' $ac_executable_extensions; do
36688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36689    ac_cv_prog_ac_ct_AR="$ac_prog"
36690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36691    break 2
36692  fi
36693done
36694  done
36695IFS=$as_save_IFS
36696
36697fi
36698fi
36699ac_ct_AR=$ac_cv_prog_ac_ct_AR
36700if test -n "$ac_ct_AR"; then
36701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36702$as_echo "$ac_ct_AR" >&6; }
36703else
36704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36705$as_echo "no" >&6; }
36706fi
36707
36708
36709  test -n "$ac_ct_AR" && break
36710done
36711
36712  if test "x$ac_ct_AR" = x; then
36713    AR=""
36714  else
36715    case $cross_compiling:$ac_tool_warned in
36716yes:)
36717{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36718$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36719ac_tool_warned=yes ;;
36720esac
36721    AR=$ac_ct_AR
36722  fi
36723fi
36724
36725  else
36726    # The variable is set, but is it from the command line or the environment?
36727
36728    # Try to remove the string !AR! from our list.
36729    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36730    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36731      # If it failed, the variable was not from the command line. Ignore it,
36732      # but warn the user (except for BASH, which is always set by the calling BASH).
36733      if test "xAR" != xBASH; then
36734        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36735$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36736      fi
36737      # Try to locate tool using the code snippet
36738      if test -n "$ac_tool_prefix"; then
36739  for ac_prog in ar gcc-ar
36740  do
36741    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36742set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36744$as_echo_n "checking for $ac_word... " >&6; }
36745if ${ac_cv_prog_AR+:} false; then :
36746  $as_echo_n "(cached) " >&6
36747else
36748  if test -n "$AR"; then
36749  ac_cv_prog_AR="$AR" # Let the user override the test.
36750else
36751as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36752for as_dir in $PATH
36753do
36754  IFS=$as_save_IFS
36755  test -z "$as_dir" && as_dir=.
36756    for ac_exec_ext in '' $ac_executable_extensions; do
36757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36758    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36760    break 2
36761  fi
36762done
36763  done
36764IFS=$as_save_IFS
36765
36766fi
36767fi
36768AR=$ac_cv_prog_AR
36769if test -n "$AR"; then
36770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36771$as_echo "$AR" >&6; }
36772else
36773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36774$as_echo "no" >&6; }
36775fi
36776
36777
36778    test -n "$AR" && break
36779  done
36780fi
36781if test -z "$AR"; then
36782  ac_ct_AR=$AR
36783  for ac_prog in ar gcc-ar
36784do
36785  # Extract the first word of "$ac_prog", so it can be a program name with args.
36786set dummy $ac_prog; ac_word=$2
36787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36788$as_echo_n "checking for $ac_word... " >&6; }
36789if ${ac_cv_prog_ac_ct_AR+:} false; then :
36790  $as_echo_n "(cached) " >&6
36791else
36792  if test -n "$ac_ct_AR"; then
36793  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36794else
36795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36796for as_dir in $PATH
36797do
36798  IFS=$as_save_IFS
36799  test -z "$as_dir" && as_dir=.
36800    for ac_exec_ext in '' $ac_executable_extensions; do
36801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36802    ac_cv_prog_ac_ct_AR="$ac_prog"
36803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36804    break 2
36805  fi
36806done
36807  done
36808IFS=$as_save_IFS
36809
36810fi
36811fi
36812ac_ct_AR=$ac_cv_prog_ac_ct_AR
36813if test -n "$ac_ct_AR"; then
36814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36815$as_echo "$ac_ct_AR" >&6; }
36816else
36817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36818$as_echo "no" >&6; }
36819fi
36820
36821
36822  test -n "$ac_ct_AR" && break
36823done
36824
36825  if test "x$ac_ct_AR" = x; then
36826    AR=""
36827  else
36828    case $cross_compiling:$ac_tool_warned in
36829yes:)
36830{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36831$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36832ac_tool_warned=yes ;;
36833esac
36834    AR=$ac_ct_AR
36835  fi
36836fi
36837
36838    else
36839      # If it succeeded, then it was overridden by the user. We will use it
36840      # for the tool.
36841
36842      # First remove it from the list of overridden variables, so we can test
36843      # for unknown variables in the end.
36844      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36845
36846      # Check if we try to supply an empty value
36847      if test "x$AR" = x; then
36848        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36849$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36850        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36851$as_echo_n "checking for AR... " >&6; }
36852        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36853$as_echo "disabled" >&6; }
36854      else
36855        # Check if the provided tool contains a complete path.
36856        tool_specified="$AR"
36857        tool_basename="${tool_specified##*/}"
36858        if test "x$tool_basename" = "x$tool_specified"; then
36859          # A command without a complete path is provided, search $PATH.
36860          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36861$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36862          # Extract the first word of "$tool_basename", so it can be a program name with args.
36863set dummy $tool_basename; ac_word=$2
36864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36865$as_echo_n "checking for $ac_word... " >&6; }
36866if ${ac_cv_path_AR+:} false; then :
36867  $as_echo_n "(cached) " >&6
36868else
36869  case $AR in
36870  [\\/]* | ?:[\\/]*)
36871  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36872  ;;
36873  *)
36874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36875for as_dir in $PATH
36876do
36877  IFS=$as_save_IFS
36878  test -z "$as_dir" && as_dir=.
36879    for ac_exec_ext in '' $ac_executable_extensions; do
36880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36881    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36883    break 2
36884  fi
36885done
36886  done
36887IFS=$as_save_IFS
36888
36889  ;;
36890esac
36891fi
36892AR=$ac_cv_path_AR
36893if test -n "$AR"; then
36894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36895$as_echo "$AR" >&6; }
36896else
36897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36898$as_echo "no" >&6; }
36899fi
36900
36901
36902          if test "x$AR" = x; then
36903            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36904          fi
36905        else
36906          # Otherwise we believe it is a complete path. Use it as it is.
36907          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36908$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36909          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36910$as_echo_n "checking for AR... " >&6; }
36911          if test ! -x "$tool_specified"; then
36912            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36913$as_echo "not found" >&6; }
36914            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36915          fi
36916          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36917$as_echo "$tool_specified" >&6; }
36918        fi
36919      fi
36920    fi
36921
36922  fi
36923
36924
36925  else
36926
36927
36928  # Publish this variable in the help.
36929
36930
36931  if [ -z "${AR+x}" ]; then
36932    # The variable is not set by user, try to locate tool using the code snippet
36933    if test -n "$ac_tool_prefix"; then
36934  for ac_prog in ar
36935  do
36936    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36937set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36939$as_echo_n "checking for $ac_word... " >&6; }
36940if ${ac_cv_prog_AR+:} false; then :
36941  $as_echo_n "(cached) " >&6
36942else
36943  if test -n "$AR"; then
36944  ac_cv_prog_AR="$AR" # Let the user override the test.
36945else
36946as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36947for as_dir in $PATH
36948do
36949  IFS=$as_save_IFS
36950  test -z "$as_dir" && as_dir=.
36951    for ac_exec_ext in '' $ac_executable_extensions; do
36952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36953    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36955    break 2
36956  fi
36957done
36958  done
36959IFS=$as_save_IFS
36960
36961fi
36962fi
36963AR=$ac_cv_prog_AR
36964if test -n "$AR"; then
36965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36966$as_echo "$AR" >&6; }
36967else
36968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36969$as_echo "no" >&6; }
36970fi
36971
36972
36973    test -n "$AR" && break
36974  done
36975fi
36976if test -z "$AR"; then
36977  ac_ct_AR=$AR
36978  for ac_prog in ar
36979do
36980  # Extract the first word of "$ac_prog", so it can be a program name with args.
36981set dummy $ac_prog; ac_word=$2
36982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36983$as_echo_n "checking for $ac_word... " >&6; }
36984if ${ac_cv_prog_ac_ct_AR+:} false; then :
36985  $as_echo_n "(cached) " >&6
36986else
36987  if test -n "$ac_ct_AR"; then
36988  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36989else
36990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36991for as_dir in $PATH
36992do
36993  IFS=$as_save_IFS
36994  test -z "$as_dir" && as_dir=.
36995    for ac_exec_ext in '' $ac_executable_extensions; do
36996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36997    ac_cv_prog_ac_ct_AR="$ac_prog"
36998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36999    break 2
37000  fi
37001done
37002  done
37003IFS=$as_save_IFS
37004
37005fi
37006fi
37007ac_ct_AR=$ac_cv_prog_ac_ct_AR
37008if test -n "$ac_ct_AR"; then
37009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37010$as_echo "$ac_ct_AR" >&6; }
37011else
37012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37013$as_echo "no" >&6; }
37014fi
37015
37016
37017  test -n "$ac_ct_AR" && break
37018done
37019
37020  if test "x$ac_ct_AR" = x; then
37021    AR=""
37022  else
37023    case $cross_compiling:$ac_tool_warned in
37024yes:)
37025{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37026$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37027ac_tool_warned=yes ;;
37028esac
37029    AR=$ac_ct_AR
37030  fi
37031fi
37032
37033  else
37034    # The variable is set, but is it from the command line or the environment?
37035
37036    # Try to remove the string !AR! from our list.
37037    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37038    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37039      # If it failed, the variable was not from the command line. Ignore it,
37040      # but warn the user (except for BASH, which is always set by the calling BASH).
37041      if test "xAR" != xBASH; then
37042        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37043$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37044      fi
37045      # Try to locate tool using the code snippet
37046      if test -n "$ac_tool_prefix"; then
37047  for ac_prog in ar
37048  do
37049    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37050set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37052$as_echo_n "checking for $ac_word... " >&6; }
37053if ${ac_cv_prog_AR+:} false; then :
37054  $as_echo_n "(cached) " >&6
37055else
37056  if test -n "$AR"; then
37057  ac_cv_prog_AR="$AR" # Let the user override the test.
37058else
37059as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37060for as_dir in $PATH
37061do
37062  IFS=$as_save_IFS
37063  test -z "$as_dir" && as_dir=.
37064    for ac_exec_ext in '' $ac_executable_extensions; do
37065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37066    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37068    break 2
37069  fi
37070done
37071  done
37072IFS=$as_save_IFS
37073
37074fi
37075fi
37076AR=$ac_cv_prog_AR
37077if test -n "$AR"; then
37078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37079$as_echo "$AR" >&6; }
37080else
37081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37082$as_echo "no" >&6; }
37083fi
37084
37085
37086    test -n "$AR" && break
37087  done
37088fi
37089if test -z "$AR"; then
37090  ac_ct_AR=$AR
37091  for ac_prog in ar
37092do
37093  # Extract the first word of "$ac_prog", so it can be a program name with args.
37094set dummy $ac_prog; ac_word=$2
37095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37096$as_echo_n "checking for $ac_word... " >&6; }
37097if ${ac_cv_prog_ac_ct_AR+:} false; then :
37098  $as_echo_n "(cached) " >&6
37099else
37100  if test -n "$ac_ct_AR"; then
37101  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37102else
37103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37104for as_dir in $PATH
37105do
37106  IFS=$as_save_IFS
37107  test -z "$as_dir" && as_dir=.
37108    for ac_exec_ext in '' $ac_executable_extensions; do
37109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37110    ac_cv_prog_ac_ct_AR="$ac_prog"
37111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37112    break 2
37113  fi
37114done
37115  done
37116IFS=$as_save_IFS
37117
37118fi
37119fi
37120ac_ct_AR=$ac_cv_prog_ac_ct_AR
37121if test -n "$ac_ct_AR"; then
37122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37123$as_echo "$ac_ct_AR" >&6; }
37124else
37125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37126$as_echo "no" >&6; }
37127fi
37128
37129
37130  test -n "$ac_ct_AR" && break
37131done
37132
37133  if test "x$ac_ct_AR" = x; then
37134    AR=""
37135  else
37136    case $cross_compiling:$ac_tool_warned in
37137yes:)
37138{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37139$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37140ac_tool_warned=yes ;;
37141esac
37142    AR=$ac_ct_AR
37143  fi
37144fi
37145
37146    else
37147      # If it succeeded, then it was overridden by the user. We will use it
37148      # for the tool.
37149
37150      # First remove it from the list of overridden variables, so we can test
37151      # for unknown variables in the end.
37152      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37153
37154      # Check if we try to supply an empty value
37155      if test "x$AR" = x; then
37156        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37157$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37158        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37159$as_echo_n "checking for AR... " >&6; }
37160        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37161$as_echo "disabled" >&6; }
37162      else
37163        # Check if the provided tool contains a complete path.
37164        tool_specified="$AR"
37165        tool_basename="${tool_specified##*/}"
37166        if test "x$tool_basename" = "x$tool_specified"; then
37167          # A command without a complete path is provided, search $PATH.
37168          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37169$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37170          # Extract the first word of "$tool_basename", so it can be a program name with args.
37171set dummy $tool_basename; ac_word=$2
37172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37173$as_echo_n "checking for $ac_word... " >&6; }
37174if ${ac_cv_path_AR+:} false; then :
37175  $as_echo_n "(cached) " >&6
37176else
37177  case $AR in
37178  [\\/]* | ?:[\\/]*)
37179  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37180  ;;
37181  *)
37182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37183for as_dir in $PATH
37184do
37185  IFS=$as_save_IFS
37186  test -z "$as_dir" && as_dir=.
37187    for ac_exec_ext in '' $ac_executable_extensions; do
37188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37189    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37191    break 2
37192  fi
37193done
37194  done
37195IFS=$as_save_IFS
37196
37197  ;;
37198esac
37199fi
37200AR=$ac_cv_path_AR
37201if test -n "$AR"; then
37202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37203$as_echo "$AR" >&6; }
37204else
37205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37206$as_echo "no" >&6; }
37207fi
37208
37209
37210          if test "x$AR" = x; then
37211            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37212          fi
37213        else
37214          # Otherwise we believe it is a complete path. Use it as it is.
37215          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37216$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37217          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37218$as_echo_n "checking for AR... " >&6; }
37219          if test ! -x "$tool_specified"; then
37220            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37221$as_echo "not found" >&6; }
37222            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37223          fi
37224          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37225$as_echo "$tool_specified" >&6; }
37226        fi
37227      fi
37228    fi
37229
37230  fi
37231
37232
37233  fi
37234
37235  # Only process if variable expands to non-empty
37236
37237  if test "x$AR" != x; then
37238    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37239
37240  # First separate the path from the arguments. This will split at the first
37241  # space.
37242  complete="$AR"
37243  path="${complete%% *}"
37244  tmp="$complete EOL"
37245  arguments="${tmp#* }"
37246
37247  # Input might be given as Windows format, start by converting to
37248  # unix format.
37249  new_path=`$CYGPATH -u "$path"`
37250
37251  # Now try to locate executable using which
37252  new_path=`$WHICH "$new_path" 2> /dev/null`
37253  # bat and cmd files are not always considered executable in cygwin causing which
37254  # to not find them
37255  if test "x$new_path" = x \
37256      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37257      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37258    new_path=`$CYGPATH -u "$path"`
37259  fi
37260  if test "x$new_path" = x; then
37261    # Oops. Which didn't find the executable.
37262    # The splitting of arguments from the executable at a space might have been incorrect,
37263    # since paths with space are more likely in Windows. Give it another try with the whole
37264    # argument.
37265    path="$complete"
37266    arguments="EOL"
37267    new_path=`$CYGPATH -u "$path"`
37268    new_path=`$WHICH "$new_path" 2> /dev/null`
37269    # bat and cmd files are not always considered executable in cygwin causing which
37270    # to not find them
37271    if test "x$new_path" = x \
37272        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37273        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37274      new_path=`$CYGPATH -u "$path"`
37275    fi
37276    if test "x$new_path" = x; then
37277      # It's still not found. Now this is an unrecoverable error.
37278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37279$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37280      has_space=`$ECHO "$complete" | $GREP " "`
37281      if test "x$has_space" != x; then
37282        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37283$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37284      fi
37285      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37286    fi
37287  fi
37288
37289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37292  # "foo.exe" is OK but "foo" is an error.
37293  #
37294  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37295  # It is also a way to make sure we got the proper file name for the real test later on.
37296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37297  if test "x$test_shortpath" = x; then
37298    # Short path failed, file does not exist as specified.
37299    # Try adding .exe or .cmd
37300    if test -f "${new_path}.exe"; then
37301      input_to_shortpath="${new_path}.exe"
37302    elif test -f "${new_path}.cmd"; then
37303      input_to_shortpath="${new_path}.cmd"
37304    else
37305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37306$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37307      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37308$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37309      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37310    fi
37311  else
37312    input_to_shortpath="$new_path"
37313  fi
37314
37315  # Call helper function which possibly converts this using DOS-style short mode.
37316  # If so, the updated path is stored in $new_path.
37317  new_path="$input_to_shortpath"
37318
37319  input_path="$input_to_shortpath"
37320  # Check if we need to convert this using DOS-style short mode. If the path
37321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37322  # take no chances and rewrite it.
37323  # Note: m4 eats our [], so we need to use [ and ] instead.
37324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37325  if test "x$has_forbidden_chars" != x; then
37326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37330      # Going to short mode and back again did indeed matter. Since short mode is
37331      # case insensitive, let's make it lowercase to improve readability.
37332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37333      # Now convert it back to Unix-style (cygpath)
37334      input_path=`$CYGPATH -u "$shortmode_path"`
37335      new_path="$input_path"
37336    fi
37337  fi
37338
37339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37340  if test "x$test_cygdrive_prefix" = x; then
37341    # As a simple fix, exclude /usr/bin since it's not a real path.
37342    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37344      # a path prefixed by /cygdrive for fixpath to work.
37345      new_path="$CYGWIN_ROOT_PATH$input_path"
37346    fi
37347  fi
37348
37349  # remove trailing .exe if any
37350  new_path="${new_path/%.exe/}"
37351
37352    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37353
37354  # First separate the path from the arguments. This will split at the first
37355  # space.
37356  complete="$AR"
37357  path="${complete%% *}"
37358  tmp="$complete EOL"
37359  arguments="${tmp#* }"
37360
37361  # Input might be given as Windows format, start by converting to
37362  # unix format.
37363  new_path="$path"
37364
37365  windows_path="$new_path"
37366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37367    unix_path=`$CYGPATH -u "$windows_path"`
37368    new_path="$unix_path"
37369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37371    new_path="$unix_path"
37372  fi
37373
37374
37375  # Now try to locate executable using which
37376  new_path=`$WHICH "$new_path" 2> /dev/null`
37377
37378  if test "x$new_path" = x; then
37379    # Oops. Which didn't find the executable.
37380    # The splitting of arguments from the executable at a space might have been incorrect,
37381    # since paths with space are more likely in Windows. Give it another try with the whole
37382    # argument.
37383    path="$complete"
37384    arguments="EOL"
37385    new_path="$path"
37386
37387  windows_path="$new_path"
37388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37389    unix_path=`$CYGPATH -u "$windows_path"`
37390    new_path="$unix_path"
37391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37393    new_path="$unix_path"
37394  fi
37395
37396
37397    new_path=`$WHICH "$new_path" 2> /dev/null`
37398    # bat and cmd files are not always considered executable in MSYS causing which
37399    # to not find them
37400    if test "x$new_path" = x \
37401        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37402        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37403      new_path="$path"
37404
37405  windows_path="$new_path"
37406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37407    unix_path=`$CYGPATH -u "$windows_path"`
37408    new_path="$unix_path"
37409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37411    new_path="$unix_path"
37412  fi
37413
37414    fi
37415
37416    if test "x$new_path" = x; then
37417      # It's still not found. Now this is an unrecoverable error.
37418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37419$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37420      has_space=`$ECHO "$complete" | $GREP " "`
37421      if test "x$has_space" != x; then
37422        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37423$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37424      fi
37425      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37426    fi
37427  fi
37428
37429  # Now new_path has a complete unix path to the binary
37430  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37431    # Keep paths in /bin as-is, but remove trailing .exe if any
37432    new_path="${new_path/%.exe/}"
37433    # Do not save /bin paths to all_fixpath_prefixes!
37434  else
37435    # Not in mixed or Windows style, start by that.
37436    new_path=`cmd //c echo $new_path`
37437
37438  input_path="$new_path"
37439  # Check if we need to convert this using DOS-style short mode. If the path
37440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37441  # take no chances and rewrite it.
37442  # Note: m4 eats our [], so we need to use [ and ] instead.
37443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37444  if test "x$has_forbidden_chars" != x; then
37445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37447  fi
37448
37449    # Output is in $new_path
37450
37451  windows_path="$new_path"
37452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37453    unix_path=`$CYGPATH -u "$windows_path"`
37454    new_path="$unix_path"
37455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37457    new_path="$unix_path"
37458  fi
37459
37460    # remove trailing .exe if any
37461    new_path="${new_path/%.exe/}"
37462
37463    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37464    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37465  fi
37466
37467    else
37468      # We're on a unix platform. Hooray! :)
37469      # First separate the path from the arguments. This will split at the first
37470      # space.
37471      complete="$AR"
37472      path="${complete%% *}"
37473      tmp="$complete EOL"
37474      arguments="${tmp#* }"
37475
37476      # Cannot rely on the command "which" here since it doesn't always work.
37477      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37478      if test -z "$is_absolute_path"; then
37479        # Path to executable is not absolute. Find it.
37480        IFS_save="$IFS"
37481        IFS=:
37482        for p in $PATH; do
37483          if test -f "$p/$path" && test -x "$p/$path"; then
37484            new_path="$p/$path"
37485            break
37486          fi
37487        done
37488        IFS="$IFS_save"
37489      else
37490        # This is an absolute path, we can use it without further modifications.
37491        new_path="$path"
37492      fi
37493
37494      if test "x$new_path" = x; then
37495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37496$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37497        has_space=`$ECHO "$complete" | $GREP " "`
37498        if test "x$has_space" != x; then
37499          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37500$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37501        fi
37502        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37503      fi
37504    fi
37505
37506    # Now join together the path and the arguments once again
37507    if test "x$arguments" != xEOL; then
37508      new_complete="$new_path ${arguments% *}"
37509    else
37510      new_complete="$new_path"
37511    fi
37512
37513    if test "x$complete" != "x$new_complete"; then
37514      AR="$new_complete"
37515      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37516$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37517    fi
37518  fi
37519
37520
37521
37522  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37523
37524
37525  # Publish this variable in the help.
37526
37527
37528  if [ -z "${LIPO+x}" ]; then
37529    # The variable is not set by user, try to locate tool using the code snippet
37530    for ac_prog in lipo
37531do
37532  # Extract the first word of "$ac_prog", so it can be a program name with args.
37533set dummy $ac_prog; ac_word=$2
37534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37535$as_echo_n "checking for $ac_word... " >&6; }
37536if ${ac_cv_path_LIPO+:} false; then :
37537  $as_echo_n "(cached) " >&6
37538else
37539  case $LIPO in
37540  [\\/]* | ?:[\\/]*)
37541  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37542  ;;
37543  *)
37544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37545for as_dir in $PATH
37546do
37547  IFS=$as_save_IFS
37548  test -z "$as_dir" && as_dir=.
37549    for ac_exec_ext in '' $ac_executable_extensions; do
37550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37551    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37553    break 2
37554  fi
37555done
37556  done
37557IFS=$as_save_IFS
37558
37559  ;;
37560esac
37561fi
37562LIPO=$ac_cv_path_LIPO
37563if test -n "$LIPO"; then
37564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37565$as_echo "$LIPO" >&6; }
37566else
37567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37568$as_echo "no" >&6; }
37569fi
37570
37571
37572  test -n "$LIPO" && break
37573done
37574
37575  else
37576    # The variable is set, but is it from the command line or the environment?
37577
37578    # Try to remove the string !LIPO! from our list.
37579    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
37580    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37581      # If it failed, the variable was not from the command line. Ignore it,
37582      # but warn the user (except for BASH, which is always set by the calling BASH).
37583      if test "xLIPO" != xBASH; then
37584        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
37585$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
37586      fi
37587      # Try to locate tool using the code snippet
37588      for ac_prog in lipo
37589do
37590  # Extract the first word of "$ac_prog", so it can be a program name with args.
37591set dummy $ac_prog; ac_word=$2
37592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37593$as_echo_n "checking for $ac_word... " >&6; }
37594if ${ac_cv_path_LIPO+:} false; then :
37595  $as_echo_n "(cached) " >&6
37596else
37597  case $LIPO in
37598  [\\/]* | ?:[\\/]*)
37599  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37600  ;;
37601  *)
37602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37603for as_dir in $PATH
37604do
37605  IFS=$as_save_IFS
37606  test -z "$as_dir" && as_dir=.
37607    for ac_exec_ext in '' $ac_executable_extensions; do
37608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37609    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37611    break 2
37612  fi
37613done
37614  done
37615IFS=$as_save_IFS
37616
37617  ;;
37618esac
37619fi
37620LIPO=$ac_cv_path_LIPO
37621if test -n "$LIPO"; then
37622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37623$as_echo "$LIPO" >&6; }
37624else
37625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37626$as_echo "no" >&6; }
37627fi
37628
37629
37630  test -n "$LIPO" && break
37631done
37632
37633    else
37634      # If it succeeded, then it was overridden by the user. We will use it
37635      # for the tool.
37636
37637      # First remove it from the list of overridden variables, so we can test
37638      # for unknown variables in the end.
37639      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37640
37641      # Check if we try to supply an empty value
37642      if test "x$LIPO" = x; then
37643        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
37644$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
37645        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37646$as_echo_n "checking for LIPO... " >&6; }
37647        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37648$as_echo "disabled" >&6; }
37649      else
37650        # Check if the provided tool contains a complete path.
37651        tool_specified="$LIPO"
37652        tool_basename="${tool_specified##*/}"
37653        if test "x$tool_basename" = "x$tool_specified"; then
37654          # A command without a complete path is provided, search $PATH.
37655          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
37656$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
37657          # Extract the first word of "$tool_basename", so it can be a program name with args.
37658set dummy $tool_basename; ac_word=$2
37659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37660$as_echo_n "checking for $ac_word... " >&6; }
37661if ${ac_cv_path_LIPO+:} false; then :
37662  $as_echo_n "(cached) " >&6
37663else
37664  case $LIPO in
37665  [\\/]* | ?:[\\/]*)
37666  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37667  ;;
37668  *)
37669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37670for as_dir in $PATH
37671do
37672  IFS=$as_save_IFS
37673  test -z "$as_dir" && as_dir=.
37674    for ac_exec_ext in '' $ac_executable_extensions; do
37675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37676    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37678    break 2
37679  fi
37680done
37681  done
37682IFS=$as_save_IFS
37683
37684  ;;
37685esac
37686fi
37687LIPO=$ac_cv_path_LIPO
37688if test -n "$LIPO"; then
37689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37690$as_echo "$LIPO" >&6; }
37691else
37692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37693$as_echo "no" >&6; }
37694fi
37695
37696
37697          if test "x$LIPO" = x; then
37698            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37699          fi
37700        else
37701          # Otherwise we believe it is a complete path. Use it as it is.
37702          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
37703$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
37704          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37705$as_echo_n "checking for LIPO... " >&6; }
37706          if test ! -x "$tool_specified"; then
37707            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37708$as_echo "not found" >&6; }
37709            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
37710          fi
37711          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37712$as_echo "$tool_specified" >&6; }
37713        fi
37714      fi
37715    fi
37716
37717  fi
37718
37719
37720
37721  # Only process if variable expands to non-empty
37722
37723  if test "x$LIPO" != x; then
37724    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37725
37726  # First separate the path from the arguments. This will split at the first
37727  # space.
37728  complete="$LIPO"
37729  path="${complete%% *}"
37730  tmp="$complete EOL"
37731  arguments="${tmp#* }"
37732
37733  # Input might be given as Windows format, start by converting to
37734  # unix format.
37735  new_path=`$CYGPATH -u "$path"`
37736
37737  # Now try to locate executable using which
37738  new_path=`$WHICH "$new_path" 2> /dev/null`
37739  # bat and cmd files are not always considered executable in cygwin causing which
37740  # to not find them
37741  if test "x$new_path" = x \
37742      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37743      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37744    new_path=`$CYGPATH -u "$path"`
37745  fi
37746  if test "x$new_path" = x; then
37747    # Oops. Which didn't find the executable.
37748    # The splitting of arguments from the executable at a space might have been incorrect,
37749    # since paths with space are more likely in Windows. Give it another try with the whole
37750    # argument.
37751    path="$complete"
37752    arguments="EOL"
37753    new_path=`$CYGPATH -u "$path"`
37754    new_path=`$WHICH "$new_path" 2> /dev/null`
37755    # bat and cmd files are not always considered executable in cygwin causing which
37756    # to not find them
37757    if test "x$new_path" = x \
37758        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37759        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37760      new_path=`$CYGPATH -u "$path"`
37761    fi
37762    if test "x$new_path" = x; then
37763      # It's still not found. Now this is an unrecoverable error.
37764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37765$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37766      has_space=`$ECHO "$complete" | $GREP " "`
37767      if test "x$has_space" != x; then
37768        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37769$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37770      fi
37771      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37772    fi
37773  fi
37774
37775  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37776  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37777  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37778  # "foo.exe" is OK but "foo" is an error.
37779  #
37780  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37781  # It is also a way to make sure we got the proper file name for the real test later on.
37782  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37783  if test "x$test_shortpath" = x; then
37784    # Short path failed, file does not exist as specified.
37785    # Try adding .exe or .cmd
37786    if test -f "${new_path}.exe"; then
37787      input_to_shortpath="${new_path}.exe"
37788    elif test -f "${new_path}.cmd"; then
37789      input_to_shortpath="${new_path}.cmd"
37790    else
37791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
37792$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
37793      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37794$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37795      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37796    fi
37797  else
37798    input_to_shortpath="$new_path"
37799  fi
37800
37801  # Call helper function which possibly converts this using DOS-style short mode.
37802  # If so, the updated path is stored in $new_path.
37803  new_path="$input_to_shortpath"
37804
37805  input_path="$input_to_shortpath"
37806  # Check if we need to convert this using DOS-style short mode. If the path
37807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37808  # take no chances and rewrite it.
37809  # Note: m4 eats our [], so we need to use [ and ] instead.
37810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37811  if test "x$has_forbidden_chars" != x; then
37812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37813    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37814    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37815    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37816      # Going to short mode and back again did indeed matter. Since short mode is
37817      # case insensitive, let's make it lowercase to improve readability.
37818      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37819      # Now convert it back to Unix-style (cygpath)
37820      input_path=`$CYGPATH -u "$shortmode_path"`
37821      new_path="$input_path"
37822    fi
37823  fi
37824
37825  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37826  if test "x$test_cygdrive_prefix" = x; then
37827    # As a simple fix, exclude /usr/bin since it's not a real path.
37828    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37829      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37830      # a path prefixed by /cygdrive for fixpath to work.
37831      new_path="$CYGWIN_ROOT_PATH$input_path"
37832    fi
37833  fi
37834
37835  # remove trailing .exe if any
37836  new_path="${new_path/%.exe/}"
37837
37838    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37839
37840  # First separate the path from the arguments. This will split at the first
37841  # space.
37842  complete="$LIPO"
37843  path="${complete%% *}"
37844  tmp="$complete EOL"
37845  arguments="${tmp#* }"
37846
37847  # Input might be given as Windows format, start by converting to
37848  # unix format.
37849  new_path="$path"
37850
37851  windows_path="$new_path"
37852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37853    unix_path=`$CYGPATH -u "$windows_path"`
37854    new_path="$unix_path"
37855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37857    new_path="$unix_path"
37858  fi
37859
37860
37861  # Now try to locate executable using which
37862  new_path=`$WHICH "$new_path" 2> /dev/null`
37863
37864  if test "x$new_path" = x; then
37865    # Oops. Which didn't find the executable.
37866    # The splitting of arguments from the executable at a space might have been incorrect,
37867    # since paths with space are more likely in Windows. Give it another try with the whole
37868    # argument.
37869    path="$complete"
37870    arguments="EOL"
37871    new_path="$path"
37872
37873  windows_path="$new_path"
37874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37875    unix_path=`$CYGPATH -u "$windows_path"`
37876    new_path="$unix_path"
37877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37879    new_path="$unix_path"
37880  fi
37881
37882
37883    new_path=`$WHICH "$new_path" 2> /dev/null`
37884    # bat and cmd files are not always considered executable in MSYS causing which
37885    # to not find them
37886    if test "x$new_path" = x \
37887        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37888        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37889      new_path="$path"
37890
37891  windows_path="$new_path"
37892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37893    unix_path=`$CYGPATH -u "$windows_path"`
37894    new_path="$unix_path"
37895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37897    new_path="$unix_path"
37898  fi
37899
37900    fi
37901
37902    if test "x$new_path" = x; then
37903      # It's still not found. Now this is an unrecoverable error.
37904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37905$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37906      has_space=`$ECHO "$complete" | $GREP " "`
37907      if test "x$has_space" != x; then
37908        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37909$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37910      fi
37911      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37912    fi
37913  fi
37914
37915  # Now new_path has a complete unix path to the binary
37916  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37917    # Keep paths in /bin as-is, but remove trailing .exe if any
37918    new_path="${new_path/%.exe/}"
37919    # Do not save /bin paths to all_fixpath_prefixes!
37920  else
37921    # Not in mixed or Windows style, start by that.
37922    new_path=`cmd //c echo $new_path`
37923
37924  input_path="$new_path"
37925  # Check if we need to convert this using DOS-style short mode. If the path
37926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37927  # take no chances and rewrite it.
37928  # Note: m4 eats our [], so we need to use [ and ] instead.
37929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37930  if test "x$has_forbidden_chars" != x; then
37931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37932    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37933  fi
37934
37935    # Output is in $new_path
37936
37937  windows_path="$new_path"
37938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37939    unix_path=`$CYGPATH -u "$windows_path"`
37940    new_path="$unix_path"
37941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37943    new_path="$unix_path"
37944  fi
37945
37946    # remove trailing .exe if any
37947    new_path="${new_path/%.exe/}"
37948
37949    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37950    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37951  fi
37952
37953    else
37954      # We're on a unix platform. Hooray! :)
37955      # First separate the path from the arguments. This will split at the first
37956      # space.
37957      complete="$LIPO"
37958      path="${complete%% *}"
37959      tmp="$complete EOL"
37960      arguments="${tmp#* }"
37961
37962      # Cannot rely on the command "which" here since it doesn't always work.
37963      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37964      if test -z "$is_absolute_path"; then
37965        # Path to executable is not absolute. Find it.
37966        IFS_save="$IFS"
37967        IFS=:
37968        for p in $PATH; do
37969          if test -f "$p/$path" && test -x "$p/$path"; then
37970            new_path="$p/$path"
37971            break
37972          fi
37973        done
37974        IFS="$IFS_save"
37975      else
37976        # This is an absolute path, we can use it without further modifications.
37977        new_path="$path"
37978      fi
37979
37980      if test "x$new_path" = x; then
37981        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37982$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37983        has_space=`$ECHO "$complete" | $GREP " "`
37984        if test "x$has_space" != x; then
37985          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37986$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37987        fi
37988        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37989      fi
37990    fi
37991
37992    # Now join together the path and the arguments once again
37993    if test "x$arguments" != xEOL; then
37994      new_complete="$new_path ${arguments% *}"
37995    else
37996      new_complete="$new_path"
37997    fi
37998
37999    if test "x$complete" != "x$new_complete"; then
38000      LIPO="$new_complete"
38001      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38002$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38003    fi
38004  fi
38005
38006  fi
38007
38008  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38009    # Extract the first word of "mt", so it can be a program name with args.
38010set dummy mt; ac_word=$2
38011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38012$as_echo_n "checking for $ac_word... " >&6; }
38013if ${ac_cv_prog_MT+:} false; then :
38014  $as_echo_n "(cached) " >&6
38015else
38016  if test -n "$MT"; then
38017  ac_cv_prog_MT="$MT" # Let the user override the test.
38018else
38019  ac_prog_rejected=no
38020as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38021for as_dir in $PATH
38022do
38023  IFS=$as_save_IFS
38024  test -z "$as_dir" && as_dir=.
38025    for ac_exec_ext in '' $ac_executable_extensions; do
38026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38027    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38028       ac_prog_rejected=yes
38029       continue
38030     fi
38031    ac_cv_prog_MT="mt"
38032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38033    break 2
38034  fi
38035done
38036  done
38037IFS=$as_save_IFS
38038
38039if test $ac_prog_rejected = yes; then
38040  # We found a bogon in the path, so make sure we never use it.
38041  set dummy $ac_cv_prog_MT
38042  shift
38043  if test $# != 0; then
38044    # We chose a different compiler from the bogus one.
38045    # However, it has the same basename, so the bogon will be chosen
38046    # first if we set MT to just the basename; use the full file name.
38047    shift
38048    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38049  fi
38050fi
38051fi
38052fi
38053MT=$ac_cv_prog_MT
38054if test -n "$MT"; then
38055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38056$as_echo "$MT" >&6; }
38057else
38058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38059$as_echo "no" >&6; }
38060fi
38061
38062
38063
38064  # Only process if variable expands to non-empty
38065
38066  if test "x$MT" != x; then
38067    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38068
38069  # First separate the path from the arguments. This will split at the first
38070  # space.
38071  complete="$MT"
38072  path="${complete%% *}"
38073  tmp="$complete EOL"
38074  arguments="${tmp#* }"
38075
38076  # Input might be given as Windows format, start by converting to
38077  # unix format.
38078  new_path=`$CYGPATH -u "$path"`
38079
38080  # Now try to locate executable using which
38081  new_path=`$WHICH "$new_path" 2> /dev/null`
38082  # bat and cmd files are not always considered executable in cygwin causing which
38083  # to not find them
38084  if test "x$new_path" = x \
38085      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38086      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38087    new_path=`$CYGPATH -u "$path"`
38088  fi
38089  if test "x$new_path" = x; then
38090    # Oops. Which didn't find the executable.
38091    # The splitting of arguments from the executable at a space might have been incorrect,
38092    # since paths with space are more likely in Windows. Give it another try with the whole
38093    # argument.
38094    path="$complete"
38095    arguments="EOL"
38096    new_path=`$CYGPATH -u "$path"`
38097    new_path=`$WHICH "$new_path" 2> /dev/null`
38098    # bat and cmd files are not always considered executable in cygwin causing which
38099    # to not find them
38100    if test "x$new_path" = x \
38101        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38102        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38103      new_path=`$CYGPATH -u "$path"`
38104    fi
38105    if test "x$new_path" = x; then
38106      # It's still not found. Now this is an unrecoverable error.
38107      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38108$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38109      has_space=`$ECHO "$complete" | $GREP " "`
38110      if test "x$has_space" != x; then
38111        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38112$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38113      fi
38114      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38115    fi
38116  fi
38117
38118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38121  # "foo.exe" is OK but "foo" is an error.
38122  #
38123  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38124  # It is also a way to make sure we got the proper file name for the real test later on.
38125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38126  if test "x$test_shortpath" = x; then
38127    # Short path failed, file does not exist as specified.
38128    # Try adding .exe or .cmd
38129    if test -f "${new_path}.exe"; then
38130      input_to_shortpath="${new_path}.exe"
38131    elif test -f "${new_path}.cmd"; then
38132      input_to_shortpath="${new_path}.cmd"
38133    else
38134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38135$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38136      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38137$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38138      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38139    fi
38140  else
38141    input_to_shortpath="$new_path"
38142  fi
38143
38144  # Call helper function which possibly converts this using DOS-style short mode.
38145  # If so, the updated path is stored in $new_path.
38146  new_path="$input_to_shortpath"
38147
38148  input_path="$input_to_shortpath"
38149  # Check if we need to convert this using DOS-style short mode. If the path
38150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38151  # take no chances and rewrite it.
38152  # Note: m4 eats our [], so we need to use [ and ] instead.
38153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38154  if test "x$has_forbidden_chars" != x; then
38155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38156    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38157    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38158    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38159      # Going to short mode and back again did indeed matter. Since short mode is
38160      # case insensitive, let's make it lowercase to improve readability.
38161      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38162      # Now convert it back to Unix-style (cygpath)
38163      input_path=`$CYGPATH -u "$shortmode_path"`
38164      new_path="$input_path"
38165    fi
38166  fi
38167
38168  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38169  if test "x$test_cygdrive_prefix" = x; then
38170    # As a simple fix, exclude /usr/bin since it's not a real path.
38171    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38172      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38173      # a path prefixed by /cygdrive for fixpath to work.
38174      new_path="$CYGWIN_ROOT_PATH$input_path"
38175    fi
38176  fi
38177
38178  # remove trailing .exe if any
38179  new_path="${new_path/%.exe/}"
38180
38181    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38182
38183  # First separate the path from the arguments. This will split at the first
38184  # space.
38185  complete="$MT"
38186  path="${complete%% *}"
38187  tmp="$complete EOL"
38188  arguments="${tmp#* }"
38189
38190  # Input might be given as Windows format, start by converting to
38191  # unix format.
38192  new_path="$path"
38193
38194  windows_path="$new_path"
38195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38196    unix_path=`$CYGPATH -u "$windows_path"`
38197    new_path="$unix_path"
38198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38200    new_path="$unix_path"
38201  fi
38202
38203
38204  # Now try to locate executable using which
38205  new_path=`$WHICH "$new_path" 2> /dev/null`
38206
38207  if test "x$new_path" = x; then
38208    # Oops. Which didn't find the executable.
38209    # The splitting of arguments from the executable at a space might have been incorrect,
38210    # since paths with space are more likely in Windows. Give it another try with the whole
38211    # argument.
38212    path="$complete"
38213    arguments="EOL"
38214    new_path="$path"
38215
38216  windows_path="$new_path"
38217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38218    unix_path=`$CYGPATH -u "$windows_path"`
38219    new_path="$unix_path"
38220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38222    new_path="$unix_path"
38223  fi
38224
38225
38226    new_path=`$WHICH "$new_path" 2> /dev/null`
38227    # bat and cmd files are not always considered executable in MSYS causing which
38228    # to not find them
38229    if test "x$new_path" = x \
38230        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38231        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38232      new_path="$path"
38233
38234  windows_path="$new_path"
38235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38236    unix_path=`$CYGPATH -u "$windows_path"`
38237    new_path="$unix_path"
38238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38240    new_path="$unix_path"
38241  fi
38242
38243    fi
38244
38245    if test "x$new_path" = x; then
38246      # It's still not found. Now this is an unrecoverable error.
38247      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38248$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38249      has_space=`$ECHO "$complete" | $GREP " "`
38250      if test "x$has_space" != x; then
38251        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38252$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38253      fi
38254      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38255    fi
38256  fi
38257
38258  # Now new_path has a complete unix path to the binary
38259  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38260    # Keep paths in /bin as-is, but remove trailing .exe if any
38261    new_path="${new_path/%.exe/}"
38262    # Do not save /bin paths to all_fixpath_prefixes!
38263  else
38264    # Not in mixed or Windows style, start by that.
38265    new_path=`cmd //c echo $new_path`
38266
38267  input_path="$new_path"
38268  # Check if we need to convert this using DOS-style short mode. If the path
38269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38270  # take no chances and rewrite it.
38271  # Note: m4 eats our [], so we need to use [ and ] instead.
38272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38273  if test "x$has_forbidden_chars" != x; then
38274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38275    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38276  fi
38277
38278    # Output is in $new_path
38279
38280  windows_path="$new_path"
38281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38282    unix_path=`$CYGPATH -u "$windows_path"`
38283    new_path="$unix_path"
38284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38286    new_path="$unix_path"
38287  fi
38288
38289    # remove trailing .exe if any
38290    new_path="${new_path/%.exe/}"
38291
38292    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38293    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38294  fi
38295
38296    else
38297      # We're on a unix platform. Hooray! :)
38298      # First separate the path from the arguments. This will split at the first
38299      # space.
38300      complete="$MT"
38301      path="${complete%% *}"
38302      tmp="$complete EOL"
38303      arguments="${tmp#* }"
38304
38305      # Cannot rely on the command "which" here since it doesn't always work.
38306      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38307      if test -z "$is_absolute_path"; then
38308        # Path to executable is not absolute. Find it.
38309        IFS_save="$IFS"
38310        IFS=:
38311        for p in $PATH; do
38312          if test -f "$p/$path" && test -x "$p/$path"; then
38313            new_path="$p/$path"
38314            break
38315          fi
38316        done
38317        IFS="$IFS_save"
38318      else
38319        # This is an absolute path, we can use it without further modifications.
38320        new_path="$path"
38321      fi
38322
38323      if test "x$new_path" = x; then
38324        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38325$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38326        has_space=`$ECHO "$complete" | $GREP " "`
38327        if test "x$has_space" != x; then
38328          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38329$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38330        fi
38331        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38332      fi
38333    fi
38334
38335    # Now join together the path and the arguments once again
38336    if test "x$arguments" != xEOL; then
38337      new_complete="$new_path ${arguments% *}"
38338    else
38339      new_complete="$new_path"
38340    fi
38341
38342    if test "x$complete" != "x$new_complete"; then
38343      MT="$new_complete"
38344      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38345$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38346    fi
38347  fi
38348
38349    # Setup the resource compiler (RC)
38350    # Extract the first word of "rc", so it can be a program name with args.
38351set dummy rc; ac_word=$2
38352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38353$as_echo_n "checking for $ac_word... " >&6; }
38354if ${ac_cv_prog_RC+:} false; then :
38355  $as_echo_n "(cached) " >&6
38356else
38357  if test -n "$RC"; then
38358  ac_cv_prog_RC="$RC" # Let the user override the test.
38359else
38360  ac_prog_rejected=no
38361as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38362for as_dir in $PATH
38363do
38364  IFS=$as_save_IFS
38365  test -z "$as_dir" && as_dir=.
38366    for ac_exec_ext in '' $ac_executable_extensions; do
38367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38368    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38369       ac_prog_rejected=yes
38370       continue
38371     fi
38372    ac_cv_prog_RC="rc"
38373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38374    break 2
38375  fi
38376done
38377  done
38378IFS=$as_save_IFS
38379
38380if test $ac_prog_rejected = yes; then
38381  # We found a bogon in the path, so make sure we never use it.
38382  set dummy $ac_cv_prog_RC
38383  shift
38384  if test $# != 0; then
38385    # We chose a different compiler from the bogus one.
38386    # However, it has the same basename, so the bogon will be chosen
38387    # first if we set RC to just the basename; use the full file name.
38388    shift
38389    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38390  fi
38391fi
38392fi
38393fi
38394RC=$ac_cv_prog_RC
38395if test -n "$RC"; then
38396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38397$as_echo "$RC" >&6; }
38398else
38399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38400$as_echo "no" >&6; }
38401fi
38402
38403
38404
38405  # Only process if variable expands to non-empty
38406
38407  if test "x$RC" != x; then
38408    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38409
38410  # First separate the path from the arguments. This will split at the first
38411  # space.
38412  complete="$RC"
38413  path="${complete%% *}"
38414  tmp="$complete EOL"
38415  arguments="${tmp#* }"
38416
38417  # Input might be given as Windows format, start by converting to
38418  # unix format.
38419  new_path=`$CYGPATH -u "$path"`
38420
38421  # Now try to locate executable using which
38422  new_path=`$WHICH "$new_path" 2> /dev/null`
38423  # bat and cmd files are not always considered executable in cygwin causing which
38424  # to not find them
38425  if test "x$new_path" = x \
38426      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38427      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38428    new_path=`$CYGPATH -u "$path"`
38429  fi
38430  if test "x$new_path" = x; then
38431    # Oops. Which didn't find the executable.
38432    # The splitting of arguments from the executable at a space might have been incorrect,
38433    # since paths with space are more likely in Windows. Give it another try with the whole
38434    # argument.
38435    path="$complete"
38436    arguments="EOL"
38437    new_path=`$CYGPATH -u "$path"`
38438    new_path=`$WHICH "$new_path" 2> /dev/null`
38439    # bat and cmd files are not always considered executable in cygwin causing which
38440    # to not find them
38441    if test "x$new_path" = x \
38442        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38443        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38444      new_path=`$CYGPATH -u "$path"`
38445    fi
38446    if test "x$new_path" = x; then
38447      # It's still not found. Now this is an unrecoverable error.
38448      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38449$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38450      has_space=`$ECHO "$complete" | $GREP " "`
38451      if test "x$has_space" != x; then
38452        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38453$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38454      fi
38455      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38456    fi
38457  fi
38458
38459  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38460  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38461  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38462  # "foo.exe" is OK but "foo" is an error.
38463  #
38464  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38465  # It is also a way to make sure we got the proper file name for the real test later on.
38466  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38467  if test "x$test_shortpath" = x; then
38468    # Short path failed, file does not exist as specified.
38469    # Try adding .exe or .cmd
38470    if test -f "${new_path}.exe"; then
38471      input_to_shortpath="${new_path}.exe"
38472    elif test -f "${new_path}.cmd"; then
38473      input_to_shortpath="${new_path}.cmd"
38474    else
38475      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38476$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38477      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38478$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38479      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38480    fi
38481  else
38482    input_to_shortpath="$new_path"
38483  fi
38484
38485  # Call helper function which possibly converts this using DOS-style short mode.
38486  # If so, the updated path is stored in $new_path.
38487  new_path="$input_to_shortpath"
38488
38489  input_path="$input_to_shortpath"
38490  # Check if we need to convert this using DOS-style short mode. If the path
38491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38492  # take no chances and rewrite it.
38493  # Note: m4 eats our [], so we need to use [ and ] instead.
38494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38495  if test "x$has_forbidden_chars" != x; then
38496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38497    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38498    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38499    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38500      # Going to short mode and back again did indeed matter. Since short mode is
38501      # case insensitive, let's make it lowercase to improve readability.
38502      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38503      # Now convert it back to Unix-style (cygpath)
38504      input_path=`$CYGPATH -u "$shortmode_path"`
38505      new_path="$input_path"
38506    fi
38507  fi
38508
38509  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38510  if test "x$test_cygdrive_prefix" = x; then
38511    # As a simple fix, exclude /usr/bin since it's not a real path.
38512    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38513      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38514      # a path prefixed by /cygdrive for fixpath to work.
38515      new_path="$CYGWIN_ROOT_PATH$input_path"
38516    fi
38517  fi
38518
38519  # remove trailing .exe if any
38520  new_path="${new_path/%.exe/}"
38521
38522    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38523
38524  # First separate the path from the arguments. This will split at the first
38525  # space.
38526  complete="$RC"
38527  path="${complete%% *}"
38528  tmp="$complete EOL"
38529  arguments="${tmp#* }"
38530
38531  # Input might be given as Windows format, start by converting to
38532  # unix format.
38533  new_path="$path"
38534
38535  windows_path="$new_path"
38536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38537    unix_path=`$CYGPATH -u "$windows_path"`
38538    new_path="$unix_path"
38539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38541    new_path="$unix_path"
38542  fi
38543
38544
38545  # Now try to locate executable using which
38546  new_path=`$WHICH "$new_path" 2> /dev/null`
38547
38548  if test "x$new_path" = x; then
38549    # Oops. Which didn't find the executable.
38550    # The splitting of arguments from the executable at a space might have been incorrect,
38551    # since paths with space are more likely in Windows. Give it another try with the whole
38552    # argument.
38553    path="$complete"
38554    arguments="EOL"
38555    new_path="$path"
38556
38557  windows_path="$new_path"
38558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38559    unix_path=`$CYGPATH -u "$windows_path"`
38560    new_path="$unix_path"
38561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38563    new_path="$unix_path"
38564  fi
38565
38566
38567    new_path=`$WHICH "$new_path" 2> /dev/null`
38568    # bat and cmd files are not always considered executable in MSYS causing which
38569    # to not find them
38570    if test "x$new_path" = x \
38571        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38572        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38573      new_path="$path"
38574
38575  windows_path="$new_path"
38576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38577    unix_path=`$CYGPATH -u "$windows_path"`
38578    new_path="$unix_path"
38579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38581    new_path="$unix_path"
38582  fi
38583
38584    fi
38585
38586    if test "x$new_path" = x; then
38587      # It's still not found. Now this is an unrecoverable error.
38588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38589$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38590      has_space=`$ECHO "$complete" | $GREP " "`
38591      if test "x$has_space" != x; then
38592        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38593$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38594      fi
38595      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38596    fi
38597  fi
38598
38599  # Now new_path has a complete unix path to the binary
38600  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38601    # Keep paths in /bin as-is, but remove trailing .exe if any
38602    new_path="${new_path/%.exe/}"
38603    # Do not save /bin paths to all_fixpath_prefixes!
38604  else
38605    # Not in mixed or Windows style, start by that.
38606    new_path=`cmd //c echo $new_path`
38607
38608  input_path="$new_path"
38609  # Check if we need to convert this using DOS-style short mode. If the path
38610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38611  # take no chances and rewrite it.
38612  # Note: m4 eats our [], so we need to use [ and ] instead.
38613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38614  if test "x$has_forbidden_chars" != x; then
38615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38616    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38617  fi
38618
38619    # Output is in $new_path
38620
38621  windows_path="$new_path"
38622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38623    unix_path=`$CYGPATH -u "$windows_path"`
38624    new_path="$unix_path"
38625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38627    new_path="$unix_path"
38628  fi
38629
38630    # remove trailing .exe if any
38631    new_path="${new_path/%.exe/}"
38632
38633    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38634    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38635  fi
38636
38637    else
38638      # We're on a unix platform. Hooray! :)
38639      # First separate the path from the arguments. This will split at the first
38640      # space.
38641      complete="$RC"
38642      path="${complete%% *}"
38643      tmp="$complete EOL"
38644      arguments="${tmp#* }"
38645
38646      # Cannot rely on the command "which" here since it doesn't always work.
38647      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38648      if test -z "$is_absolute_path"; then
38649        # Path to executable is not absolute. Find it.
38650        IFS_save="$IFS"
38651        IFS=:
38652        for p in $PATH; do
38653          if test -f "$p/$path" && test -x "$p/$path"; then
38654            new_path="$p/$path"
38655            break
38656          fi
38657        done
38658        IFS="$IFS_save"
38659      else
38660        # This is an absolute path, we can use it without further modifications.
38661        new_path="$path"
38662      fi
38663
38664      if test "x$new_path" = x; then
38665        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38666$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38667        has_space=`$ECHO "$complete" | $GREP " "`
38668        if test "x$has_space" != x; then
38669          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38670$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38671        fi
38672        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38673      fi
38674    fi
38675
38676    # Now join together the path and the arguments once again
38677    if test "x$arguments" != xEOL; then
38678      new_complete="$new_path ${arguments% *}"
38679    else
38680      new_complete="$new_path"
38681    fi
38682
38683    if test "x$complete" != "x$new_complete"; then
38684      RC="$new_complete"
38685      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
38686$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
38687    fi
38688  fi
38689
38690    # Extract the first word of "dumpbin", so it can be a program name with args.
38691set dummy dumpbin; ac_word=$2
38692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38693$as_echo_n "checking for $ac_word... " >&6; }
38694if ${ac_cv_prog_DUMPBIN+:} false; then :
38695  $as_echo_n "(cached) " >&6
38696else
38697  if test -n "$DUMPBIN"; then
38698  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
38699else
38700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38701for as_dir in $PATH
38702do
38703  IFS=$as_save_IFS
38704  test -z "$as_dir" && as_dir=.
38705    for ac_exec_ext in '' $ac_executable_extensions; do
38706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38707    ac_cv_prog_DUMPBIN="dumpbin"
38708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38709    break 2
38710  fi
38711done
38712  done
38713IFS=$as_save_IFS
38714
38715fi
38716fi
38717DUMPBIN=$ac_cv_prog_DUMPBIN
38718if test -n "$DUMPBIN"; then
38719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
38720$as_echo "$DUMPBIN" >&6; }
38721else
38722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38723$as_echo "no" >&6; }
38724fi
38725
38726
38727
38728  # Only process if variable expands to non-empty
38729
38730  if test "x$DUMPBIN" != x; then
38731    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38732
38733  # First separate the path from the arguments. This will split at the first
38734  # space.
38735  complete="$DUMPBIN"
38736  path="${complete%% *}"
38737  tmp="$complete EOL"
38738  arguments="${tmp#* }"
38739
38740  # Input might be given as Windows format, start by converting to
38741  # unix format.
38742  new_path=`$CYGPATH -u "$path"`
38743
38744  # Now try to locate executable using which
38745  new_path=`$WHICH "$new_path" 2> /dev/null`
38746  # bat and cmd files are not always considered executable in cygwin causing which
38747  # to not find them
38748  if test "x$new_path" = x \
38749      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38750      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38751    new_path=`$CYGPATH -u "$path"`
38752  fi
38753  if test "x$new_path" = x; then
38754    # Oops. Which didn't find the executable.
38755    # The splitting of arguments from the executable at a space might have been incorrect,
38756    # since paths with space are more likely in Windows. Give it another try with the whole
38757    # argument.
38758    path="$complete"
38759    arguments="EOL"
38760    new_path=`$CYGPATH -u "$path"`
38761    new_path=`$WHICH "$new_path" 2> /dev/null`
38762    # bat and cmd files are not always considered executable in cygwin causing which
38763    # to not find them
38764    if test "x$new_path" = x \
38765        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38766        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38767      new_path=`$CYGPATH -u "$path"`
38768    fi
38769    if test "x$new_path" = x; then
38770      # It's still not found. Now this is an unrecoverable error.
38771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38772$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38773      has_space=`$ECHO "$complete" | $GREP " "`
38774      if test "x$has_space" != x; then
38775        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38776$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38777      fi
38778      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38779    fi
38780  fi
38781
38782  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38783  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38784  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38785  # "foo.exe" is OK but "foo" is an error.
38786  #
38787  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38788  # It is also a way to make sure we got the proper file name for the real test later on.
38789  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38790  if test "x$test_shortpath" = x; then
38791    # Short path failed, file does not exist as specified.
38792    # Try adding .exe or .cmd
38793    if test -f "${new_path}.exe"; then
38794      input_to_shortpath="${new_path}.exe"
38795    elif test -f "${new_path}.cmd"; then
38796      input_to_shortpath="${new_path}.cmd"
38797    else
38798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
38799$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
38800      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38801$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38802      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38803    fi
38804  else
38805    input_to_shortpath="$new_path"
38806  fi
38807
38808  # Call helper function which possibly converts this using DOS-style short mode.
38809  # If so, the updated path is stored in $new_path.
38810  new_path="$input_to_shortpath"
38811
38812  input_path="$input_to_shortpath"
38813  # Check if we need to convert this using DOS-style short mode. If the path
38814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38815  # take no chances and rewrite it.
38816  # Note: m4 eats our [], so we need to use [ and ] instead.
38817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38818  if test "x$has_forbidden_chars" != x; then
38819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38823      # Going to short mode and back again did indeed matter. Since short mode is
38824      # case insensitive, let's make it lowercase to improve readability.
38825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38826      # Now convert it back to Unix-style (cygpath)
38827      input_path=`$CYGPATH -u "$shortmode_path"`
38828      new_path="$input_path"
38829    fi
38830  fi
38831
38832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38833  if test "x$test_cygdrive_prefix" = x; then
38834    # As a simple fix, exclude /usr/bin since it's not a real path.
38835    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38837      # a path prefixed by /cygdrive for fixpath to work.
38838      new_path="$CYGWIN_ROOT_PATH$input_path"
38839    fi
38840  fi
38841
38842  # remove trailing .exe if any
38843  new_path="${new_path/%.exe/}"
38844
38845    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38846
38847  # First separate the path from the arguments. This will split at the first
38848  # space.
38849  complete="$DUMPBIN"
38850  path="${complete%% *}"
38851  tmp="$complete EOL"
38852  arguments="${tmp#* }"
38853
38854  # Input might be given as Windows format, start by converting to
38855  # unix format.
38856  new_path="$path"
38857
38858  windows_path="$new_path"
38859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38860    unix_path=`$CYGPATH -u "$windows_path"`
38861    new_path="$unix_path"
38862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38864    new_path="$unix_path"
38865  fi
38866
38867
38868  # Now try to locate executable using which
38869  new_path=`$WHICH "$new_path" 2> /dev/null`
38870
38871  if test "x$new_path" = x; then
38872    # Oops. Which didn't find the executable.
38873    # The splitting of arguments from the executable at a space might have been incorrect,
38874    # since paths with space are more likely in Windows. Give it another try with the whole
38875    # argument.
38876    path="$complete"
38877    arguments="EOL"
38878    new_path="$path"
38879
38880  windows_path="$new_path"
38881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38882    unix_path=`$CYGPATH -u "$windows_path"`
38883    new_path="$unix_path"
38884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38886    new_path="$unix_path"
38887  fi
38888
38889
38890    new_path=`$WHICH "$new_path" 2> /dev/null`
38891    # bat and cmd files are not always considered executable in MSYS causing which
38892    # to not find them
38893    if test "x$new_path" = x \
38894        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38895        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38896      new_path="$path"
38897
38898  windows_path="$new_path"
38899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38900    unix_path=`$CYGPATH -u "$windows_path"`
38901    new_path="$unix_path"
38902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38904    new_path="$unix_path"
38905  fi
38906
38907    fi
38908
38909    if test "x$new_path" = x; then
38910      # It's still not found. Now this is an unrecoverable error.
38911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38912$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38913      has_space=`$ECHO "$complete" | $GREP " "`
38914      if test "x$has_space" != x; then
38915        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38916$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38917      fi
38918      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38919    fi
38920  fi
38921
38922  # Now new_path has a complete unix path to the binary
38923  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38924    # Keep paths in /bin as-is, but remove trailing .exe if any
38925    new_path="${new_path/%.exe/}"
38926    # Do not save /bin paths to all_fixpath_prefixes!
38927  else
38928    # Not in mixed or Windows style, start by that.
38929    new_path=`cmd //c echo $new_path`
38930
38931  input_path="$new_path"
38932  # Check if we need to convert this using DOS-style short mode. If the path
38933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38934  # take no chances and rewrite it.
38935  # Note: m4 eats our [], so we need to use [ and ] instead.
38936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38937  if test "x$has_forbidden_chars" != x; then
38938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38940  fi
38941
38942    # Output is in $new_path
38943
38944  windows_path="$new_path"
38945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38946    unix_path=`$CYGPATH -u "$windows_path"`
38947    new_path="$unix_path"
38948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38950    new_path="$unix_path"
38951  fi
38952
38953    # remove trailing .exe if any
38954    new_path="${new_path/%.exe/}"
38955
38956    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38957    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38958  fi
38959
38960    else
38961      # We're on a unix platform. Hooray! :)
38962      # First separate the path from the arguments. This will split at the first
38963      # space.
38964      complete="$DUMPBIN"
38965      path="${complete%% *}"
38966      tmp="$complete EOL"
38967      arguments="${tmp#* }"
38968
38969      # Cannot rely on the command "which" here since it doesn't always work.
38970      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38971      if test -z "$is_absolute_path"; then
38972        # Path to executable is not absolute. Find it.
38973        IFS_save="$IFS"
38974        IFS=:
38975        for p in $PATH; do
38976          if test -f "$p/$path" && test -x "$p/$path"; then
38977            new_path="$p/$path"
38978            break
38979          fi
38980        done
38981        IFS="$IFS_save"
38982      else
38983        # This is an absolute path, we can use it without further modifications.
38984        new_path="$path"
38985      fi
38986
38987      if test "x$new_path" = x; then
38988        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38989$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38990        has_space=`$ECHO "$complete" | $GREP " "`
38991        if test "x$has_space" != x; then
38992          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38993$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38994        fi
38995        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38996      fi
38997    fi
38998
38999    # Now join together the path and the arguments once again
39000    if test "x$arguments" != xEOL; then
39001      new_complete="$new_path ${arguments% *}"
39002    else
39003      new_complete="$new_path"
39004    fi
39005
39006    if test "x$complete" != "x$new_complete"; then
39007      DUMPBIN="$new_complete"
39008      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39009$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39010    fi
39011  fi
39012
39013    # We need to check for 'msbuild.exe' because at the place where we expect to
39014    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39015    # won't find the 'msbuild.exe' executable in that case (and the
39016    # 'ac_executable_extensions' is unusable due to performance reasons).
39017    # Notice that we intentionally don't fix up the path to MSBUILD because we
39018    # will call it in a DOS shell during freetype detection on Windows (see
39019    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39020    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39021set dummy msbuild.exe; ac_word=$2
39022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39023$as_echo_n "checking for $ac_word... " >&6; }
39024if ${ac_cv_prog_MSBUILD+:} false; then :
39025  $as_echo_n "(cached) " >&6
39026else
39027  if test -n "$MSBUILD"; then
39028  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39029else
39030as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39031for as_dir in $PATH
39032do
39033  IFS=$as_save_IFS
39034  test -z "$as_dir" && as_dir=.
39035    for ac_exec_ext in '' $ac_executable_extensions; do
39036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39037    ac_cv_prog_MSBUILD="msbuild.exe"
39038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39039    break 2
39040  fi
39041done
39042  done
39043IFS=$as_save_IFS
39044
39045fi
39046fi
39047MSBUILD=$ac_cv_prog_MSBUILD
39048if test -n "$MSBUILD"; then
39049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39050$as_echo "$MSBUILD" >&6; }
39051else
39052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39053$as_echo "no" >&6; }
39054fi
39055
39056
39057  fi
39058
39059  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39060
39061
39062  # Publish this variable in the help.
39063
39064
39065  if [ -z "${STRIP+x}" ]; then
39066    # The variable is not set by user, try to locate tool using the code snippet
39067    for ac_prog in strip
39068do
39069  # Extract the first word of "$ac_prog", so it can be a program name with args.
39070set dummy $ac_prog; ac_word=$2
39071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39072$as_echo_n "checking for $ac_word... " >&6; }
39073if ${ac_cv_path_STRIP+:} false; then :
39074  $as_echo_n "(cached) " >&6
39075else
39076  case $STRIP in
39077  [\\/]* | ?:[\\/]*)
39078  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39079  ;;
39080  *)
39081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39082for as_dir in $PATH
39083do
39084  IFS=$as_save_IFS
39085  test -z "$as_dir" && as_dir=.
39086    for ac_exec_ext in '' $ac_executable_extensions; do
39087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39088    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39090    break 2
39091  fi
39092done
39093  done
39094IFS=$as_save_IFS
39095
39096  ;;
39097esac
39098fi
39099STRIP=$ac_cv_path_STRIP
39100if test -n "$STRIP"; then
39101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39102$as_echo "$STRIP" >&6; }
39103else
39104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39105$as_echo "no" >&6; }
39106fi
39107
39108
39109  test -n "$STRIP" && break
39110done
39111
39112  else
39113    # The variable is set, but is it from the command line or the environment?
39114
39115    # Try to remove the string !STRIP! from our list.
39116    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39117    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39118      # If it failed, the variable was not from the command line. Ignore it,
39119      # but warn the user (except for BASH, which is always set by the calling BASH).
39120      if test "xSTRIP" != xBASH; then
39121        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39122$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39123      fi
39124      # Try to locate tool using the code snippet
39125      for ac_prog in strip
39126do
39127  # Extract the first word of "$ac_prog", so it can be a program name with args.
39128set dummy $ac_prog; ac_word=$2
39129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39130$as_echo_n "checking for $ac_word... " >&6; }
39131if ${ac_cv_path_STRIP+:} false; then :
39132  $as_echo_n "(cached) " >&6
39133else
39134  case $STRIP in
39135  [\\/]* | ?:[\\/]*)
39136  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39137  ;;
39138  *)
39139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39140for as_dir in $PATH
39141do
39142  IFS=$as_save_IFS
39143  test -z "$as_dir" && as_dir=.
39144    for ac_exec_ext in '' $ac_executable_extensions; do
39145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39146    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39148    break 2
39149  fi
39150done
39151  done
39152IFS=$as_save_IFS
39153
39154  ;;
39155esac
39156fi
39157STRIP=$ac_cv_path_STRIP
39158if test -n "$STRIP"; then
39159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39160$as_echo "$STRIP" >&6; }
39161else
39162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39163$as_echo "no" >&6; }
39164fi
39165
39166
39167  test -n "$STRIP" && break
39168done
39169
39170    else
39171      # If it succeeded, then it was overridden by the user. We will use it
39172      # for the tool.
39173
39174      # First remove it from the list of overridden variables, so we can test
39175      # for unknown variables in the end.
39176      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39177
39178      # Check if we try to supply an empty value
39179      if test "x$STRIP" = x; then
39180        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39181$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39182        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39183$as_echo_n "checking for STRIP... " >&6; }
39184        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39185$as_echo "disabled" >&6; }
39186      else
39187        # Check if the provided tool contains a complete path.
39188        tool_specified="$STRIP"
39189        tool_basename="${tool_specified##*/}"
39190        if test "x$tool_basename" = "x$tool_specified"; then
39191          # A command without a complete path is provided, search $PATH.
39192          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39193$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39194          # Extract the first word of "$tool_basename", so it can be a program name with args.
39195set dummy $tool_basename; ac_word=$2
39196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39197$as_echo_n "checking for $ac_word... " >&6; }
39198if ${ac_cv_path_STRIP+:} false; then :
39199  $as_echo_n "(cached) " >&6
39200else
39201  case $STRIP in
39202  [\\/]* | ?:[\\/]*)
39203  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39204  ;;
39205  *)
39206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39207for as_dir in $PATH
39208do
39209  IFS=$as_save_IFS
39210  test -z "$as_dir" && as_dir=.
39211    for ac_exec_ext in '' $ac_executable_extensions; do
39212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39213    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39215    break 2
39216  fi
39217done
39218  done
39219IFS=$as_save_IFS
39220
39221  ;;
39222esac
39223fi
39224STRIP=$ac_cv_path_STRIP
39225if test -n "$STRIP"; then
39226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39227$as_echo "$STRIP" >&6; }
39228else
39229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39230$as_echo "no" >&6; }
39231fi
39232
39233
39234          if test "x$STRIP" = x; then
39235            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39236          fi
39237        else
39238          # Otherwise we believe it is a complete path. Use it as it is.
39239          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39240$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39241          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39242$as_echo_n "checking for STRIP... " >&6; }
39243          if test ! -x "$tool_specified"; then
39244            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39245$as_echo "not found" >&6; }
39246            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39247          fi
39248          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39249$as_echo "$tool_specified" >&6; }
39250        fi
39251      fi
39252    fi
39253
39254  fi
39255
39256
39257
39258  # Only process if variable expands to non-empty
39259
39260  if test "x$STRIP" != x; then
39261    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39262
39263  # First separate the path from the arguments. This will split at the first
39264  # space.
39265  complete="$STRIP"
39266  path="${complete%% *}"
39267  tmp="$complete EOL"
39268  arguments="${tmp#* }"
39269
39270  # Input might be given as Windows format, start by converting to
39271  # unix format.
39272  new_path=`$CYGPATH -u "$path"`
39273
39274  # Now try to locate executable using which
39275  new_path=`$WHICH "$new_path" 2> /dev/null`
39276  # bat and cmd files are not always considered executable in cygwin causing which
39277  # to not find them
39278  if test "x$new_path" = x \
39279      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39280      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39281    new_path=`$CYGPATH -u "$path"`
39282  fi
39283  if test "x$new_path" = x; then
39284    # Oops. Which didn't find the executable.
39285    # The splitting of arguments from the executable at a space might have been incorrect,
39286    # since paths with space are more likely in Windows. Give it another try with the whole
39287    # argument.
39288    path="$complete"
39289    arguments="EOL"
39290    new_path=`$CYGPATH -u "$path"`
39291    new_path=`$WHICH "$new_path" 2> /dev/null`
39292    # bat and cmd files are not always considered executable in cygwin causing which
39293    # to not find them
39294    if test "x$new_path" = x \
39295        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39296        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39297      new_path=`$CYGPATH -u "$path"`
39298    fi
39299    if test "x$new_path" = x; then
39300      # It's still not found. Now this is an unrecoverable error.
39301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39302$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39303      has_space=`$ECHO "$complete" | $GREP " "`
39304      if test "x$has_space" != x; then
39305        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39306$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39307      fi
39308      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39309    fi
39310  fi
39311
39312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39315  # "foo.exe" is OK but "foo" is an error.
39316  #
39317  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39318  # It is also a way to make sure we got the proper file name for the real test later on.
39319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39320  if test "x$test_shortpath" = x; then
39321    # Short path failed, file does not exist as specified.
39322    # Try adding .exe or .cmd
39323    if test -f "${new_path}.exe"; then
39324      input_to_shortpath="${new_path}.exe"
39325    elif test -f "${new_path}.cmd"; then
39326      input_to_shortpath="${new_path}.cmd"
39327    else
39328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39329$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39330      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39331$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39332      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39333    fi
39334  else
39335    input_to_shortpath="$new_path"
39336  fi
39337
39338  # Call helper function which possibly converts this using DOS-style short mode.
39339  # If so, the updated path is stored in $new_path.
39340  new_path="$input_to_shortpath"
39341
39342  input_path="$input_to_shortpath"
39343  # Check if we need to convert this using DOS-style short mode. If the path
39344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39345  # take no chances and rewrite it.
39346  # Note: m4 eats our [], so we need to use [ and ] instead.
39347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39348  if test "x$has_forbidden_chars" != x; then
39349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39353      # Going to short mode and back again did indeed matter. Since short mode is
39354      # case insensitive, let's make it lowercase to improve readability.
39355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39356      # Now convert it back to Unix-style (cygpath)
39357      input_path=`$CYGPATH -u "$shortmode_path"`
39358      new_path="$input_path"
39359    fi
39360  fi
39361
39362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39363  if test "x$test_cygdrive_prefix" = x; then
39364    # As a simple fix, exclude /usr/bin since it's not a real path.
39365    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39367      # a path prefixed by /cygdrive for fixpath to work.
39368      new_path="$CYGWIN_ROOT_PATH$input_path"
39369    fi
39370  fi
39371
39372  # remove trailing .exe if any
39373  new_path="${new_path/%.exe/}"
39374
39375    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39376
39377  # First separate the path from the arguments. This will split at the first
39378  # space.
39379  complete="$STRIP"
39380  path="${complete%% *}"
39381  tmp="$complete EOL"
39382  arguments="${tmp#* }"
39383
39384  # Input might be given as Windows format, start by converting to
39385  # unix format.
39386  new_path="$path"
39387
39388  windows_path="$new_path"
39389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39390    unix_path=`$CYGPATH -u "$windows_path"`
39391    new_path="$unix_path"
39392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39394    new_path="$unix_path"
39395  fi
39396
39397
39398  # Now try to locate executable using which
39399  new_path=`$WHICH "$new_path" 2> /dev/null`
39400
39401  if test "x$new_path" = x; then
39402    # Oops. Which didn't find the executable.
39403    # The splitting of arguments from the executable at a space might have been incorrect,
39404    # since paths with space are more likely in Windows. Give it another try with the whole
39405    # argument.
39406    path="$complete"
39407    arguments="EOL"
39408    new_path="$path"
39409
39410  windows_path="$new_path"
39411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39412    unix_path=`$CYGPATH -u "$windows_path"`
39413    new_path="$unix_path"
39414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39416    new_path="$unix_path"
39417  fi
39418
39419
39420    new_path=`$WHICH "$new_path" 2> /dev/null`
39421    # bat and cmd files are not always considered executable in MSYS causing which
39422    # to not find them
39423    if test "x$new_path" = x \
39424        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39425        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39426      new_path="$path"
39427
39428  windows_path="$new_path"
39429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39430    unix_path=`$CYGPATH -u "$windows_path"`
39431    new_path="$unix_path"
39432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39434    new_path="$unix_path"
39435  fi
39436
39437    fi
39438
39439    if test "x$new_path" = x; then
39440      # It's still not found. Now this is an unrecoverable error.
39441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39442$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39443      has_space=`$ECHO "$complete" | $GREP " "`
39444      if test "x$has_space" != x; then
39445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39447      fi
39448      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39449    fi
39450  fi
39451
39452  # Now new_path has a complete unix path to the binary
39453  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39454    # Keep paths in /bin as-is, but remove trailing .exe if any
39455    new_path="${new_path/%.exe/}"
39456    # Do not save /bin paths to all_fixpath_prefixes!
39457  else
39458    # Not in mixed or Windows style, start by that.
39459    new_path=`cmd //c echo $new_path`
39460
39461  input_path="$new_path"
39462  # Check if we need to convert this using DOS-style short mode. If the path
39463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39464  # take no chances and rewrite it.
39465  # Note: m4 eats our [], so we need to use [ and ] instead.
39466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39467  if test "x$has_forbidden_chars" != x; then
39468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39470  fi
39471
39472    # Output is in $new_path
39473
39474  windows_path="$new_path"
39475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39476    unix_path=`$CYGPATH -u "$windows_path"`
39477    new_path="$unix_path"
39478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39480    new_path="$unix_path"
39481  fi
39482
39483    # remove trailing .exe if any
39484    new_path="${new_path/%.exe/}"
39485
39486    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39487    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39488  fi
39489
39490    else
39491      # We're on a unix platform. Hooray! :)
39492      # First separate the path from the arguments. This will split at the first
39493      # space.
39494      complete="$STRIP"
39495      path="${complete%% *}"
39496      tmp="$complete EOL"
39497      arguments="${tmp#* }"
39498
39499      # Cannot rely on the command "which" here since it doesn't always work.
39500      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39501      if test -z "$is_absolute_path"; then
39502        # Path to executable is not absolute. Find it.
39503        IFS_save="$IFS"
39504        IFS=:
39505        for p in $PATH; do
39506          if test -f "$p/$path" && test -x "$p/$path"; then
39507            new_path="$p/$path"
39508            break
39509          fi
39510        done
39511        IFS="$IFS_save"
39512      else
39513        # This is an absolute path, we can use it without further modifications.
39514        new_path="$path"
39515      fi
39516
39517      if test "x$new_path" = x; then
39518        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39519$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39520        has_space=`$ECHO "$complete" | $GREP " "`
39521        if test "x$has_space" != x; then
39522          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39523$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39524        fi
39525        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39526      fi
39527    fi
39528
39529    # Now join together the path and the arguments once again
39530    if test "x$arguments" != xEOL; then
39531      new_complete="$new_path ${arguments% *}"
39532    else
39533      new_complete="$new_path"
39534    fi
39535
39536    if test "x$complete" != "x$new_complete"; then
39537      STRIP="$new_complete"
39538      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39539$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39540    fi
39541  fi
39542
39543
39544
39545  # Publish this variable in the help.
39546
39547
39548  if [ -z "${NM+x}" ]; then
39549    # The variable is not set by user, try to locate tool using the code snippet
39550    for ac_prog in nm
39551do
39552  # Extract the first word of "$ac_prog", so it can be a program name with args.
39553set dummy $ac_prog; ac_word=$2
39554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39555$as_echo_n "checking for $ac_word... " >&6; }
39556if ${ac_cv_path_NM+:} false; then :
39557  $as_echo_n "(cached) " >&6
39558else
39559  case $NM in
39560  [\\/]* | ?:[\\/]*)
39561  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39562  ;;
39563  *)
39564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39565for as_dir in $PATH
39566do
39567  IFS=$as_save_IFS
39568  test -z "$as_dir" && as_dir=.
39569    for ac_exec_ext in '' $ac_executable_extensions; do
39570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39571    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39573    break 2
39574  fi
39575done
39576  done
39577IFS=$as_save_IFS
39578
39579  ;;
39580esac
39581fi
39582NM=$ac_cv_path_NM
39583if test -n "$NM"; then
39584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39585$as_echo "$NM" >&6; }
39586else
39587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39588$as_echo "no" >&6; }
39589fi
39590
39591
39592  test -n "$NM" && break
39593done
39594
39595  else
39596    # The variable is set, but is it from the command line or the environment?
39597
39598    # Try to remove the string !NM! from our list.
39599    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39600    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39601      # If it failed, the variable was not from the command line. Ignore it,
39602      # but warn the user (except for BASH, which is always set by the calling BASH).
39603      if test "xNM" != xBASH; then
39604        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39605$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39606      fi
39607      # Try to locate tool using the code snippet
39608      for ac_prog in nm
39609do
39610  # Extract the first word of "$ac_prog", so it can be a program name with args.
39611set dummy $ac_prog; ac_word=$2
39612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39613$as_echo_n "checking for $ac_word... " >&6; }
39614if ${ac_cv_path_NM+:} false; then :
39615  $as_echo_n "(cached) " >&6
39616else
39617  case $NM in
39618  [\\/]* | ?:[\\/]*)
39619  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39620  ;;
39621  *)
39622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39623for as_dir in $PATH
39624do
39625  IFS=$as_save_IFS
39626  test -z "$as_dir" && as_dir=.
39627    for ac_exec_ext in '' $ac_executable_extensions; do
39628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39629    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39631    break 2
39632  fi
39633done
39634  done
39635IFS=$as_save_IFS
39636
39637  ;;
39638esac
39639fi
39640NM=$ac_cv_path_NM
39641if test -n "$NM"; then
39642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39643$as_echo "$NM" >&6; }
39644else
39645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39646$as_echo "no" >&6; }
39647fi
39648
39649
39650  test -n "$NM" && break
39651done
39652
39653    else
39654      # If it succeeded, then it was overridden by the user. We will use it
39655      # for the tool.
39656
39657      # First remove it from the list of overridden variables, so we can test
39658      # for unknown variables in the end.
39659      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39660
39661      # Check if we try to supply an empty value
39662      if test "x$NM" = x; then
39663        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
39664$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
39665        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39666$as_echo_n "checking for NM... " >&6; }
39667        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39668$as_echo "disabled" >&6; }
39669      else
39670        # Check if the provided tool contains a complete path.
39671        tool_specified="$NM"
39672        tool_basename="${tool_specified##*/}"
39673        if test "x$tool_basename" = "x$tool_specified"; then
39674          # A command without a complete path is provided, search $PATH.
39675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
39676$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
39677          # Extract the first word of "$tool_basename", so it can be a program name with args.
39678set dummy $tool_basename; ac_word=$2
39679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39680$as_echo_n "checking for $ac_word... " >&6; }
39681if ${ac_cv_path_NM+:} false; then :
39682  $as_echo_n "(cached) " >&6
39683else
39684  case $NM in
39685  [\\/]* | ?:[\\/]*)
39686  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39687  ;;
39688  *)
39689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39690for as_dir in $PATH
39691do
39692  IFS=$as_save_IFS
39693  test -z "$as_dir" && as_dir=.
39694    for ac_exec_ext in '' $ac_executable_extensions; do
39695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39696    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39698    break 2
39699  fi
39700done
39701  done
39702IFS=$as_save_IFS
39703
39704  ;;
39705esac
39706fi
39707NM=$ac_cv_path_NM
39708if test -n "$NM"; then
39709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39710$as_echo "$NM" >&6; }
39711else
39712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39713$as_echo "no" >&6; }
39714fi
39715
39716
39717          if test "x$NM" = x; then
39718            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39719          fi
39720        else
39721          # Otherwise we believe it is a complete path. Use it as it is.
39722          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
39723$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
39724          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39725$as_echo_n "checking for NM... " >&6; }
39726          if test ! -x "$tool_specified"; then
39727            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39728$as_echo "not found" >&6; }
39729            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
39730          fi
39731          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39732$as_echo "$tool_specified" >&6; }
39733        fi
39734      fi
39735    fi
39736
39737  fi
39738
39739
39740
39741  # Only process if variable expands to non-empty
39742
39743  if test "x$NM" != x; then
39744    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39745
39746  # First separate the path from the arguments. This will split at the first
39747  # space.
39748  complete="$NM"
39749  path="${complete%% *}"
39750  tmp="$complete EOL"
39751  arguments="${tmp#* }"
39752
39753  # Input might be given as Windows format, start by converting to
39754  # unix format.
39755  new_path=`$CYGPATH -u "$path"`
39756
39757  # Now try to locate executable using which
39758  new_path=`$WHICH "$new_path" 2> /dev/null`
39759  # bat and cmd files are not always considered executable in cygwin causing which
39760  # to not find them
39761  if test "x$new_path" = x \
39762      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39763      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39764    new_path=`$CYGPATH -u "$path"`
39765  fi
39766  if test "x$new_path" = x; then
39767    # Oops. Which didn't find the executable.
39768    # The splitting of arguments from the executable at a space might have been incorrect,
39769    # since paths with space are more likely in Windows. Give it another try with the whole
39770    # argument.
39771    path="$complete"
39772    arguments="EOL"
39773    new_path=`$CYGPATH -u "$path"`
39774    new_path=`$WHICH "$new_path" 2> /dev/null`
39775    # bat and cmd files are not always considered executable in cygwin causing which
39776    # to not find them
39777    if test "x$new_path" = x \
39778        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39779        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39780      new_path=`$CYGPATH -u "$path"`
39781    fi
39782    if test "x$new_path" = x; then
39783      # It's still not found. Now this is an unrecoverable error.
39784      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39785$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39786      has_space=`$ECHO "$complete" | $GREP " "`
39787      if test "x$has_space" != x; then
39788        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39789$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39790      fi
39791      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39792    fi
39793  fi
39794
39795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39798  # "foo.exe" is OK but "foo" is an error.
39799  #
39800  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39801  # It is also a way to make sure we got the proper file name for the real test later on.
39802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39803  if test "x$test_shortpath" = x; then
39804    # Short path failed, file does not exist as specified.
39805    # Try adding .exe or .cmd
39806    if test -f "${new_path}.exe"; then
39807      input_to_shortpath="${new_path}.exe"
39808    elif test -f "${new_path}.cmd"; then
39809      input_to_shortpath="${new_path}.cmd"
39810    else
39811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
39812$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
39813      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39814$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39815      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39816    fi
39817  else
39818    input_to_shortpath="$new_path"
39819  fi
39820
39821  # Call helper function which possibly converts this using DOS-style short mode.
39822  # If so, the updated path is stored in $new_path.
39823  new_path="$input_to_shortpath"
39824
39825  input_path="$input_to_shortpath"
39826  # Check if we need to convert this using DOS-style short mode. If the path
39827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39828  # take no chances and rewrite it.
39829  # Note: m4 eats our [], so we need to use [ and ] instead.
39830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39831  if test "x$has_forbidden_chars" != x; then
39832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39836      # Going to short mode and back again did indeed matter. Since short mode is
39837      # case insensitive, let's make it lowercase to improve readability.
39838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39839      # Now convert it back to Unix-style (cygpath)
39840      input_path=`$CYGPATH -u "$shortmode_path"`
39841      new_path="$input_path"
39842    fi
39843  fi
39844
39845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39846  if test "x$test_cygdrive_prefix" = x; then
39847    # As a simple fix, exclude /usr/bin since it's not a real path.
39848    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39850      # a path prefixed by /cygdrive for fixpath to work.
39851      new_path="$CYGWIN_ROOT_PATH$input_path"
39852    fi
39853  fi
39854
39855  # remove trailing .exe if any
39856  new_path="${new_path/%.exe/}"
39857
39858    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39859
39860  # First separate the path from the arguments. This will split at the first
39861  # space.
39862  complete="$NM"
39863  path="${complete%% *}"
39864  tmp="$complete EOL"
39865  arguments="${tmp#* }"
39866
39867  # Input might be given as Windows format, start by converting to
39868  # unix format.
39869  new_path="$path"
39870
39871  windows_path="$new_path"
39872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39873    unix_path=`$CYGPATH -u "$windows_path"`
39874    new_path="$unix_path"
39875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39877    new_path="$unix_path"
39878  fi
39879
39880
39881  # Now try to locate executable using which
39882  new_path=`$WHICH "$new_path" 2> /dev/null`
39883
39884  if test "x$new_path" = x; then
39885    # Oops. Which didn't find the executable.
39886    # The splitting of arguments from the executable at a space might have been incorrect,
39887    # since paths with space are more likely in Windows. Give it another try with the whole
39888    # argument.
39889    path="$complete"
39890    arguments="EOL"
39891    new_path="$path"
39892
39893  windows_path="$new_path"
39894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39895    unix_path=`$CYGPATH -u "$windows_path"`
39896    new_path="$unix_path"
39897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39899    new_path="$unix_path"
39900  fi
39901
39902
39903    new_path=`$WHICH "$new_path" 2> /dev/null`
39904    # bat and cmd files are not always considered executable in MSYS causing which
39905    # to not find them
39906    if test "x$new_path" = x \
39907        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39908        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39909      new_path="$path"
39910
39911  windows_path="$new_path"
39912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39913    unix_path=`$CYGPATH -u "$windows_path"`
39914    new_path="$unix_path"
39915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39917    new_path="$unix_path"
39918  fi
39919
39920    fi
39921
39922    if test "x$new_path" = x; then
39923      # It's still not found. Now this is an unrecoverable error.
39924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39925$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39926      has_space=`$ECHO "$complete" | $GREP " "`
39927      if test "x$has_space" != x; then
39928        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39929$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39930      fi
39931      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39932    fi
39933  fi
39934
39935  # Now new_path has a complete unix path to the binary
39936  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39937    # Keep paths in /bin as-is, but remove trailing .exe if any
39938    new_path="${new_path/%.exe/}"
39939    # Do not save /bin paths to all_fixpath_prefixes!
39940  else
39941    # Not in mixed or Windows style, start by that.
39942    new_path=`cmd //c echo $new_path`
39943
39944  input_path="$new_path"
39945  # Check if we need to convert this using DOS-style short mode. If the path
39946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39947  # take no chances and rewrite it.
39948  # Note: m4 eats our [], so we need to use [ and ] instead.
39949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39950  if test "x$has_forbidden_chars" != x; then
39951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39952    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39953  fi
39954
39955    # Output is in $new_path
39956
39957  windows_path="$new_path"
39958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39959    unix_path=`$CYGPATH -u "$windows_path"`
39960    new_path="$unix_path"
39961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39963    new_path="$unix_path"
39964  fi
39965
39966    # remove trailing .exe if any
39967    new_path="${new_path/%.exe/}"
39968
39969    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39970    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39971  fi
39972
39973    else
39974      # We're on a unix platform. Hooray! :)
39975      # First separate the path from the arguments. This will split at the first
39976      # space.
39977      complete="$NM"
39978      path="${complete%% *}"
39979      tmp="$complete EOL"
39980      arguments="${tmp#* }"
39981
39982      # Cannot rely on the command "which" here since it doesn't always work.
39983      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39984      if test -z "$is_absolute_path"; then
39985        # Path to executable is not absolute. Find it.
39986        IFS_save="$IFS"
39987        IFS=:
39988        for p in $PATH; do
39989          if test -f "$p/$path" && test -x "$p/$path"; then
39990            new_path="$p/$path"
39991            break
39992          fi
39993        done
39994        IFS="$IFS_save"
39995      else
39996        # This is an absolute path, we can use it without further modifications.
39997        new_path="$path"
39998      fi
39999
40000      if test "x$new_path" = x; then
40001        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40002$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40003        has_space=`$ECHO "$complete" | $GREP " "`
40004        if test "x$has_space" != x; then
40005          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40006$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40007        fi
40008        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40009      fi
40010    fi
40011
40012    # Now join together the path and the arguments once again
40013    if test "x$arguments" != xEOL; then
40014      new_complete="$new_path ${arguments% *}"
40015    else
40016      new_complete="$new_path"
40017    fi
40018
40019    if test "x$complete" != "x$new_complete"; then
40020      NM="$new_complete"
40021      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40022$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40023    fi
40024  fi
40025
40026
40027
40028  # Publish this variable in the help.
40029
40030
40031  if [ -z "${GNM+x}" ]; then
40032    # The variable is not set by user, try to locate tool using the code snippet
40033    for ac_prog in gnm
40034do
40035  # Extract the first word of "$ac_prog", so it can be a program name with args.
40036set dummy $ac_prog; ac_word=$2
40037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40038$as_echo_n "checking for $ac_word... " >&6; }
40039if ${ac_cv_path_GNM+:} false; then :
40040  $as_echo_n "(cached) " >&6
40041else
40042  case $GNM in
40043  [\\/]* | ?:[\\/]*)
40044  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40045  ;;
40046  *)
40047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40048for as_dir in $PATH
40049do
40050  IFS=$as_save_IFS
40051  test -z "$as_dir" && as_dir=.
40052    for ac_exec_ext in '' $ac_executable_extensions; do
40053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40054    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40056    break 2
40057  fi
40058done
40059  done
40060IFS=$as_save_IFS
40061
40062  ;;
40063esac
40064fi
40065GNM=$ac_cv_path_GNM
40066if test -n "$GNM"; then
40067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40068$as_echo "$GNM" >&6; }
40069else
40070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40071$as_echo "no" >&6; }
40072fi
40073
40074
40075  test -n "$GNM" && break
40076done
40077
40078  else
40079    # The variable is set, but is it from the command line or the environment?
40080
40081    # Try to remove the string !GNM! from our list.
40082    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40083    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40084      # If it failed, the variable was not from the command line. Ignore it,
40085      # but warn the user (except for BASH, which is always set by the calling BASH).
40086      if test "xGNM" != xBASH; then
40087        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40088$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40089      fi
40090      # Try to locate tool using the code snippet
40091      for ac_prog in gnm
40092do
40093  # Extract the first word of "$ac_prog", so it can be a program name with args.
40094set dummy $ac_prog; ac_word=$2
40095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40096$as_echo_n "checking for $ac_word... " >&6; }
40097if ${ac_cv_path_GNM+:} false; then :
40098  $as_echo_n "(cached) " >&6
40099else
40100  case $GNM in
40101  [\\/]* | ?:[\\/]*)
40102  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40103  ;;
40104  *)
40105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40106for as_dir in $PATH
40107do
40108  IFS=$as_save_IFS
40109  test -z "$as_dir" && as_dir=.
40110    for ac_exec_ext in '' $ac_executable_extensions; do
40111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40112    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40114    break 2
40115  fi
40116done
40117  done
40118IFS=$as_save_IFS
40119
40120  ;;
40121esac
40122fi
40123GNM=$ac_cv_path_GNM
40124if test -n "$GNM"; then
40125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40126$as_echo "$GNM" >&6; }
40127else
40128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40129$as_echo "no" >&6; }
40130fi
40131
40132
40133  test -n "$GNM" && break
40134done
40135
40136    else
40137      # If it succeeded, then it was overridden by the user. We will use it
40138      # for the tool.
40139
40140      # First remove it from the list of overridden variables, so we can test
40141      # for unknown variables in the end.
40142      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40143
40144      # Check if we try to supply an empty value
40145      if test "x$GNM" = x; then
40146        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40147$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40148        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40149$as_echo_n "checking for GNM... " >&6; }
40150        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40151$as_echo "disabled" >&6; }
40152      else
40153        # Check if the provided tool contains a complete path.
40154        tool_specified="$GNM"
40155        tool_basename="${tool_specified##*/}"
40156        if test "x$tool_basename" = "x$tool_specified"; then
40157          # A command without a complete path is provided, search $PATH.
40158          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40159$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40160          # Extract the first word of "$tool_basename", so it can be a program name with args.
40161set dummy $tool_basename; ac_word=$2
40162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40163$as_echo_n "checking for $ac_word... " >&6; }
40164if ${ac_cv_path_GNM+:} false; then :
40165  $as_echo_n "(cached) " >&6
40166else
40167  case $GNM in
40168  [\\/]* | ?:[\\/]*)
40169  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40170  ;;
40171  *)
40172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40173for as_dir in $PATH
40174do
40175  IFS=$as_save_IFS
40176  test -z "$as_dir" && as_dir=.
40177    for ac_exec_ext in '' $ac_executable_extensions; do
40178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40179    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40181    break 2
40182  fi
40183done
40184  done
40185IFS=$as_save_IFS
40186
40187  ;;
40188esac
40189fi
40190GNM=$ac_cv_path_GNM
40191if test -n "$GNM"; then
40192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40193$as_echo "$GNM" >&6; }
40194else
40195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40196$as_echo "no" >&6; }
40197fi
40198
40199
40200          if test "x$GNM" = x; then
40201            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40202          fi
40203        else
40204          # Otherwise we believe it is a complete path. Use it as it is.
40205          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40206$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40207          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40208$as_echo_n "checking for GNM... " >&6; }
40209          if test ! -x "$tool_specified"; then
40210            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40211$as_echo "not found" >&6; }
40212            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40213          fi
40214          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40215$as_echo "$tool_specified" >&6; }
40216        fi
40217      fi
40218    fi
40219
40220  fi
40221
40222
40223
40224  # Only process if variable expands to non-empty
40225
40226  if test "x$GNM" != x; then
40227    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40228
40229  # First separate the path from the arguments. This will split at the first
40230  # space.
40231  complete="$GNM"
40232  path="${complete%% *}"
40233  tmp="$complete EOL"
40234  arguments="${tmp#* }"
40235
40236  # Input might be given as Windows format, start by converting to
40237  # unix format.
40238  new_path=`$CYGPATH -u "$path"`
40239
40240  # Now try to locate executable using which
40241  new_path=`$WHICH "$new_path" 2> /dev/null`
40242  # bat and cmd files are not always considered executable in cygwin causing which
40243  # to not find them
40244  if test "x$new_path" = x \
40245      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40246      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40247    new_path=`$CYGPATH -u "$path"`
40248  fi
40249  if test "x$new_path" = x; then
40250    # Oops. Which didn't find the executable.
40251    # The splitting of arguments from the executable at a space might have been incorrect,
40252    # since paths with space are more likely in Windows. Give it another try with the whole
40253    # argument.
40254    path="$complete"
40255    arguments="EOL"
40256    new_path=`$CYGPATH -u "$path"`
40257    new_path=`$WHICH "$new_path" 2> /dev/null`
40258    # bat and cmd files are not always considered executable in cygwin causing which
40259    # to not find them
40260    if test "x$new_path" = x \
40261        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40262        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40263      new_path=`$CYGPATH -u "$path"`
40264    fi
40265    if test "x$new_path" = x; then
40266      # It's still not found. Now this is an unrecoverable error.
40267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40268$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40269      has_space=`$ECHO "$complete" | $GREP " "`
40270      if test "x$has_space" != x; then
40271        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40272$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40273      fi
40274      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40275    fi
40276  fi
40277
40278  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40279  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40280  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40281  # "foo.exe" is OK but "foo" is an error.
40282  #
40283  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40284  # It is also a way to make sure we got the proper file name for the real test later on.
40285  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40286  if test "x$test_shortpath" = x; then
40287    # Short path failed, file does not exist as specified.
40288    # Try adding .exe or .cmd
40289    if test -f "${new_path}.exe"; then
40290      input_to_shortpath="${new_path}.exe"
40291    elif test -f "${new_path}.cmd"; then
40292      input_to_shortpath="${new_path}.cmd"
40293    else
40294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40295$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40296      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40297$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40298      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40299    fi
40300  else
40301    input_to_shortpath="$new_path"
40302  fi
40303
40304  # Call helper function which possibly converts this using DOS-style short mode.
40305  # If so, the updated path is stored in $new_path.
40306  new_path="$input_to_shortpath"
40307
40308  input_path="$input_to_shortpath"
40309  # Check if we need to convert this using DOS-style short mode. If the path
40310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40311  # take no chances and rewrite it.
40312  # Note: m4 eats our [], so we need to use [ and ] instead.
40313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40314  if test "x$has_forbidden_chars" != x; then
40315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40319      # Going to short mode and back again did indeed matter. Since short mode is
40320      # case insensitive, let's make it lowercase to improve readability.
40321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40322      # Now convert it back to Unix-style (cygpath)
40323      input_path=`$CYGPATH -u "$shortmode_path"`
40324      new_path="$input_path"
40325    fi
40326  fi
40327
40328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40329  if test "x$test_cygdrive_prefix" = x; then
40330    # As a simple fix, exclude /usr/bin since it's not a real path.
40331    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40333      # a path prefixed by /cygdrive for fixpath to work.
40334      new_path="$CYGWIN_ROOT_PATH$input_path"
40335    fi
40336  fi
40337
40338  # remove trailing .exe if any
40339  new_path="${new_path/%.exe/}"
40340
40341    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40342
40343  # First separate the path from the arguments. This will split at the first
40344  # space.
40345  complete="$GNM"
40346  path="${complete%% *}"
40347  tmp="$complete EOL"
40348  arguments="${tmp#* }"
40349
40350  # Input might be given as Windows format, start by converting to
40351  # unix format.
40352  new_path="$path"
40353
40354  windows_path="$new_path"
40355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40356    unix_path=`$CYGPATH -u "$windows_path"`
40357    new_path="$unix_path"
40358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40360    new_path="$unix_path"
40361  fi
40362
40363
40364  # Now try to locate executable using which
40365  new_path=`$WHICH "$new_path" 2> /dev/null`
40366
40367  if test "x$new_path" = x; then
40368    # Oops. Which didn't find the executable.
40369    # The splitting of arguments from the executable at a space might have been incorrect,
40370    # since paths with space are more likely in Windows. Give it another try with the whole
40371    # argument.
40372    path="$complete"
40373    arguments="EOL"
40374    new_path="$path"
40375
40376  windows_path="$new_path"
40377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40378    unix_path=`$CYGPATH -u "$windows_path"`
40379    new_path="$unix_path"
40380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40382    new_path="$unix_path"
40383  fi
40384
40385
40386    new_path=`$WHICH "$new_path" 2> /dev/null`
40387    # bat and cmd files are not always considered executable in MSYS causing which
40388    # to not find them
40389    if test "x$new_path" = x \
40390        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40391        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40392      new_path="$path"
40393
40394  windows_path="$new_path"
40395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40396    unix_path=`$CYGPATH -u "$windows_path"`
40397    new_path="$unix_path"
40398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40400    new_path="$unix_path"
40401  fi
40402
40403    fi
40404
40405    if test "x$new_path" = x; then
40406      # It's still not found. Now this is an unrecoverable error.
40407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40408$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40409      has_space=`$ECHO "$complete" | $GREP " "`
40410      if test "x$has_space" != x; then
40411        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40412$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40413      fi
40414      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40415    fi
40416  fi
40417
40418  # Now new_path has a complete unix path to the binary
40419  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40420    # Keep paths in /bin as-is, but remove trailing .exe if any
40421    new_path="${new_path/%.exe/}"
40422    # Do not save /bin paths to all_fixpath_prefixes!
40423  else
40424    # Not in mixed or Windows style, start by that.
40425    new_path=`cmd //c echo $new_path`
40426
40427  input_path="$new_path"
40428  # Check if we need to convert this using DOS-style short mode. If the path
40429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40430  # take no chances and rewrite it.
40431  # Note: m4 eats our [], so we need to use [ and ] instead.
40432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40433  if test "x$has_forbidden_chars" != x; then
40434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40436  fi
40437
40438    # Output is in $new_path
40439
40440  windows_path="$new_path"
40441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40442    unix_path=`$CYGPATH -u "$windows_path"`
40443    new_path="$unix_path"
40444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40446    new_path="$unix_path"
40447  fi
40448
40449    # remove trailing .exe if any
40450    new_path="${new_path/%.exe/}"
40451
40452    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40453    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40454  fi
40455
40456    else
40457      # We're on a unix platform. Hooray! :)
40458      # First separate the path from the arguments. This will split at the first
40459      # space.
40460      complete="$GNM"
40461      path="${complete%% *}"
40462      tmp="$complete EOL"
40463      arguments="${tmp#* }"
40464
40465      # Cannot rely on the command "which" here since it doesn't always work.
40466      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40467      if test -z "$is_absolute_path"; then
40468        # Path to executable is not absolute. Find it.
40469        IFS_save="$IFS"
40470        IFS=:
40471        for p in $PATH; do
40472          if test -f "$p/$path" && test -x "$p/$path"; then
40473            new_path="$p/$path"
40474            break
40475          fi
40476        done
40477        IFS="$IFS_save"
40478      else
40479        # This is an absolute path, we can use it without further modifications.
40480        new_path="$path"
40481      fi
40482
40483      if test "x$new_path" = x; then
40484        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40485$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40486        has_space=`$ECHO "$complete" | $GREP " "`
40487        if test "x$has_space" != x; then
40488          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40489$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40490        fi
40491        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40492      fi
40493    fi
40494
40495    # Now join together the path and the arguments once again
40496    if test "x$arguments" != xEOL; then
40497      new_complete="$new_path ${arguments% *}"
40498    else
40499      new_complete="$new_path"
40500    fi
40501
40502    if test "x$complete" != "x$new_complete"; then
40503      GNM="$new_complete"
40504      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40505$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40506    fi
40507  fi
40508
40509  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40510    # FIXME: we should unify this with the solaris case above.
40511
40512
40513  # Publish this variable in the help.
40514
40515
40516  if [ -z "${STRIP+x}" ]; then
40517    # The variable is not set by user, try to locate tool using the code snippet
40518    if test -n "$ac_tool_prefix"; then
40519  for ac_prog in strip
40520  do
40521    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40522set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40524$as_echo_n "checking for $ac_word... " >&6; }
40525if ${ac_cv_prog_STRIP+:} false; then :
40526  $as_echo_n "(cached) " >&6
40527else
40528  if test -n "$STRIP"; then
40529  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40530else
40531as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40532for as_dir in $PATH
40533do
40534  IFS=$as_save_IFS
40535  test -z "$as_dir" && as_dir=.
40536    for ac_exec_ext in '' $ac_executable_extensions; do
40537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40538    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40540    break 2
40541  fi
40542done
40543  done
40544IFS=$as_save_IFS
40545
40546fi
40547fi
40548STRIP=$ac_cv_prog_STRIP
40549if test -n "$STRIP"; then
40550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40551$as_echo "$STRIP" >&6; }
40552else
40553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40554$as_echo "no" >&6; }
40555fi
40556
40557
40558    test -n "$STRIP" && break
40559  done
40560fi
40561if test -z "$STRIP"; then
40562  ac_ct_STRIP=$STRIP
40563  for ac_prog in strip
40564do
40565  # Extract the first word of "$ac_prog", so it can be a program name with args.
40566set dummy $ac_prog; ac_word=$2
40567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40568$as_echo_n "checking for $ac_word... " >&6; }
40569if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40570  $as_echo_n "(cached) " >&6
40571else
40572  if test -n "$ac_ct_STRIP"; then
40573  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40574else
40575as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40576for as_dir in $PATH
40577do
40578  IFS=$as_save_IFS
40579  test -z "$as_dir" && as_dir=.
40580    for ac_exec_ext in '' $ac_executable_extensions; do
40581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40582    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40584    break 2
40585  fi
40586done
40587  done
40588IFS=$as_save_IFS
40589
40590fi
40591fi
40592ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40593if test -n "$ac_ct_STRIP"; then
40594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40595$as_echo "$ac_ct_STRIP" >&6; }
40596else
40597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40598$as_echo "no" >&6; }
40599fi
40600
40601
40602  test -n "$ac_ct_STRIP" && break
40603done
40604
40605  if test "x$ac_ct_STRIP" = x; then
40606    STRIP=""
40607  else
40608    case $cross_compiling:$ac_tool_warned in
40609yes:)
40610{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40611$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40612ac_tool_warned=yes ;;
40613esac
40614    STRIP=$ac_ct_STRIP
40615  fi
40616fi
40617
40618  else
40619    # The variable is set, but is it from the command line or the environment?
40620
40621    # Try to remove the string !STRIP! from our list.
40622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40624      # If it failed, the variable was not from the command line. Ignore it,
40625      # but warn the user (except for BASH, which is always set by the calling BASH).
40626      if test "xSTRIP" != xBASH; then
40627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40628$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40629      fi
40630      # Try to locate tool using the code snippet
40631      if test -n "$ac_tool_prefix"; then
40632  for ac_prog in strip
40633  do
40634    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40635set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40637$as_echo_n "checking for $ac_word... " >&6; }
40638if ${ac_cv_prog_STRIP+:} false; then :
40639  $as_echo_n "(cached) " >&6
40640else
40641  if test -n "$STRIP"; then
40642  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40643else
40644as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40645for as_dir in $PATH
40646do
40647  IFS=$as_save_IFS
40648  test -z "$as_dir" && as_dir=.
40649    for ac_exec_ext in '' $ac_executable_extensions; do
40650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40651    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40653    break 2
40654  fi
40655done
40656  done
40657IFS=$as_save_IFS
40658
40659fi
40660fi
40661STRIP=$ac_cv_prog_STRIP
40662if test -n "$STRIP"; then
40663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40664$as_echo "$STRIP" >&6; }
40665else
40666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40667$as_echo "no" >&6; }
40668fi
40669
40670
40671    test -n "$STRIP" && break
40672  done
40673fi
40674if test -z "$STRIP"; then
40675  ac_ct_STRIP=$STRIP
40676  for ac_prog in strip
40677do
40678  # Extract the first word of "$ac_prog", so it can be a program name with args.
40679set dummy $ac_prog; ac_word=$2
40680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40681$as_echo_n "checking for $ac_word... " >&6; }
40682if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40683  $as_echo_n "(cached) " >&6
40684else
40685  if test -n "$ac_ct_STRIP"; then
40686  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40687else
40688as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40689for as_dir in $PATH
40690do
40691  IFS=$as_save_IFS
40692  test -z "$as_dir" && as_dir=.
40693    for ac_exec_ext in '' $ac_executable_extensions; do
40694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40695    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40697    break 2
40698  fi
40699done
40700  done
40701IFS=$as_save_IFS
40702
40703fi
40704fi
40705ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40706if test -n "$ac_ct_STRIP"; then
40707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40708$as_echo "$ac_ct_STRIP" >&6; }
40709else
40710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40711$as_echo "no" >&6; }
40712fi
40713
40714
40715  test -n "$ac_ct_STRIP" && break
40716done
40717
40718  if test "x$ac_ct_STRIP" = x; then
40719    STRIP=""
40720  else
40721    case $cross_compiling:$ac_tool_warned in
40722yes:)
40723{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40724$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40725ac_tool_warned=yes ;;
40726esac
40727    STRIP=$ac_ct_STRIP
40728  fi
40729fi
40730
40731    else
40732      # If it succeeded, then it was overridden by the user. We will use it
40733      # for the tool.
40734
40735      # First remove it from the list of overridden variables, so we can test
40736      # for unknown variables in the end.
40737      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40738
40739      # Check if we try to supply an empty value
40740      if test "x$STRIP" = x; then
40741        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40742$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40743        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40744$as_echo_n "checking for STRIP... " >&6; }
40745        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40746$as_echo "disabled" >&6; }
40747      else
40748        # Check if the provided tool contains a complete path.
40749        tool_specified="$STRIP"
40750        tool_basename="${tool_specified##*/}"
40751        if test "x$tool_basename" = "x$tool_specified"; then
40752          # A command without a complete path is provided, search $PATH.
40753          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40754$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40755          # Extract the first word of "$tool_basename", so it can be a program name with args.
40756set dummy $tool_basename; ac_word=$2
40757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40758$as_echo_n "checking for $ac_word... " >&6; }
40759if ${ac_cv_path_STRIP+:} false; then :
40760  $as_echo_n "(cached) " >&6
40761else
40762  case $STRIP in
40763  [\\/]* | ?:[\\/]*)
40764  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40765  ;;
40766  *)
40767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40768for as_dir in $PATH
40769do
40770  IFS=$as_save_IFS
40771  test -z "$as_dir" && as_dir=.
40772    for ac_exec_ext in '' $ac_executable_extensions; do
40773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40774    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40776    break 2
40777  fi
40778done
40779  done
40780IFS=$as_save_IFS
40781
40782  ;;
40783esac
40784fi
40785STRIP=$ac_cv_path_STRIP
40786if test -n "$STRIP"; then
40787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40788$as_echo "$STRIP" >&6; }
40789else
40790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40791$as_echo "no" >&6; }
40792fi
40793
40794
40795          if test "x$STRIP" = x; then
40796            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40797          fi
40798        else
40799          # Otherwise we believe it is a complete path. Use it as it is.
40800          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40801$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40802          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40803$as_echo_n "checking for STRIP... " >&6; }
40804          if test ! -x "$tool_specified"; then
40805            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40806$as_echo "not found" >&6; }
40807            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40808          fi
40809          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40810$as_echo "$tool_specified" >&6; }
40811        fi
40812      fi
40813    fi
40814
40815  fi
40816
40817
40818
40819  # Only process if variable expands to non-empty
40820
40821  if test "x$STRIP" != x; then
40822    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40823
40824  # First separate the path from the arguments. This will split at the first
40825  # space.
40826  complete="$STRIP"
40827  path="${complete%% *}"
40828  tmp="$complete EOL"
40829  arguments="${tmp#* }"
40830
40831  # Input might be given as Windows format, start by converting to
40832  # unix format.
40833  new_path=`$CYGPATH -u "$path"`
40834
40835  # Now try to locate executable using which
40836  new_path=`$WHICH "$new_path" 2> /dev/null`
40837  # bat and cmd files are not always considered executable in cygwin causing which
40838  # to not find them
40839  if test "x$new_path" = x \
40840      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40841      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40842    new_path=`$CYGPATH -u "$path"`
40843  fi
40844  if test "x$new_path" = x; then
40845    # Oops. Which didn't find the executable.
40846    # The splitting of arguments from the executable at a space might have been incorrect,
40847    # since paths with space are more likely in Windows. Give it another try with the whole
40848    # argument.
40849    path="$complete"
40850    arguments="EOL"
40851    new_path=`$CYGPATH -u "$path"`
40852    new_path=`$WHICH "$new_path" 2> /dev/null`
40853    # bat and cmd files are not always considered executable in cygwin causing which
40854    # to not find them
40855    if test "x$new_path" = x \
40856        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40857        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40858      new_path=`$CYGPATH -u "$path"`
40859    fi
40860    if test "x$new_path" = x; then
40861      # It's still not found. Now this is an unrecoverable error.
40862      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40863$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40864      has_space=`$ECHO "$complete" | $GREP " "`
40865      if test "x$has_space" != x; then
40866        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40867$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40868      fi
40869      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40870    fi
40871  fi
40872
40873  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40874  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40875  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40876  # "foo.exe" is OK but "foo" is an error.
40877  #
40878  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40879  # It is also a way to make sure we got the proper file name for the real test later on.
40880  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40881  if test "x$test_shortpath" = x; then
40882    # Short path failed, file does not exist as specified.
40883    # Try adding .exe or .cmd
40884    if test -f "${new_path}.exe"; then
40885      input_to_shortpath="${new_path}.exe"
40886    elif test -f "${new_path}.cmd"; then
40887      input_to_shortpath="${new_path}.cmd"
40888    else
40889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40890$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40891      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40892$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40893      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40894    fi
40895  else
40896    input_to_shortpath="$new_path"
40897  fi
40898
40899  # Call helper function which possibly converts this using DOS-style short mode.
40900  # If so, the updated path is stored in $new_path.
40901  new_path="$input_to_shortpath"
40902
40903  input_path="$input_to_shortpath"
40904  # Check if we need to convert this using DOS-style short mode. If the path
40905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40906  # take no chances and rewrite it.
40907  # Note: m4 eats our [], so we need to use [ and ] instead.
40908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40909  if test "x$has_forbidden_chars" != x; then
40910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40911    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40912    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40913    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40914      # Going to short mode and back again did indeed matter. Since short mode is
40915      # case insensitive, let's make it lowercase to improve readability.
40916      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40917      # Now convert it back to Unix-style (cygpath)
40918      input_path=`$CYGPATH -u "$shortmode_path"`
40919      new_path="$input_path"
40920    fi
40921  fi
40922
40923  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40924  if test "x$test_cygdrive_prefix" = x; then
40925    # As a simple fix, exclude /usr/bin since it's not a real path.
40926    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40927      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40928      # a path prefixed by /cygdrive for fixpath to work.
40929      new_path="$CYGWIN_ROOT_PATH$input_path"
40930    fi
40931  fi
40932
40933  # remove trailing .exe if any
40934  new_path="${new_path/%.exe/}"
40935
40936    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40937
40938  # First separate the path from the arguments. This will split at the first
40939  # space.
40940  complete="$STRIP"
40941  path="${complete%% *}"
40942  tmp="$complete EOL"
40943  arguments="${tmp#* }"
40944
40945  # Input might be given as Windows format, start by converting to
40946  # unix format.
40947  new_path="$path"
40948
40949  windows_path="$new_path"
40950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40951    unix_path=`$CYGPATH -u "$windows_path"`
40952    new_path="$unix_path"
40953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40955    new_path="$unix_path"
40956  fi
40957
40958
40959  # Now try to locate executable using which
40960  new_path=`$WHICH "$new_path" 2> /dev/null`
40961
40962  if test "x$new_path" = x; then
40963    # Oops. Which didn't find the executable.
40964    # The splitting of arguments from the executable at a space might have been incorrect,
40965    # since paths with space are more likely in Windows. Give it another try with the whole
40966    # argument.
40967    path="$complete"
40968    arguments="EOL"
40969    new_path="$path"
40970
40971  windows_path="$new_path"
40972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40973    unix_path=`$CYGPATH -u "$windows_path"`
40974    new_path="$unix_path"
40975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40977    new_path="$unix_path"
40978  fi
40979
40980
40981    new_path=`$WHICH "$new_path" 2> /dev/null`
40982    # bat and cmd files are not always considered executable in MSYS causing which
40983    # to not find them
40984    if test "x$new_path" = x \
40985        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40986        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40987      new_path="$path"
40988
40989  windows_path="$new_path"
40990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40991    unix_path=`$CYGPATH -u "$windows_path"`
40992    new_path="$unix_path"
40993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40995    new_path="$unix_path"
40996  fi
40997
40998    fi
40999
41000    if test "x$new_path" = x; then
41001      # It's still not found. Now this is an unrecoverable error.
41002      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41003$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41004      has_space=`$ECHO "$complete" | $GREP " "`
41005      if test "x$has_space" != x; then
41006        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41007$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41008      fi
41009      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41010    fi
41011  fi
41012
41013  # Now new_path has a complete unix path to the binary
41014  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41015    # Keep paths in /bin as-is, but remove trailing .exe if any
41016    new_path="${new_path/%.exe/}"
41017    # Do not save /bin paths to all_fixpath_prefixes!
41018  else
41019    # Not in mixed or Windows style, start by that.
41020    new_path=`cmd //c echo $new_path`
41021
41022  input_path="$new_path"
41023  # Check if we need to convert this using DOS-style short mode. If the path
41024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41025  # take no chances and rewrite it.
41026  # Note: m4 eats our [], so we need to use [ and ] instead.
41027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41028  if test "x$has_forbidden_chars" != x; then
41029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41030    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41031  fi
41032
41033    # Output is in $new_path
41034
41035  windows_path="$new_path"
41036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41037    unix_path=`$CYGPATH -u "$windows_path"`
41038    new_path="$unix_path"
41039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41041    new_path="$unix_path"
41042  fi
41043
41044    # remove trailing .exe if any
41045    new_path="${new_path/%.exe/}"
41046
41047    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41048    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41049  fi
41050
41051    else
41052      # We're on a unix platform. Hooray! :)
41053      # First separate the path from the arguments. This will split at the first
41054      # space.
41055      complete="$STRIP"
41056      path="${complete%% *}"
41057      tmp="$complete EOL"
41058      arguments="${tmp#* }"
41059
41060      # Cannot rely on the command "which" here since it doesn't always work.
41061      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41062      if test -z "$is_absolute_path"; then
41063        # Path to executable is not absolute. Find it.
41064        IFS_save="$IFS"
41065        IFS=:
41066        for p in $PATH; do
41067          if test -f "$p/$path" && test -x "$p/$path"; then
41068            new_path="$p/$path"
41069            break
41070          fi
41071        done
41072        IFS="$IFS_save"
41073      else
41074        # This is an absolute path, we can use it without further modifications.
41075        new_path="$path"
41076      fi
41077
41078      if test "x$new_path" = x; then
41079        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41080$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41081        has_space=`$ECHO "$complete" | $GREP " "`
41082        if test "x$has_space" != x; then
41083          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41084$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41085        fi
41086        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41087      fi
41088    fi
41089
41090    # Now join together the path and the arguments once again
41091    if test "x$arguments" != xEOL; then
41092      new_complete="$new_path ${arguments% *}"
41093    else
41094      new_complete="$new_path"
41095    fi
41096
41097    if test "x$complete" != "x$new_complete"; then
41098      STRIP="$new_complete"
41099      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41100$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41101    fi
41102  fi
41103
41104    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41105
41106
41107  # Publish this variable in the help.
41108
41109
41110  if [ -z "${NM+x}" ]; then
41111    # The variable is not set by user, try to locate tool using the code snippet
41112    if test -n "$ac_tool_prefix"; then
41113  for ac_prog in nm gcc-nm
41114  do
41115    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41116set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41118$as_echo_n "checking for $ac_word... " >&6; }
41119if ${ac_cv_prog_NM+:} false; then :
41120  $as_echo_n "(cached) " >&6
41121else
41122  if test -n "$NM"; then
41123  ac_cv_prog_NM="$NM" # Let the user override the test.
41124else
41125as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41126for as_dir in $PATH
41127do
41128  IFS=$as_save_IFS
41129  test -z "$as_dir" && as_dir=.
41130    for ac_exec_ext in '' $ac_executable_extensions; do
41131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41132    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41134    break 2
41135  fi
41136done
41137  done
41138IFS=$as_save_IFS
41139
41140fi
41141fi
41142NM=$ac_cv_prog_NM
41143if test -n "$NM"; then
41144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41145$as_echo "$NM" >&6; }
41146else
41147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41148$as_echo "no" >&6; }
41149fi
41150
41151
41152    test -n "$NM" && break
41153  done
41154fi
41155if test -z "$NM"; then
41156  ac_ct_NM=$NM
41157  for ac_prog in nm gcc-nm
41158do
41159  # Extract the first word of "$ac_prog", so it can be a program name with args.
41160set dummy $ac_prog; ac_word=$2
41161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41162$as_echo_n "checking for $ac_word... " >&6; }
41163if ${ac_cv_prog_ac_ct_NM+:} false; then :
41164  $as_echo_n "(cached) " >&6
41165else
41166  if test -n "$ac_ct_NM"; then
41167  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41168else
41169as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41170for as_dir in $PATH
41171do
41172  IFS=$as_save_IFS
41173  test -z "$as_dir" && as_dir=.
41174    for ac_exec_ext in '' $ac_executable_extensions; do
41175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41176    ac_cv_prog_ac_ct_NM="$ac_prog"
41177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41178    break 2
41179  fi
41180done
41181  done
41182IFS=$as_save_IFS
41183
41184fi
41185fi
41186ac_ct_NM=$ac_cv_prog_ac_ct_NM
41187if test -n "$ac_ct_NM"; then
41188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41189$as_echo "$ac_ct_NM" >&6; }
41190else
41191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41192$as_echo "no" >&6; }
41193fi
41194
41195
41196  test -n "$ac_ct_NM" && break
41197done
41198
41199  if test "x$ac_ct_NM" = x; then
41200    NM=""
41201  else
41202    case $cross_compiling:$ac_tool_warned in
41203yes:)
41204{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41205$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41206ac_tool_warned=yes ;;
41207esac
41208    NM=$ac_ct_NM
41209  fi
41210fi
41211
41212  else
41213    # The variable is set, but is it from the command line or the environment?
41214
41215    # Try to remove the string !NM! from our list.
41216    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41217    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41218      # If it failed, the variable was not from the command line. Ignore it,
41219      # but warn the user (except for BASH, which is always set by the calling BASH).
41220      if test "xNM" != xBASH; then
41221        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41222$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41223      fi
41224      # Try to locate tool using the code snippet
41225      if test -n "$ac_tool_prefix"; then
41226  for ac_prog in nm gcc-nm
41227  do
41228    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41229set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41231$as_echo_n "checking for $ac_word... " >&6; }
41232if ${ac_cv_prog_NM+:} false; then :
41233  $as_echo_n "(cached) " >&6
41234else
41235  if test -n "$NM"; then
41236  ac_cv_prog_NM="$NM" # Let the user override the test.
41237else
41238as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41239for as_dir in $PATH
41240do
41241  IFS=$as_save_IFS
41242  test -z "$as_dir" && as_dir=.
41243    for ac_exec_ext in '' $ac_executable_extensions; do
41244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41245    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41247    break 2
41248  fi
41249done
41250  done
41251IFS=$as_save_IFS
41252
41253fi
41254fi
41255NM=$ac_cv_prog_NM
41256if test -n "$NM"; then
41257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41258$as_echo "$NM" >&6; }
41259else
41260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41261$as_echo "no" >&6; }
41262fi
41263
41264
41265    test -n "$NM" && break
41266  done
41267fi
41268if test -z "$NM"; then
41269  ac_ct_NM=$NM
41270  for ac_prog in nm gcc-nm
41271do
41272  # Extract the first word of "$ac_prog", so it can be a program name with args.
41273set dummy $ac_prog; ac_word=$2
41274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41275$as_echo_n "checking for $ac_word... " >&6; }
41276if ${ac_cv_prog_ac_ct_NM+:} false; then :
41277  $as_echo_n "(cached) " >&6
41278else
41279  if test -n "$ac_ct_NM"; then
41280  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41281else
41282as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41283for as_dir in $PATH
41284do
41285  IFS=$as_save_IFS
41286  test -z "$as_dir" && as_dir=.
41287    for ac_exec_ext in '' $ac_executable_extensions; do
41288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41289    ac_cv_prog_ac_ct_NM="$ac_prog"
41290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41291    break 2
41292  fi
41293done
41294  done
41295IFS=$as_save_IFS
41296
41297fi
41298fi
41299ac_ct_NM=$ac_cv_prog_ac_ct_NM
41300if test -n "$ac_ct_NM"; then
41301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41302$as_echo "$ac_ct_NM" >&6; }
41303else
41304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41305$as_echo "no" >&6; }
41306fi
41307
41308
41309  test -n "$ac_ct_NM" && break
41310done
41311
41312  if test "x$ac_ct_NM" = x; then
41313    NM=""
41314  else
41315    case $cross_compiling:$ac_tool_warned in
41316yes:)
41317{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41318$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41319ac_tool_warned=yes ;;
41320esac
41321    NM=$ac_ct_NM
41322  fi
41323fi
41324
41325    else
41326      # If it succeeded, then it was overridden by the user. We will use it
41327      # for the tool.
41328
41329      # First remove it from the list of overridden variables, so we can test
41330      # for unknown variables in the end.
41331      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41332
41333      # Check if we try to supply an empty value
41334      if test "x$NM" = x; then
41335        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41336$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41337        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41338$as_echo_n "checking for NM... " >&6; }
41339        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41340$as_echo "disabled" >&6; }
41341      else
41342        # Check if the provided tool contains a complete path.
41343        tool_specified="$NM"
41344        tool_basename="${tool_specified##*/}"
41345        if test "x$tool_basename" = "x$tool_specified"; then
41346          # A command without a complete path is provided, search $PATH.
41347          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41348$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41349          # Extract the first word of "$tool_basename", so it can be a program name with args.
41350set dummy $tool_basename; ac_word=$2
41351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41352$as_echo_n "checking for $ac_word... " >&6; }
41353if ${ac_cv_path_NM+:} false; then :
41354  $as_echo_n "(cached) " >&6
41355else
41356  case $NM in
41357  [\\/]* | ?:[\\/]*)
41358  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41359  ;;
41360  *)
41361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41362for as_dir in $PATH
41363do
41364  IFS=$as_save_IFS
41365  test -z "$as_dir" && as_dir=.
41366    for ac_exec_ext in '' $ac_executable_extensions; do
41367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41368    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41370    break 2
41371  fi
41372done
41373  done
41374IFS=$as_save_IFS
41375
41376  ;;
41377esac
41378fi
41379NM=$ac_cv_path_NM
41380if test -n "$NM"; then
41381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41382$as_echo "$NM" >&6; }
41383else
41384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41385$as_echo "no" >&6; }
41386fi
41387
41388
41389          if test "x$NM" = x; then
41390            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41391          fi
41392        else
41393          # Otherwise we believe it is a complete path. Use it as it is.
41394          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41395$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41396          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41397$as_echo_n "checking for NM... " >&6; }
41398          if test ! -x "$tool_specified"; then
41399            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41400$as_echo "not found" >&6; }
41401            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41402          fi
41403          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41404$as_echo "$tool_specified" >&6; }
41405        fi
41406      fi
41407    fi
41408
41409  fi
41410
41411
41412    else
41413
41414
41415  # Publish this variable in the help.
41416
41417
41418  if [ -z "${NM+x}" ]; then
41419    # The variable is not set by user, try to locate tool using the code snippet
41420    if test -n "$ac_tool_prefix"; then
41421  for ac_prog in nm
41422  do
41423    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41424set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41426$as_echo_n "checking for $ac_word... " >&6; }
41427if ${ac_cv_prog_NM+:} false; then :
41428  $as_echo_n "(cached) " >&6
41429else
41430  if test -n "$NM"; then
41431  ac_cv_prog_NM="$NM" # Let the user override the test.
41432else
41433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41434for as_dir in $PATH
41435do
41436  IFS=$as_save_IFS
41437  test -z "$as_dir" && as_dir=.
41438    for ac_exec_ext in '' $ac_executable_extensions; do
41439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41440    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41442    break 2
41443  fi
41444done
41445  done
41446IFS=$as_save_IFS
41447
41448fi
41449fi
41450NM=$ac_cv_prog_NM
41451if test -n "$NM"; then
41452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41453$as_echo "$NM" >&6; }
41454else
41455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41456$as_echo "no" >&6; }
41457fi
41458
41459
41460    test -n "$NM" && break
41461  done
41462fi
41463if test -z "$NM"; then
41464  ac_ct_NM=$NM
41465  for ac_prog in nm
41466do
41467  # Extract the first word of "$ac_prog", so it can be a program name with args.
41468set dummy $ac_prog; ac_word=$2
41469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41470$as_echo_n "checking for $ac_word... " >&6; }
41471if ${ac_cv_prog_ac_ct_NM+:} false; then :
41472  $as_echo_n "(cached) " >&6
41473else
41474  if test -n "$ac_ct_NM"; then
41475  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41476else
41477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41478for as_dir in $PATH
41479do
41480  IFS=$as_save_IFS
41481  test -z "$as_dir" && as_dir=.
41482    for ac_exec_ext in '' $ac_executable_extensions; do
41483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41484    ac_cv_prog_ac_ct_NM="$ac_prog"
41485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41486    break 2
41487  fi
41488done
41489  done
41490IFS=$as_save_IFS
41491
41492fi
41493fi
41494ac_ct_NM=$ac_cv_prog_ac_ct_NM
41495if test -n "$ac_ct_NM"; then
41496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41497$as_echo "$ac_ct_NM" >&6; }
41498else
41499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41500$as_echo "no" >&6; }
41501fi
41502
41503
41504  test -n "$ac_ct_NM" && break
41505done
41506
41507  if test "x$ac_ct_NM" = x; then
41508    NM=""
41509  else
41510    case $cross_compiling:$ac_tool_warned in
41511yes:)
41512{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41513$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41514ac_tool_warned=yes ;;
41515esac
41516    NM=$ac_ct_NM
41517  fi
41518fi
41519
41520  else
41521    # The variable is set, but is it from the command line or the environment?
41522
41523    # Try to remove the string !NM! from our list.
41524    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41525    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41526      # If it failed, the variable was not from the command line. Ignore it,
41527      # but warn the user (except for BASH, which is always set by the calling BASH).
41528      if test "xNM" != xBASH; then
41529        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41530$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41531      fi
41532      # Try to locate tool using the code snippet
41533      if test -n "$ac_tool_prefix"; then
41534  for ac_prog in nm
41535  do
41536    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41537set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41539$as_echo_n "checking for $ac_word... " >&6; }
41540if ${ac_cv_prog_NM+:} false; then :
41541  $as_echo_n "(cached) " >&6
41542else
41543  if test -n "$NM"; then
41544  ac_cv_prog_NM="$NM" # Let the user override the test.
41545else
41546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41547for as_dir in $PATH
41548do
41549  IFS=$as_save_IFS
41550  test -z "$as_dir" && as_dir=.
41551    for ac_exec_ext in '' $ac_executable_extensions; do
41552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41553    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41555    break 2
41556  fi
41557done
41558  done
41559IFS=$as_save_IFS
41560
41561fi
41562fi
41563NM=$ac_cv_prog_NM
41564if test -n "$NM"; then
41565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41566$as_echo "$NM" >&6; }
41567else
41568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41569$as_echo "no" >&6; }
41570fi
41571
41572
41573    test -n "$NM" && break
41574  done
41575fi
41576if test -z "$NM"; then
41577  ac_ct_NM=$NM
41578  for ac_prog in nm
41579do
41580  # Extract the first word of "$ac_prog", so it can be a program name with args.
41581set dummy $ac_prog; ac_word=$2
41582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41583$as_echo_n "checking for $ac_word... " >&6; }
41584if ${ac_cv_prog_ac_ct_NM+:} false; then :
41585  $as_echo_n "(cached) " >&6
41586else
41587  if test -n "$ac_ct_NM"; then
41588  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41589else
41590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41591for as_dir in $PATH
41592do
41593  IFS=$as_save_IFS
41594  test -z "$as_dir" && as_dir=.
41595    for ac_exec_ext in '' $ac_executable_extensions; do
41596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41597    ac_cv_prog_ac_ct_NM="$ac_prog"
41598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41599    break 2
41600  fi
41601done
41602  done
41603IFS=$as_save_IFS
41604
41605fi
41606fi
41607ac_ct_NM=$ac_cv_prog_ac_ct_NM
41608if test -n "$ac_ct_NM"; then
41609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41610$as_echo "$ac_ct_NM" >&6; }
41611else
41612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41613$as_echo "no" >&6; }
41614fi
41615
41616
41617  test -n "$ac_ct_NM" && break
41618done
41619
41620  if test "x$ac_ct_NM" = x; then
41621    NM=""
41622  else
41623    case $cross_compiling:$ac_tool_warned in
41624yes:)
41625{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41626$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41627ac_tool_warned=yes ;;
41628esac
41629    NM=$ac_ct_NM
41630  fi
41631fi
41632
41633    else
41634      # If it succeeded, then it was overridden by the user. We will use it
41635      # for the tool.
41636
41637      # First remove it from the list of overridden variables, so we can test
41638      # for unknown variables in the end.
41639      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41640
41641      # Check if we try to supply an empty value
41642      if test "x$NM" = x; then
41643        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41644$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41645        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41646$as_echo_n "checking for NM... " >&6; }
41647        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41648$as_echo "disabled" >&6; }
41649      else
41650        # Check if the provided tool contains a complete path.
41651        tool_specified="$NM"
41652        tool_basename="${tool_specified##*/}"
41653        if test "x$tool_basename" = "x$tool_specified"; then
41654          # A command without a complete path is provided, search $PATH.
41655          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41656$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41657          # Extract the first word of "$tool_basename", so it can be a program name with args.
41658set dummy $tool_basename; ac_word=$2
41659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41660$as_echo_n "checking for $ac_word... " >&6; }
41661if ${ac_cv_path_NM+:} false; then :
41662  $as_echo_n "(cached) " >&6
41663else
41664  case $NM in
41665  [\\/]* | ?:[\\/]*)
41666  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41667  ;;
41668  *)
41669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41670for as_dir in $PATH
41671do
41672  IFS=$as_save_IFS
41673  test -z "$as_dir" && as_dir=.
41674    for ac_exec_ext in '' $ac_executable_extensions; do
41675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41676    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41678    break 2
41679  fi
41680done
41681  done
41682IFS=$as_save_IFS
41683
41684  ;;
41685esac
41686fi
41687NM=$ac_cv_path_NM
41688if test -n "$NM"; then
41689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41690$as_echo "$NM" >&6; }
41691else
41692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41693$as_echo "no" >&6; }
41694fi
41695
41696
41697          if test "x$NM" = x; then
41698            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41699          fi
41700        else
41701          # Otherwise we believe it is a complete path. Use it as it is.
41702          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41703$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41704          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41705$as_echo_n "checking for NM... " >&6; }
41706          if test ! -x "$tool_specified"; then
41707            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41708$as_echo "not found" >&6; }
41709            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41710          fi
41711          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41712$as_echo "$tool_specified" >&6; }
41713        fi
41714      fi
41715    fi
41716
41717  fi
41718
41719
41720    fi
41721
41722  # Only process if variable expands to non-empty
41723
41724  if test "x$NM" != x; then
41725    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41726
41727  # First separate the path from the arguments. This will split at the first
41728  # space.
41729  complete="$NM"
41730  path="${complete%% *}"
41731  tmp="$complete EOL"
41732  arguments="${tmp#* }"
41733
41734  # Input might be given as Windows format, start by converting to
41735  # unix format.
41736  new_path=`$CYGPATH -u "$path"`
41737
41738  # Now try to locate executable using which
41739  new_path=`$WHICH "$new_path" 2> /dev/null`
41740  # bat and cmd files are not always considered executable in cygwin causing which
41741  # to not find them
41742  if test "x$new_path" = x \
41743      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41744      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41745    new_path=`$CYGPATH -u "$path"`
41746  fi
41747  if test "x$new_path" = x; then
41748    # Oops. Which didn't find the executable.
41749    # The splitting of arguments from the executable at a space might have been incorrect,
41750    # since paths with space are more likely in Windows. Give it another try with the whole
41751    # argument.
41752    path="$complete"
41753    arguments="EOL"
41754    new_path=`$CYGPATH -u "$path"`
41755    new_path=`$WHICH "$new_path" 2> /dev/null`
41756    # bat and cmd files are not always considered executable in cygwin causing which
41757    # to not find them
41758    if test "x$new_path" = x \
41759        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41760        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41761      new_path=`$CYGPATH -u "$path"`
41762    fi
41763    if test "x$new_path" = x; then
41764      # It's still not found. Now this is an unrecoverable error.
41765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41766$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41767      has_space=`$ECHO "$complete" | $GREP " "`
41768      if test "x$has_space" != x; then
41769        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41770$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41771      fi
41772      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41773    fi
41774  fi
41775
41776  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41777  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41778  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41779  # "foo.exe" is OK but "foo" is an error.
41780  #
41781  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41782  # It is also a way to make sure we got the proper file name for the real test later on.
41783  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41784  if test "x$test_shortpath" = x; then
41785    # Short path failed, file does not exist as specified.
41786    # Try adding .exe or .cmd
41787    if test -f "${new_path}.exe"; then
41788      input_to_shortpath="${new_path}.exe"
41789    elif test -f "${new_path}.cmd"; then
41790      input_to_shortpath="${new_path}.cmd"
41791    else
41792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41793$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41794      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41795$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41796      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41797    fi
41798  else
41799    input_to_shortpath="$new_path"
41800  fi
41801
41802  # Call helper function which possibly converts this using DOS-style short mode.
41803  # If so, the updated path is stored in $new_path.
41804  new_path="$input_to_shortpath"
41805
41806  input_path="$input_to_shortpath"
41807  # Check if we need to convert this using DOS-style short mode. If the path
41808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41809  # take no chances and rewrite it.
41810  # Note: m4 eats our [], so we need to use [ and ] instead.
41811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41812  if test "x$has_forbidden_chars" != x; then
41813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41817      # Going to short mode and back again did indeed matter. Since short mode is
41818      # case insensitive, let's make it lowercase to improve readability.
41819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41820      # Now convert it back to Unix-style (cygpath)
41821      input_path=`$CYGPATH -u "$shortmode_path"`
41822      new_path="$input_path"
41823    fi
41824  fi
41825
41826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41827  if test "x$test_cygdrive_prefix" = x; then
41828    # As a simple fix, exclude /usr/bin since it's not a real path.
41829    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41831      # a path prefixed by /cygdrive for fixpath to work.
41832      new_path="$CYGWIN_ROOT_PATH$input_path"
41833    fi
41834  fi
41835
41836  # remove trailing .exe if any
41837  new_path="${new_path/%.exe/}"
41838
41839    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41840
41841  # First separate the path from the arguments. This will split at the first
41842  # space.
41843  complete="$NM"
41844  path="${complete%% *}"
41845  tmp="$complete EOL"
41846  arguments="${tmp#* }"
41847
41848  # Input might be given as Windows format, start by converting to
41849  # unix format.
41850  new_path="$path"
41851
41852  windows_path="$new_path"
41853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41854    unix_path=`$CYGPATH -u "$windows_path"`
41855    new_path="$unix_path"
41856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41858    new_path="$unix_path"
41859  fi
41860
41861
41862  # Now try to locate executable using which
41863  new_path=`$WHICH "$new_path" 2> /dev/null`
41864
41865  if test "x$new_path" = x; then
41866    # Oops. Which didn't find the executable.
41867    # The splitting of arguments from the executable at a space might have been incorrect,
41868    # since paths with space are more likely in Windows. Give it another try with the whole
41869    # argument.
41870    path="$complete"
41871    arguments="EOL"
41872    new_path="$path"
41873
41874  windows_path="$new_path"
41875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41876    unix_path=`$CYGPATH -u "$windows_path"`
41877    new_path="$unix_path"
41878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41880    new_path="$unix_path"
41881  fi
41882
41883
41884    new_path=`$WHICH "$new_path" 2> /dev/null`
41885    # bat and cmd files are not always considered executable in MSYS causing which
41886    # to not find them
41887    if test "x$new_path" = x \
41888        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41889        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41890      new_path="$path"
41891
41892  windows_path="$new_path"
41893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41894    unix_path=`$CYGPATH -u "$windows_path"`
41895    new_path="$unix_path"
41896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41898    new_path="$unix_path"
41899  fi
41900
41901    fi
41902
41903    if test "x$new_path" = x; then
41904      # It's still not found. Now this is an unrecoverable error.
41905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41906$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41907      has_space=`$ECHO "$complete" | $GREP " "`
41908      if test "x$has_space" != x; then
41909        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41910$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41911      fi
41912      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41913    fi
41914  fi
41915
41916  # Now new_path has a complete unix path to the binary
41917  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41918    # Keep paths in /bin as-is, but remove trailing .exe if any
41919    new_path="${new_path/%.exe/}"
41920    # Do not save /bin paths to all_fixpath_prefixes!
41921  else
41922    # Not in mixed or Windows style, start by that.
41923    new_path=`cmd //c echo $new_path`
41924
41925  input_path="$new_path"
41926  # Check if we need to convert this using DOS-style short mode. If the path
41927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41928  # take no chances and rewrite it.
41929  # Note: m4 eats our [], so we need to use [ and ] instead.
41930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41931  if test "x$has_forbidden_chars" != x; then
41932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41933    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41934  fi
41935
41936    # Output is in $new_path
41937
41938  windows_path="$new_path"
41939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41940    unix_path=`$CYGPATH -u "$windows_path"`
41941    new_path="$unix_path"
41942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41944    new_path="$unix_path"
41945  fi
41946
41947    # remove trailing .exe if any
41948    new_path="${new_path/%.exe/}"
41949
41950    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41951    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41952  fi
41953
41954    else
41955      # We're on a unix platform. Hooray! :)
41956      # First separate the path from the arguments. This will split at the first
41957      # space.
41958      complete="$NM"
41959      path="${complete%% *}"
41960      tmp="$complete EOL"
41961      arguments="${tmp#* }"
41962
41963      # Cannot rely on the command "which" here since it doesn't always work.
41964      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41965      if test -z "$is_absolute_path"; then
41966        # Path to executable is not absolute. Find it.
41967        IFS_save="$IFS"
41968        IFS=:
41969        for p in $PATH; do
41970          if test -f "$p/$path" && test -x "$p/$path"; then
41971            new_path="$p/$path"
41972            break
41973          fi
41974        done
41975        IFS="$IFS_save"
41976      else
41977        # This is an absolute path, we can use it without further modifications.
41978        new_path="$path"
41979      fi
41980
41981      if test "x$new_path" = x; then
41982        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41983$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41984        has_space=`$ECHO "$complete" | $GREP " "`
41985        if test "x$has_space" != x; then
41986          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41987$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41988        fi
41989        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41990      fi
41991    fi
41992
41993    # Now join together the path and the arguments once again
41994    if test "x$arguments" != xEOL; then
41995      new_complete="$new_path ${arguments% *}"
41996    else
41997      new_complete="$new_path"
41998    fi
41999
42000    if test "x$complete" != "x$new_complete"; then
42001      NM="$new_complete"
42002      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42003$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42004    fi
42005  fi
42006
42007    GNM="$NM"
42008
42009  fi
42010
42011  # objcopy is used for moving debug symbols to separate files when
42012  # full debug symbols are enabled.
42013  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42014
42015
42016  # Publish this variable in the help.
42017
42018
42019  if [ -z "${OBJCOPY+x}" ]; then
42020    # The variable is not set by user, try to locate tool using the code snippet
42021    if test -n "$ac_tool_prefix"; then
42022  for ac_prog in gobjcopy objcopy
42023  do
42024    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42025set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42027$as_echo_n "checking for $ac_word... " >&6; }
42028if ${ac_cv_prog_OBJCOPY+:} false; then :
42029  $as_echo_n "(cached) " >&6
42030else
42031  if test -n "$OBJCOPY"; then
42032  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42033else
42034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42035for as_dir in $PATH
42036do
42037  IFS=$as_save_IFS
42038  test -z "$as_dir" && as_dir=.
42039    for ac_exec_ext in '' $ac_executable_extensions; do
42040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42041    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42043    break 2
42044  fi
42045done
42046  done
42047IFS=$as_save_IFS
42048
42049fi
42050fi
42051OBJCOPY=$ac_cv_prog_OBJCOPY
42052if test -n "$OBJCOPY"; then
42053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42054$as_echo "$OBJCOPY" >&6; }
42055else
42056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42057$as_echo "no" >&6; }
42058fi
42059
42060
42061    test -n "$OBJCOPY" && break
42062  done
42063fi
42064if test -z "$OBJCOPY"; then
42065  ac_ct_OBJCOPY=$OBJCOPY
42066  for ac_prog in gobjcopy objcopy
42067do
42068  # Extract the first word of "$ac_prog", so it can be a program name with args.
42069set dummy $ac_prog; ac_word=$2
42070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42071$as_echo_n "checking for $ac_word... " >&6; }
42072if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42073  $as_echo_n "(cached) " >&6
42074else
42075  if test -n "$ac_ct_OBJCOPY"; then
42076  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42077else
42078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42079for as_dir in $PATH
42080do
42081  IFS=$as_save_IFS
42082  test -z "$as_dir" && as_dir=.
42083    for ac_exec_ext in '' $ac_executable_extensions; do
42084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42085    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42087    break 2
42088  fi
42089done
42090  done
42091IFS=$as_save_IFS
42092
42093fi
42094fi
42095ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42096if test -n "$ac_ct_OBJCOPY"; then
42097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42098$as_echo "$ac_ct_OBJCOPY" >&6; }
42099else
42100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42101$as_echo "no" >&6; }
42102fi
42103
42104
42105  test -n "$ac_ct_OBJCOPY" && break
42106done
42107
42108  if test "x$ac_ct_OBJCOPY" = x; then
42109    OBJCOPY=""
42110  else
42111    case $cross_compiling:$ac_tool_warned in
42112yes:)
42113{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42114$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42115ac_tool_warned=yes ;;
42116esac
42117    OBJCOPY=$ac_ct_OBJCOPY
42118  fi
42119fi
42120
42121  else
42122    # The variable is set, but is it from the command line or the environment?
42123
42124    # Try to remove the string !OBJCOPY! from our list.
42125    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42126    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42127      # If it failed, the variable was not from the command line. Ignore it,
42128      # but warn the user (except for BASH, which is always set by the calling BASH).
42129      if test "xOBJCOPY" != xBASH; then
42130        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42131$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42132      fi
42133      # Try to locate tool using the code snippet
42134      if test -n "$ac_tool_prefix"; then
42135  for ac_prog in gobjcopy objcopy
42136  do
42137    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42138set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42140$as_echo_n "checking for $ac_word... " >&6; }
42141if ${ac_cv_prog_OBJCOPY+:} false; then :
42142  $as_echo_n "(cached) " >&6
42143else
42144  if test -n "$OBJCOPY"; then
42145  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42146else
42147as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42148for as_dir in $PATH
42149do
42150  IFS=$as_save_IFS
42151  test -z "$as_dir" && as_dir=.
42152    for ac_exec_ext in '' $ac_executable_extensions; do
42153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42154    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42156    break 2
42157  fi
42158done
42159  done
42160IFS=$as_save_IFS
42161
42162fi
42163fi
42164OBJCOPY=$ac_cv_prog_OBJCOPY
42165if test -n "$OBJCOPY"; then
42166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42167$as_echo "$OBJCOPY" >&6; }
42168else
42169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42170$as_echo "no" >&6; }
42171fi
42172
42173
42174    test -n "$OBJCOPY" && break
42175  done
42176fi
42177if test -z "$OBJCOPY"; then
42178  ac_ct_OBJCOPY=$OBJCOPY
42179  for ac_prog in gobjcopy objcopy
42180do
42181  # Extract the first word of "$ac_prog", so it can be a program name with args.
42182set dummy $ac_prog; ac_word=$2
42183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42184$as_echo_n "checking for $ac_word... " >&6; }
42185if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42186  $as_echo_n "(cached) " >&6
42187else
42188  if test -n "$ac_ct_OBJCOPY"; then
42189  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42190else
42191as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42192for as_dir in $PATH
42193do
42194  IFS=$as_save_IFS
42195  test -z "$as_dir" && as_dir=.
42196    for ac_exec_ext in '' $ac_executable_extensions; do
42197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42198    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42200    break 2
42201  fi
42202done
42203  done
42204IFS=$as_save_IFS
42205
42206fi
42207fi
42208ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42209if test -n "$ac_ct_OBJCOPY"; then
42210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42211$as_echo "$ac_ct_OBJCOPY" >&6; }
42212else
42213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42214$as_echo "no" >&6; }
42215fi
42216
42217
42218  test -n "$ac_ct_OBJCOPY" && break
42219done
42220
42221  if test "x$ac_ct_OBJCOPY" = x; then
42222    OBJCOPY=""
42223  else
42224    case $cross_compiling:$ac_tool_warned in
42225yes:)
42226{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42227$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42228ac_tool_warned=yes ;;
42229esac
42230    OBJCOPY=$ac_ct_OBJCOPY
42231  fi
42232fi
42233
42234    else
42235      # If it succeeded, then it was overridden by the user. We will use it
42236      # for the tool.
42237
42238      # First remove it from the list of overridden variables, so we can test
42239      # for unknown variables in the end.
42240      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42241
42242      # Check if we try to supply an empty value
42243      if test "x$OBJCOPY" = x; then
42244        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42245$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42246        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42247$as_echo_n "checking for OBJCOPY... " >&6; }
42248        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42249$as_echo "disabled" >&6; }
42250      else
42251        # Check if the provided tool contains a complete path.
42252        tool_specified="$OBJCOPY"
42253        tool_basename="${tool_specified##*/}"
42254        if test "x$tool_basename" = "x$tool_specified"; then
42255          # A command without a complete path is provided, search $PATH.
42256          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42257$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42258          # Extract the first word of "$tool_basename", so it can be a program name with args.
42259set dummy $tool_basename; ac_word=$2
42260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42261$as_echo_n "checking for $ac_word... " >&6; }
42262if ${ac_cv_path_OBJCOPY+:} false; then :
42263  $as_echo_n "(cached) " >&6
42264else
42265  case $OBJCOPY in
42266  [\\/]* | ?:[\\/]*)
42267  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42268  ;;
42269  *)
42270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42271for as_dir in $PATH
42272do
42273  IFS=$as_save_IFS
42274  test -z "$as_dir" && as_dir=.
42275    for ac_exec_ext in '' $ac_executable_extensions; do
42276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42277    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42279    break 2
42280  fi
42281done
42282  done
42283IFS=$as_save_IFS
42284
42285  ;;
42286esac
42287fi
42288OBJCOPY=$ac_cv_path_OBJCOPY
42289if test -n "$OBJCOPY"; then
42290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42291$as_echo "$OBJCOPY" >&6; }
42292else
42293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42294$as_echo "no" >&6; }
42295fi
42296
42297
42298          if test "x$OBJCOPY" = x; then
42299            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42300          fi
42301        else
42302          # Otherwise we believe it is a complete path. Use it as it is.
42303          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42304$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42305          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42306$as_echo_n "checking for OBJCOPY... " >&6; }
42307          if test ! -x "$tool_specified"; then
42308            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42309$as_echo "not found" >&6; }
42310            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42311          fi
42312          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42313$as_echo "$tool_specified" >&6; }
42314        fi
42315      fi
42316    fi
42317
42318  fi
42319
42320
42321    # Only call fixup if objcopy was found.
42322    if test -n "$OBJCOPY"; then
42323
42324  # Only process if variable expands to non-empty
42325
42326  if test "x$OBJCOPY" != x; then
42327    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42328
42329  # First separate the path from the arguments. This will split at the first
42330  # space.
42331  complete="$OBJCOPY"
42332  path="${complete%% *}"
42333  tmp="$complete EOL"
42334  arguments="${tmp#* }"
42335
42336  # Input might be given as Windows format, start by converting to
42337  # unix format.
42338  new_path=`$CYGPATH -u "$path"`
42339
42340  # Now try to locate executable using which
42341  new_path=`$WHICH "$new_path" 2> /dev/null`
42342  # bat and cmd files are not always considered executable in cygwin causing which
42343  # to not find them
42344  if test "x$new_path" = x \
42345      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42346      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42347    new_path=`$CYGPATH -u "$path"`
42348  fi
42349  if test "x$new_path" = x; then
42350    # Oops. Which didn't find the executable.
42351    # The splitting of arguments from the executable at a space might have been incorrect,
42352    # since paths with space are more likely in Windows. Give it another try with the whole
42353    # argument.
42354    path="$complete"
42355    arguments="EOL"
42356    new_path=`$CYGPATH -u "$path"`
42357    new_path=`$WHICH "$new_path" 2> /dev/null`
42358    # bat and cmd files are not always considered executable in cygwin causing which
42359    # to not find them
42360    if test "x$new_path" = x \
42361        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42362        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42363      new_path=`$CYGPATH -u "$path"`
42364    fi
42365    if test "x$new_path" = x; then
42366      # It's still not found. Now this is an unrecoverable error.
42367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42368$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42369      has_space=`$ECHO "$complete" | $GREP " "`
42370      if test "x$has_space" != x; then
42371        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42372$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42373      fi
42374      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42375    fi
42376  fi
42377
42378  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42379  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42380  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42381  # "foo.exe" is OK but "foo" is an error.
42382  #
42383  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42384  # It is also a way to make sure we got the proper file name for the real test later on.
42385  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42386  if test "x$test_shortpath" = x; then
42387    # Short path failed, file does not exist as specified.
42388    # Try adding .exe or .cmd
42389    if test -f "${new_path}.exe"; then
42390      input_to_shortpath="${new_path}.exe"
42391    elif test -f "${new_path}.cmd"; then
42392      input_to_shortpath="${new_path}.cmd"
42393    else
42394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42395$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42396      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42397$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42398      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42399    fi
42400  else
42401    input_to_shortpath="$new_path"
42402  fi
42403
42404  # Call helper function which possibly converts this using DOS-style short mode.
42405  # If so, the updated path is stored in $new_path.
42406  new_path="$input_to_shortpath"
42407
42408  input_path="$input_to_shortpath"
42409  # Check if we need to convert this using DOS-style short mode. If the path
42410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42411  # take no chances and rewrite it.
42412  # Note: m4 eats our [], so we need to use [ and ] instead.
42413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42414  if test "x$has_forbidden_chars" != x; then
42415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42416    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42417    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42418    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42419      # Going to short mode and back again did indeed matter. Since short mode is
42420      # case insensitive, let's make it lowercase to improve readability.
42421      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42422      # Now convert it back to Unix-style (cygpath)
42423      input_path=`$CYGPATH -u "$shortmode_path"`
42424      new_path="$input_path"
42425    fi
42426  fi
42427
42428  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42429  if test "x$test_cygdrive_prefix" = x; then
42430    # As a simple fix, exclude /usr/bin since it's not a real path.
42431    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42432      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42433      # a path prefixed by /cygdrive for fixpath to work.
42434      new_path="$CYGWIN_ROOT_PATH$input_path"
42435    fi
42436  fi
42437
42438  # remove trailing .exe if any
42439  new_path="${new_path/%.exe/}"
42440
42441    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42442
42443  # First separate the path from the arguments. This will split at the first
42444  # space.
42445  complete="$OBJCOPY"
42446  path="${complete%% *}"
42447  tmp="$complete EOL"
42448  arguments="${tmp#* }"
42449
42450  # Input might be given as Windows format, start by converting to
42451  # unix format.
42452  new_path="$path"
42453
42454  windows_path="$new_path"
42455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42456    unix_path=`$CYGPATH -u "$windows_path"`
42457    new_path="$unix_path"
42458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42460    new_path="$unix_path"
42461  fi
42462
42463
42464  # Now try to locate executable using which
42465  new_path=`$WHICH "$new_path" 2> /dev/null`
42466
42467  if test "x$new_path" = x; then
42468    # Oops. Which didn't find the executable.
42469    # The splitting of arguments from the executable at a space might have been incorrect,
42470    # since paths with space are more likely in Windows. Give it another try with the whole
42471    # argument.
42472    path="$complete"
42473    arguments="EOL"
42474    new_path="$path"
42475
42476  windows_path="$new_path"
42477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42478    unix_path=`$CYGPATH -u "$windows_path"`
42479    new_path="$unix_path"
42480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42482    new_path="$unix_path"
42483  fi
42484
42485
42486    new_path=`$WHICH "$new_path" 2> /dev/null`
42487    # bat and cmd files are not always considered executable in MSYS causing which
42488    # to not find them
42489    if test "x$new_path" = x \
42490        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42491        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42492      new_path="$path"
42493
42494  windows_path="$new_path"
42495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42496    unix_path=`$CYGPATH -u "$windows_path"`
42497    new_path="$unix_path"
42498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42500    new_path="$unix_path"
42501  fi
42502
42503    fi
42504
42505    if test "x$new_path" = x; then
42506      # It's still not found. Now this is an unrecoverable error.
42507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42508$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42509      has_space=`$ECHO "$complete" | $GREP " "`
42510      if test "x$has_space" != x; then
42511        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42512$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42513      fi
42514      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42515    fi
42516  fi
42517
42518  # Now new_path has a complete unix path to the binary
42519  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42520    # Keep paths in /bin as-is, but remove trailing .exe if any
42521    new_path="${new_path/%.exe/}"
42522    # Do not save /bin paths to all_fixpath_prefixes!
42523  else
42524    # Not in mixed or Windows style, start by that.
42525    new_path=`cmd //c echo $new_path`
42526
42527  input_path="$new_path"
42528  # Check if we need to convert this using DOS-style short mode. If the path
42529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42530  # take no chances and rewrite it.
42531  # Note: m4 eats our [], so we need to use [ and ] instead.
42532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42533  if test "x$has_forbidden_chars" != x; then
42534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42536  fi
42537
42538    # Output is in $new_path
42539
42540  windows_path="$new_path"
42541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42542    unix_path=`$CYGPATH -u "$windows_path"`
42543    new_path="$unix_path"
42544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42546    new_path="$unix_path"
42547  fi
42548
42549    # remove trailing .exe if any
42550    new_path="${new_path/%.exe/}"
42551
42552    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42553    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42554  fi
42555
42556    else
42557      # We're on a unix platform. Hooray! :)
42558      # First separate the path from the arguments. This will split at the first
42559      # space.
42560      complete="$OBJCOPY"
42561      path="${complete%% *}"
42562      tmp="$complete EOL"
42563      arguments="${tmp#* }"
42564
42565      # Cannot rely on the command "which" here since it doesn't always work.
42566      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42567      if test -z "$is_absolute_path"; then
42568        # Path to executable is not absolute. Find it.
42569        IFS_save="$IFS"
42570        IFS=:
42571        for p in $PATH; do
42572          if test -f "$p/$path" && test -x "$p/$path"; then
42573            new_path="$p/$path"
42574            break
42575          fi
42576        done
42577        IFS="$IFS_save"
42578      else
42579        # This is an absolute path, we can use it without further modifications.
42580        new_path="$path"
42581      fi
42582
42583      if test "x$new_path" = x; then
42584        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42585$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42586        has_space=`$ECHO "$complete" | $GREP " "`
42587        if test "x$has_space" != x; then
42588          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42589$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42590        fi
42591        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42592      fi
42593    fi
42594
42595    # Now join together the path and the arguments once again
42596    if test "x$arguments" != xEOL; then
42597      new_complete="$new_path ${arguments% *}"
42598    else
42599      new_complete="$new_path"
42600    fi
42601
42602    if test "x$complete" != "x$new_complete"; then
42603      OBJCOPY="$new_complete"
42604      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
42605$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
42606    fi
42607  fi
42608
42609      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
42610        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
42611        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
42612        # - version number is last blank separate word on first line
42613        # - version number formats that have been seen:
42614        #   - <major>.<minor>
42615        #   - <major>.<minor>.<micro>
42616        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
42617        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
42618         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
42619              -e 's/.* //' \
42620              -e '/^[01]\./b bad' \
42621              -e '/^2\./{' \
42622              -e '  s/^2\.//' \
42623              -e '  /^[0-9]$/b bad' \
42624              -e '  /^[0-9]\./b bad' \
42625              -e '  /^1[0-9]$/b bad' \
42626              -e '  /^1[0-9]\./b bad' \
42627              -e '  /^20\./b bad' \
42628              -e '  /^21\.0$/b bad' \
42629              -e '  /^21\.0\./b bad' \
42630              -e '}' \
42631              -e ':good' \
42632              -e 's/.*/VALID_VERSION/p' \
42633              -e 'q' \
42634              -e ':bad' \
42635              -e 's/.*/BAD_VERSION/p' \
42636              -e 'q'`
42637        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
42638          OBJCOPY=
42639          { $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
42640$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
42641          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
42642$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
42643          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
42644$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
42645          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
42646$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
42647          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
42648$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
42649        fi
42650      fi
42651    fi
42652  fi
42653
42654
42655
42656  # Publish this variable in the help.
42657
42658
42659  if [ -z "${OBJDUMP+x}" ]; then
42660    # The variable is not set by user, try to locate tool using the code snippet
42661    if test -n "$ac_tool_prefix"; then
42662  for ac_prog in gobjdump objdump
42663  do
42664    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42665set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42667$as_echo_n "checking for $ac_word... " >&6; }
42668if ${ac_cv_prog_OBJDUMP+:} false; then :
42669  $as_echo_n "(cached) " >&6
42670else
42671  if test -n "$OBJDUMP"; then
42672  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42673else
42674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42675for as_dir in $PATH
42676do
42677  IFS=$as_save_IFS
42678  test -z "$as_dir" && as_dir=.
42679    for ac_exec_ext in '' $ac_executable_extensions; do
42680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42681    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42683    break 2
42684  fi
42685done
42686  done
42687IFS=$as_save_IFS
42688
42689fi
42690fi
42691OBJDUMP=$ac_cv_prog_OBJDUMP
42692if test -n "$OBJDUMP"; then
42693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42694$as_echo "$OBJDUMP" >&6; }
42695else
42696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42697$as_echo "no" >&6; }
42698fi
42699
42700
42701    test -n "$OBJDUMP" && break
42702  done
42703fi
42704if test -z "$OBJDUMP"; then
42705  ac_ct_OBJDUMP=$OBJDUMP
42706  for ac_prog in gobjdump objdump
42707do
42708  # Extract the first word of "$ac_prog", so it can be a program name with args.
42709set dummy $ac_prog; ac_word=$2
42710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42711$as_echo_n "checking for $ac_word... " >&6; }
42712if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42713  $as_echo_n "(cached) " >&6
42714else
42715  if test -n "$ac_ct_OBJDUMP"; then
42716  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42717else
42718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42719for as_dir in $PATH
42720do
42721  IFS=$as_save_IFS
42722  test -z "$as_dir" && as_dir=.
42723    for ac_exec_ext in '' $ac_executable_extensions; do
42724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42725    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42727    break 2
42728  fi
42729done
42730  done
42731IFS=$as_save_IFS
42732
42733fi
42734fi
42735ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42736if test -n "$ac_ct_OBJDUMP"; then
42737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42738$as_echo "$ac_ct_OBJDUMP" >&6; }
42739else
42740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42741$as_echo "no" >&6; }
42742fi
42743
42744
42745  test -n "$ac_ct_OBJDUMP" && break
42746done
42747
42748  if test "x$ac_ct_OBJDUMP" = x; then
42749    OBJDUMP=""
42750  else
42751    case $cross_compiling:$ac_tool_warned in
42752yes:)
42753{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42754$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42755ac_tool_warned=yes ;;
42756esac
42757    OBJDUMP=$ac_ct_OBJDUMP
42758  fi
42759fi
42760
42761  else
42762    # The variable is set, but is it from the command line or the environment?
42763
42764    # Try to remove the string !OBJDUMP! from our list.
42765    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
42766    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42767      # If it failed, the variable was not from the command line. Ignore it,
42768      # but warn the user (except for BASH, which is always set by the calling BASH).
42769      if test "xOBJDUMP" != xBASH; then
42770        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
42771$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
42772      fi
42773      # Try to locate tool using the code snippet
42774      if test -n "$ac_tool_prefix"; then
42775  for ac_prog in gobjdump objdump
42776  do
42777    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42778set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42780$as_echo_n "checking for $ac_word... " >&6; }
42781if ${ac_cv_prog_OBJDUMP+:} false; then :
42782  $as_echo_n "(cached) " >&6
42783else
42784  if test -n "$OBJDUMP"; then
42785  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42786else
42787as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42788for as_dir in $PATH
42789do
42790  IFS=$as_save_IFS
42791  test -z "$as_dir" && as_dir=.
42792    for ac_exec_ext in '' $ac_executable_extensions; do
42793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42794    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42796    break 2
42797  fi
42798done
42799  done
42800IFS=$as_save_IFS
42801
42802fi
42803fi
42804OBJDUMP=$ac_cv_prog_OBJDUMP
42805if test -n "$OBJDUMP"; then
42806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42807$as_echo "$OBJDUMP" >&6; }
42808else
42809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42810$as_echo "no" >&6; }
42811fi
42812
42813
42814    test -n "$OBJDUMP" && break
42815  done
42816fi
42817if test -z "$OBJDUMP"; then
42818  ac_ct_OBJDUMP=$OBJDUMP
42819  for ac_prog in gobjdump objdump
42820do
42821  # Extract the first word of "$ac_prog", so it can be a program name with args.
42822set dummy $ac_prog; ac_word=$2
42823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42824$as_echo_n "checking for $ac_word... " >&6; }
42825if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42826  $as_echo_n "(cached) " >&6
42827else
42828  if test -n "$ac_ct_OBJDUMP"; then
42829  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42830else
42831as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42832for as_dir in $PATH
42833do
42834  IFS=$as_save_IFS
42835  test -z "$as_dir" && as_dir=.
42836    for ac_exec_ext in '' $ac_executable_extensions; do
42837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42838    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42840    break 2
42841  fi
42842done
42843  done
42844IFS=$as_save_IFS
42845
42846fi
42847fi
42848ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42849if test -n "$ac_ct_OBJDUMP"; then
42850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42851$as_echo "$ac_ct_OBJDUMP" >&6; }
42852else
42853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42854$as_echo "no" >&6; }
42855fi
42856
42857
42858  test -n "$ac_ct_OBJDUMP" && break
42859done
42860
42861  if test "x$ac_ct_OBJDUMP" = x; then
42862    OBJDUMP=""
42863  else
42864    case $cross_compiling:$ac_tool_warned in
42865yes:)
42866{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42867$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42868ac_tool_warned=yes ;;
42869esac
42870    OBJDUMP=$ac_ct_OBJDUMP
42871  fi
42872fi
42873
42874    else
42875      # If it succeeded, then it was overridden by the user. We will use it
42876      # for the tool.
42877
42878      # First remove it from the list of overridden variables, so we can test
42879      # for unknown variables in the end.
42880      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42881
42882      # Check if we try to supply an empty value
42883      if test "x$OBJDUMP" = x; then
42884        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42885$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42886        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42887$as_echo_n "checking for OBJDUMP... " >&6; }
42888        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42889$as_echo "disabled" >&6; }
42890      else
42891        # Check if the provided tool contains a complete path.
42892        tool_specified="$OBJDUMP"
42893        tool_basename="${tool_specified##*/}"
42894        if test "x$tool_basename" = "x$tool_specified"; then
42895          # A command without a complete path is provided, search $PATH.
42896          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42897$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42898          # Extract the first word of "$tool_basename", so it can be a program name with args.
42899set dummy $tool_basename; ac_word=$2
42900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42901$as_echo_n "checking for $ac_word... " >&6; }
42902if ${ac_cv_path_OBJDUMP+:} false; then :
42903  $as_echo_n "(cached) " >&6
42904else
42905  case $OBJDUMP in
42906  [\\/]* | ?:[\\/]*)
42907  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42908  ;;
42909  *)
42910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42911for as_dir in $PATH
42912do
42913  IFS=$as_save_IFS
42914  test -z "$as_dir" && as_dir=.
42915    for ac_exec_ext in '' $ac_executable_extensions; do
42916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42917    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42919    break 2
42920  fi
42921done
42922  done
42923IFS=$as_save_IFS
42924
42925  ;;
42926esac
42927fi
42928OBJDUMP=$ac_cv_path_OBJDUMP
42929if test -n "$OBJDUMP"; then
42930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42931$as_echo "$OBJDUMP" >&6; }
42932else
42933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42934$as_echo "no" >&6; }
42935fi
42936
42937
42938          if test "x$OBJDUMP" = x; then
42939            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42940          fi
42941        else
42942          # Otherwise we believe it is a complete path. Use it as it is.
42943          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42944$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42945          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42946$as_echo_n "checking for OBJDUMP... " >&6; }
42947          if test ! -x "$tool_specified"; then
42948            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42949$as_echo "not found" >&6; }
42950            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42951          fi
42952          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42953$as_echo "$tool_specified" >&6; }
42954        fi
42955      fi
42956    fi
42957
42958  fi
42959
42960
42961  if test "x$OBJDUMP" != x; then
42962    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42963    # bails if argument is missing.
42964
42965  # Only process if variable expands to non-empty
42966
42967  if test "x$OBJDUMP" != x; then
42968    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42969
42970  # First separate the path from the arguments. This will split at the first
42971  # space.
42972  complete="$OBJDUMP"
42973  path="${complete%% *}"
42974  tmp="$complete EOL"
42975  arguments="${tmp#* }"
42976
42977  # Input might be given as Windows format, start by converting to
42978  # unix format.
42979  new_path=`$CYGPATH -u "$path"`
42980
42981  # Now try to locate executable using which
42982  new_path=`$WHICH "$new_path" 2> /dev/null`
42983  # bat and cmd files are not always considered executable in cygwin causing which
42984  # to not find them
42985  if test "x$new_path" = x \
42986      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42987      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42988    new_path=`$CYGPATH -u "$path"`
42989  fi
42990  if test "x$new_path" = x; then
42991    # Oops. Which didn't find the executable.
42992    # The splitting of arguments from the executable at a space might have been incorrect,
42993    # since paths with space are more likely in Windows. Give it another try with the whole
42994    # argument.
42995    path="$complete"
42996    arguments="EOL"
42997    new_path=`$CYGPATH -u "$path"`
42998    new_path=`$WHICH "$new_path" 2> /dev/null`
42999    # bat and cmd files are not always considered executable in cygwin causing which
43000    # to not find them
43001    if test "x$new_path" = x \
43002        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43003        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43004      new_path=`$CYGPATH -u "$path"`
43005    fi
43006    if test "x$new_path" = x; then
43007      # It's still not found. Now this is an unrecoverable error.
43008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43009$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43010      has_space=`$ECHO "$complete" | $GREP " "`
43011      if test "x$has_space" != x; then
43012        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43013$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43014      fi
43015      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43016    fi
43017  fi
43018
43019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43022  # "foo.exe" is OK but "foo" is an error.
43023  #
43024  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43025  # It is also a way to make sure we got the proper file name for the real test later on.
43026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43027  if test "x$test_shortpath" = x; then
43028    # Short path failed, file does not exist as specified.
43029    # Try adding .exe or .cmd
43030    if test -f "${new_path}.exe"; then
43031      input_to_shortpath="${new_path}.exe"
43032    elif test -f "${new_path}.cmd"; then
43033      input_to_shortpath="${new_path}.cmd"
43034    else
43035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43036$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43037      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43038$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43039      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43040    fi
43041  else
43042    input_to_shortpath="$new_path"
43043  fi
43044
43045  # Call helper function which possibly converts this using DOS-style short mode.
43046  # If so, the updated path is stored in $new_path.
43047  new_path="$input_to_shortpath"
43048
43049  input_path="$input_to_shortpath"
43050  # Check if we need to convert this using DOS-style short mode. If the path
43051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43052  # take no chances and rewrite it.
43053  # Note: m4 eats our [], so we need to use [ and ] instead.
43054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43055  if test "x$has_forbidden_chars" != x; then
43056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43060      # Going to short mode and back again did indeed matter. Since short mode is
43061      # case insensitive, let's make it lowercase to improve readability.
43062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43063      # Now convert it back to Unix-style (cygpath)
43064      input_path=`$CYGPATH -u "$shortmode_path"`
43065      new_path="$input_path"
43066    fi
43067  fi
43068
43069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43070  if test "x$test_cygdrive_prefix" = x; then
43071    # As a simple fix, exclude /usr/bin since it's not a real path.
43072    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43074      # a path prefixed by /cygdrive for fixpath to work.
43075      new_path="$CYGWIN_ROOT_PATH$input_path"
43076    fi
43077  fi
43078
43079  # remove trailing .exe if any
43080  new_path="${new_path/%.exe/}"
43081
43082    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43083
43084  # First separate the path from the arguments. This will split at the first
43085  # space.
43086  complete="$OBJDUMP"
43087  path="${complete%% *}"
43088  tmp="$complete EOL"
43089  arguments="${tmp#* }"
43090
43091  # Input might be given as Windows format, start by converting to
43092  # unix format.
43093  new_path="$path"
43094
43095  windows_path="$new_path"
43096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43097    unix_path=`$CYGPATH -u "$windows_path"`
43098    new_path="$unix_path"
43099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43101    new_path="$unix_path"
43102  fi
43103
43104
43105  # Now try to locate executable using which
43106  new_path=`$WHICH "$new_path" 2> /dev/null`
43107
43108  if test "x$new_path" = x; then
43109    # Oops. Which didn't find the executable.
43110    # The splitting of arguments from the executable at a space might have been incorrect,
43111    # since paths with space are more likely in Windows. Give it another try with the whole
43112    # argument.
43113    path="$complete"
43114    arguments="EOL"
43115    new_path="$path"
43116
43117  windows_path="$new_path"
43118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43119    unix_path=`$CYGPATH -u "$windows_path"`
43120    new_path="$unix_path"
43121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43123    new_path="$unix_path"
43124  fi
43125
43126
43127    new_path=`$WHICH "$new_path" 2> /dev/null`
43128    # bat and cmd files are not always considered executable in MSYS causing which
43129    # to not find them
43130    if test "x$new_path" = x \
43131        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43132        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43133      new_path="$path"
43134
43135  windows_path="$new_path"
43136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43137    unix_path=`$CYGPATH -u "$windows_path"`
43138    new_path="$unix_path"
43139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43141    new_path="$unix_path"
43142  fi
43143
43144    fi
43145
43146    if test "x$new_path" = x; then
43147      # It's still not found. Now this is an unrecoverable error.
43148      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43149$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43150      has_space=`$ECHO "$complete" | $GREP " "`
43151      if test "x$has_space" != x; then
43152        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43153$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43154      fi
43155      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43156    fi
43157  fi
43158
43159  # Now new_path has a complete unix path to the binary
43160  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43161    # Keep paths in /bin as-is, but remove trailing .exe if any
43162    new_path="${new_path/%.exe/}"
43163    # Do not save /bin paths to all_fixpath_prefixes!
43164  else
43165    # Not in mixed or Windows style, start by that.
43166    new_path=`cmd //c echo $new_path`
43167
43168  input_path="$new_path"
43169  # Check if we need to convert this using DOS-style short mode. If the path
43170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43171  # take no chances and rewrite it.
43172  # Note: m4 eats our [], so we need to use [ and ] instead.
43173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43174  if test "x$has_forbidden_chars" != x; then
43175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43176    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43177  fi
43178
43179    # Output is in $new_path
43180
43181  windows_path="$new_path"
43182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43183    unix_path=`$CYGPATH -u "$windows_path"`
43184    new_path="$unix_path"
43185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43187    new_path="$unix_path"
43188  fi
43189
43190    # remove trailing .exe if any
43191    new_path="${new_path/%.exe/}"
43192
43193    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43194    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43195  fi
43196
43197    else
43198      # We're on a unix platform. Hooray! :)
43199      # First separate the path from the arguments. This will split at the first
43200      # space.
43201      complete="$OBJDUMP"
43202      path="${complete%% *}"
43203      tmp="$complete EOL"
43204      arguments="${tmp#* }"
43205
43206      # Cannot rely on the command "which" here since it doesn't always work.
43207      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43208      if test -z "$is_absolute_path"; then
43209        # Path to executable is not absolute. Find it.
43210        IFS_save="$IFS"
43211        IFS=:
43212        for p in $PATH; do
43213          if test -f "$p/$path" && test -x "$p/$path"; then
43214            new_path="$p/$path"
43215            break
43216          fi
43217        done
43218        IFS="$IFS_save"
43219      else
43220        # This is an absolute path, we can use it without further modifications.
43221        new_path="$path"
43222      fi
43223
43224      if test "x$new_path" = x; then
43225        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43226$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43227        has_space=`$ECHO "$complete" | $GREP " "`
43228        if test "x$has_space" != x; then
43229          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43230$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43231        fi
43232        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43233      fi
43234    fi
43235
43236    # Now join together the path and the arguments once again
43237    if test "x$arguments" != xEOL; then
43238      new_complete="$new_path ${arguments% *}"
43239    else
43240      new_complete="$new_path"
43241    fi
43242
43243    if test "x$complete" != "x$new_complete"; then
43244      OBJDUMP="$new_complete"
43245      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43246$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43247    fi
43248  fi
43249
43250  fi
43251
43252
43253  # Restore old path.
43254  PATH="$OLD_PATH"
43255
43256  # Restore the flags to the user specified values.
43257  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43258  CFLAGS="$ORG_CFLAGS"
43259  CXXFLAGS="$ORG_CXXFLAGS"
43260
43261
43262# Finally do some processing after the detection phase
43263
43264  if test "x$COMPILE_TYPE" = "xcross"; then
43265    # Now we need to find a C/C++ compiler that can build executables for the
43266    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43267    # used once. Also, we need to do this without adding a tools dir to the
43268    # path, otherwise we might pick up cross-compilers which don't use standard
43269    # naming.
43270
43271    OLDPATH="$PATH"
43272
43273
43274# Check whether --with-build-devkit was given.
43275if test "${with_build_devkit+set}" = set; then :
43276  withval=$with_build_devkit;
43277fi
43278
43279    if test "x$with_build_devkit" = "xyes"; then
43280      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43281    elif test -n "$with_build_devkit"; then
43282      if test ! -d "$with_build_devkit"; then
43283        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43284      else
43285
43286  # Only process if variable expands to non-empty
43287
43288  if test "x$with_build_devkit" != x; then
43289    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43290
43291  # Input might be given as Windows format, start by converting to
43292  # unix format.
43293  path="$with_build_devkit"
43294  new_path=`$CYGPATH -u "$path"`
43295
43296  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43297  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43298  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43299  # "foo.exe" is OK but "foo" is an error.
43300  #
43301  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43302  # It is also a way to make sure we got the proper file name for the real test later on.
43303  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43304  if test "x$test_shortpath" = x; then
43305    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43306$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43307    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43308  fi
43309
43310  # Call helper function which possibly converts this using DOS-style short mode.
43311  # If so, the updated path is stored in $new_path.
43312
43313  input_path="$new_path"
43314  # Check if we need to convert this using DOS-style short mode. If the path
43315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43316  # take no chances and rewrite it.
43317  # Note: m4 eats our [], so we need to use [ and ] instead.
43318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43319  if test "x$has_forbidden_chars" != x; then
43320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43324      # Going to short mode and back again did indeed matter. Since short mode is
43325      # case insensitive, let's make it lowercase to improve readability.
43326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43327      # Now convert it back to Unix-style (cygpath)
43328      input_path=`$CYGPATH -u "$shortmode_path"`
43329      new_path="$input_path"
43330    fi
43331  fi
43332
43333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43334  if test "x$test_cygdrive_prefix" = x; then
43335    # As a simple fix, exclude /usr/bin since it's not a real path.
43336    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43338      # a path prefixed by /cygdrive for fixpath to work.
43339      new_path="$CYGWIN_ROOT_PATH$input_path"
43340    fi
43341  fi
43342
43343
43344  if test "x$path" != "x$new_path"; then
43345    with_build_devkit="$new_path"
43346    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43347$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43348  fi
43349
43350    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43351
43352  path="$with_build_devkit"
43353  has_colon=`$ECHO $path | $GREP ^.:`
43354  new_path="$path"
43355  if test "x$has_colon" = x; then
43356    # Not in mixed or Windows style, start by that.
43357    new_path=`cmd //c echo $path`
43358  fi
43359
43360
43361  input_path="$new_path"
43362  # Check if we need to convert this using DOS-style short mode. If the path
43363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43364  # take no chances and rewrite it.
43365  # Note: m4 eats our [], so we need to use [ and ] instead.
43366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43367  if test "x$has_forbidden_chars" != x; then
43368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43369    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43370  fi
43371
43372
43373  windows_path="$new_path"
43374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43375    unix_path=`$CYGPATH -u "$windows_path"`
43376    new_path="$unix_path"
43377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43379    new_path="$unix_path"
43380  fi
43381
43382  if test "x$path" != "x$new_path"; then
43383    with_build_devkit="$new_path"
43384    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43385$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43386  fi
43387
43388  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43389  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43390
43391    else
43392      # We're on a unix platform. Hooray! :)
43393      path="$with_build_devkit"
43394      has_space=`$ECHO "$path" | $GREP " "`
43395      if test "x$has_space" != x; then
43396        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43397$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43398        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43399      fi
43400
43401      # Use eval to expand a potential ~
43402      eval path="$path"
43403      if test ! -f "$path" && test ! -d "$path"; then
43404        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43405      fi
43406
43407      if test -d "$path"; then
43408        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43409      else
43410        dir="`$DIRNAME "$path"`"
43411        base="`$BASENAME "$path"`"
43412        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43413      fi
43414    fi
43415  fi
43416
43417        BUILD_DEVKIT_ROOT="$with_build_devkit"
43418        # Check for a meta data info file in the root of the devkit
43419        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43420          # Process devkit.info so that existing devkit variables are not
43421          # modified by this
43422          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43423              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43424              -e "s/\$host/\$build/g" \
43425              $BUILD_DEVKIT_ROOT/devkit.info \
43426              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43427          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43428          # This potentially sets the following:
43429          # A descriptive name of the devkit
43430
43431  if test "x$BUILD_DEVKIT_NAME" = x; then
43432    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43433  fi
43434
43435          # Corresponds to --with-extra-path
43436
43437  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43438    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43439  fi
43440
43441          # Corresponds to --with-toolchain-path
43442
43443  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43444    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43445  fi
43446
43447          # Corresponds to --with-sysroot
43448
43449  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43450    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43451  fi
43452
43453          # Skip the Window specific parts
43454        fi
43455
43456        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43457$as_echo_n "checking for build platform devkit... " >&6; }
43458        if test "x$BUILD_DEVKIT_NAME" != x; then
43459          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43460$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43461        else
43462          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43463$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43464        fi
43465
43466        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43467
43468  if test "x$BUILD_SYSROOT" != "x"; then
43469    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43470      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43471        # Solaris Studio does not have a concept of sysroot. Instead we must
43472        # make sure the default include and lib dirs are appended to each
43473        # compile and link command line. Must also add -I-xbuiltin to enable
43474        # inlining of system functions and intrinsics.
43475        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43476        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43477            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43478            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43479      fi
43480    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43481      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43482      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43483    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43484      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43485      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43486    fi
43487    # Propagate the sysroot args to hotspot
43488    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43489    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43490    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43491    # The global CFLAGS and LDFLAGS variables need these for configure to function
43492    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43493    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43494    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43495    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43496  fi
43497
43498  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43499    # We also need -iframework<path>/System/Library/Frameworks
43500    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43501    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43502    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43503    # set this here so it doesn't have to be peppered throughout the forest
43504    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43505    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43506  fi
43507
43508
43509
43510
43511
43512         # Fallback default of just /bin if DEVKIT_PATH is not defined
43513        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43514          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43515        fi
43516        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43517      fi
43518    fi
43519
43520    # FIXME: we should list the discovered compilers as an exclude pattern!
43521    # If we do that, we can do this detection before POST_DETECTION, and still
43522    # find the build compilers in the tools dir, if needed.
43523
43524
43525
43526  # Publish this variable in the help.
43527
43528
43529  if [ -z "${BUILD_CC+x}" ]; then
43530    # The variable is not set by user, try to locate tool using the code snippet
43531    for ac_prog in cl cc gcc
43532do
43533  # Extract the first word of "$ac_prog", so it can be a program name with args.
43534set dummy $ac_prog; ac_word=$2
43535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43536$as_echo_n "checking for $ac_word... " >&6; }
43537if ${ac_cv_path_BUILD_CC+:} false; then :
43538  $as_echo_n "(cached) " >&6
43539else
43540  case $BUILD_CC in
43541  [\\/]* | ?:[\\/]*)
43542  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43543  ;;
43544  *)
43545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43546for as_dir in $PATH
43547do
43548  IFS=$as_save_IFS
43549  test -z "$as_dir" && as_dir=.
43550    for ac_exec_ext in '' $ac_executable_extensions; do
43551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43552    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43554    break 2
43555  fi
43556done
43557  done
43558IFS=$as_save_IFS
43559
43560  ;;
43561esac
43562fi
43563BUILD_CC=$ac_cv_path_BUILD_CC
43564if test -n "$BUILD_CC"; then
43565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43566$as_echo "$BUILD_CC" >&6; }
43567else
43568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43569$as_echo "no" >&6; }
43570fi
43571
43572
43573  test -n "$BUILD_CC" && break
43574done
43575
43576  else
43577    # The variable is set, but is it from the command line or the environment?
43578
43579    # Try to remove the string !BUILD_CC! from our list.
43580    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
43581    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43582      # If it failed, the variable was not from the command line. Ignore it,
43583      # but warn the user (except for BASH, which is always set by the calling BASH).
43584      if test "xBUILD_CC" != xBASH; then
43585        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
43586$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
43587      fi
43588      # Try to locate tool using the code snippet
43589      for ac_prog in cl cc gcc
43590do
43591  # Extract the first word of "$ac_prog", so it can be a program name with args.
43592set dummy $ac_prog; ac_word=$2
43593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43594$as_echo_n "checking for $ac_word... " >&6; }
43595if ${ac_cv_path_BUILD_CC+:} false; then :
43596  $as_echo_n "(cached) " >&6
43597else
43598  case $BUILD_CC in
43599  [\\/]* | ?:[\\/]*)
43600  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43601  ;;
43602  *)
43603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43604for as_dir in $PATH
43605do
43606  IFS=$as_save_IFS
43607  test -z "$as_dir" && as_dir=.
43608    for ac_exec_ext in '' $ac_executable_extensions; do
43609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43610    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43612    break 2
43613  fi
43614done
43615  done
43616IFS=$as_save_IFS
43617
43618  ;;
43619esac
43620fi
43621BUILD_CC=$ac_cv_path_BUILD_CC
43622if test -n "$BUILD_CC"; then
43623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43624$as_echo "$BUILD_CC" >&6; }
43625else
43626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43627$as_echo "no" >&6; }
43628fi
43629
43630
43631  test -n "$BUILD_CC" && break
43632done
43633
43634    else
43635      # If it succeeded, then it was overridden by the user. We will use it
43636      # for the tool.
43637
43638      # First remove it from the list of overridden variables, so we can test
43639      # for unknown variables in the end.
43640      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43641
43642      # Check if we try to supply an empty value
43643      if test "x$BUILD_CC" = x; then
43644        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
43645$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
43646        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43647$as_echo_n "checking for BUILD_CC... " >&6; }
43648        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43649$as_echo "disabled" >&6; }
43650      else
43651        # Check if the provided tool contains a complete path.
43652        tool_specified="$BUILD_CC"
43653        tool_basename="${tool_specified##*/}"
43654        if test "x$tool_basename" = "x$tool_specified"; then
43655          # A command without a complete path is provided, search $PATH.
43656          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
43657$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
43658          # Extract the first word of "$tool_basename", so it can be a program name with args.
43659set dummy $tool_basename; ac_word=$2
43660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43661$as_echo_n "checking for $ac_word... " >&6; }
43662if ${ac_cv_path_BUILD_CC+:} false; then :
43663  $as_echo_n "(cached) " >&6
43664else
43665  case $BUILD_CC in
43666  [\\/]* | ?:[\\/]*)
43667  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43668  ;;
43669  *)
43670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43671for as_dir in $PATH
43672do
43673  IFS=$as_save_IFS
43674  test -z "$as_dir" && as_dir=.
43675    for ac_exec_ext in '' $ac_executable_extensions; do
43676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43677    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43679    break 2
43680  fi
43681done
43682  done
43683IFS=$as_save_IFS
43684
43685  ;;
43686esac
43687fi
43688BUILD_CC=$ac_cv_path_BUILD_CC
43689if test -n "$BUILD_CC"; then
43690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43691$as_echo "$BUILD_CC" >&6; }
43692else
43693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43694$as_echo "no" >&6; }
43695fi
43696
43697
43698          if test "x$BUILD_CC" = x; then
43699            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43700          fi
43701        else
43702          # Otherwise we believe it is a complete path. Use it as it is.
43703          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
43704$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
43705          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43706$as_echo_n "checking for BUILD_CC... " >&6; }
43707          if test ! -x "$tool_specified"; then
43708            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43709$as_echo "not found" >&6; }
43710            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
43711          fi
43712          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43713$as_echo "$tool_specified" >&6; }
43714        fi
43715      fi
43716    fi
43717
43718  fi
43719
43720
43721
43722  if test "x$BUILD_CC" = x; then
43723    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
43724  fi
43725
43726
43727
43728  # Only process if variable expands to non-empty
43729
43730  if test "x$BUILD_CC" != x; then
43731    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43732
43733  # First separate the path from the arguments. This will split at the first
43734  # space.
43735  complete="$BUILD_CC"
43736  path="${complete%% *}"
43737  tmp="$complete EOL"
43738  arguments="${tmp#* }"
43739
43740  # Input might be given as Windows format, start by converting to
43741  # unix format.
43742  new_path=`$CYGPATH -u "$path"`
43743
43744  # Now try to locate executable using which
43745  new_path=`$WHICH "$new_path" 2> /dev/null`
43746  # bat and cmd files are not always considered executable in cygwin causing which
43747  # to not find them
43748  if test "x$new_path" = x \
43749      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43750      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43751    new_path=`$CYGPATH -u "$path"`
43752  fi
43753  if test "x$new_path" = x; then
43754    # Oops. Which didn't find the executable.
43755    # The splitting of arguments from the executable at a space might have been incorrect,
43756    # since paths with space are more likely in Windows. Give it another try with the whole
43757    # argument.
43758    path="$complete"
43759    arguments="EOL"
43760    new_path=`$CYGPATH -u "$path"`
43761    new_path=`$WHICH "$new_path" 2> /dev/null`
43762    # bat and cmd files are not always considered executable in cygwin causing which
43763    # to not find them
43764    if test "x$new_path" = x \
43765        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43766        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43767      new_path=`$CYGPATH -u "$path"`
43768    fi
43769    if test "x$new_path" = x; then
43770      # It's still not found. Now this is an unrecoverable error.
43771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43772$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43773      has_space=`$ECHO "$complete" | $GREP " "`
43774      if test "x$has_space" != x; then
43775        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43776$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43777      fi
43778      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43779    fi
43780  fi
43781
43782  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43783  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43784  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43785  # "foo.exe" is OK but "foo" is an error.
43786  #
43787  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43788  # It is also a way to make sure we got the proper file name for the real test later on.
43789  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43790  if test "x$test_shortpath" = x; then
43791    # Short path failed, file does not exist as specified.
43792    # Try adding .exe or .cmd
43793    if test -f "${new_path}.exe"; then
43794      input_to_shortpath="${new_path}.exe"
43795    elif test -f "${new_path}.cmd"; then
43796      input_to_shortpath="${new_path}.cmd"
43797    else
43798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
43799$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
43800      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43801$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43802      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43803    fi
43804  else
43805    input_to_shortpath="$new_path"
43806  fi
43807
43808  # Call helper function which possibly converts this using DOS-style short mode.
43809  # If so, the updated path is stored in $new_path.
43810  new_path="$input_to_shortpath"
43811
43812  input_path="$input_to_shortpath"
43813  # Check if we need to convert this using DOS-style short mode. If the path
43814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43815  # take no chances and rewrite it.
43816  # Note: m4 eats our [], so we need to use [ and ] instead.
43817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43818  if test "x$has_forbidden_chars" != x; then
43819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43823      # Going to short mode and back again did indeed matter. Since short mode is
43824      # case insensitive, let's make it lowercase to improve readability.
43825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43826      # Now convert it back to Unix-style (cygpath)
43827      input_path=`$CYGPATH -u "$shortmode_path"`
43828      new_path="$input_path"
43829    fi
43830  fi
43831
43832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43833  if test "x$test_cygdrive_prefix" = x; then
43834    # As a simple fix, exclude /usr/bin since it's not a real path.
43835    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43837      # a path prefixed by /cygdrive for fixpath to work.
43838      new_path="$CYGWIN_ROOT_PATH$input_path"
43839    fi
43840  fi
43841
43842  # remove trailing .exe if any
43843  new_path="${new_path/%.exe/}"
43844
43845    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43846
43847  # First separate the path from the arguments. This will split at the first
43848  # space.
43849  complete="$BUILD_CC"
43850  path="${complete%% *}"
43851  tmp="$complete EOL"
43852  arguments="${tmp#* }"
43853
43854  # Input might be given as Windows format, start by converting to
43855  # unix format.
43856  new_path="$path"
43857
43858  windows_path="$new_path"
43859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43860    unix_path=`$CYGPATH -u "$windows_path"`
43861    new_path="$unix_path"
43862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43864    new_path="$unix_path"
43865  fi
43866
43867
43868  # Now try to locate executable using which
43869  new_path=`$WHICH "$new_path" 2> /dev/null`
43870
43871  if test "x$new_path" = x; then
43872    # Oops. Which didn't find the executable.
43873    # The splitting of arguments from the executable at a space might have been incorrect,
43874    # since paths with space are more likely in Windows. Give it another try with the whole
43875    # argument.
43876    path="$complete"
43877    arguments="EOL"
43878    new_path="$path"
43879
43880  windows_path="$new_path"
43881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43882    unix_path=`$CYGPATH -u "$windows_path"`
43883    new_path="$unix_path"
43884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43886    new_path="$unix_path"
43887  fi
43888
43889
43890    new_path=`$WHICH "$new_path" 2> /dev/null`
43891    # bat and cmd files are not always considered executable in MSYS causing which
43892    # to not find them
43893    if test "x$new_path" = x \
43894        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43895        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43896      new_path="$path"
43897
43898  windows_path="$new_path"
43899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43900    unix_path=`$CYGPATH -u "$windows_path"`
43901    new_path="$unix_path"
43902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43904    new_path="$unix_path"
43905  fi
43906
43907    fi
43908
43909    if test "x$new_path" = x; then
43910      # It's still not found. Now this is an unrecoverable error.
43911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43912$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43913      has_space=`$ECHO "$complete" | $GREP " "`
43914      if test "x$has_space" != x; then
43915        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43916$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43917      fi
43918      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43919    fi
43920  fi
43921
43922  # Now new_path has a complete unix path to the binary
43923  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43924    # Keep paths in /bin as-is, but remove trailing .exe if any
43925    new_path="${new_path/%.exe/}"
43926    # Do not save /bin paths to all_fixpath_prefixes!
43927  else
43928    # Not in mixed or Windows style, start by that.
43929    new_path=`cmd //c echo $new_path`
43930
43931  input_path="$new_path"
43932  # Check if we need to convert this using DOS-style short mode. If the path
43933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43934  # take no chances and rewrite it.
43935  # Note: m4 eats our [], so we need to use [ and ] instead.
43936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43937  if test "x$has_forbidden_chars" != x; then
43938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43940  fi
43941
43942    # Output is in $new_path
43943
43944  windows_path="$new_path"
43945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43946    unix_path=`$CYGPATH -u "$windows_path"`
43947    new_path="$unix_path"
43948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43950    new_path="$unix_path"
43951  fi
43952
43953    # remove trailing .exe if any
43954    new_path="${new_path/%.exe/}"
43955
43956    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43957    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43958  fi
43959
43960    else
43961      # We're on a unix platform. Hooray! :)
43962      # First separate the path from the arguments. This will split at the first
43963      # space.
43964      complete="$BUILD_CC"
43965      path="${complete%% *}"
43966      tmp="$complete EOL"
43967      arguments="${tmp#* }"
43968
43969      # Cannot rely on the command "which" here since it doesn't always work.
43970      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43971      if test -z "$is_absolute_path"; then
43972        # Path to executable is not absolute. Find it.
43973        IFS_save="$IFS"
43974        IFS=:
43975        for p in $PATH; do
43976          if test -f "$p/$path" && test -x "$p/$path"; then
43977            new_path="$p/$path"
43978            break
43979          fi
43980        done
43981        IFS="$IFS_save"
43982      else
43983        # This is an absolute path, we can use it without further modifications.
43984        new_path="$path"
43985      fi
43986
43987      if test "x$new_path" = x; then
43988        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43989$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43990        has_space=`$ECHO "$complete" | $GREP " "`
43991        if test "x$has_space" != x; then
43992          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43993$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43994        fi
43995        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43996      fi
43997    fi
43998
43999    # Now join together the path and the arguments once again
44000    if test "x$arguments" != xEOL; then
44001      new_complete="$new_path ${arguments% *}"
44002    else
44003      new_complete="$new_path"
44004    fi
44005
44006    if test "x$complete" != "x$new_complete"; then
44007      BUILD_CC="$new_complete"
44008      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44009$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44010    fi
44011  fi
44012
44013
44014
44015
44016  # Publish this variable in the help.
44017
44018
44019  if [ -z "${BUILD_CXX+x}" ]; then
44020    # The variable is not set by user, try to locate tool using the code snippet
44021    for ac_prog in cl CC g++
44022do
44023  # Extract the first word of "$ac_prog", so it can be a program name with args.
44024set dummy $ac_prog; ac_word=$2
44025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44026$as_echo_n "checking for $ac_word... " >&6; }
44027if ${ac_cv_path_BUILD_CXX+:} false; then :
44028  $as_echo_n "(cached) " >&6
44029else
44030  case $BUILD_CXX in
44031  [\\/]* | ?:[\\/]*)
44032  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44033  ;;
44034  *)
44035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44036for as_dir in $PATH
44037do
44038  IFS=$as_save_IFS
44039  test -z "$as_dir" && as_dir=.
44040    for ac_exec_ext in '' $ac_executable_extensions; do
44041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44042    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44044    break 2
44045  fi
44046done
44047  done
44048IFS=$as_save_IFS
44049
44050  ;;
44051esac
44052fi
44053BUILD_CXX=$ac_cv_path_BUILD_CXX
44054if test -n "$BUILD_CXX"; then
44055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44056$as_echo "$BUILD_CXX" >&6; }
44057else
44058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44059$as_echo "no" >&6; }
44060fi
44061
44062
44063  test -n "$BUILD_CXX" && break
44064done
44065
44066  else
44067    # The variable is set, but is it from the command line or the environment?
44068
44069    # Try to remove the string !BUILD_CXX! from our list.
44070    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44071    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44072      # If it failed, the variable was not from the command line. Ignore it,
44073      # but warn the user (except for BASH, which is always set by the calling BASH).
44074      if test "xBUILD_CXX" != xBASH; then
44075        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44076$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44077      fi
44078      # Try to locate tool using the code snippet
44079      for ac_prog in cl CC g++
44080do
44081  # Extract the first word of "$ac_prog", so it can be a program name with args.
44082set dummy $ac_prog; ac_word=$2
44083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44084$as_echo_n "checking for $ac_word... " >&6; }
44085if ${ac_cv_path_BUILD_CXX+:} false; then :
44086  $as_echo_n "(cached) " >&6
44087else
44088  case $BUILD_CXX in
44089  [\\/]* | ?:[\\/]*)
44090  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44091  ;;
44092  *)
44093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44094for as_dir in $PATH
44095do
44096  IFS=$as_save_IFS
44097  test -z "$as_dir" && as_dir=.
44098    for ac_exec_ext in '' $ac_executable_extensions; do
44099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44100    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44102    break 2
44103  fi
44104done
44105  done
44106IFS=$as_save_IFS
44107
44108  ;;
44109esac
44110fi
44111BUILD_CXX=$ac_cv_path_BUILD_CXX
44112if test -n "$BUILD_CXX"; then
44113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44114$as_echo "$BUILD_CXX" >&6; }
44115else
44116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44117$as_echo "no" >&6; }
44118fi
44119
44120
44121  test -n "$BUILD_CXX" && break
44122done
44123
44124    else
44125      # If it succeeded, then it was overridden by the user. We will use it
44126      # for the tool.
44127
44128      # First remove it from the list of overridden variables, so we can test
44129      # for unknown variables in the end.
44130      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44131
44132      # Check if we try to supply an empty value
44133      if test "x$BUILD_CXX" = x; then
44134        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44135$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44136        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44137$as_echo_n "checking for BUILD_CXX... " >&6; }
44138        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44139$as_echo "disabled" >&6; }
44140      else
44141        # Check if the provided tool contains a complete path.
44142        tool_specified="$BUILD_CXX"
44143        tool_basename="${tool_specified##*/}"
44144        if test "x$tool_basename" = "x$tool_specified"; then
44145          # A command without a complete path is provided, search $PATH.
44146          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44147$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44148          # Extract the first word of "$tool_basename", so it can be a program name with args.
44149set dummy $tool_basename; ac_word=$2
44150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44151$as_echo_n "checking for $ac_word... " >&6; }
44152if ${ac_cv_path_BUILD_CXX+:} false; then :
44153  $as_echo_n "(cached) " >&6
44154else
44155  case $BUILD_CXX in
44156  [\\/]* | ?:[\\/]*)
44157  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44158  ;;
44159  *)
44160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44161for as_dir in $PATH
44162do
44163  IFS=$as_save_IFS
44164  test -z "$as_dir" && as_dir=.
44165    for ac_exec_ext in '' $ac_executable_extensions; do
44166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44167    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44169    break 2
44170  fi
44171done
44172  done
44173IFS=$as_save_IFS
44174
44175  ;;
44176esac
44177fi
44178BUILD_CXX=$ac_cv_path_BUILD_CXX
44179if test -n "$BUILD_CXX"; then
44180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44181$as_echo "$BUILD_CXX" >&6; }
44182else
44183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44184$as_echo "no" >&6; }
44185fi
44186
44187
44188          if test "x$BUILD_CXX" = x; then
44189            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44190          fi
44191        else
44192          # Otherwise we believe it is a complete path. Use it as it is.
44193          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44194$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44195          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44196$as_echo_n "checking for BUILD_CXX... " >&6; }
44197          if test ! -x "$tool_specified"; then
44198            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44199$as_echo "not found" >&6; }
44200            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44201          fi
44202          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44203$as_echo "$tool_specified" >&6; }
44204        fi
44205      fi
44206    fi
44207
44208  fi
44209
44210
44211
44212  if test "x$BUILD_CXX" = x; then
44213    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44214  fi
44215
44216
44217
44218  # Only process if variable expands to non-empty
44219
44220  if test "x$BUILD_CXX" != x; then
44221    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44222
44223  # First separate the path from the arguments. This will split at the first
44224  # space.
44225  complete="$BUILD_CXX"
44226  path="${complete%% *}"
44227  tmp="$complete EOL"
44228  arguments="${tmp#* }"
44229
44230  # Input might be given as Windows format, start by converting to
44231  # unix format.
44232  new_path=`$CYGPATH -u "$path"`
44233
44234  # Now try to locate executable using which
44235  new_path=`$WHICH "$new_path" 2> /dev/null`
44236  # bat and cmd files are not always considered executable in cygwin causing which
44237  # to not find them
44238  if test "x$new_path" = x \
44239      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44240      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44241    new_path=`$CYGPATH -u "$path"`
44242  fi
44243  if test "x$new_path" = x; then
44244    # Oops. Which didn't find the executable.
44245    # The splitting of arguments from the executable at a space might have been incorrect,
44246    # since paths with space are more likely in Windows. Give it another try with the whole
44247    # argument.
44248    path="$complete"
44249    arguments="EOL"
44250    new_path=`$CYGPATH -u "$path"`
44251    new_path=`$WHICH "$new_path" 2> /dev/null`
44252    # bat and cmd files are not always considered executable in cygwin causing which
44253    # to not find them
44254    if test "x$new_path" = x \
44255        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44256        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44257      new_path=`$CYGPATH -u "$path"`
44258    fi
44259    if test "x$new_path" = x; then
44260      # It's still not found. Now this is an unrecoverable error.
44261      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44262$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44263      has_space=`$ECHO "$complete" | $GREP " "`
44264      if test "x$has_space" != x; then
44265        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44266$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44267      fi
44268      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44269    fi
44270  fi
44271
44272  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44273  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44274  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44275  # "foo.exe" is OK but "foo" is an error.
44276  #
44277  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44278  # It is also a way to make sure we got the proper file name for the real test later on.
44279  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44280  if test "x$test_shortpath" = x; then
44281    # Short path failed, file does not exist as specified.
44282    # Try adding .exe or .cmd
44283    if test -f "${new_path}.exe"; then
44284      input_to_shortpath="${new_path}.exe"
44285    elif test -f "${new_path}.cmd"; then
44286      input_to_shortpath="${new_path}.cmd"
44287    else
44288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44289$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44290      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44291$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44292      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44293    fi
44294  else
44295    input_to_shortpath="$new_path"
44296  fi
44297
44298  # Call helper function which possibly converts this using DOS-style short mode.
44299  # If so, the updated path is stored in $new_path.
44300  new_path="$input_to_shortpath"
44301
44302  input_path="$input_to_shortpath"
44303  # Check if we need to convert this using DOS-style short mode. If the path
44304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44305  # take no chances and rewrite it.
44306  # Note: m4 eats our [], so we need to use [ and ] instead.
44307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44308  if test "x$has_forbidden_chars" != x; then
44309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44310    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44311    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44312    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44313      # Going to short mode and back again did indeed matter. Since short mode is
44314      # case insensitive, let's make it lowercase to improve readability.
44315      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44316      # Now convert it back to Unix-style (cygpath)
44317      input_path=`$CYGPATH -u "$shortmode_path"`
44318      new_path="$input_path"
44319    fi
44320  fi
44321
44322  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44323  if test "x$test_cygdrive_prefix" = x; then
44324    # As a simple fix, exclude /usr/bin since it's not a real path.
44325    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44326      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44327      # a path prefixed by /cygdrive for fixpath to work.
44328      new_path="$CYGWIN_ROOT_PATH$input_path"
44329    fi
44330  fi
44331
44332  # remove trailing .exe if any
44333  new_path="${new_path/%.exe/}"
44334
44335    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44336
44337  # First separate the path from the arguments. This will split at the first
44338  # space.
44339  complete="$BUILD_CXX"
44340  path="${complete%% *}"
44341  tmp="$complete EOL"
44342  arguments="${tmp#* }"
44343
44344  # Input might be given as Windows format, start by converting to
44345  # unix format.
44346  new_path="$path"
44347
44348  windows_path="$new_path"
44349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44350    unix_path=`$CYGPATH -u "$windows_path"`
44351    new_path="$unix_path"
44352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44354    new_path="$unix_path"
44355  fi
44356
44357
44358  # Now try to locate executable using which
44359  new_path=`$WHICH "$new_path" 2> /dev/null`
44360
44361  if test "x$new_path" = x; then
44362    # Oops. Which didn't find the executable.
44363    # The splitting of arguments from the executable at a space might have been incorrect,
44364    # since paths with space are more likely in Windows. Give it another try with the whole
44365    # argument.
44366    path="$complete"
44367    arguments="EOL"
44368    new_path="$path"
44369
44370  windows_path="$new_path"
44371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44372    unix_path=`$CYGPATH -u "$windows_path"`
44373    new_path="$unix_path"
44374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44376    new_path="$unix_path"
44377  fi
44378
44379
44380    new_path=`$WHICH "$new_path" 2> /dev/null`
44381    # bat and cmd files are not always considered executable in MSYS causing which
44382    # to not find them
44383    if test "x$new_path" = x \
44384        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44385        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44386      new_path="$path"
44387
44388  windows_path="$new_path"
44389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44390    unix_path=`$CYGPATH -u "$windows_path"`
44391    new_path="$unix_path"
44392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44394    new_path="$unix_path"
44395  fi
44396
44397    fi
44398
44399    if test "x$new_path" = x; then
44400      # It's still not found. Now this is an unrecoverable error.
44401      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44402$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44403      has_space=`$ECHO "$complete" | $GREP " "`
44404      if test "x$has_space" != x; then
44405        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44406$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44407      fi
44408      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44409    fi
44410  fi
44411
44412  # Now new_path has a complete unix path to the binary
44413  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44414    # Keep paths in /bin as-is, but remove trailing .exe if any
44415    new_path="${new_path/%.exe/}"
44416    # Do not save /bin paths to all_fixpath_prefixes!
44417  else
44418    # Not in mixed or Windows style, start by that.
44419    new_path=`cmd //c echo $new_path`
44420
44421  input_path="$new_path"
44422  # Check if we need to convert this using DOS-style short mode. If the path
44423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44424  # take no chances and rewrite it.
44425  # Note: m4 eats our [], so we need to use [ and ] instead.
44426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44427  if test "x$has_forbidden_chars" != x; then
44428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44429    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44430  fi
44431
44432    # Output is in $new_path
44433
44434  windows_path="$new_path"
44435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44436    unix_path=`$CYGPATH -u "$windows_path"`
44437    new_path="$unix_path"
44438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44440    new_path="$unix_path"
44441  fi
44442
44443    # remove trailing .exe if any
44444    new_path="${new_path/%.exe/}"
44445
44446    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44447    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44448  fi
44449
44450    else
44451      # We're on a unix platform. Hooray! :)
44452      # First separate the path from the arguments. This will split at the first
44453      # space.
44454      complete="$BUILD_CXX"
44455      path="${complete%% *}"
44456      tmp="$complete EOL"
44457      arguments="${tmp#* }"
44458
44459      # Cannot rely on the command "which" here since it doesn't always work.
44460      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44461      if test -z "$is_absolute_path"; then
44462        # Path to executable is not absolute. Find it.
44463        IFS_save="$IFS"
44464        IFS=:
44465        for p in $PATH; do
44466          if test -f "$p/$path" && test -x "$p/$path"; then
44467            new_path="$p/$path"
44468            break
44469          fi
44470        done
44471        IFS="$IFS_save"
44472      else
44473        # This is an absolute path, we can use it without further modifications.
44474        new_path="$path"
44475      fi
44476
44477      if test "x$new_path" = x; then
44478        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44479$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44480        has_space=`$ECHO "$complete" | $GREP " "`
44481        if test "x$has_space" != x; then
44482          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44483$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44484        fi
44485        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44486      fi
44487    fi
44488
44489    # Now join together the path and the arguments once again
44490    if test "x$arguments" != xEOL; then
44491      new_complete="$new_path ${arguments% *}"
44492    else
44493      new_complete="$new_path"
44494    fi
44495
44496    if test "x$complete" != "x$new_complete"; then
44497      BUILD_CXX="$new_complete"
44498      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44499$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44500    fi
44501  fi
44502
44503
44504
44505  # Publish this variable in the help.
44506
44507
44508  if [ -z "${BUILD_NM+x}" ]; then
44509    # The variable is not set by user, try to locate tool using the code snippet
44510    for ac_prog in nm gcc-nm
44511do
44512  # Extract the first word of "$ac_prog", so it can be a program name with args.
44513set dummy $ac_prog; ac_word=$2
44514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44515$as_echo_n "checking for $ac_word... " >&6; }
44516if ${ac_cv_path_BUILD_NM+:} false; then :
44517  $as_echo_n "(cached) " >&6
44518else
44519  case $BUILD_NM in
44520  [\\/]* | ?:[\\/]*)
44521  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44522  ;;
44523  *)
44524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44525for as_dir in $PATH
44526do
44527  IFS=$as_save_IFS
44528  test -z "$as_dir" && as_dir=.
44529    for ac_exec_ext in '' $ac_executable_extensions; do
44530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44531    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44533    break 2
44534  fi
44535done
44536  done
44537IFS=$as_save_IFS
44538
44539  ;;
44540esac
44541fi
44542BUILD_NM=$ac_cv_path_BUILD_NM
44543if test -n "$BUILD_NM"; then
44544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44545$as_echo "$BUILD_NM" >&6; }
44546else
44547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44548$as_echo "no" >&6; }
44549fi
44550
44551
44552  test -n "$BUILD_NM" && break
44553done
44554
44555  else
44556    # The variable is set, but is it from the command line or the environment?
44557
44558    # Try to remove the string !BUILD_NM! from our list.
44559    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
44560    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44561      # If it failed, the variable was not from the command line. Ignore it,
44562      # but warn the user (except for BASH, which is always set by the calling BASH).
44563      if test "xBUILD_NM" != xBASH; then
44564        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
44565$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
44566      fi
44567      # Try to locate tool using the code snippet
44568      for ac_prog in nm gcc-nm
44569do
44570  # Extract the first word of "$ac_prog", so it can be a program name with args.
44571set dummy $ac_prog; ac_word=$2
44572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44573$as_echo_n "checking for $ac_word... " >&6; }
44574if ${ac_cv_path_BUILD_NM+:} false; then :
44575  $as_echo_n "(cached) " >&6
44576else
44577  case $BUILD_NM in
44578  [\\/]* | ?:[\\/]*)
44579  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44580  ;;
44581  *)
44582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44583for as_dir in $PATH
44584do
44585  IFS=$as_save_IFS
44586  test -z "$as_dir" && as_dir=.
44587    for ac_exec_ext in '' $ac_executable_extensions; do
44588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44589    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44591    break 2
44592  fi
44593done
44594  done
44595IFS=$as_save_IFS
44596
44597  ;;
44598esac
44599fi
44600BUILD_NM=$ac_cv_path_BUILD_NM
44601if test -n "$BUILD_NM"; then
44602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44603$as_echo "$BUILD_NM" >&6; }
44604else
44605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44606$as_echo "no" >&6; }
44607fi
44608
44609
44610  test -n "$BUILD_NM" && break
44611done
44612
44613    else
44614      # If it succeeded, then it was overridden by the user. We will use it
44615      # for the tool.
44616
44617      # First remove it from the list of overridden variables, so we can test
44618      # for unknown variables in the end.
44619      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44620
44621      # Check if we try to supply an empty value
44622      if test "x$BUILD_NM" = x; then
44623        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
44624$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
44625        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44626$as_echo_n "checking for BUILD_NM... " >&6; }
44627        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44628$as_echo "disabled" >&6; }
44629      else
44630        # Check if the provided tool contains a complete path.
44631        tool_specified="$BUILD_NM"
44632        tool_basename="${tool_specified##*/}"
44633        if test "x$tool_basename" = "x$tool_specified"; then
44634          # A command without a complete path is provided, search $PATH.
44635          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
44636$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
44637          # Extract the first word of "$tool_basename", so it can be a program name with args.
44638set dummy $tool_basename; ac_word=$2
44639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44640$as_echo_n "checking for $ac_word... " >&6; }
44641if ${ac_cv_path_BUILD_NM+:} false; then :
44642  $as_echo_n "(cached) " >&6
44643else
44644  case $BUILD_NM in
44645  [\\/]* | ?:[\\/]*)
44646  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44647  ;;
44648  *)
44649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44650for as_dir in $PATH
44651do
44652  IFS=$as_save_IFS
44653  test -z "$as_dir" && as_dir=.
44654    for ac_exec_ext in '' $ac_executable_extensions; do
44655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44656    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44658    break 2
44659  fi
44660done
44661  done
44662IFS=$as_save_IFS
44663
44664  ;;
44665esac
44666fi
44667BUILD_NM=$ac_cv_path_BUILD_NM
44668if test -n "$BUILD_NM"; then
44669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44670$as_echo "$BUILD_NM" >&6; }
44671else
44672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44673$as_echo "no" >&6; }
44674fi
44675
44676
44677          if test "x$BUILD_NM" = x; then
44678            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44679          fi
44680        else
44681          # Otherwise we believe it is a complete path. Use it as it is.
44682          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
44683$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
44684          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44685$as_echo_n "checking for BUILD_NM... " >&6; }
44686          if test ! -x "$tool_specified"; then
44687            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44688$as_echo "not found" >&6; }
44689            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44690          fi
44691          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44692$as_echo "$tool_specified" >&6; }
44693        fi
44694      fi
44695    fi
44696
44697  fi
44698
44699
44700
44701  # Only process if variable expands to non-empty
44702
44703  if test "x$BUILD_NM" != x; then
44704    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44705
44706  # First separate the path from the arguments. This will split at the first
44707  # space.
44708  complete="$BUILD_NM"
44709  path="${complete%% *}"
44710  tmp="$complete EOL"
44711  arguments="${tmp#* }"
44712
44713  # Input might be given as Windows format, start by converting to
44714  # unix format.
44715  new_path=`$CYGPATH -u "$path"`
44716
44717  # Now try to locate executable using which
44718  new_path=`$WHICH "$new_path" 2> /dev/null`
44719  # bat and cmd files are not always considered executable in cygwin causing which
44720  # to not find them
44721  if test "x$new_path" = x \
44722      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44723      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44724    new_path=`$CYGPATH -u "$path"`
44725  fi
44726  if test "x$new_path" = x; then
44727    # Oops. Which didn't find the executable.
44728    # The splitting of arguments from the executable at a space might have been incorrect,
44729    # since paths with space are more likely in Windows. Give it another try with the whole
44730    # argument.
44731    path="$complete"
44732    arguments="EOL"
44733    new_path=`$CYGPATH -u "$path"`
44734    new_path=`$WHICH "$new_path" 2> /dev/null`
44735    # bat and cmd files are not always considered executable in cygwin causing which
44736    # to not find them
44737    if test "x$new_path" = x \
44738        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44739        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44740      new_path=`$CYGPATH -u "$path"`
44741    fi
44742    if test "x$new_path" = x; then
44743      # It's still not found. Now this is an unrecoverable error.
44744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44745$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44746      has_space=`$ECHO "$complete" | $GREP " "`
44747      if test "x$has_space" != x; then
44748        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44749$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44750      fi
44751      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44752    fi
44753  fi
44754
44755  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44756  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44757  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44758  # "foo.exe" is OK but "foo" is an error.
44759  #
44760  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44761  # It is also a way to make sure we got the proper file name for the real test later on.
44762  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44763  if test "x$test_shortpath" = x; then
44764    # Short path failed, file does not exist as specified.
44765    # Try adding .exe or .cmd
44766    if test -f "${new_path}.exe"; then
44767      input_to_shortpath="${new_path}.exe"
44768    elif test -f "${new_path}.cmd"; then
44769      input_to_shortpath="${new_path}.cmd"
44770    else
44771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
44772$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
44773      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44774$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44775      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44776    fi
44777  else
44778    input_to_shortpath="$new_path"
44779  fi
44780
44781  # Call helper function which possibly converts this using DOS-style short mode.
44782  # If so, the updated path is stored in $new_path.
44783  new_path="$input_to_shortpath"
44784
44785  input_path="$input_to_shortpath"
44786  # Check if we need to convert this using DOS-style short mode. If the path
44787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44788  # take no chances and rewrite it.
44789  # Note: m4 eats our [], so we need to use [ and ] instead.
44790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44791  if test "x$has_forbidden_chars" != x; then
44792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44793    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44794    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44795    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44796      # Going to short mode and back again did indeed matter. Since short mode is
44797      # case insensitive, let's make it lowercase to improve readability.
44798      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44799      # Now convert it back to Unix-style (cygpath)
44800      input_path=`$CYGPATH -u "$shortmode_path"`
44801      new_path="$input_path"
44802    fi
44803  fi
44804
44805  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44806  if test "x$test_cygdrive_prefix" = x; then
44807    # As a simple fix, exclude /usr/bin since it's not a real path.
44808    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44809      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44810      # a path prefixed by /cygdrive for fixpath to work.
44811      new_path="$CYGWIN_ROOT_PATH$input_path"
44812    fi
44813  fi
44814
44815  # remove trailing .exe if any
44816  new_path="${new_path/%.exe/}"
44817
44818    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44819
44820  # First separate the path from the arguments. This will split at the first
44821  # space.
44822  complete="$BUILD_NM"
44823  path="${complete%% *}"
44824  tmp="$complete EOL"
44825  arguments="${tmp#* }"
44826
44827  # Input might be given as Windows format, start by converting to
44828  # unix format.
44829  new_path="$path"
44830
44831  windows_path="$new_path"
44832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44833    unix_path=`$CYGPATH -u "$windows_path"`
44834    new_path="$unix_path"
44835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44837    new_path="$unix_path"
44838  fi
44839
44840
44841  # Now try to locate executable using which
44842  new_path=`$WHICH "$new_path" 2> /dev/null`
44843
44844  if test "x$new_path" = x; then
44845    # Oops. Which didn't find the executable.
44846    # The splitting of arguments from the executable at a space might have been incorrect,
44847    # since paths with space are more likely in Windows. Give it another try with the whole
44848    # argument.
44849    path="$complete"
44850    arguments="EOL"
44851    new_path="$path"
44852
44853  windows_path="$new_path"
44854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44855    unix_path=`$CYGPATH -u "$windows_path"`
44856    new_path="$unix_path"
44857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44859    new_path="$unix_path"
44860  fi
44861
44862
44863    new_path=`$WHICH "$new_path" 2> /dev/null`
44864    # bat and cmd files are not always considered executable in MSYS causing which
44865    # to not find them
44866    if test "x$new_path" = x \
44867        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44868        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44869      new_path="$path"
44870
44871  windows_path="$new_path"
44872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44873    unix_path=`$CYGPATH -u "$windows_path"`
44874    new_path="$unix_path"
44875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44877    new_path="$unix_path"
44878  fi
44879
44880    fi
44881
44882    if test "x$new_path" = x; then
44883      # It's still not found. Now this is an unrecoverable error.
44884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44885$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44886      has_space=`$ECHO "$complete" | $GREP " "`
44887      if test "x$has_space" != x; then
44888        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44889$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44890      fi
44891      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44892    fi
44893  fi
44894
44895  # Now new_path has a complete unix path to the binary
44896  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44897    # Keep paths in /bin as-is, but remove trailing .exe if any
44898    new_path="${new_path/%.exe/}"
44899    # Do not save /bin paths to all_fixpath_prefixes!
44900  else
44901    # Not in mixed or Windows style, start by that.
44902    new_path=`cmd //c echo $new_path`
44903
44904  input_path="$new_path"
44905  # Check if we need to convert this using DOS-style short mode. If the path
44906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44907  # take no chances and rewrite it.
44908  # Note: m4 eats our [], so we need to use [ and ] instead.
44909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44910  if test "x$has_forbidden_chars" != x; then
44911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44913  fi
44914
44915    # Output is in $new_path
44916
44917  windows_path="$new_path"
44918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44919    unix_path=`$CYGPATH -u "$windows_path"`
44920    new_path="$unix_path"
44921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44923    new_path="$unix_path"
44924  fi
44925
44926    # remove trailing .exe if any
44927    new_path="${new_path/%.exe/}"
44928
44929    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44930    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44931  fi
44932
44933    else
44934      # We're on a unix platform. Hooray! :)
44935      # First separate the path from the arguments. This will split at the first
44936      # space.
44937      complete="$BUILD_NM"
44938      path="${complete%% *}"
44939      tmp="$complete EOL"
44940      arguments="${tmp#* }"
44941
44942      # Cannot rely on the command "which" here since it doesn't always work.
44943      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44944      if test -z "$is_absolute_path"; then
44945        # Path to executable is not absolute. Find it.
44946        IFS_save="$IFS"
44947        IFS=:
44948        for p in $PATH; do
44949          if test -f "$p/$path" && test -x "$p/$path"; then
44950            new_path="$p/$path"
44951            break
44952          fi
44953        done
44954        IFS="$IFS_save"
44955      else
44956        # This is an absolute path, we can use it without further modifications.
44957        new_path="$path"
44958      fi
44959
44960      if test "x$new_path" = x; then
44961        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44962$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44963        has_space=`$ECHO "$complete" | $GREP " "`
44964        if test "x$has_space" != x; then
44965          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44966$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44967        fi
44968        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44969      fi
44970    fi
44971
44972    # Now join together the path and the arguments once again
44973    if test "x$arguments" != xEOL; then
44974      new_complete="$new_path ${arguments% *}"
44975    else
44976      new_complete="$new_path"
44977    fi
44978
44979    if test "x$complete" != "x$new_complete"; then
44980      BUILD_NM="$new_complete"
44981      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
44982$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
44983    fi
44984  fi
44985
44986
44987
44988  # Publish this variable in the help.
44989
44990
44991  if [ -z "${BUILD_AR+x}" ]; then
44992    # The variable is not set by user, try to locate tool using the code snippet
44993    for ac_prog in ar gcc-ar
44994do
44995  # Extract the first word of "$ac_prog", so it can be a program name with args.
44996set dummy $ac_prog; ac_word=$2
44997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44998$as_echo_n "checking for $ac_word... " >&6; }
44999if ${ac_cv_path_BUILD_AR+:} false; then :
45000  $as_echo_n "(cached) " >&6
45001else
45002  case $BUILD_AR in
45003  [\\/]* | ?:[\\/]*)
45004  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45005  ;;
45006  *)
45007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45008for as_dir in $PATH
45009do
45010  IFS=$as_save_IFS
45011  test -z "$as_dir" && as_dir=.
45012    for ac_exec_ext in '' $ac_executable_extensions; do
45013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45014    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45016    break 2
45017  fi
45018done
45019  done
45020IFS=$as_save_IFS
45021
45022  ;;
45023esac
45024fi
45025BUILD_AR=$ac_cv_path_BUILD_AR
45026if test -n "$BUILD_AR"; then
45027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45028$as_echo "$BUILD_AR" >&6; }
45029else
45030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45031$as_echo "no" >&6; }
45032fi
45033
45034
45035  test -n "$BUILD_AR" && break
45036done
45037
45038  else
45039    # The variable is set, but is it from the command line or the environment?
45040
45041    # Try to remove the string !BUILD_AR! from our list.
45042    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45043    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45044      # If it failed, the variable was not from the command line. Ignore it,
45045      # but warn the user (except for BASH, which is always set by the calling BASH).
45046      if test "xBUILD_AR" != xBASH; then
45047        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45048$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45049      fi
45050      # Try to locate tool using the code snippet
45051      for ac_prog in ar gcc-ar
45052do
45053  # Extract the first word of "$ac_prog", so it can be a program name with args.
45054set dummy $ac_prog; ac_word=$2
45055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45056$as_echo_n "checking for $ac_word... " >&6; }
45057if ${ac_cv_path_BUILD_AR+:} false; then :
45058  $as_echo_n "(cached) " >&6
45059else
45060  case $BUILD_AR in
45061  [\\/]* | ?:[\\/]*)
45062  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45063  ;;
45064  *)
45065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45066for as_dir in $PATH
45067do
45068  IFS=$as_save_IFS
45069  test -z "$as_dir" && as_dir=.
45070    for ac_exec_ext in '' $ac_executable_extensions; do
45071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45072    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45074    break 2
45075  fi
45076done
45077  done
45078IFS=$as_save_IFS
45079
45080  ;;
45081esac
45082fi
45083BUILD_AR=$ac_cv_path_BUILD_AR
45084if test -n "$BUILD_AR"; then
45085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45086$as_echo "$BUILD_AR" >&6; }
45087else
45088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45089$as_echo "no" >&6; }
45090fi
45091
45092
45093  test -n "$BUILD_AR" && break
45094done
45095
45096    else
45097      # If it succeeded, then it was overridden by the user. We will use it
45098      # for the tool.
45099
45100      # First remove it from the list of overridden variables, so we can test
45101      # for unknown variables in the end.
45102      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45103
45104      # Check if we try to supply an empty value
45105      if test "x$BUILD_AR" = x; then
45106        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45107$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45108        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45109$as_echo_n "checking for BUILD_AR... " >&6; }
45110        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45111$as_echo "disabled" >&6; }
45112      else
45113        # Check if the provided tool contains a complete path.
45114        tool_specified="$BUILD_AR"
45115        tool_basename="${tool_specified##*/}"
45116        if test "x$tool_basename" = "x$tool_specified"; then
45117          # A command without a complete path is provided, search $PATH.
45118          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45119$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45120          # Extract the first word of "$tool_basename", so it can be a program name with args.
45121set dummy $tool_basename; ac_word=$2
45122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45123$as_echo_n "checking for $ac_word... " >&6; }
45124if ${ac_cv_path_BUILD_AR+:} false; then :
45125  $as_echo_n "(cached) " >&6
45126else
45127  case $BUILD_AR in
45128  [\\/]* | ?:[\\/]*)
45129  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45130  ;;
45131  *)
45132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45133for as_dir in $PATH
45134do
45135  IFS=$as_save_IFS
45136  test -z "$as_dir" && as_dir=.
45137    for ac_exec_ext in '' $ac_executable_extensions; do
45138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45139    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45141    break 2
45142  fi
45143done
45144  done
45145IFS=$as_save_IFS
45146
45147  ;;
45148esac
45149fi
45150BUILD_AR=$ac_cv_path_BUILD_AR
45151if test -n "$BUILD_AR"; then
45152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45153$as_echo "$BUILD_AR" >&6; }
45154else
45155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45156$as_echo "no" >&6; }
45157fi
45158
45159
45160          if test "x$BUILD_AR" = x; then
45161            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45162          fi
45163        else
45164          # Otherwise we believe it is a complete path. Use it as it is.
45165          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45166$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45167          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45168$as_echo_n "checking for BUILD_AR... " >&6; }
45169          if test ! -x "$tool_specified"; then
45170            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45171$as_echo "not found" >&6; }
45172            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45173          fi
45174          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45175$as_echo "$tool_specified" >&6; }
45176        fi
45177      fi
45178    fi
45179
45180  fi
45181
45182
45183
45184  # Only process if variable expands to non-empty
45185
45186  if test "x$BUILD_AR" != x; then
45187    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45188
45189  # First separate the path from the arguments. This will split at the first
45190  # space.
45191  complete="$BUILD_AR"
45192  path="${complete%% *}"
45193  tmp="$complete EOL"
45194  arguments="${tmp#* }"
45195
45196  # Input might be given as Windows format, start by converting to
45197  # unix format.
45198  new_path=`$CYGPATH -u "$path"`
45199
45200  # Now try to locate executable using which
45201  new_path=`$WHICH "$new_path" 2> /dev/null`
45202  # bat and cmd files are not always considered executable in cygwin causing which
45203  # to not find them
45204  if test "x$new_path" = x \
45205      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45206      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45207    new_path=`$CYGPATH -u "$path"`
45208  fi
45209  if test "x$new_path" = x; then
45210    # Oops. Which didn't find the executable.
45211    # The splitting of arguments from the executable at a space might have been incorrect,
45212    # since paths with space are more likely in Windows. Give it another try with the whole
45213    # argument.
45214    path="$complete"
45215    arguments="EOL"
45216    new_path=`$CYGPATH -u "$path"`
45217    new_path=`$WHICH "$new_path" 2> /dev/null`
45218    # bat and cmd files are not always considered executable in cygwin causing which
45219    # to not find them
45220    if test "x$new_path" = x \
45221        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45222        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45223      new_path=`$CYGPATH -u "$path"`
45224    fi
45225    if test "x$new_path" = x; then
45226      # It's still not found. Now this is an unrecoverable error.
45227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45228$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45229      has_space=`$ECHO "$complete" | $GREP " "`
45230      if test "x$has_space" != x; then
45231        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45232$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45233      fi
45234      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45235    fi
45236  fi
45237
45238  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45239  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45240  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45241  # "foo.exe" is OK but "foo" is an error.
45242  #
45243  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45244  # It is also a way to make sure we got the proper file name for the real test later on.
45245  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45246  if test "x$test_shortpath" = x; then
45247    # Short path failed, file does not exist as specified.
45248    # Try adding .exe or .cmd
45249    if test -f "${new_path}.exe"; then
45250      input_to_shortpath="${new_path}.exe"
45251    elif test -f "${new_path}.cmd"; then
45252      input_to_shortpath="${new_path}.cmd"
45253    else
45254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45255$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45256      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45257$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45258      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45259    fi
45260  else
45261    input_to_shortpath="$new_path"
45262  fi
45263
45264  # Call helper function which possibly converts this using DOS-style short mode.
45265  # If so, the updated path is stored in $new_path.
45266  new_path="$input_to_shortpath"
45267
45268  input_path="$input_to_shortpath"
45269  # Check if we need to convert this using DOS-style short mode. If the path
45270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45271  # take no chances and rewrite it.
45272  # Note: m4 eats our [], so we need to use [ and ] instead.
45273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45274  if test "x$has_forbidden_chars" != x; then
45275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45279      # Going to short mode and back again did indeed matter. Since short mode is
45280      # case insensitive, let's make it lowercase to improve readability.
45281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45282      # Now convert it back to Unix-style (cygpath)
45283      input_path=`$CYGPATH -u "$shortmode_path"`
45284      new_path="$input_path"
45285    fi
45286  fi
45287
45288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45289  if test "x$test_cygdrive_prefix" = x; then
45290    # As a simple fix, exclude /usr/bin since it's not a real path.
45291    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45293      # a path prefixed by /cygdrive for fixpath to work.
45294      new_path="$CYGWIN_ROOT_PATH$input_path"
45295    fi
45296  fi
45297
45298  # remove trailing .exe if any
45299  new_path="${new_path/%.exe/}"
45300
45301    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45302
45303  # First separate the path from the arguments. This will split at the first
45304  # space.
45305  complete="$BUILD_AR"
45306  path="${complete%% *}"
45307  tmp="$complete EOL"
45308  arguments="${tmp#* }"
45309
45310  # Input might be given as Windows format, start by converting to
45311  # unix format.
45312  new_path="$path"
45313
45314  windows_path="$new_path"
45315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45316    unix_path=`$CYGPATH -u "$windows_path"`
45317    new_path="$unix_path"
45318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45320    new_path="$unix_path"
45321  fi
45322
45323
45324  # Now try to locate executable using which
45325  new_path=`$WHICH "$new_path" 2> /dev/null`
45326
45327  if test "x$new_path" = x; then
45328    # Oops. Which didn't find the executable.
45329    # The splitting of arguments from the executable at a space might have been incorrect,
45330    # since paths with space are more likely in Windows. Give it another try with the whole
45331    # argument.
45332    path="$complete"
45333    arguments="EOL"
45334    new_path="$path"
45335
45336  windows_path="$new_path"
45337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45338    unix_path=`$CYGPATH -u "$windows_path"`
45339    new_path="$unix_path"
45340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45342    new_path="$unix_path"
45343  fi
45344
45345
45346    new_path=`$WHICH "$new_path" 2> /dev/null`
45347    # bat and cmd files are not always considered executable in MSYS causing which
45348    # to not find them
45349    if test "x$new_path" = x \
45350        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45351        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45352      new_path="$path"
45353
45354  windows_path="$new_path"
45355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45356    unix_path=`$CYGPATH -u "$windows_path"`
45357    new_path="$unix_path"
45358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45360    new_path="$unix_path"
45361  fi
45362
45363    fi
45364
45365    if test "x$new_path" = x; then
45366      # It's still not found. Now this is an unrecoverable error.
45367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45368$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45369      has_space=`$ECHO "$complete" | $GREP " "`
45370      if test "x$has_space" != x; then
45371        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45372$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45373      fi
45374      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45375    fi
45376  fi
45377
45378  # Now new_path has a complete unix path to the binary
45379  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45380    # Keep paths in /bin as-is, but remove trailing .exe if any
45381    new_path="${new_path/%.exe/}"
45382    # Do not save /bin paths to all_fixpath_prefixes!
45383  else
45384    # Not in mixed or Windows style, start by that.
45385    new_path=`cmd //c echo $new_path`
45386
45387  input_path="$new_path"
45388  # Check if we need to convert this using DOS-style short mode. If the path
45389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45390  # take no chances and rewrite it.
45391  # Note: m4 eats our [], so we need to use [ and ] instead.
45392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45393  if test "x$has_forbidden_chars" != x; then
45394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45396  fi
45397
45398    # Output is in $new_path
45399
45400  windows_path="$new_path"
45401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45402    unix_path=`$CYGPATH -u "$windows_path"`
45403    new_path="$unix_path"
45404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45406    new_path="$unix_path"
45407  fi
45408
45409    # remove trailing .exe if any
45410    new_path="${new_path/%.exe/}"
45411
45412    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45413    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45414  fi
45415
45416    else
45417      # We're on a unix platform. Hooray! :)
45418      # First separate the path from the arguments. This will split at the first
45419      # space.
45420      complete="$BUILD_AR"
45421      path="${complete%% *}"
45422      tmp="$complete EOL"
45423      arguments="${tmp#* }"
45424
45425      # Cannot rely on the command "which" here since it doesn't always work.
45426      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45427      if test -z "$is_absolute_path"; then
45428        # Path to executable is not absolute. Find it.
45429        IFS_save="$IFS"
45430        IFS=:
45431        for p in $PATH; do
45432          if test -f "$p/$path" && test -x "$p/$path"; then
45433            new_path="$p/$path"
45434            break
45435          fi
45436        done
45437        IFS="$IFS_save"
45438      else
45439        # This is an absolute path, we can use it without further modifications.
45440        new_path="$path"
45441      fi
45442
45443      if test "x$new_path" = x; then
45444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45445$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45446        has_space=`$ECHO "$complete" | $GREP " "`
45447        if test "x$has_space" != x; then
45448          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45449$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45450        fi
45451        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45452      fi
45453    fi
45454
45455    # Now join together the path and the arguments once again
45456    if test "x$arguments" != xEOL; then
45457      new_complete="$new_path ${arguments% *}"
45458    else
45459      new_complete="$new_path"
45460    fi
45461
45462    if test "x$complete" != "x$new_complete"; then
45463      BUILD_AR="$new_complete"
45464      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45465$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45466    fi
45467  fi
45468
45469
45470
45471  # Publish this variable in the help.
45472
45473
45474  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45475    # The variable is not set by user, try to locate tool using the code snippet
45476    for ac_prog in objcopy
45477do
45478  # Extract the first word of "$ac_prog", so it can be a program name with args.
45479set dummy $ac_prog; ac_word=$2
45480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45481$as_echo_n "checking for $ac_word... " >&6; }
45482if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45483  $as_echo_n "(cached) " >&6
45484else
45485  case $BUILD_OBJCOPY in
45486  [\\/]* | ?:[\\/]*)
45487  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45488  ;;
45489  *)
45490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45491for as_dir in $PATH
45492do
45493  IFS=$as_save_IFS
45494  test -z "$as_dir" && as_dir=.
45495    for ac_exec_ext in '' $ac_executable_extensions; do
45496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45497    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45499    break 2
45500  fi
45501done
45502  done
45503IFS=$as_save_IFS
45504
45505  ;;
45506esac
45507fi
45508BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45509if test -n "$BUILD_OBJCOPY"; then
45510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45511$as_echo "$BUILD_OBJCOPY" >&6; }
45512else
45513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45514$as_echo "no" >&6; }
45515fi
45516
45517
45518  test -n "$BUILD_OBJCOPY" && break
45519done
45520
45521  else
45522    # The variable is set, but is it from the command line or the environment?
45523
45524    # Try to remove the string !BUILD_OBJCOPY! from our list.
45525    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
45526    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45527      # If it failed, the variable was not from the command line. Ignore it,
45528      # but warn the user (except for BASH, which is always set by the calling BASH).
45529      if test "xBUILD_OBJCOPY" != xBASH; then
45530        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
45531$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
45532      fi
45533      # Try to locate tool using the code snippet
45534      for ac_prog in objcopy
45535do
45536  # Extract the first word of "$ac_prog", so it can be a program name with args.
45537set dummy $ac_prog; ac_word=$2
45538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45539$as_echo_n "checking for $ac_word... " >&6; }
45540if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45541  $as_echo_n "(cached) " >&6
45542else
45543  case $BUILD_OBJCOPY in
45544  [\\/]* | ?:[\\/]*)
45545  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45546  ;;
45547  *)
45548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45549for as_dir in $PATH
45550do
45551  IFS=$as_save_IFS
45552  test -z "$as_dir" && as_dir=.
45553    for ac_exec_ext in '' $ac_executable_extensions; do
45554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45555    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45557    break 2
45558  fi
45559done
45560  done
45561IFS=$as_save_IFS
45562
45563  ;;
45564esac
45565fi
45566BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45567if test -n "$BUILD_OBJCOPY"; then
45568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45569$as_echo "$BUILD_OBJCOPY" >&6; }
45570else
45571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45572$as_echo "no" >&6; }
45573fi
45574
45575
45576  test -n "$BUILD_OBJCOPY" && break
45577done
45578
45579    else
45580      # If it succeeded, then it was overridden by the user. We will use it
45581      # for the tool.
45582
45583      # First remove it from the list of overridden variables, so we can test
45584      # for unknown variables in the end.
45585      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45586
45587      # Check if we try to supply an empty value
45588      if test "x$BUILD_OBJCOPY" = x; then
45589        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
45590$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
45591        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45592$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45593        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45594$as_echo "disabled" >&6; }
45595      else
45596        # Check if the provided tool contains a complete path.
45597        tool_specified="$BUILD_OBJCOPY"
45598        tool_basename="${tool_specified##*/}"
45599        if test "x$tool_basename" = "x$tool_specified"; then
45600          # A command without a complete path is provided, search $PATH.
45601          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
45602$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
45603          # Extract the first word of "$tool_basename", so it can be a program name with args.
45604set dummy $tool_basename; ac_word=$2
45605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45606$as_echo_n "checking for $ac_word... " >&6; }
45607if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45608  $as_echo_n "(cached) " >&6
45609else
45610  case $BUILD_OBJCOPY in
45611  [\\/]* | ?:[\\/]*)
45612  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45613  ;;
45614  *)
45615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45616for as_dir in $PATH
45617do
45618  IFS=$as_save_IFS
45619  test -z "$as_dir" && as_dir=.
45620    for ac_exec_ext in '' $ac_executable_extensions; do
45621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45622    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45624    break 2
45625  fi
45626done
45627  done
45628IFS=$as_save_IFS
45629
45630  ;;
45631esac
45632fi
45633BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45634if test -n "$BUILD_OBJCOPY"; then
45635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45636$as_echo "$BUILD_OBJCOPY" >&6; }
45637else
45638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45639$as_echo "no" >&6; }
45640fi
45641
45642
45643          if test "x$BUILD_OBJCOPY" = x; then
45644            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45645          fi
45646        else
45647          # Otherwise we believe it is a complete path. Use it as it is.
45648          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
45649$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
45650          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45651$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45652          if test ! -x "$tool_specified"; then
45653            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45654$as_echo "not found" >&6; }
45655            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
45656          fi
45657          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45658$as_echo "$tool_specified" >&6; }
45659        fi
45660      fi
45661    fi
45662
45663  fi
45664
45665
45666
45667  # Only process if variable expands to non-empty
45668
45669  if test "x$BUILD_OBJCOPY" != x; then
45670    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45671
45672  # First separate the path from the arguments. This will split at the first
45673  # space.
45674  complete="$BUILD_OBJCOPY"
45675  path="${complete%% *}"
45676  tmp="$complete EOL"
45677  arguments="${tmp#* }"
45678
45679  # Input might be given as Windows format, start by converting to
45680  # unix format.
45681  new_path=`$CYGPATH -u "$path"`
45682
45683  # Now try to locate executable using which
45684  new_path=`$WHICH "$new_path" 2> /dev/null`
45685  # bat and cmd files are not always considered executable in cygwin causing which
45686  # to not find them
45687  if test "x$new_path" = x \
45688      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45689      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45690    new_path=`$CYGPATH -u "$path"`
45691  fi
45692  if test "x$new_path" = x; then
45693    # Oops. Which didn't find the executable.
45694    # The splitting of arguments from the executable at a space might have been incorrect,
45695    # since paths with space are more likely in Windows. Give it another try with the whole
45696    # argument.
45697    path="$complete"
45698    arguments="EOL"
45699    new_path=`$CYGPATH -u "$path"`
45700    new_path=`$WHICH "$new_path" 2> /dev/null`
45701    # bat and cmd files are not always considered executable in cygwin causing which
45702    # to not find them
45703    if test "x$new_path" = x \
45704        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45705        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45706      new_path=`$CYGPATH -u "$path"`
45707    fi
45708    if test "x$new_path" = x; then
45709      # It's still not found. Now this is an unrecoverable error.
45710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45711$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45712      has_space=`$ECHO "$complete" | $GREP " "`
45713      if test "x$has_space" != x; then
45714        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45715$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45716      fi
45717      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45718    fi
45719  fi
45720
45721  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45722  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45723  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45724  # "foo.exe" is OK but "foo" is an error.
45725  #
45726  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45727  # It is also a way to make sure we got the proper file name for the real test later on.
45728  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45729  if test "x$test_shortpath" = x; then
45730    # Short path failed, file does not exist as specified.
45731    # Try adding .exe or .cmd
45732    if test -f "${new_path}.exe"; then
45733      input_to_shortpath="${new_path}.exe"
45734    elif test -f "${new_path}.cmd"; then
45735      input_to_shortpath="${new_path}.cmd"
45736    else
45737      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
45738$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
45739      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45740$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45741      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45742    fi
45743  else
45744    input_to_shortpath="$new_path"
45745  fi
45746
45747  # Call helper function which possibly converts this using DOS-style short mode.
45748  # If so, the updated path is stored in $new_path.
45749  new_path="$input_to_shortpath"
45750
45751  input_path="$input_to_shortpath"
45752  # Check if we need to convert this using DOS-style short mode. If the path
45753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45754  # take no chances and rewrite it.
45755  # Note: m4 eats our [], so we need to use [ and ] instead.
45756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45757  if test "x$has_forbidden_chars" != x; then
45758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45759    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45760    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45761    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45762      # Going to short mode and back again did indeed matter. Since short mode is
45763      # case insensitive, let's make it lowercase to improve readability.
45764      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45765      # Now convert it back to Unix-style (cygpath)
45766      input_path=`$CYGPATH -u "$shortmode_path"`
45767      new_path="$input_path"
45768    fi
45769  fi
45770
45771  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45772  if test "x$test_cygdrive_prefix" = x; then
45773    # As a simple fix, exclude /usr/bin since it's not a real path.
45774    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45775      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45776      # a path prefixed by /cygdrive for fixpath to work.
45777      new_path="$CYGWIN_ROOT_PATH$input_path"
45778    fi
45779  fi
45780
45781  # remove trailing .exe if any
45782  new_path="${new_path/%.exe/}"
45783
45784    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45785
45786  # First separate the path from the arguments. This will split at the first
45787  # space.
45788  complete="$BUILD_OBJCOPY"
45789  path="${complete%% *}"
45790  tmp="$complete EOL"
45791  arguments="${tmp#* }"
45792
45793  # Input might be given as Windows format, start by converting to
45794  # unix format.
45795  new_path="$path"
45796
45797  windows_path="$new_path"
45798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45799    unix_path=`$CYGPATH -u "$windows_path"`
45800    new_path="$unix_path"
45801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45803    new_path="$unix_path"
45804  fi
45805
45806
45807  # Now try to locate executable using which
45808  new_path=`$WHICH "$new_path" 2> /dev/null`
45809
45810  if test "x$new_path" = x; then
45811    # Oops. Which didn't find the executable.
45812    # The splitting of arguments from the executable at a space might have been incorrect,
45813    # since paths with space are more likely in Windows. Give it another try with the whole
45814    # argument.
45815    path="$complete"
45816    arguments="EOL"
45817    new_path="$path"
45818
45819  windows_path="$new_path"
45820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45821    unix_path=`$CYGPATH -u "$windows_path"`
45822    new_path="$unix_path"
45823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45825    new_path="$unix_path"
45826  fi
45827
45828
45829    new_path=`$WHICH "$new_path" 2> /dev/null`
45830    # bat and cmd files are not always considered executable in MSYS causing which
45831    # to not find them
45832    if test "x$new_path" = x \
45833        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45834        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45835      new_path="$path"
45836
45837  windows_path="$new_path"
45838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45839    unix_path=`$CYGPATH -u "$windows_path"`
45840    new_path="$unix_path"
45841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45843    new_path="$unix_path"
45844  fi
45845
45846    fi
45847
45848    if test "x$new_path" = x; then
45849      # It's still not found. Now this is an unrecoverable error.
45850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45851$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45852      has_space=`$ECHO "$complete" | $GREP " "`
45853      if test "x$has_space" != x; then
45854        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45855$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45856      fi
45857      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45858    fi
45859  fi
45860
45861  # Now new_path has a complete unix path to the binary
45862  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45863    # Keep paths in /bin as-is, but remove trailing .exe if any
45864    new_path="${new_path/%.exe/}"
45865    # Do not save /bin paths to all_fixpath_prefixes!
45866  else
45867    # Not in mixed or Windows style, start by that.
45868    new_path=`cmd //c echo $new_path`
45869
45870  input_path="$new_path"
45871  # Check if we need to convert this using DOS-style short mode. If the path
45872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45873  # take no chances and rewrite it.
45874  # Note: m4 eats our [], so we need to use [ and ] instead.
45875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45876  if test "x$has_forbidden_chars" != x; then
45877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45878    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45879  fi
45880
45881    # Output is in $new_path
45882
45883  windows_path="$new_path"
45884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45885    unix_path=`$CYGPATH -u "$windows_path"`
45886    new_path="$unix_path"
45887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45889    new_path="$unix_path"
45890  fi
45891
45892    # remove trailing .exe if any
45893    new_path="${new_path/%.exe/}"
45894
45895    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45896    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45897  fi
45898
45899    else
45900      # We're on a unix platform. Hooray! :)
45901      # First separate the path from the arguments. This will split at the first
45902      # space.
45903      complete="$BUILD_OBJCOPY"
45904      path="${complete%% *}"
45905      tmp="$complete EOL"
45906      arguments="${tmp#* }"
45907
45908      # Cannot rely on the command "which" here since it doesn't always work.
45909      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45910      if test -z "$is_absolute_path"; then
45911        # Path to executable is not absolute. Find it.
45912        IFS_save="$IFS"
45913        IFS=:
45914        for p in $PATH; do
45915          if test -f "$p/$path" && test -x "$p/$path"; then
45916            new_path="$p/$path"
45917            break
45918          fi
45919        done
45920        IFS="$IFS_save"
45921      else
45922        # This is an absolute path, we can use it without further modifications.
45923        new_path="$path"
45924      fi
45925
45926      if test "x$new_path" = x; then
45927        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45928$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45929        has_space=`$ECHO "$complete" | $GREP " "`
45930        if test "x$has_space" != x; then
45931          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45932$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45933        fi
45934        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45935      fi
45936    fi
45937
45938    # Now join together the path and the arguments once again
45939    if test "x$arguments" != xEOL; then
45940      new_complete="$new_path ${arguments% *}"
45941    else
45942      new_complete="$new_path"
45943    fi
45944
45945    if test "x$complete" != "x$new_complete"; then
45946      BUILD_OBJCOPY="$new_complete"
45947      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
45948$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
45949    fi
45950  fi
45951
45952
45953
45954  # Publish this variable in the help.
45955
45956
45957  if [ -z "${BUILD_STRIP+x}" ]; then
45958    # The variable is not set by user, try to locate tool using the code snippet
45959    for ac_prog in strip
45960do
45961  # Extract the first word of "$ac_prog", so it can be a program name with args.
45962set dummy $ac_prog; ac_word=$2
45963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45964$as_echo_n "checking for $ac_word... " >&6; }
45965if ${ac_cv_path_BUILD_STRIP+:} false; then :
45966  $as_echo_n "(cached) " >&6
45967else
45968  case $BUILD_STRIP in
45969  [\\/]* | ?:[\\/]*)
45970  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
45971  ;;
45972  *)
45973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45974for as_dir in $PATH
45975do
45976  IFS=$as_save_IFS
45977  test -z "$as_dir" && as_dir=.
45978    for ac_exec_ext in '' $ac_executable_extensions; do
45979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45980    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
45981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45982    break 2
45983  fi
45984done
45985  done
45986IFS=$as_save_IFS
45987
45988  ;;
45989esac
45990fi
45991BUILD_STRIP=$ac_cv_path_BUILD_STRIP
45992if test -n "$BUILD_STRIP"; then
45993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
45994$as_echo "$BUILD_STRIP" >&6; }
45995else
45996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45997$as_echo "no" >&6; }
45998fi
45999
46000
46001  test -n "$BUILD_STRIP" && break
46002done
46003
46004  else
46005    # The variable is set, but is it from the command line or the environment?
46006
46007    # Try to remove the string !BUILD_STRIP! from our list.
46008    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46009    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46010      # If it failed, the variable was not from the command line. Ignore it,
46011      # but warn the user (except for BASH, which is always set by the calling BASH).
46012      if test "xBUILD_STRIP" != xBASH; then
46013        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46014$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46015      fi
46016      # Try to locate tool using the code snippet
46017      for ac_prog in strip
46018do
46019  # Extract the first word of "$ac_prog", so it can be a program name with args.
46020set dummy $ac_prog; ac_word=$2
46021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46022$as_echo_n "checking for $ac_word... " >&6; }
46023if ${ac_cv_path_BUILD_STRIP+:} false; then :
46024  $as_echo_n "(cached) " >&6
46025else
46026  case $BUILD_STRIP in
46027  [\\/]* | ?:[\\/]*)
46028  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46029  ;;
46030  *)
46031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46032for as_dir in $PATH
46033do
46034  IFS=$as_save_IFS
46035  test -z "$as_dir" && as_dir=.
46036    for ac_exec_ext in '' $ac_executable_extensions; do
46037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46038    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46040    break 2
46041  fi
46042done
46043  done
46044IFS=$as_save_IFS
46045
46046  ;;
46047esac
46048fi
46049BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46050if test -n "$BUILD_STRIP"; then
46051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46052$as_echo "$BUILD_STRIP" >&6; }
46053else
46054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46055$as_echo "no" >&6; }
46056fi
46057
46058
46059  test -n "$BUILD_STRIP" && break
46060done
46061
46062    else
46063      # If it succeeded, then it was overridden by the user. We will use it
46064      # for the tool.
46065
46066      # First remove it from the list of overridden variables, so we can test
46067      # for unknown variables in the end.
46068      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46069
46070      # Check if we try to supply an empty value
46071      if test "x$BUILD_STRIP" = x; then
46072        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46073$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46074        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46075$as_echo_n "checking for BUILD_STRIP... " >&6; }
46076        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46077$as_echo "disabled" >&6; }
46078      else
46079        # Check if the provided tool contains a complete path.
46080        tool_specified="$BUILD_STRIP"
46081        tool_basename="${tool_specified##*/}"
46082        if test "x$tool_basename" = "x$tool_specified"; then
46083          # A command without a complete path is provided, search $PATH.
46084          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46085$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46086          # Extract the first word of "$tool_basename", so it can be a program name with args.
46087set dummy $tool_basename; ac_word=$2
46088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46089$as_echo_n "checking for $ac_word... " >&6; }
46090if ${ac_cv_path_BUILD_STRIP+:} false; then :
46091  $as_echo_n "(cached) " >&6
46092else
46093  case $BUILD_STRIP in
46094  [\\/]* | ?:[\\/]*)
46095  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46096  ;;
46097  *)
46098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46099for as_dir in $PATH
46100do
46101  IFS=$as_save_IFS
46102  test -z "$as_dir" && as_dir=.
46103    for ac_exec_ext in '' $ac_executable_extensions; do
46104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46105    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46107    break 2
46108  fi
46109done
46110  done
46111IFS=$as_save_IFS
46112
46113  ;;
46114esac
46115fi
46116BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46117if test -n "$BUILD_STRIP"; then
46118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46119$as_echo "$BUILD_STRIP" >&6; }
46120else
46121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46122$as_echo "no" >&6; }
46123fi
46124
46125
46126          if test "x$BUILD_STRIP" = x; then
46127            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46128          fi
46129        else
46130          # Otherwise we believe it is a complete path. Use it as it is.
46131          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46132$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46133          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46134$as_echo_n "checking for BUILD_STRIP... " >&6; }
46135          if test ! -x "$tool_specified"; then
46136            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46137$as_echo "not found" >&6; }
46138            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46139          fi
46140          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46141$as_echo "$tool_specified" >&6; }
46142        fi
46143      fi
46144    fi
46145
46146  fi
46147
46148
46149
46150  # Only process if variable expands to non-empty
46151
46152  if test "x$BUILD_STRIP" != x; then
46153    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46154
46155  # First separate the path from the arguments. This will split at the first
46156  # space.
46157  complete="$BUILD_STRIP"
46158  path="${complete%% *}"
46159  tmp="$complete EOL"
46160  arguments="${tmp#* }"
46161
46162  # Input might be given as Windows format, start by converting to
46163  # unix format.
46164  new_path=`$CYGPATH -u "$path"`
46165
46166  # Now try to locate executable using which
46167  new_path=`$WHICH "$new_path" 2> /dev/null`
46168  # bat and cmd files are not always considered executable in cygwin causing which
46169  # to not find them
46170  if test "x$new_path" = x \
46171      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46172      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46173    new_path=`$CYGPATH -u "$path"`
46174  fi
46175  if test "x$new_path" = x; then
46176    # Oops. Which didn't find the executable.
46177    # The splitting of arguments from the executable at a space might have been incorrect,
46178    # since paths with space are more likely in Windows. Give it another try with the whole
46179    # argument.
46180    path="$complete"
46181    arguments="EOL"
46182    new_path=`$CYGPATH -u "$path"`
46183    new_path=`$WHICH "$new_path" 2> /dev/null`
46184    # bat and cmd files are not always considered executable in cygwin causing which
46185    # to not find them
46186    if test "x$new_path" = x \
46187        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46188        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46189      new_path=`$CYGPATH -u "$path"`
46190    fi
46191    if test "x$new_path" = x; then
46192      # It's still not found. Now this is an unrecoverable error.
46193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46194$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46195      has_space=`$ECHO "$complete" | $GREP " "`
46196      if test "x$has_space" != x; then
46197        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46198$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46199      fi
46200      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46201    fi
46202  fi
46203
46204  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46205  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46206  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46207  # "foo.exe" is OK but "foo" is an error.
46208  #
46209  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46210  # It is also a way to make sure we got the proper file name for the real test later on.
46211  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46212  if test "x$test_shortpath" = x; then
46213    # Short path failed, file does not exist as specified.
46214    # Try adding .exe or .cmd
46215    if test -f "${new_path}.exe"; then
46216      input_to_shortpath="${new_path}.exe"
46217    elif test -f "${new_path}.cmd"; then
46218      input_to_shortpath="${new_path}.cmd"
46219    else
46220      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46221$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46222      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46223$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46224      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46225    fi
46226  else
46227    input_to_shortpath="$new_path"
46228  fi
46229
46230  # Call helper function which possibly converts this using DOS-style short mode.
46231  # If so, the updated path is stored in $new_path.
46232  new_path="$input_to_shortpath"
46233
46234  input_path="$input_to_shortpath"
46235  # Check if we need to convert this using DOS-style short mode. If the path
46236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46237  # take no chances and rewrite it.
46238  # Note: m4 eats our [], so we need to use [ and ] instead.
46239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46240  if test "x$has_forbidden_chars" != x; then
46241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46242    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46243    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46244    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46245      # Going to short mode and back again did indeed matter. Since short mode is
46246      # case insensitive, let's make it lowercase to improve readability.
46247      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46248      # Now convert it back to Unix-style (cygpath)
46249      input_path=`$CYGPATH -u "$shortmode_path"`
46250      new_path="$input_path"
46251    fi
46252  fi
46253
46254  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46255  if test "x$test_cygdrive_prefix" = x; then
46256    # As a simple fix, exclude /usr/bin since it's not a real path.
46257    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46258      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46259      # a path prefixed by /cygdrive for fixpath to work.
46260      new_path="$CYGWIN_ROOT_PATH$input_path"
46261    fi
46262  fi
46263
46264  # remove trailing .exe if any
46265  new_path="${new_path/%.exe/}"
46266
46267    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46268
46269  # First separate the path from the arguments. This will split at the first
46270  # space.
46271  complete="$BUILD_STRIP"
46272  path="${complete%% *}"
46273  tmp="$complete EOL"
46274  arguments="${tmp#* }"
46275
46276  # Input might be given as Windows format, start by converting to
46277  # unix format.
46278  new_path="$path"
46279
46280  windows_path="$new_path"
46281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46282    unix_path=`$CYGPATH -u "$windows_path"`
46283    new_path="$unix_path"
46284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46286    new_path="$unix_path"
46287  fi
46288
46289
46290  # Now try to locate executable using which
46291  new_path=`$WHICH "$new_path" 2> /dev/null`
46292
46293  if test "x$new_path" = x; then
46294    # Oops. Which didn't find the executable.
46295    # The splitting of arguments from the executable at a space might have been incorrect,
46296    # since paths with space are more likely in Windows. Give it another try with the whole
46297    # argument.
46298    path="$complete"
46299    arguments="EOL"
46300    new_path="$path"
46301
46302  windows_path="$new_path"
46303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46304    unix_path=`$CYGPATH -u "$windows_path"`
46305    new_path="$unix_path"
46306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46308    new_path="$unix_path"
46309  fi
46310
46311
46312    new_path=`$WHICH "$new_path" 2> /dev/null`
46313    # bat and cmd files are not always considered executable in MSYS causing which
46314    # to not find them
46315    if test "x$new_path" = x \
46316        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46317        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46318      new_path="$path"
46319
46320  windows_path="$new_path"
46321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46322    unix_path=`$CYGPATH -u "$windows_path"`
46323    new_path="$unix_path"
46324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46326    new_path="$unix_path"
46327  fi
46328
46329    fi
46330
46331    if test "x$new_path" = x; then
46332      # It's still not found. Now this is an unrecoverable error.
46333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46334$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46335      has_space=`$ECHO "$complete" | $GREP " "`
46336      if test "x$has_space" != x; then
46337        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46338$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46339      fi
46340      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46341    fi
46342  fi
46343
46344  # Now new_path has a complete unix path to the binary
46345  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46346    # Keep paths in /bin as-is, but remove trailing .exe if any
46347    new_path="${new_path/%.exe/}"
46348    # Do not save /bin paths to all_fixpath_prefixes!
46349  else
46350    # Not in mixed or Windows style, start by that.
46351    new_path=`cmd //c echo $new_path`
46352
46353  input_path="$new_path"
46354  # Check if we need to convert this using DOS-style short mode. If the path
46355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46356  # take no chances and rewrite it.
46357  # Note: m4 eats our [], so we need to use [ and ] instead.
46358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46359  if test "x$has_forbidden_chars" != x; then
46360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46361    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46362  fi
46363
46364    # Output is in $new_path
46365
46366  windows_path="$new_path"
46367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46368    unix_path=`$CYGPATH -u "$windows_path"`
46369    new_path="$unix_path"
46370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46372    new_path="$unix_path"
46373  fi
46374
46375    # remove trailing .exe if any
46376    new_path="${new_path/%.exe/}"
46377
46378    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46379    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46380  fi
46381
46382    else
46383      # We're on a unix platform. Hooray! :)
46384      # First separate the path from the arguments. This will split at the first
46385      # space.
46386      complete="$BUILD_STRIP"
46387      path="${complete%% *}"
46388      tmp="$complete EOL"
46389      arguments="${tmp#* }"
46390
46391      # Cannot rely on the command "which" here since it doesn't always work.
46392      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46393      if test -z "$is_absolute_path"; then
46394        # Path to executable is not absolute. Find it.
46395        IFS_save="$IFS"
46396        IFS=:
46397        for p in $PATH; do
46398          if test -f "$p/$path" && test -x "$p/$path"; then
46399            new_path="$p/$path"
46400            break
46401          fi
46402        done
46403        IFS="$IFS_save"
46404      else
46405        # This is an absolute path, we can use it without further modifications.
46406        new_path="$path"
46407      fi
46408
46409      if test "x$new_path" = x; then
46410        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46411$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46412        has_space=`$ECHO "$complete" | $GREP " "`
46413        if test "x$has_space" != x; then
46414          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46415$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46416        fi
46417        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46418      fi
46419    fi
46420
46421    # Now join together the path and the arguments once again
46422    if test "x$arguments" != xEOL; then
46423      new_complete="$new_path ${arguments% *}"
46424    else
46425      new_complete="$new_path"
46426    fi
46427
46428    if test "x$complete" != "x$new_complete"; then
46429      BUILD_STRIP="$new_complete"
46430      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46431$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46432    fi
46433  fi
46434
46435    # Assume the C compiler is the assembler
46436    BUILD_AS="$BUILD_CC -c"
46437    # Just like for the target compiler, use the compiler as linker
46438    BUILD_LD="$BUILD_CC"
46439    BUILD_LDCXX="$BUILD_CXX"
46440
46441    PATH="$OLDPATH"
46442  else
46443    # If we are not cross compiling, use the normal target compilers for
46444    # building the build platform executables.
46445    BUILD_CC="$CC"
46446    BUILD_CXX="$CXX"
46447    BUILD_LD="$LD"
46448    BUILD_LDCXX="$LDCXX"
46449    BUILD_NM="$NM"
46450    BUILD_AS="$AS"
46451    BUILD_OBJCOPY="$OBJCOPY"
46452    BUILD_STRIP="$STRIP"
46453    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
46454    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
46455    BUILD_AR="$AR"
46456  fi
46457
46458
46459
46460
46461
46462
46463
46464
46465
46466
46467
46468
46469  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46470    # For hotspot, we need these in Windows mixed path,
46471    # so rewrite them all. Need added .exe suffix.
46472    HOTSPOT_CXX="$CXX.exe"
46473    HOTSPOT_LD="$LD.exe"
46474    HOTSPOT_MT="$MT.exe"
46475    HOTSPOT_RC="$RC.exe"
46476
46477  unix_path="$HOTSPOT_CXX"
46478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46479    windows_path=`$CYGPATH -m "$unix_path"`
46480    HOTSPOT_CXX="$windows_path"
46481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46482    windows_path=`cmd //c echo $unix_path`
46483    HOTSPOT_CXX="$windows_path"
46484  fi
46485
46486
46487  unix_path="$HOTSPOT_LD"
46488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46489    windows_path=`$CYGPATH -m "$unix_path"`
46490    HOTSPOT_LD="$windows_path"
46491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46492    windows_path=`cmd //c echo $unix_path`
46493    HOTSPOT_LD="$windows_path"
46494  fi
46495
46496
46497  unix_path="$HOTSPOT_MT"
46498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46499    windows_path=`$CYGPATH -m "$unix_path"`
46500    HOTSPOT_MT="$windows_path"
46501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46502    windows_path=`cmd //c echo $unix_path`
46503    HOTSPOT_MT="$windows_path"
46504  fi
46505
46506
46507  unix_path="$HOTSPOT_RC"
46508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46509    windows_path=`$CYGPATH -m "$unix_path"`
46510    HOTSPOT_RC="$windows_path"
46511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46512    windows_path=`cmd //c echo $unix_path`
46513    HOTSPOT_RC="$windows_path"
46514  fi
46515
46516
46517
46518  else
46519    HOTSPOT_CXX="$CXX"
46520    HOTSPOT_LD="$LD"
46521  fi
46522
46523
46524
46525  if test  "x$TOOLCHAIN_TYPE" = xclang; then
46526    USE_CLANG=true
46527  fi
46528
46529
46530
46531
46532
46533  # The package path is used only on macosx?
46534  # FIXME: clean this up, and/or move it elsewhere.
46535  PACKAGE_PATH=/opt/local
46536
46537
46538  # Check for extra potential brokenness.
46539  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46540    # On Windows, double-check that we got the right compiler.
46541    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46542    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
46543    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
46544      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
46545        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
46546      fi
46547    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
46548      if test "x$COMPILER_CPU_TEST" != "xx64"; then
46549        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
46550      fi
46551    fi
46552  fi
46553
46554  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46555    # If this is a --hash-style=gnu system, use --hash-style=both, why?
46556    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
46557    # This is later checked when setting flags.
46558
46559    # "-Og" suppported for GCC 4.8 and later
46560    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
46561
46562
46563
46564
46565
46566
46567
46568
46569
46570
46571
46572
46573
46574
46575
46576
46577
46578
46579
46580
46581
46582
46583
46584
46585
46586
46587
46588
46589
46590
46591
46592
46593
46594
46595
46596
46597
46598
46599
46600
46601
46602
46603
46604
46605
46606
46607
46608    # Execute function body
46609
46610
46611
46612
46613
46614
46615
46616
46617
46618
46619
46620
46621
46622
46623
46624
46625
46626
46627
46628
46629
46630
46631
46632
46633
46634
46635
46636
46637
46638
46639
46640
46641
46642
46643
46644
46645
46646
46647
46648
46649
46650
46651
46652
46653
46654
46655
46656
46657    # Execute function body
46658
46659  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46660$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46661  supports=yes
46662
46663  saved_cflags="$CFLAGS"
46664  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
46665  ac_ext=c
46666ac_cpp='$CPP $CPPFLAGS'
46667ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46668ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46669ac_compiler_gnu=$ac_cv_c_compiler_gnu
46670
46671  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46672/* end confdefs.h.  */
46673int i;
46674_ACEOF
46675if ac_fn_c_try_compile "$LINENO"; then :
46676
46677else
46678  supports=no
46679fi
46680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46681  ac_ext=cpp
46682ac_cpp='$CXXCPP $CPPFLAGS'
46683ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46684ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46685ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46686
46687  CFLAGS="$saved_cflags"
46688
46689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46690$as_echo "$supports" >&6; }
46691  if test "x$supports" = "xyes" ; then
46692    :
46693    C_COMP_SUPPORTS="yes"
46694  else
46695    :
46696    C_COMP_SUPPORTS="no"
46697  fi
46698
46699
46700
46701
46702
46703
46704
46705
46706
46707
46708
46709
46710
46711
46712
46713
46714
46715
46716
46717
46718
46719
46720
46721
46722
46723
46724
46725
46726
46727
46728
46729
46730
46731
46732
46733
46734
46735
46736
46737
46738
46739
46740
46741
46742
46743
46744
46745
46746
46747
46748
46749
46750
46751
46752
46753
46754
46755
46756
46757    # Execute function body
46758
46759  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46760$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46761  supports=yes
46762
46763  saved_cxxflags="$CXXFLAGS"
46764  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
46765  ac_ext=cpp
46766ac_cpp='$CXXCPP $CPPFLAGS'
46767ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46768ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46769ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46770
46771  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46772/* end confdefs.h.  */
46773int i;
46774_ACEOF
46775if ac_fn_cxx_try_compile "$LINENO"; then :
46776
46777else
46778  supports=no
46779fi
46780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46781  ac_ext=cpp
46782ac_cpp='$CXXCPP $CPPFLAGS'
46783ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46784ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46785ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46786
46787  CXXFLAGS="$saved_cxxflags"
46788
46789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46790$as_echo "$supports" >&6; }
46791  if test "x$supports" = "xyes" ; then
46792    :
46793    CXX_COMP_SUPPORTS="yes"
46794  else
46795    :
46796    CXX_COMP_SUPPORTS="no"
46797  fi
46798
46799
46800
46801
46802
46803
46804
46805
46806
46807
46808
46809
46810
46811  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46812$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46813  supports=no
46814  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
46815
46816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46817$as_echo "$supports" >&6; }
46818  if test "x$supports" = "xyes" ; then
46819    :
46820    HAS_CFLAG_OPTIMIZE_DEBUG=true
46821  else
46822    :
46823    HAS_CFLAG_OPTIMIZE_DEBUG=false
46824  fi
46825
46826
46827
46828
46829
46830
46831
46832    # "-z relro" supported in GNU binutils 2.17 and later
46833    LINKER_RELRO_FLAG="-Wl,-z,relro"
46834
46835
46836
46837
46838
46839
46840
46841
46842
46843
46844
46845
46846
46847
46848
46849
46850
46851
46852
46853
46854
46855
46856
46857
46858
46859
46860
46861
46862
46863
46864
46865
46866
46867
46868
46869
46870
46871
46872
46873
46874
46875
46876
46877
46878
46879
46880
46881    # Execute function body
46882
46883  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
46884$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
46885  supports=yes
46886
46887  saved_ldflags="$LDFLAGS"
46888  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
46889  ac_ext=c
46890ac_cpp='$CPP $CPPFLAGS'
46891ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46892ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46893ac_compiler_gnu=$ac_cv_c_compiler_gnu
46894
46895  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46896/* end confdefs.h.  */
46897
46898int
46899main ()
46900{
46901
46902  ;
46903  return 0;
46904}
46905_ACEOF
46906if ac_fn_c_try_link "$LINENO"; then :
46907
46908else
46909  supports=no
46910fi
46911rm -f core conftest.err conftest.$ac_objext \
46912    conftest$ac_exeext conftest.$ac_ext
46913  ac_ext=cpp
46914ac_cpp='$CXXCPP $CPPFLAGS'
46915ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46916ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46917ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46918
46919  LDFLAGS="$saved_ldflags"
46920
46921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46922$as_echo "$supports" >&6; }
46923  if test "x$supports" = "xyes" ; then
46924    :
46925    HAS_LINKER_RELRO=true
46926  else
46927    :
46928    HAS_LINKER_RELRO=false
46929  fi
46930
46931
46932
46933
46934
46935
46936
46937
46938
46939
46940
46941
46942
46943    # "-z now" supported in GNU binutils 2.11 and later
46944    LINKER_NOW_FLAG="-Wl,-z,now"
46945
46946
46947
46948
46949
46950
46951
46952
46953
46954
46955
46956
46957
46958
46959
46960
46961
46962
46963
46964
46965
46966
46967
46968
46969
46970
46971
46972
46973
46974
46975
46976
46977
46978
46979
46980
46981
46982
46983
46984
46985
46986
46987
46988
46989
46990
46991
46992    # Execute function body
46993
46994  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
46995$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
46996  supports=yes
46997
46998  saved_ldflags="$LDFLAGS"
46999  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47000  ac_ext=c
47001ac_cpp='$CPP $CPPFLAGS'
47002ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47003ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47004ac_compiler_gnu=$ac_cv_c_compiler_gnu
47005
47006  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47007/* end confdefs.h.  */
47008
47009int
47010main ()
47011{
47012
47013  ;
47014  return 0;
47015}
47016_ACEOF
47017if ac_fn_c_try_link "$LINENO"; then :
47018
47019else
47020  supports=no
47021fi
47022rm -f core conftest.err conftest.$ac_objext \
47023    conftest$ac_exeext conftest.$ac_ext
47024  ac_ext=cpp
47025ac_cpp='$CXXCPP $CPPFLAGS'
47026ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47027ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47028ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47029
47030  LDFLAGS="$saved_ldflags"
47031
47032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47033$as_echo "$supports" >&6; }
47034  if test "x$supports" = "xyes" ; then
47035    :
47036    HAS_LINKER_NOW=true
47037  else
47038    :
47039    HAS_LINKER_NOW=false
47040  fi
47041
47042
47043
47044
47045
47046
47047
47048
47049
47050
47051
47052
47053  fi
47054
47055  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47056  # in executable.'
47057  USING_BROKEN_SUSE_LD=no
47058  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47059    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47060$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47061    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47062    $ECHO "int main() { }" > main.c
47063    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47064      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47065$as_echo "no" >&6; }
47066      USING_BROKEN_SUSE_LD=no
47067    else
47068      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47069$as_echo "yes" >&6; }
47070      USING_BROKEN_SUSE_LD=yes
47071    fi
47072    rm -rf version-script.map main.c a.out
47073  fi
47074
47075
47076  # Setup hotspot lecagy names for toolchains
47077  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47078  if test "x$TOOLCHAIN_TYPE" = xclang; then
47079    HOTSPOT_TOOLCHAIN_TYPE=gcc
47080  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47081    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47082  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47083    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47084  fi
47085
47086
47087
47088# Setup the JTReg Regression Test Harness.
47089
47090
47091# Check whether --with-jtreg was given.
47092if test "${with_jtreg+set}" = set; then :
47093  withval=$with_jtreg;
47094else
47095  with_jtreg=no
47096fi
47097
47098
47099  if test "x$with_jtreg" = xno; then
47100    # jtreg disabled
47101    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47102$as_echo_n "checking for jtreg... " >&6; }
47103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47104$as_echo "no" >&6; }
47105  else
47106    if test "x$with_jtreg" != xyes; then
47107      # with path specified.
47108      JT_HOME="$with_jtreg"
47109    fi
47110
47111    if test "x$JT_HOME" != x; then
47112      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47113$as_echo_n "checking for jtreg... " >&6; }
47114
47115      # use JT_HOME enviroment var.
47116
47117  # Only process if variable expands to non-empty
47118
47119  if test "x$JT_HOME" != x; then
47120    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47121
47122  # Input might be given as Windows format, start by converting to
47123  # unix format.
47124  path="$JT_HOME"
47125  new_path=`$CYGPATH -u "$path"`
47126
47127  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47128  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47129  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47130  # "foo.exe" is OK but "foo" is an error.
47131  #
47132  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47133  # It is also a way to make sure we got the proper file name for the real test later on.
47134  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47135  if test "x$test_shortpath" = x; then
47136    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47137$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47138    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47139  fi
47140
47141  # Call helper function which possibly converts this using DOS-style short mode.
47142  # If so, the updated path is stored in $new_path.
47143
47144  input_path="$new_path"
47145  # Check if we need to convert this using DOS-style short mode. If the path
47146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47147  # take no chances and rewrite it.
47148  # Note: m4 eats our [], so we need to use [ and ] instead.
47149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47150  if test "x$has_forbidden_chars" != x; then
47151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47152    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47153    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47154    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47155      # Going to short mode and back again did indeed matter. Since short mode is
47156      # case insensitive, let's make it lowercase to improve readability.
47157      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47158      # Now convert it back to Unix-style (cygpath)
47159      input_path=`$CYGPATH -u "$shortmode_path"`
47160      new_path="$input_path"
47161    fi
47162  fi
47163
47164  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47165  if test "x$test_cygdrive_prefix" = x; then
47166    # As a simple fix, exclude /usr/bin since it's not a real path.
47167    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47168      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47169      # a path prefixed by /cygdrive for fixpath to work.
47170      new_path="$CYGWIN_ROOT_PATH$input_path"
47171    fi
47172  fi
47173
47174
47175  if test "x$path" != "x$new_path"; then
47176    JT_HOME="$new_path"
47177    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47178$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47179  fi
47180
47181    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47182
47183  path="$JT_HOME"
47184  has_colon=`$ECHO $path | $GREP ^.:`
47185  new_path="$path"
47186  if test "x$has_colon" = x; then
47187    # Not in mixed or Windows style, start by that.
47188    new_path=`cmd //c echo $path`
47189  fi
47190
47191
47192  input_path="$new_path"
47193  # Check if we need to convert this using DOS-style short mode. If the path
47194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47195  # take no chances and rewrite it.
47196  # Note: m4 eats our [], so we need to use [ and ] instead.
47197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47198  if test "x$has_forbidden_chars" != x; then
47199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47201  fi
47202
47203
47204  windows_path="$new_path"
47205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47206    unix_path=`$CYGPATH -u "$windows_path"`
47207    new_path="$unix_path"
47208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47210    new_path="$unix_path"
47211  fi
47212
47213  if test "x$path" != "x$new_path"; then
47214    JT_HOME="$new_path"
47215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47216$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47217  fi
47218
47219  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47220  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47221
47222    else
47223      # We're on a unix platform. Hooray! :)
47224      path="$JT_HOME"
47225      has_space=`$ECHO "$path" | $GREP " "`
47226      if test "x$has_space" != x; then
47227        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47228$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47229        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47230      fi
47231
47232      # Use eval to expand a potential ~
47233      eval path="$path"
47234      if test ! -f "$path" && test ! -d "$path"; then
47235        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
47236      fi
47237
47238      if test -d "$path"; then
47239        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
47240      else
47241        dir="`$DIRNAME "$path"`"
47242        base="`$BASENAME "$path"`"
47243        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
47244      fi
47245    fi
47246  fi
47247
47248
47249      # jtreg win32 script works for everybody
47250      JTREGEXE="$JT_HOME/bin/jtreg"
47251
47252      if test ! -f "$JTREGEXE"; then
47253        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
47254      fi
47255
47256      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47257$as_echo "$JTREGEXE" >&6; }
47258    else
47259      # try to find jtreg on path
47260
47261
47262
47263  # Publish this variable in the help.
47264
47265
47266  if [ -z "${JTREGEXE+x}" ]; then
47267    # The variable is not set by user, try to locate tool using the code snippet
47268    for ac_prog in jtreg
47269do
47270  # Extract the first word of "$ac_prog", so it can be a program name with args.
47271set dummy $ac_prog; ac_word=$2
47272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47273$as_echo_n "checking for $ac_word... " >&6; }
47274if ${ac_cv_path_JTREGEXE+:} false; then :
47275  $as_echo_n "(cached) " >&6
47276else
47277  case $JTREGEXE in
47278  [\\/]* | ?:[\\/]*)
47279  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47280  ;;
47281  *)
47282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47283for as_dir in $PATH
47284do
47285  IFS=$as_save_IFS
47286  test -z "$as_dir" && as_dir=.
47287    for ac_exec_ext in '' $ac_executable_extensions; do
47288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47289    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47291    break 2
47292  fi
47293done
47294  done
47295IFS=$as_save_IFS
47296
47297  ;;
47298esac
47299fi
47300JTREGEXE=$ac_cv_path_JTREGEXE
47301if test -n "$JTREGEXE"; then
47302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47303$as_echo "$JTREGEXE" >&6; }
47304else
47305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47306$as_echo "no" >&6; }
47307fi
47308
47309
47310  test -n "$JTREGEXE" && break
47311done
47312
47313  else
47314    # The variable is set, but is it from the command line or the environment?
47315
47316    # Try to remove the string !JTREGEXE! from our list.
47317    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
47318    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47319      # If it failed, the variable was not from the command line. Ignore it,
47320      # but warn the user (except for BASH, which is always set by the calling BASH).
47321      if test "xJTREGEXE" != xBASH; then
47322        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
47323$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
47324      fi
47325      # Try to locate tool using the code snippet
47326      for ac_prog in jtreg
47327do
47328  # Extract the first word of "$ac_prog", so it can be a program name with args.
47329set dummy $ac_prog; ac_word=$2
47330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47331$as_echo_n "checking for $ac_word... " >&6; }
47332if ${ac_cv_path_JTREGEXE+:} false; then :
47333  $as_echo_n "(cached) " >&6
47334else
47335  case $JTREGEXE in
47336  [\\/]* | ?:[\\/]*)
47337  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47338  ;;
47339  *)
47340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47341for as_dir in $PATH
47342do
47343  IFS=$as_save_IFS
47344  test -z "$as_dir" && as_dir=.
47345    for ac_exec_ext in '' $ac_executable_extensions; do
47346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47347    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47349    break 2
47350  fi
47351done
47352  done
47353IFS=$as_save_IFS
47354
47355  ;;
47356esac
47357fi
47358JTREGEXE=$ac_cv_path_JTREGEXE
47359if test -n "$JTREGEXE"; then
47360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47361$as_echo "$JTREGEXE" >&6; }
47362else
47363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47364$as_echo "no" >&6; }
47365fi
47366
47367
47368  test -n "$JTREGEXE" && break
47369done
47370
47371    else
47372      # If it succeeded, then it was overridden by the user. We will use it
47373      # for the tool.
47374
47375      # First remove it from the list of overridden variables, so we can test
47376      # for unknown variables in the end.
47377      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47378
47379      # Check if we try to supply an empty value
47380      if test "x$JTREGEXE" = x; then
47381        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
47382$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
47383        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47384$as_echo_n "checking for JTREGEXE... " >&6; }
47385        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47386$as_echo "disabled" >&6; }
47387      else
47388        # Check if the provided tool contains a complete path.
47389        tool_specified="$JTREGEXE"
47390        tool_basename="${tool_specified##*/}"
47391        if test "x$tool_basename" = "x$tool_specified"; then
47392          # A command without a complete path is provided, search $PATH.
47393          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
47394$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
47395          # Extract the first word of "$tool_basename", so it can be a program name with args.
47396set dummy $tool_basename; ac_word=$2
47397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47398$as_echo_n "checking for $ac_word... " >&6; }
47399if ${ac_cv_path_JTREGEXE+:} false; then :
47400  $as_echo_n "(cached) " >&6
47401else
47402  case $JTREGEXE in
47403  [\\/]* | ?:[\\/]*)
47404  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47405  ;;
47406  *)
47407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47408for as_dir in $PATH
47409do
47410  IFS=$as_save_IFS
47411  test -z "$as_dir" && as_dir=.
47412    for ac_exec_ext in '' $ac_executable_extensions; do
47413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47414    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47416    break 2
47417  fi
47418done
47419  done
47420IFS=$as_save_IFS
47421
47422  ;;
47423esac
47424fi
47425JTREGEXE=$ac_cv_path_JTREGEXE
47426if test -n "$JTREGEXE"; then
47427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47428$as_echo "$JTREGEXE" >&6; }
47429else
47430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47431$as_echo "no" >&6; }
47432fi
47433
47434
47435          if test "x$JTREGEXE" = x; then
47436            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47437          fi
47438        else
47439          # Otherwise we believe it is a complete path. Use it as it is.
47440          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
47441$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
47442          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47443$as_echo_n "checking for JTREGEXE... " >&6; }
47444          if test ! -x "$tool_specified"; then
47445            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47446$as_echo "not found" >&6; }
47447            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
47448          fi
47449          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47450$as_echo "$tool_specified" >&6; }
47451        fi
47452      fi
47453    fi
47454
47455  fi
47456
47457
47458
47459  if test "x$JTREGEXE" = x; then
47460    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
47461  fi
47462
47463
47464      JT_HOME="`$DIRNAME $JTREGEXE`"
47465    fi
47466  fi
47467
47468
47469
47470
47471
47472
47473  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
47474  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
47475  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
47476  #                              commands produced by the link step (currently AIX only)
47477  if test "x$TOOLCHAIN_TYPE" = xxlc; then
47478    COMPILER_TARGET_BITS_FLAG="-q"
47479    COMPILER_COMMAND_FILE_FLAG="-f"
47480    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
47481  else
47482    COMPILER_TARGET_BITS_FLAG="-m"
47483    COMPILER_COMMAND_FILE_FLAG="@"
47484    COMPILER_BINDCMD_FILE_FLAG=""
47485
47486    # The solstudio linker does not support @-files.
47487    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47488      COMPILER_COMMAND_FILE_FLAG=
47489    fi
47490
47491    # Check if @file is supported by gcc
47492    if test "x$TOOLCHAIN_TYPE" = xgcc; then
47493      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
47494$as_echo_n "checking if @file is supported by gcc... " >&6; }
47495      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
47496      $ECHO "" "--version" > command.file
47497      if $CXX @command.file 2>&5 >&5; then
47498        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47499$as_echo "yes" >&6; }
47500        COMPILER_COMMAND_FILE_FLAG="@"
47501      else
47502        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47503$as_echo "no" >&6; }
47504        COMPILER_COMMAND_FILE_FLAG=
47505      fi
47506      rm -rf command.file
47507    fi
47508  fi
47509
47510
47511
47512
47513  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
47514  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47515    ARFLAGS="-r"
47516  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47517    ARFLAGS="-X64"
47518  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
47519    # lib.exe is used as AR to create static libraries.
47520    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
47521  else
47522    ARFLAGS=""
47523  fi
47524
47525
47526  ## Setup strip.
47527  # FIXME: should this really be per platform, or should it be per toolchain type?
47528  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
47529  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
47530  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47531    STRIPFLAGS="-g"
47532  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
47533    STRIPFLAGS="-x"
47534  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
47535    STRIPFLAGS="-S"
47536  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47537    STRIPFLAGS="-X32_64"
47538  fi
47539
47540
47541
47542  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47543    CC_OUT_OPTION=-Fo
47544    EXE_OUT_OPTION=-out:
47545    LD_OUT_OPTION=-out:
47546    AR_OUT_OPTION=-out:
47547  else
47548    # The option used to specify the target .o,.a or .so file.
47549    # When compiling, how to specify the to be created object file.
47550    CC_OUT_OPTION='-o$(SPACE)'
47551    # When linking, how to specify the to be created executable.
47552    EXE_OUT_OPTION='-o$(SPACE)'
47553    # When linking, how to specify the to be created dynamically linkable library.
47554    LD_OUT_OPTION='-o$(SPACE)'
47555    # When archiving, how to specify the to be create static archive for object files.
47556    AR_OUT_OPTION='rcs$(SPACE)'
47557  fi
47558
47559
47560
47561
47562
47563  # On Windows, we need to set RC flags.
47564  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47565    RC_FLAGS="-nologo -l0x409"
47566    JVM_RCFLAGS="-nologo"
47567    if test "x$DEBUG_LEVEL" = xrelease; then
47568      RC_FLAGS="$RC_FLAGS -DNDEBUG"
47569      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
47570    fi
47571
47572    # The version variables used to create RC_FLAGS may be overridden
47573    # in a custom configure script, or possibly the command line.
47574    # Let those variables be expanded at make time in spec.gmk.
47575    # The \$ are escaped to the shell, and the $(...) variables
47576    # are evaluated by make.
47577    RC_FLAGS="$RC_FLAGS \
47578        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
47579        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
47580        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
47581        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
47582        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
47583        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
47584        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
47585
47586    JVM_RCFLAGS="$JVM_RCFLAGS \
47587        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
47588        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
47589        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
47590        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
47591        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
47592        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
47593        -D\"HS_FNAME=jvm.dll\" \
47594        -D\"HS_INTERNAL_NAME=jvm\""
47595  fi
47596
47597
47598
47599  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47600    # silence copyright notice and other headers.
47601    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
47602  fi
47603
47604
47605# Now we can test some aspects on the target using configure macros.
47606
47607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
47608$as_echo_n "checking for ANSI C header files... " >&6; }
47609if ${ac_cv_header_stdc+:} false; then :
47610  $as_echo_n "(cached) " >&6
47611else
47612  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47613/* end confdefs.h.  */
47614#include <stdlib.h>
47615#include <stdarg.h>
47616#include <string.h>
47617#include <float.h>
47618
47619int
47620main ()
47621{
47622
47623  ;
47624  return 0;
47625}
47626_ACEOF
47627if ac_fn_cxx_try_compile "$LINENO"; then :
47628  ac_cv_header_stdc=yes
47629else
47630  ac_cv_header_stdc=no
47631fi
47632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47633
47634if test $ac_cv_header_stdc = yes; then
47635  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
47636  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47637/* end confdefs.h.  */
47638#include <string.h>
47639
47640_ACEOF
47641if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47642  $EGREP "memchr" >/dev/null 2>&1; then :
47643
47644else
47645  ac_cv_header_stdc=no
47646fi
47647rm -f conftest*
47648
47649fi
47650
47651if test $ac_cv_header_stdc = yes; then
47652  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
47653  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47654/* end confdefs.h.  */
47655#include <stdlib.h>
47656
47657_ACEOF
47658if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47659  $EGREP "free" >/dev/null 2>&1; then :
47660
47661else
47662  ac_cv_header_stdc=no
47663fi
47664rm -f conftest*
47665
47666fi
47667
47668if test $ac_cv_header_stdc = yes; then
47669  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
47670  if test "$cross_compiling" = yes; then :
47671  :
47672else
47673  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47674/* end confdefs.h.  */
47675#include <ctype.h>
47676#include <stdlib.h>
47677#if ((' ' & 0x0FF) == 0x020)
47678# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
47679# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
47680#else
47681# define ISLOWER(c) \
47682		   (('a' <= (c) && (c) <= 'i') \
47683		     || ('j' <= (c) && (c) <= 'r') \
47684		     || ('s' <= (c) && (c) <= 'z'))
47685# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
47686#endif
47687
47688#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
47689int
47690main ()
47691{
47692  int i;
47693  for (i = 0; i < 256; i++)
47694    if (XOR (islower (i), ISLOWER (i))
47695	|| toupper (i) != TOUPPER (i))
47696      return 2;
47697  return 0;
47698}
47699_ACEOF
47700if ac_fn_cxx_try_run "$LINENO"; then :
47701
47702else
47703  ac_cv_header_stdc=no
47704fi
47705rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47706  conftest.$ac_objext conftest.beam conftest.$ac_ext
47707fi
47708
47709fi
47710fi
47711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
47712$as_echo "$ac_cv_header_stdc" >&6; }
47713if test $ac_cv_header_stdc = yes; then
47714
47715$as_echo "#define STDC_HEADERS 1" >>confdefs.h
47716
47717fi
47718
47719# On IRIX 5.3, sys/types and inttypes.h are conflicting.
47720for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
47721		  inttypes.h stdint.h unistd.h
47722do :
47723  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
47724ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
47725"
47726if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
47727  cat >>confdefs.h <<_ACEOF
47728#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
47729_ACEOF
47730
47731fi
47732
47733done
47734
47735
47736
47737  ###############################################################################
47738  #
47739  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
47740  # (The JVM can use 32 or 64 bit Java pointers but that decision
47741  # is made at runtime.)
47742  #
47743
47744  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
47745    # Always specify -m flag on Solaris
47746    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
47747
47748  # When we add flags to the "official" CFLAGS etc, we need to
47749  # keep track of these additions in ADDED_CFLAGS etc. These
47750  # will later be checked to make sure only controlled additions
47751  # have been made to CFLAGS etc.
47752  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47753  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47754  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47755
47756  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47757  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47758  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47759
47760  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47761  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47762  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47763
47764  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47765  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47766  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47767
47768  elif test "x$COMPILE_TYPE" = xreduced; then
47769    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
47770      # Specify -m if running reduced on unix platforms
47771
47772  # When we add flags to the "official" CFLAGS etc, we need to
47773  # keep track of these additions in ADDED_CFLAGS etc. These
47774  # will later be checked to make sure only controlled additions
47775  # have been made to CFLAGS etc.
47776  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47777  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47778  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47779
47780  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47781  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47782  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47783
47784  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47785  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47786  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47787
47788  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47789  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47790  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47791
47792    fi
47793  fi
47794  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47795    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47796    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47797    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47798  fi
47799
47800  # Make compilation sanity check
47801  for ac_header in stdio.h
47802do :
47803  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
47804if test "x$ac_cv_header_stdio_h" = xyes; then :
47805  cat >>confdefs.h <<_ACEOF
47806#define HAVE_STDIO_H 1
47807_ACEOF
47808
47809else
47810
47811    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
47812$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
47813    if test "x$COMPILE_TYPE" = xreduced; then
47814
47815  # Print a helpful message on how to acquire the necessary build dependency.
47816  # reduced is the help tag: freetype, cups, alsa etc
47817  MISSING_DEPENDENCY=reduced
47818
47819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47820    cygwin_help $MISSING_DEPENDENCY
47821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47822    msys_help $MISSING_DEPENDENCY
47823  else
47824    PKGHANDLER_COMMAND=
47825
47826    case $PKGHANDLER in
47827      apt-get)
47828        apt_help     $MISSING_DEPENDENCY ;;
47829      yum)
47830        yum_help     $MISSING_DEPENDENCY ;;
47831      port)
47832        port_help    $MISSING_DEPENDENCY ;;
47833      pkgutil)
47834        pkgutil_help $MISSING_DEPENDENCY ;;
47835      pkgadd)
47836        pkgadd_help  $MISSING_DEPENDENCY ;;
47837    esac
47838
47839    if test "x$PKGHANDLER_COMMAND" != x; then
47840      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47841    fi
47842  fi
47843
47844      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
47845$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
47846    elif test "x$COMPILE_TYPE" = xcross; then
47847      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
47848$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
47849    fi
47850    as_fn_error $? "Cannot continue." "$LINENO" 5
47851
47852fi
47853
47854done
47855
47856
47857  # The cast to long int works around a bug in the HP C Compiler
47858# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47859# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47860# This bug is HP SR number 8606223364.
47861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47862$as_echo_n "checking size of int *... " >&6; }
47863if ${ac_cv_sizeof_int_p+:} false; then :
47864  $as_echo_n "(cached) " >&6
47865else
47866  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47867
47868else
47869  if test "$ac_cv_type_int_p" = yes; then
47870     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47872as_fn_error 77 "cannot compute sizeof (int *)
47873See \`config.log' for more details" "$LINENO" 5; }
47874   else
47875     ac_cv_sizeof_int_p=0
47876   fi
47877fi
47878
47879fi
47880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47881$as_echo "$ac_cv_sizeof_int_p" >&6; }
47882
47883
47884
47885cat >>confdefs.h <<_ACEOF
47886#define SIZEOF_INT_P $ac_cv_sizeof_int_p
47887_ACEOF
47888
47889
47890
47891  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
47892  if test "x$ac_cv_sizeof_int_p" = x; then
47893    # The test failed, lets stick to the assumed value.
47894    { $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
47895$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
47896  else
47897    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
47898
47899    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
47900      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
47901      # Let's try to implicitely set the compilers target architecture and retry the test
47902      { $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
47903$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;}
47904      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
47905$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
47906
47907  # When we add flags to the "official" CFLAGS etc, we need to
47908  # keep track of these additions in ADDED_CFLAGS etc. These
47909  # will later be checked to make sure only controlled additions
47910  # have been made to CFLAGS etc.
47911  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47912  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47913  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47914
47915  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47916  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47917  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47918
47919  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47920  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47921  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47922
47923  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47924  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47925  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47926
47927
47928      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
47929      unset ac_cv_sizeof_int_p
47930      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
47931      cat >>confdefs.h <<_ACEOF
47932#undef SIZEOF_INT_P
47933_ACEOF
47934
47935      # The cast to long int works around a bug in the HP C Compiler
47936# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47937# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47938# This bug is HP SR number 8606223364.
47939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47940$as_echo_n "checking size of int *... " >&6; }
47941if ${ac_cv_sizeof_int_p+:} false; then :
47942  $as_echo_n "(cached) " >&6
47943else
47944  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47945
47946else
47947  if test "$ac_cv_type_int_p" = yes; then
47948     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47949$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47950as_fn_error 77 "cannot compute sizeof (int *)
47951See \`config.log' for more details" "$LINENO" 5; }
47952   else
47953     ac_cv_sizeof_int_p=0
47954   fi
47955fi
47956
47957fi
47958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47959$as_echo "$ac_cv_sizeof_int_p" >&6; }
47960
47961
47962
47963cat >>confdefs.h <<_ACEOF
47964#define SIZEOF_INT_P $ac_cv_sizeof_int_p
47965_ACEOF
47966
47967
47968
47969      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
47970
47971      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
47972        { $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
47973$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;}
47974        if test "x$COMPILE_TYPE" = xreduced; then
47975
47976  # Print a helpful message on how to acquire the necessary build dependency.
47977  # reduced is the help tag: freetype, cups, alsa etc
47978  MISSING_DEPENDENCY=reduced
47979
47980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47981    cygwin_help $MISSING_DEPENDENCY
47982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47983    msys_help $MISSING_DEPENDENCY
47984  else
47985    PKGHANDLER_COMMAND=
47986
47987    case $PKGHANDLER in
47988      apt-get)
47989        apt_help     $MISSING_DEPENDENCY ;;
47990      yum)
47991        yum_help     $MISSING_DEPENDENCY ;;
47992      port)
47993        port_help    $MISSING_DEPENDENCY ;;
47994      pkgutil)
47995        pkgutil_help $MISSING_DEPENDENCY ;;
47996      pkgadd)
47997        pkgadd_help  $MISSING_DEPENDENCY ;;
47998    esac
47999
48000    if test "x$PKGHANDLER_COMMAND" != x; then
48001      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48002    fi
48003  fi
48004
48005          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48006$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48007        elif test "x$COMPILE_TYPE" = xcross; then
48008          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48009$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48010        fi
48011        as_fn_error $? "Cannot continue." "$LINENO" 5
48012      fi
48013    fi
48014  fi
48015
48016  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48017$as_echo_n "checking for target address size... " >&6; }
48018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48019$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48020
48021
48022  ###############################################################################
48023  #
48024  # Is the target little of big endian?
48025  #
48026   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48027$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48028if ${ac_cv_c_bigendian+:} false; then :
48029  $as_echo_n "(cached) " >&6
48030else
48031  ac_cv_c_bigendian=unknown
48032    # See if we're dealing with a universal compiler.
48033    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48034/* end confdefs.h.  */
48035#ifndef __APPLE_CC__
48036	       not a universal capable compiler
48037	     #endif
48038	     typedef int dummy;
48039
48040_ACEOF
48041if ac_fn_cxx_try_compile "$LINENO"; then :
48042
48043	# Check for potential -arch flags.  It is not universal unless
48044	# there are at least two -arch flags with different values.
48045	ac_arch=
48046	ac_prev=
48047	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48048	 if test -n "$ac_prev"; then
48049	   case $ac_word in
48050	     i?86 | x86_64 | ppc | ppc64)
48051	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48052		 ac_arch=$ac_word
48053	       else
48054		 ac_cv_c_bigendian=universal
48055		 break
48056	       fi
48057	       ;;
48058	   esac
48059	   ac_prev=
48060	 elif test "x$ac_word" = "x-arch"; then
48061	   ac_prev=arch
48062	 fi
48063       done
48064fi
48065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48066    if test $ac_cv_c_bigendian = unknown; then
48067      # See if sys/param.h defines the BYTE_ORDER macro.
48068      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48069/* end confdefs.h.  */
48070#include <sys/types.h>
48071	     #include <sys/param.h>
48072
48073int
48074main ()
48075{
48076#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48077		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48078		     && LITTLE_ENDIAN)
48079	      bogus endian macros
48080	     #endif
48081
48082  ;
48083  return 0;
48084}
48085_ACEOF
48086if ac_fn_cxx_try_compile "$LINENO"; then :
48087  # It does; now see whether it defined to BIG_ENDIAN or not.
48088	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48089/* end confdefs.h.  */
48090#include <sys/types.h>
48091		#include <sys/param.h>
48092
48093int
48094main ()
48095{
48096#if BYTE_ORDER != BIG_ENDIAN
48097		 not big endian
48098		#endif
48099
48100  ;
48101  return 0;
48102}
48103_ACEOF
48104if ac_fn_cxx_try_compile "$LINENO"; then :
48105  ac_cv_c_bigendian=yes
48106else
48107  ac_cv_c_bigendian=no
48108fi
48109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48110fi
48111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48112    fi
48113    if test $ac_cv_c_bigendian = unknown; then
48114      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48115      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48116/* end confdefs.h.  */
48117#include <limits.h>
48118
48119int
48120main ()
48121{
48122#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48123	      bogus endian macros
48124	     #endif
48125
48126  ;
48127  return 0;
48128}
48129_ACEOF
48130if ac_fn_cxx_try_compile "$LINENO"; then :
48131  # It does; now see whether it defined to _BIG_ENDIAN or not.
48132	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48133/* end confdefs.h.  */
48134#include <limits.h>
48135
48136int
48137main ()
48138{
48139#ifndef _BIG_ENDIAN
48140		 not big endian
48141		#endif
48142
48143  ;
48144  return 0;
48145}
48146_ACEOF
48147if ac_fn_cxx_try_compile "$LINENO"; then :
48148  ac_cv_c_bigendian=yes
48149else
48150  ac_cv_c_bigendian=no
48151fi
48152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48153fi
48154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48155    fi
48156    if test $ac_cv_c_bigendian = unknown; then
48157      # Compile a test program.
48158      if test "$cross_compiling" = yes; then :
48159  # Try to guess by grepping values from an object file.
48160	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48161/* end confdefs.h.  */
48162short int ascii_mm[] =
48163		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48164		short int ascii_ii[] =
48165		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48166		int use_ascii (int i) {
48167		  return ascii_mm[i] + ascii_ii[i];
48168		}
48169		short int ebcdic_ii[] =
48170		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48171		short int ebcdic_mm[] =
48172		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48173		int use_ebcdic (int i) {
48174		  return ebcdic_mm[i] + ebcdic_ii[i];
48175		}
48176		extern int foo;
48177
48178int
48179main ()
48180{
48181return use_ascii (foo) == use_ebcdic (foo);
48182  ;
48183  return 0;
48184}
48185_ACEOF
48186if ac_fn_cxx_try_compile "$LINENO"; then :
48187  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48188	      ac_cv_c_bigendian=yes
48189	    fi
48190	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48191	      if test "$ac_cv_c_bigendian" = unknown; then
48192		ac_cv_c_bigendian=no
48193	      else
48194		# finding both strings is unlikely to happen, but who knows?
48195		ac_cv_c_bigendian=unknown
48196	      fi
48197	    fi
48198fi
48199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48200else
48201  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48202/* end confdefs.h.  */
48203$ac_includes_default
48204int
48205main ()
48206{
48207
48208	     /* Are we little or big endian?  From Harbison&Steele.  */
48209	     union
48210	     {
48211	       long int l;
48212	       char c[sizeof (long int)];
48213	     } u;
48214	     u.l = 1;
48215	     return u.c[sizeof (long int) - 1] == 1;
48216
48217  ;
48218  return 0;
48219}
48220_ACEOF
48221if ac_fn_cxx_try_run "$LINENO"; then :
48222  ac_cv_c_bigendian=no
48223else
48224  ac_cv_c_bigendian=yes
48225fi
48226rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48227  conftest.$ac_objext conftest.beam conftest.$ac_ext
48228fi
48229
48230    fi
48231fi
48232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
48233$as_echo "$ac_cv_c_bigendian" >&6; }
48234 case $ac_cv_c_bigendian in #(
48235   yes)
48236     ENDIAN="big";; #(
48237   no)
48238     ENDIAN="little" ;; #(
48239   universal)
48240     ENDIAN="universal_endianness"
48241     ;; #(
48242   *)
48243     ENDIAN="unknown" ;;
48244 esac
48245
48246
48247  if test "x$ENDIAN" = xuniversal_endianness; then
48248    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
48249  fi
48250  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
48251    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
48252  fi
48253
48254
48255# Configure flags for the tools
48256
48257  ###############################################################################
48258  #
48259  # How to compile shared libraries.
48260  #
48261
48262  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48263    PICFLAG="-fPIC"
48264    C_FLAG_REORDER=''
48265    CXX_FLAG_REORDER=''
48266
48267    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48268      # Linking is different on MacOSX
48269      if test "x$STATIC_BUILD" = xtrue; then
48270        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
48271      else
48272        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48273        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
48274      fi
48275      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48276      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48277      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48278      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48279    else
48280      # Default works for linux, might work on other platforms as well.
48281      SHARED_LIBRARY_FLAGS='-shared'
48282      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
48283      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
48284      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
48285      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
48286    fi
48287  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48288    C_FLAG_REORDER=''
48289    CXX_FLAG_REORDER=''
48290
48291    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48292      # Linking is different on MacOSX
48293      PICFLAG=''
48294      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48295      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48296      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48297      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48298      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48299
48300      if test "x$STATIC_BUILD" = xfalse; then
48301        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
48302      fi
48303    else
48304      # Default works for linux, might work on other platforms as well.
48305      PICFLAG='-fPIC'
48306      SHARED_LIBRARY_FLAGS='-shared'
48307      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
48308      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
48309      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
48310      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
48311    fi
48312  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48313    PICFLAG="-KPIC"
48314    C_FLAG_REORDER='-xF'
48315    CXX_FLAG_REORDER='-xF'
48316    SHARED_LIBRARY_FLAGS="-G"
48317    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
48318    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48319    SET_SHARED_LIBRARY_NAME='-h $1'
48320    SET_SHARED_LIBRARY_MAPFILE='-M$1'
48321  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48322    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
48323    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
48324    # will have to patch this single instruction with a call to some out-of-order code which
48325    # does the load from the TOC. This is of course slow. But in that case we also would have
48326    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
48327    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
48328    # can be patched directly by the linker and does not require a jump to out-of-order code.
48329    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
48330    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
48331    # loads for accessing a global variable). But there are rumors that this may be seen as a
48332    # 'performance feature' because of improved code locality of the symbols used in a
48333    # compilation unit.
48334    PICFLAG="-qpic"
48335    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
48336    C_FLAG_REORDER=''
48337    CXX_FLAG_REORDER=''
48338    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
48339    SET_EXECUTABLE_ORIGIN=""
48340    SET_SHARED_LIBRARY_ORIGIN=''
48341    SET_SHARED_LIBRARY_NAME=''
48342    SET_SHARED_LIBRARY_MAPFILE=''
48343  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48344    PICFLAG=""
48345    C_FLAG_REORDER=''
48346    CXX_FLAG_REORDER=''
48347    SHARED_LIBRARY_FLAGS="-dll"
48348    SET_EXECUTABLE_ORIGIN=''
48349    SET_SHARED_LIBRARY_ORIGIN=''
48350    SET_SHARED_LIBRARY_NAME=''
48351    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
48352  fi
48353
48354
48355
48356
48357
48358
48359
48360
48361
48362  # The (cross) compiler is now configured, we can now test capabilities
48363  # of the target platform.
48364
48365
48366
48367  ###############################################################################
48368  #
48369  # Setup the opt flags for different compilers
48370  # and different operating systems.
48371  #
48372
48373  # FIXME: this was indirectly the old default, but just inherited.
48374  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48375  #   C_FLAG_DEPS="-MMD -MF"
48376  # fi
48377
48378  # Generate make dependency files
48379  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48380    C_FLAG_DEPS="-MMD -MF"
48381  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48382    C_FLAG_DEPS="-MMD -MF"
48383  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48384    C_FLAG_DEPS="-xMMD -xMF"
48385  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48386    C_FLAG_DEPS="-qmakedep=gcc -MF"
48387  fi
48388  CXX_FLAG_DEPS="$C_FLAG_DEPS"
48389
48390
48391
48392  # Debug symbols
48393  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48394    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
48395      # reduce from default "-g2" option to save space
48396      CFLAGS_DEBUG_SYMBOLS="-g1"
48397      CXXFLAGS_DEBUG_SYMBOLS="-g1"
48398    else
48399      CFLAGS_DEBUG_SYMBOLS="-g"
48400      CXXFLAGS_DEBUG_SYMBOLS="-g"
48401    fi
48402  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48403    CFLAGS_DEBUG_SYMBOLS="-g"
48404    CXXFLAGS_DEBUG_SYMBOLS="-g"
48405  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48406    CFLAGS_DEBUG_SYMBOLS="-g -xs"
48407    # -g0 enables debug symbols without disabling inlining.
48408    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
48409  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48410    CFLAGS_DEBUG_SYMBOLS="-g"
48411    CXXFLAGS_DEBUG_SYMBOLS="-g"
48412  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48413    CFLAGS_DEBUG_SYMBOLS="-Zi"
48414    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
48415  fi
48416
48417
48418
48419  # Debug symbols for JVM_CFLAGS
48420  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48421    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
48422    if test "x$DEBUG_LEVEL" = xslowdebug; then
48423      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
48424    else
48425      # -g0 does not disable inlining, which -g does.
48426      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
48427    fi
48428  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48429    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
48430  else
48431    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
48432  fi
48433
48434
48435  # bounds, memory and behavior checking options
48436  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48437    case $DEBUG_LEVEL in
48438    release )
48439      # no adjustment
48440      ;;
48441    fastdebug )
48442      # no adjustment
48443      ;;
48444    slowdebug )
48445      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
48446      # get's added conditionally on whether we produce debug symbols or not.
48447      # This is most likely not really correct.
48448
48449      # Add runtime stack smashing and undefined behavior checks.
48450      # Not all versions of gcc support -fstack-protector
48451      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
48452
48453
48454
48455
48456
48457
48458
48459
48460
48461
48462
48463
48464
48465
48466
48467
48468
48469
48470
48471
48472
48473
48474
48475
48476
48477
48478
48479
48480
48481
48482
48483
48484
48485
48486
48487
48488
48489
48490
48491
48492
48493
48494    # Execute function body
48495
48496
48497
48498
48499
48500
48501
48502
48503
48504
48505
48506
48507
48508
48509
48510
48511
48512
48513
48514
48515
48516
48517
48518
48519
48520
48521
48522
48523
48524
48525
48526
48527
48528
48529
48530
48531
48532
48533
48534
48535
48536
48537
48538
48539
48540
48541
48542
48543    # Execute function body
48544
48545  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48546$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48547  supports=yes
48548
48549  saved_cflags="$CFLAGS"
48550  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
48551  ac_ext=c
48552ac_cpp='$CPP $CPPFLAGS'
48553ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48554ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48555ac_compiler_gnu=$ac_cv_c_compiler_gnu
48556
48557  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48558/* end confdefs.h.  */
48559int i;
48560_ACEOF
48561if ac_fn_c_try_compile "$LINENO"; then :
48562
48563else
48564  supports=no
48565fi
48566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48567  ac_ext=cpp
48568ac_cpp='$CXXCPP $CPPFLAGS'
48569ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48570ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48571ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48572
48573  CFLAGS="$saved_cflags"
48574
48575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48576$as_echo "$supports" >&6; }
48577  if test "x$supports" = "xyes" ; then
48578    :
48579    C_COMP_SUPPORTS="yes"
48580  else
48581    :
48582    C_COMP_SUPPORTS="no"
48583  fi
48584
48585
48586
48587
48588
48589
48590
48591
48592
48593
48594
48595
48596
48597
48598
48599
48600
48601
48602
48603
48604
48605
48606
48607
48608
48609
48610
48611
48612
48613
48614
48615
48616
48617
48618
48619
48620
48621
48622
48623
48624
48625
48626
48627
48628
48629
48630
48631
48632
48633
48634
48635
48636
48637
48638
48639
48640
48641
48642
48643    # Execute function body
48644
48645  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48646$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48647  supports=yes
48648
48649  saved_cxxflags="$CXXFLAGS"
48650  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
48651  ac_ext=cpp
48652ac_cpp='$CXXCPP $CPPFLAGS'
48653ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48654ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48655ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48656
48657  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48658/* end confdefs.h.  */
48659int i;
48660_ACEOF
48661if ac_fn_cxx_try_compile "$LINENO"; then :
48662
48663else
48664  supports=no
48665fi
48666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48667  ac_ext=cpp
48668ac_cpp='$CXXCPP $CPPFLAGS'
48669ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48670ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48671ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48672
48673  CXXFLAGS="$saved_cxxflags"
48674
48675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48676$as_echo "$supports" >&6; }
48677  if test "x$supports" = "xyes" ; then
48678    :
48679    CXX_COMP_SUPPORTS="yes"
48680  else
48681    :
48682    CXX_COMP_SUPPORTS="no"
48683  fi
48684
48685
48686
48687
48688
48689
48690
48691
48692
48693
48694
48695
48696
48697  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48698$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48699  supports=no
48700  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48701
48702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48703$as_echo "$supports" >&6; }
48704  if test "x$supports" = "xyes" ; then
48705    :
48706
48707  else
48708    :
48709    STACK_PROTECTOR_CFLAG=""
48710  fi
48711
48712
48713
48714
48715
48716
48717
48718      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48719      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48720      if test "x$STACK_PROTECTOR_CFLAG" != x; then
48721        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48722      fi
48723      ;;
48724    esac
48725  fi
48726
48727  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48728    if test "x$DEBUG_LEVEL" != xrelease; then
48729      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
48730        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
48731      fi
48732    fi
48733  fi
48734
48735  # Optimization levels
48736  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48737    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
48738
48739    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
48740      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
48741      C_O_FLAG_HIGHEST_JVM="-xO4"
48742      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
48743      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
48744      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
48745      C_O_FLAG_DEBUG="-xregs=no%frameptr"
48746      C_O_FLAG_DEBUG_JVM=""
48747      C_O_FLAG_NONE="-xregs=no%frameptr"
48748      CXX_O_FLAG_HIGHEST_JVM="-xO4"
48749      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
48750      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
48751      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
48752      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
48753      CXX_O_FLAG_DEBUG_JVM=""
48754      CXX_O_FLAG_NONE="-xregs=no%frameptr"
48755      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
48756        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
48757        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
48758      fi
48759    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48760      C_O_FLAG_HIGHEST_JVM="-xO4"
48761      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
48762      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48763      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48764      C_O_FLAG_DEBUG=""
48765      C_O_FLAG_DEBUG_JVM=""
48766      C_O_FLAG_NONE=""
48767      CXX_O_FLAG_HIGHEST_JVM="-xO4"
48768      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
48769      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48770      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48771      CXX_O_FLAG_DEBUG=""
48772      CXX_O_FLAG_DEBUG_JVM=""
48773      CXX_O_FLAG_NONE=""
48774    fi
48775  else
48776    # The remaining toolchains share opt flags between CC and CXX;
48777    # setup for C and duplicate afterwards.
48778    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48779      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48780        # On MacOSX we optimize for size, something
48781        # we should do for all platforms?
48782        C_O_FLAG_HIGHEST_JVM="-Os"
48783        C_O_FLAG_HIGHEST="-Os"
48784        C_O_FLAG_HI="-Os"
48785        C_O_FLAG_NORM="-Os"
48786        C_O_FLAG_SIZE="-Os"
48787      else
48788        C_O_FLAG_HIGHEST_JVM="-O3"
48789        C_O_FLAG_HIGHEST="-O3"
48790        C_O_FLAG_HI="-O3"
48791        C_O_FLAG_NORM="-O2"
48792        C_O_FLAG_SIZE="-Os"
48793      fi
48794      C_O_FLAG_DEBUG="-O0"
48795      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48796        C_O_FLAG_DEBUG_JVM=""
48797      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
48798        C_O_FLAG_DEBUG_JVM="-O0"
48799      fi
48800      C_O_FLAG_NONE="-O0"
48801    elif test "x$TOOLCHAIN_TYPE" = xclang; then
48802      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48803        # On MacOSX we optimize for size, something
48804        # we should do for all platforms?
48805        C_O_FLAG_HIGHEST_JVM="-Os"
48806        C_O_FLAG_HIGHEST="-Os"
48807        C_O_FLAG_HI="-Os"
48808        C_O_FLAG_NORM="-Os"
48809        C_O_FLAG_SIZE="-Os"
48810      else
48811        C_O_FLAG_HIGHEST_JVM="-O3"
48812        C_O_FLAG_HIGHEST="-O3"
48813        C_O_FLAG_HI="-O3"
48814        C_O_FLAG_NORM="-O2"
48815        C_O_FLAG_SIZE="-Os"
48816      fi
48817      C_O_FLAG_DEBUG="-O0"
48818      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48819        C_O_FLAG_DEBUG_JVM=""
48820      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
48821        C_O_FLAG_DEBUG_JVM="-O0"
48822      fi
48823      C_O_FLAG_NONE="-O0"
48824    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48825      C_O_FLAG_HIGHEST_JVM="-O3"
48826      C_O_FLAG_HIGHEST="-O3"
48827      C_O_FLAG_HI="-O3 -qstrict"
48828      C_O_FLAG_NORM="-O2"
48829      C_O_FLAG_DEBUG="-qnoopt"
48830      # FIXME: Value below not verified.
48831      C_O_FLAG_DEBUG_JVM=""
48832      C_O_FLAG_NONE="-qnoopt"
48833    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48834      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
48835      C_O_FLAG_HIGHEST="-O2"
48836      C_O_FLAG_HI="-O1"
48837      C_O_FLAG_NORM="-O1"
48838      C_O_FLAG_DEBUG="-Od"
48839      C_O_FLAG_DEBUG_JVM=""
48840      C_O_FLAG_NONE="-Od"
48841      C_O_FLAG_SIZE="-Os"
48842    fi
48843    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
48844    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
48845    CXX_O_FLAG_HI="$C_O_FLAG_HI"
48846    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
48847    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
48848    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
48849    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
48850    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
48851  fi
48852
48853  # Adjust optimization flags according to debug level.
48854  case $DEBUG_LEVEL in
48855    release )
48856      # no adjustment
48857      ;;
48858    fastdebug )
48859      # Not quite so much optimization
48860      C_O_FLAG_HI="$C_O_FLAG_NORM"
48861      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
48862      ;;
48863    slowdebug )
48864      # Disable optimization
48865      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
48866      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
48867      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
48868      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
48869      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
48870      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
48871      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
48872      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
48873      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
48874      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
48875      ;;
48876  esac
48877
48878
48879
48880
48881
48882
48883
48884
48885
48886
48887
48888
48889
48890
48891
48892
48893
48894
48895
48896  # Special extras...
48897  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48898    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48899      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48900      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48901    fi
48902    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48903    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48904  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48905    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48906    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48907  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
48908    CXXSTD_CXXFLAG="-std=gnu++98"
48909
48910
48911
48912
48913
48914
48915
48916
48917
48918
48919
48920
48921
48922
48923
48924
48925
48926
48927
48928
48929
48930
48931
48932
48933
48934
48935
48936
48937
48938
48939
48940
48941
48942
48943
48944
48945
48946
48947
48948
48949
48950
48951    # Execute function body
48952
48953  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
48954$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
48955  supports=yes
48956
48957  saved_cxxflags="$CXXFLAGS"
48958  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
48959  ac_ext=cpp
48960ac_cpp='$CXXCPP $CPPFLAGS'
48961ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48962ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48963ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48964
48965  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48966/* end confdefs.h.  */
48967int i;
48968_ACEOF
48969if ac_fn_cxx_try_compile "$LINENO"; then :
48970
48971else
48972  supports=no
48973fi
48974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48975  ac_ext=cpp
48976ac_cpp='$CXXCPP $CPPFLAGS'
48977ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48978ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48979ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48980
48981  CXXFLAGS="$saved_cxxflags"
48982
48983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48984$as_echo "$supports" >&6; }
48985  if test "x$supports" = "xyes" ; then
48986    :
48987
48988  else
48989    :
48990    CXXSTD_CXXFLAG=""
48991  fi
48992
48993
48994
48995
48996
48997
48998
48999
49000
49001
49002
49003
49004    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49005
49006  fi
49007  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49008    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49009    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49010    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49011    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49012    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49013  fi
49014
49015  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49016    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49017    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49018    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49019  fi
49020
49021  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49022  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49023  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49024
49025  ###############################################################################
49026  #
49027  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49028  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49029  #
49030
49031  # Setup compiler/platform specific flags into
49032  #    CFLAGS_JDK    - C Compiler flags
49033  #    CXXFLAGS_JDK  - C++ Compiler flags
49034  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49035  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49036    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49037    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49038    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49039    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49040      # Force compatibility with i586 on 32 bit intel platforms.
49041      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49042      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49043    fi
49044    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49045        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49046    case $OPENJDK_TARGET_CPU_ARCH in
49047      arm )
49048        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49049        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49050        ;;
49051      ppc )
49052        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49053        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49054        ;;
49055      * )
49056        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49057        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49058        ;;
49059    esac
49060
49061
49062
49063
49064
49065
49066
49067
49068
49069
49070
49071
49072
49073
49074
49075
49076
49077
49078
49079
49080
49081
49082
49083
49084
49085
49086
49087
49088
49089
49090
49091
49092
49093
49094
49095
49096
49097
49098
49099
49100
49101
49102    # Execute function body
49103
49104  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49105  REFERENCE_VERSION=6
49106
49107  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49108    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49109  fi
49110
49111  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49112    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49113  fi
49114
49115  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49116  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49117
49118  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49119    :
49120
49121  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49122  # runs afoul of the more aggressive versions of these optimisations.
49123  # Notably, value range propagation now assumes that the this pointer of C++
49124  # member functions is non-null.
49125  NO_NULL_POINTER_CHECK_CFLAG="-fno-delete-null-pointer-checks"
49126
49127
49128
49129
49130
49131
49132
49133
49134
49135
49136
49137
49138
49139
49140
49141
49142
49143
49144
49145
49146
49147
49148
49149
49150
49151
49152
49153
49154
49155
49156
49157
49158
49159
49160
49161
49162
49163
49164
49165
49166
49167
49168    # Execute function body
49169
49170
49171
49172
49173
49174
49175
49176
49177
49178
49179
49180
49181
49182
49183
49184
49185
49186
49187
49188
49189
49190
49191
49192
49193
49194
49195
49196
49197
49198
49199
49200
49201
49202
49203
49204
49205
49206
49207
49208
49209
49210
49211
49212
49213
49214
49215
49216
49217    # Execute function body
49218
49219  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49220$as_echo_n "checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49221  supports=yes
49222
49223  saved_cflags="$CFLAGS"
49224  CFLAGS="$CFLAGS $NO_NULL_POINTER_CHECK_CFLAG -Werror"
49225  ac_ext=c
49226ac_cpp='$CPP $CPPFLAGS'
49227ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49228ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49229ac_compiler_gnu=$ac_cv_c_compiler_gnu
49230
49231  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49232/* end confdefs.h.  */
49233int i;
49234_ACEOF
49235if ac_fn_c_try_compile "$LINENO"; then :
49236
49237else
49238  supports=no
49239fi
49240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49241  ac_ext=cpp
49242ac_cpp='$CXXCPP $CPPFLAGS'
49243ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49244ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49245ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49246
49247  CFLAGS="$saved_cflags"
49248
49249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49250$as_echo "$supports" >&6; }
49251  if test "x$supports" = "xyes" ; then
49252    :
49253    C_COMP_SUPPORTS="yes"
49254  else
49255    :
49256    C_COMP_SUPPORTS="no"
49257  fi
49258
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283
49284
49285
49286
49287
49288
49289
49290
49291
49292
49293
49294
49295
49296
49297
49298
49299
49300
49301
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316
49317    # Execute function body
49318
49319  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49320$as_echo_n "checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49321  supports=yes
49322
49323  saved_cxxflags="$CXXFLAGS"
49324  CXXFLAGS="$CXXFLAG $NO_NULL_POINTER_CHECK_CFLAG -Werror"
49325  ac_ext=cpp
49326ac_cpp='$CXXCPP $CPPFLAGS'
49327ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49328ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49329ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49330
49331  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49332/* end confdefs.h.  */
49333int i;
49334_ACEOF
49335if ac_fn_cxx_try_compile "$LINENO"; then :
49336
49337else
49338  supports=no
49339fi
49340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49341  ac_ext=cpp
49342ac_cpp='$CXXCPP $CPPFLAGS'
49343ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49344ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49345ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49346
49347  CXXFLAGS="$saved_cxxflags"
49348
49349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49350$as_echo "$supports" >&6; }
49351  if test "x$supports" = "xyes" ; then
49352    :
49353    CXX_COMP_SUPPORTS="yes"
49354  else
49355    :
49356    CXX_COMP_SUPPORTS="no"
49357  fi
49358
49359
49360
49361
49362
49363
49364
49365
49366
49367
49368
49369
49370
49371  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49372$as_echo_n "checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49373  supports=no
49374  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49375
49376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49377$as_echo "$supports" >&6; }
49378  if test "x$supports" = "xyes" ; then
49379    :
49380
49381  else
49382    :
49383    NO_NULL_POINTER_CHECK_CFLAG=""
49384  fi
49385
49386
49387
49388
49389
49390
49391
49392  NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
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    # Execute function body
49436
49437
49438
49439
49440
49441
49442
49443
49444
49445
49446
49447
49448
49449
49450
49451
49452
49453
49454
49455
49456
49457
49458
49459
49460
49461
49462
49463
49464
49465
49466
49467
49468
49469
49470
49471
49472
49473
49474
49475
49476
49477
49478
49479
49480
49481
49482
49483
49484    # Execute function body
49485
49486  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49487$as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49488  supports=yes
49489
49490  saved_cflags="$CFLAGS"
49491  CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
49492  ac_ext=c
49493ac_cpp='$CPP $CPPFLAGS'
49494ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49495ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49496ac_compiler_gnu=$ac_cv_c_compiler_gnu
49497
49498  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49499/* end confdefs.h.  */
49500int i;
49501_ACEOF
49502if ac_fn_c_try_compile "$LINENO"; then :
49503
49504else
49505  supports=no
49506fi
49507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49508  ac_ext=cpp
49509ac_cpp='$CXXCPP $CPPFLAGS'
49510ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49511ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49512ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49513
49514  CFLAGS="$saved_cflags"
49515
49516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49517$as_echo "$supports" >&6; }
49518  if test "x$supports" = "xyes" ; then
49519    :
49520    C_COMP_SUPPORTS="yes"
49521  else
49522    :
49523    C_COMP_SUPPORTS="no"
49524  fi
49525
49526
49527
49528
49529
49530
49531
49532
49533
49534
49535
49536
49537
49538
49539
49540
49541
49542
49543
49544
49545
49546
49547
49548
49549
49550
49551
49552
49553
49554
49555
49556
49557
49558
49559
49560
49561
49562
49563
49564
49565
49566
49567
49568
49569
49570
49571
49572
49573
49574
49575
49576
49577
49578
49579
49580
49581
49582
49583
49584    # Execute function body
49585
49586  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49587$as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49588  supports=yes
49589
49590  saved_cxxflags="$CXXFLAGS"
49591  CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
49592  ac_ext=cpp
49593ac_cpp='$CXXCPP $CPPFLAGS'
49594ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49595ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49596ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49597
49598  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49599/* end confdefs.h.  */
49600int i;
49601_ACEOF
49602if ac_fn_cxx_try_compile "$LINENO"; then :
49603
49604else
49605  supports=no
49606fi
49607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49608  ac_ext=cpp
49609ac_cpp='$CXXCPP $CPPFLAGS'
49610ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49611ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49612ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49613
49614  CXXFLAGS="$saved_cxxflags"
49615
49616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49617$as_echo "$supports" >&6; }
49618  if test "x$supports" = "xyes" ; then
49619    :
49620    CXX_COMP_SUPPORTS="yes"
49621  else
49622    :
49623    CXX_COMP_SUPPORTS="no"
49624  fi
49625
49626
49627
49628
49629
49630
49631
49632
49633
49634
49635
49636
49637
49638  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49639$as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49640  supports=no
49641  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49642
49643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49644$as_echo "$supports" >&6; }
49645  if test "x$supports" = "xyes" ; then
49646    :
49647
49648  else
49649    :
49650    NO_LIFETIME_DSE_CFLAG=""
49651  fi
49652
49653
49654
49655
49656
49657
49658  CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49659
49660
49661
49662  else
49663    :
49664
49665  fi
49666
49667
49668
49669
49670
49671
49672
49673
49674
49675
49676
49677
49678  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49679    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49680
49681    # Restrict the debug information created by Clang to avoid
49682    # too big object files and speed the build up a little bit
49683    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49684    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49685    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49686      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49687        # Force compatibility with i586 on 32 bit intel platforms.
49688        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49689        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49690      fi
49691      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49692      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49693          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49694      case $OPENJDK_TARGET_CPU_ARCH in
49695        ppc )
49696          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49697          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49698          ;;
49699        * )
49700          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49701          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49702          ;;
49703      esac
49704    fi
49705  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49706    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49707    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49708    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49709      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49710    fi
49711
49712    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49713    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49714  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49715    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49716    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49717    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49718  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49719    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49720        -MD -Zc:wchar_t- -W3 -wd4800 \
49721        -DWIN32_LEAN_AND_MEAN \
49722        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49723        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
49724        -DWIN32 -DIAL"
49725    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49726      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
49727    else
49728      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
49729    fi
49730    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
49731    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
49732    # studio.
49733    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
49734      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
49735      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
49736      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
49737    fi
49738  fi
49739
49740  ###############################################################################
49741
49742  # Adjust flags according to debug level.
49743  case $DEBUG_LEVEL in
49744    fastdebug | slowdebug )
49745      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
49746      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
49747      JAVAC_FLAGS="$JAVAC_FLAGS -g"
49748      ;;
49749    release )
49750      ;;
49751    * )
49752      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
49753      ;;
49754  esac
49755
49756  # Set some common defines. These works for all compilers, but assume
49757  # -D is universally accepted.
49758
49759  # Setup endianness
49760  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49761    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
49762    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
49763    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
49764    #   Note: -Dmacro         is the same as    #define macro 1
49765    #         -Dmacro=        is the same as    #define macro
49766    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49767      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
49768    else
49769      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
49770    fi
49771  else
49772    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
49773    # are defined in the system?
49774    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49775      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
49776    else
49777      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
49778    fi
49779  fi
49780
49781  # Setup target OS define. Use OS target name but in upper case.
49782  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
49783  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
49784
49785  # Setup target CPU
49786  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
49787      $OPENJDK_TARGET_ADD_LP64 \
49788      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
49789
49790  # Setup debug/release defines
49791  if test "x$DEBUG_LEVEL" = xrelease; then
49792    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
49793    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49794      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
49795    fi
49796  else
49797    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
49798  fi
49799
49800  # Set some additional per-OS defines.
49801  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49802    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
49803    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
49804        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
49805  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49806    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
49807    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
49808        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
49809  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49810    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
49811    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
49812    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
49813    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
49814        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
49815        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
49816        -fno-omit-frame-pointer"
49817  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49818    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
49819    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
49820    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
49821        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
49822        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
49823  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
49824    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
49825  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49826    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
49827    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
49828  fi
49829
49830  # Set some additional per-CPU defines.
49831  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
49832    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
49833  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49834    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
49835  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
49836    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49837      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
49838      # fixes `relocation truncated to fit' error for gcc 4.1.
49839      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
49840      # Use ppc64 instructions, but schedule for power5
49841      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
49842    elif test "x$OPENJDK_TARGET_OS" = xaix; then
49843      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
49844    fi
49845  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
49846    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49847      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
49848      # Little endian machine uses ELFv2 ABI.
49849      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
49850      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
49851      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
49852    fi
49853  fi
49854
49855  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49856    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
49857  fi
49858
49859  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49860    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
49861      # Solaris does not have _LP64=1 in the old build.
49862      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
49863      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
49864    fi
49865  fi
49866
49867  # Set JVM_CFLAGS warning handling
49868  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49869    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
49870        -Wunused-value -Woverloaded-virtual"
49871
49872    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49873
49874
49875
49876
49877
49878
49879
49880
49881
49882
49883
49884
49885
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900
49901
49902
49903
49904
49905
49906
49907
49908
49909
49910
49911
49912
49913
49914
49915    # Execute function body
49916
49917  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49918  REFERENCE_VERSION=4.8
49919
49920  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49921    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
49922  fi
49923
49924  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49925    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
49926  fi
49927
49928  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49929  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49930
49931  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49932    :
49933
49934            # These flags either do not work or give spurious warnings prior to gcc 4.8.
49935            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
49936
49937
49938  else
49939    :
49940
49941  fi
49942
49943
49944
49945
49946
49947
49948
49949
49950
49951
49952
49953
49954    fi
49955    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
49956      # Non-zero builds have stricter warnings
49957      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
49958    else
49959      if test "x$TOOLCHAIN_TYPE" = xclang; then
49960        # Some versions of llvm do not like -Wundef
49961        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
49962      fi
49963    fi
49964  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49965    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
49966        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
49967  fi
49968
49969  # Additional macosx handling
49970  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49971    # Setting these parameters makes it an error to link to macosx APIs that are
49972    # newer than the given OS version and makes the linked binaries compatible
49973    # even if built on a newer version of the OS.
49974    # The expected format is X.Y.Z
49975    MACOSX_VERSION_MIN=10.7.0
49976
49977
49978    # The macro takes the version with no dots, ex: 1070
49979    # Let the flags variables get resolved in make for easier override on make
49980    # command line.
49981    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
49982    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
49983  fi
49984
49985  # Setup some hard coded includes
49986  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
49987      -I${JDK_TOPDIR}/src/java.base/share/native/include \
49988      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
49989      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
49990      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
49991      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
49992
49993  # The shared libraries are compiled using the picflag.
49994  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
49995      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
49996  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
49997      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
49998
49999  # Executable flags
50000  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50001  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50002
50003
50004
50005
50006
50007
50008  # Setup LDFLAGS et al.
50009  #
50010
50011  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50012    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50013    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50014    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50015    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50016      LDFLAGS_SAFESH="-safeseh"
50017      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50018      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50019      # NOTE: Old build added -machine. Probably not needed.
50020      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50021    else
50022      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50023    fi
50024  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50025      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50026      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50027        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50028        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50029    fi
50030  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50031    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50032    # We have previously set HAS_GNU_HASH if this is the case
50033    if test -n "$HAS_GNU_HASH"; then
50034      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50035      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50036      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50037    fi
50038      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50039        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50040    fi
50041    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50042      # And since we now know that the linker is gnu, then add -z defs, to forbid
50043      # undefined symbols in object files.
50044      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50045      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50046      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50047      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50048      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50049      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50050        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50051      fi
50052      case $DEBUG_LEVEL in
50053        release )
50054          # tell linker to optimize libraries.
50055          # Should this be supplied to the OSS linker as well?
50056          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50057          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50058          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50059          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50060            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50061          fi
50062          ;;
50063        slowdebug )
50064          # Hotspot always let the linker optimize
50065          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50066          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50067            # do relocations at load
50068            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50069            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50070            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50071          fi
50072          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50073            # mark relocations read only
50074            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50075            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50076            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50077          fi
50078          ;;
50079        fastdebug )
50080          # Hotspot always let the linker optimize
50081          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50082          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50083            # mark relocations read only
50084            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50085            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50086            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50087          fi
50088          ;;
50089        * )
50090          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50091          ;;
50092        esac
50093    fi
50094  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50095    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50096    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50097    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50098    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50099    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50100    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50101      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50102    fi
50103  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50104    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50105    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50106    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50107  fi
50108
50109  # Customize LDFLAGS for executables
50110
50111  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50112
50113  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50114    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50115      LDFLAGS_STACK_SIZE=1048576
50116    else
50117      LDFLAGS_STACK_SIZE=327680
50118    fi
50119    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50120  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50121    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50122  fi
50123
50124  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50125
50126  # Customize LDFLAGS for libs
50127  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50128
50129  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50130  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50131    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50132        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50133    JDKLIB_LIBS=""
50134  else
50135    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50136        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50137
50138    if test "xTARGET" = "xTARGET"; then
50139    # On some platforms (mac) the linker warns about non existing -L dirs.
50140    # Add server first if available. Linking aginst client does not always produce the same results.
50141      # Only add client/minimal dir if client/minimal is being built.
50142    # Default to server for other variants.
50143      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50144        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50145      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50146        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50147      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50148        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50149    else
50150        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50151    fi
50152    elif test "xTARGET" = "xBUILD"; then
50153      # When building a buildjdk, it's always only the server variant
50154      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50155          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50156    fi
50157
50158    JDKLIB_LIBS="-ljava -ljvm"
50159    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50160      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50161    fi
50162
50163  fi
50164
50165  # Set JVM_LIBS (per os)
50166  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50167    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50168  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50169    # FIXME: This hard-coded path is not really proper.
50170    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50171      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50172    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50173      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50174    fi
50175    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50176        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50177  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50178    JVM_LIBS="$JVM_LIBS -lm"
50179  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50180    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50181  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50182    JVM_LIBS="$JVM_LIBS -lm"
50183  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50184    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50185        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50186        wsock32.lib winmm.lib version.lib psapi.lib"
50187    fi
50188
50189  # Set JVM_ASFLAGS
50190  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50191    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50192      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50193    fi
50194  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50195    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50196  fi
50197
50198  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50199
50200
50201
50202
50203
50204
50205
50206
50207
50208
50209
50210
50211
50212
50213
50214  # Special extras...
50215  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50216    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50217      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50218      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50219    fi
50220    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50221    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50222  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50223    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50224    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50225  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50226    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50227
50228
50229
50230
50231
50232
50233
50234
50235
50236
50237
50238
50239
50240
50241
50242
50243
50244
50245
50246
50247
50248
50249
50250
50251
50252
50253
50254
50255
50256
50257
50258
50259
50260
50261
50262
50263
50264
50265
50266
50267
50268
50269    # Execute function body
50270
50271  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50272$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50273  supports=yes
50274
50275  saved_cxxflags="$CXXFLAGS"
50276  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50277  ac_ext=cpp
50278ac_cpp='$CXXCPP $CPPFLAGS'
50279ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50280ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50281ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50282
50283  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50284/* end confdefs.h.  */
50285int i;
50286_ACEOF
50287if ac_fn_cxx_try_compile "$LINENO"; then :
50288
50289else
50290  supports=no
50291fi
50292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50293  ac_ext=cpp
50294ac_cpp='$CXXCPP $CPPFLAGS'
50295ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50296ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50297ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50298
50299  CXXFLAGS="$saved_cxxflags"
50300
50301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50302$as_echo "$supports" >&6; }
50303  if test "x$supports" = "xyes" ; then
50304    :
50305
50306  else
50307    :
50308    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50309  fi
50310
50311
50312
50313
50314
50315
50316
50317
50318
50319
50320
50321
50322    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50323
50324  fi
50325  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50326    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50327    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50328    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
50329    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50330    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50331  fi
50332
50333  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50334    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50335    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50336    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
50337  fi
50338
50339  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50340  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50341  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50342
50343  ###############################################################################
50344  #
50345  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50346  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50347  #
50348
50349  # Setup compiler/platform specific flags into
50350  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50351  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50352  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50353  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50354    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50355    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50356    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50357    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50358      # Force compatibility with i586 on 32 bit intel platforms.
50359      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50360      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50361    fi
50362    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50363        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50364    case $OPENJDK_BUILD_CPU_ARCH in
50365      arm )
50366        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50367        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50368        ;;
50369      ppc )
50370        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50371        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50372        ;;
50373      * )
50374        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50375        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50376        ;;
50377    esac
50378
50379
50380
50381
50382
50383
50384
50385
50386
50387
50388
50389
50390
50391
50392
50393
50394
50395
50396
50397
50398
50399
50400
50401
50402
50403
50404
50405
50406
50407
50408
50409
50410
50411
50412
50413
50414
50415
50416
50417
50418
50419
50420    # Execute function body
50421
50422  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50423  REFERENCE_VERSION=6
50424
50425  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50426    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50427  fi
50428
50429  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50430    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50431  fi
50432
50433  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50434  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50435
50436  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50437    :
50438
50439  else
50440    :
50441
50442  fi
50443
50444
50445
50446
50447
50448
50449
50450
50451
50452
50453
50454
50455  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50456    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50457
50458    # Restrict the debug information created by Clang to avoid
50459    # too big object files and speed the build up a little bit
50460    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50461    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50462    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50463      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50464        # Force compatibility with i586 on 32 bit intel platforms.
50465        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50466        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50467      fi
50468      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50469      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50470          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50471      case $OPENJDK_BUILD_CPU_ARCH in
50472        ppc )
50473          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50474          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50475          ;;
50476        * )
50477          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50478          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50479          ;;
50480      esac
50481    fi
50482  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50483    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50484    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50485    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50486      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50487    fi
50488
50489    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50490    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50491  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50492    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50493    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50494    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50495  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50496    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50497        -MD -Zc:wchar_t- -W3 -wd4800 \
50498        -DWIN32_LEAN_AND_MEAN \
50499        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50500        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50501        -DWIN32 -DIAL"
50502    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50503      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50504    else
50505      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50506    fi
50507    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50508    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50509    # studio.
50510    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50511      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50512      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50513      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50514    fi
50515  fi
50516
50517  ###############################################################################
50518
50519  # Adjust flags according to debug level.
50520  case $DEBUG_LEVEL in
50521    fastdebug | slowdebug )
50522      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50523      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50524      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50525      ;;
50526    release )
50527      ;;
50528    * )
50529      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50530      ;;
50531  esac
50532
50533  # Set some common defines. These works for all compilers, but assume
50534  # -D is universally accepted.
50535
50536  # Setup endianness
50537  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50538    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50539    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50540    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50541    #   Note: -Dmacro         is the same as    #define macro 1
50542    #         -Dmacro=        is the same as    #define macro
50543    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50544      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50545    else
50546      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50547    fi
50548  else
50549    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50550    # are defined in the system?
50551    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50552      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50553    else
50554      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50555    fi
50556  fi
50557
50558  # Setup target OS define. Use OS target name but in upper case.
50559  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50560  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50561
50562  # Setup target CPU
50563  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50564      $OPENJDK_BUILD_ADD_LP64 \
50565      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50566
50567  # Setup debug/release defines
50568  if test "x$DEBUG_LEVEL" = xrelease; then
50569    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50570    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50571      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50572    fi
50573  else
50574    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50575  fi
50576
50577  # Set some additional per-OS defines.
50578  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50579    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50580    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50581        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50582  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50583    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50584    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50585        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50586  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50587    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50588    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50589    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50590    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50591        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50592        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50593        -fno-omit-frame-pointer"
50594  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50595    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50596    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50597    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
50598        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50599        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50600  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50601    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50602  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50603    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50604    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50605  fi
50606
50607  # Set some additional per-CPU defines.
50608  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50609    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50610  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50611    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50612  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50613    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50614      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50615      # fixes `relocation truncated to fit' error for gcc 4.1.
50616      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50617      # Use ppc64 instructions, but schedule for power5
50618      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50619    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50620      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50621    fi
50622  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50623    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50624      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50625      # Little endian machine uses ELFv2 ABI.
50626      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50627      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50628      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
50629    fi
50630  fi
50631
50632  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50633    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50634  fi
50635
50636  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50637    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50638      # Solaris does not have _LP64=1 in the old build.
50639      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50640      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50641    fi
50642  fi
50643
50644  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50645  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50646    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50647        -Wunused-value -Woverloaded-virtual"
50648
50649    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50650
50651
50652
50653
50654
50655
50656
50657
50658
50659
50660
50661
50662
50663
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692    # Execute function body
50693
50694  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50695  REFERENCE_VERSION=4.8
50696
50697  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50698    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50699  fi
50700
50701  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50702    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50703  fi
50704
50705  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50706  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50707
50708  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50709    :
50710
50711            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50712            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50713
50714
50715  else
50716    :
50717
50718  fi
50719
50720
50721
50722
50723
50724
50725
50726
50727
50728
50729
50730
50731    fi
50732    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50733      # Non-zero builds have stricter warnings
50734      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50735    else
50736      if test "x$TOOLCHAIN_TYPE" = xclang; then
50737        # Some versions of llvm do not like -Wundef
50738        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
50739      fi
50740    fi
50741  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50742    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50743        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50744  fi
50745
50746  # Additional macosx handling
50747  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50748    # Setting these parameters makes it an error to link to macosx APIs that are
50749    # newer than the given OS version and makes the linked binaries compatible
50750    # even if built on a newer version of the OS.
50751    # The expected format is X.Y.Z
50752    MACOSX_VERSION_MIN=10.7.0
50753
50754
50755    # The macro takes the version with no dots, ex: 1070
50756    # Let the flags variables get resolved in make for easier override on make
50757    # command line.
50758    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)"
50759    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50760  fi
50761
50762  # Setup some hard coded includes
50763  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50764      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50765      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
50766      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
50767      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50768      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
50769
50770  # The shared libraries are compiled using the picflag.
50771  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50772      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
50773  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50774      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
50775
50776  # Executable flags
50777  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
50778  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
50779
50780
50781
50782
50783
50784
50785  # Setup LDFLAGS et al.
50786  #
50787
50788  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50789    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50790    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50791    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50792    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
50793      LDFLAGS_SAFESH="-safeseh"
50794      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
50795      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
50796      # NOTE: Old build added -machine. Probably not needed.
50797      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
50798    else
50799      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
50800    fi
50801  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50802      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50803      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50804        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50805        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50806    fi
50807  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50808    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50809    # We have previously set HAS_GNU_HASH if this is the case
50810    if test -n "$HAS_GNU_HASH"; then
50811      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50812      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
50813      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
50814    fi
50815      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50816        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50817    fi
50818    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50819      # And since we now know that the linker is gnu, then add -z defs, to forbid
50820      # undefined symbols in object files.
50821      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50822      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50823      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50824      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50825      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50826      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50827        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
50828      fi
50829      case $DEBUG_LEVEL in
50830        release )
50831          # tell linker to optimize libraries.
50832          # Should this be supplied to the OSS linker as well?
50833          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50834          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50835          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50836          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50837            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50838          fi
50839          ;;
50840        slowdebug )
50841          # Hotspot always let the linker optimize
50842          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
50843          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50844            # do relocations at load
50845            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
50846            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50847            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
50848          fi
50849          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50850            # mark relocations read only
50851            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
50852            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50853            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50854          fi
50855          ;;
50856        fastdebug )
50857          # Hotspot always let the linker optimize
50858          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
50859          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50860            # mark relocations read only
50861            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
50862            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50863            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50864          fi
50865          ;;
50866        * )
50867          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50868          ;;
50869        esac
50870    fi
50871  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50872    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50873    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50874    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50875    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50876    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50877    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50878      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
50879    fi
50880  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50881    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50882    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
50883    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
50884  fi
50885
50886  # Customize LDFLAGS for executables
50887
50888  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
50889
50890  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50891    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
50892      LDFLAGS_STACK_SIZE=1048576
50893    else
50894      LDFLAGS_STACK_SIZE=327680
50895    fi
50896    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50897  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
50898    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50899  fi
50900
50901  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
50902
50903  # Customize LDFLAGS for libs
50904  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
50905
50906  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50907  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50908    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50909        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50910    OPENJDK_BUILD_JDKLIB_LIBS=""
50911  else
50912    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50913        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
50914
50915    if test "xBUILD" = "xTARGET"; then
50916    # On some platforms (mac) the linker warns about non existing -L dirs.
50917    # Add server first if available. Linking aginst client does not always produce the same results.
50918      # Only add client/minimal dir if client/minimal is being built.
50919    # Default to server for other variants.
50920      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50921        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50922      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50923        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
50924      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50925        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
50926    else
50927        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50928    fi
50929    elif test "xBUILD" = "xBUILD"; then
50930      # When building a buildjdk, it's always only the server variant
50931      OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50932          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50933    fi
50934
50935    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
50936    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50937      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
50938    fi
50939
50940  fi
50941
50942  # Set OPENJDK_BUILD_JVM_LIBS (per os)
50943  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50944    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
50945  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50946    # FIXME: This hard-coded path is not really proper.
50947    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50948      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50949    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50950      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50951    fi
50952    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50953        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50954  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50955    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
50956  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50957    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50958  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50959    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
50960  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50961    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50962        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50963        wsock32.lib winmm.lib version.lib psapi.lib"
50964    fi
50965
50966  # Set OPENJDK_BUILD_JVM_ASFLAGS
50967  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50968    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50969      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
50970    fi
50971  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50972    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50973  fi
50974
50975  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
50976
50977
50978
50979
50980
50981
50982
50983
50984
50985
50986
50987
50988
50989
50990
50991  # Tests are only ever compiled for TARGET
50992  # Flags for compiling test libraries
50993  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50994  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50995
50996  # Flags for compiling test executables
50997  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
50998  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
50999
51000
51001
51002
51003
51004
51005  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51006  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
51007
51008
51009
51010
51011
51012
51013  # Some Zero and Shark settings.
51014  # ZERO_ARCHFLAG tells the compiler which mode to build for
51015  case "${OPENJDK_TARGET_CPU}" in
51016    s390)
51017      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51018      ;;
51019    *)
51020      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51021  esac
51022
51023
51024
51025
51026
51027
51028
51029
51030
51031
51032
51033
51034
51035
51036
51037
51038
51039
51040
51041
51042
51043
51044
51045
51046
51047
51048
51049
51050
51051
51052
51053
51054
51055
51056
51057
51058
51059
51060
51061
51062
51063
51064    # Execute function body
51065
51066
51067
51068
51069
51070
51071
51072
51073
51074
51075
51076
51077
51078
51079
51080
51081
51082
51083
51084
51085
51086
51087
51088
51089
51090
51091
51092
51093
51094
51095
51096
51097
51098
51099
51100
51101
51102
51103
51104
51105
51106
51107
51108
51109
51110
51111
51112
51113    # Execute function body
51114
51115  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51116$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51117  supports=yes
51118
51119  saved_cflags="$CFLAGS"
51120  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51121  ac_ext=c
51122ac_cpp='$CPP $CPPFLAGS'
51123ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51124ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51125ac_compiler_gnu=$ac_cv_c_compiler_gnu
51126
51127  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51128/* end confdefs.h.  */
51129int i;
51130_ACEOF
51131if ac_fn_c_try_compile "$LINENO"; then :
51132
51133else
51134  supports=no
51135fi
51136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51137  ac_ext=cpp
51138ac_cpp='$CXXCPP $CPPFLAGS'
51139ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51140ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51141ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51142
51143  CFLAGS="$saved_cflags"
51144
51145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51146$as_echo "$supports" >&6; }
51147  if test "x$supports" = "xyes" ; then
51148    :
51149    C_COMP_SUPPORTS="yes"
51150  else
51151    :
51152    C_COMP_SUPPORTS="no"
51153  fi
51154
51155
51156
51157
51158
51159
51160
51161
51162
51163
51164
51165
51166
51167
51168
51169
51170
51171
51172
51173
51174
51175
51176
51177
51178
51179
51180
51181
51182
51183
51184
51185
51186
51187
51188
51189
51190
51191
51192
51193
51194
51195
51196
51197
51198
51199
51200
51201
51202
51203
51204
51205
51206
51207
51208
51209
51210
51211
51212
51213    # Execute function body
51214
51215  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51216$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51217  supports=yes
51218
51219  saved_cxxflags="$CXXFLAGS"
51220  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51221  ac_ext=cpp
51222ac_cpp='$CXXCPP $CPPFLAGS'
51223ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51224ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51225ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51226
51227  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51228/* end confdefs.h.  */
51229int i;
51230_ACEOF
51231if ac_fn_cxx_try_compile "$LINENO"; then :
51232
51233else
51234  supports=no
51235fi
51236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51237  ac_ext=cpp
51238ac_cpp='$CXXCPP $CPPFLAGS'
51239ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51240ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51241ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51242
51243  CXXFLAGS="$saved_cxxflags"
51244
51245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51246$as_echo "$supports" >&6; }
51247  if test "x$supports" = "xyes" ; then
51248    :
51249    CXX_COMP_SUPPORTS="yes"
51250  else
51251    :
51252    CXX_COMP_SUPPORTS="no"
51253  fi
51254
51255
51256
51257
51258
51259
51260
51261
51262
51263
51264
51265
51266
51267  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51268$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51269  supports=no
51270  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51271
51272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51273$as_echo "$supports" >&6; }
51274  if test "x$supports" = "xyes" ; then
51275    :
51276
51277  else
51278    :
51279    ZERO_ARCHFLAG=""
51280  fi
51281
51282
51283
51284
51285
51286
51287
51288
51289  # Check that the compiler supports -mX (or -qX on AIX) flags
51290  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51291
51292
51293
51294
51295
51296
51297
51298
51299
51300
51301
51302
51303
51304
51305
51306
51307
51308
51309
51310
51311
51312
51313
51314
51315
51316
51317
51318
51319
51320
51321
51322
51323
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335
51336
51337
51338    # Execute function body
51339
51340
51341
51342
51343
51344
51345
51346
51347
51348
51349
51350
51351
51352
51353
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    # Execute function body
51388
51389  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51390$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51391  supports=yes
51392
51393  saved_cflags="$CFLAGS"
51394  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51395  ac_ext=c
51396ac_cpp='$CPP $CPPFLAGS'
51397ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51398ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51399ac_compiler_gnu=$ac_cv_c_compiler_gnu
51400
51401  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51402/* end confdefs.h.  */
51403int i;
51404_ACEOF
51405if ac_fn_c_try_compile "$LINENO"; then :
51406
51407else
51408  supports=no
51409fi
51410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51411  ac_ext=cpp
51412ac_cpp='$CXXCPP $CPPFLAGS'
51413ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51414ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51415ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51416
51417  CFLAGS="$saved_cflags"
51418
51419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51420$as_echo "$supports" >&6; }
51421  if test "x$supports" = "xyes" ; then
51422    :
51423    C_COMP_SUPPORTS="yes"
51424  else
51425    :
51426    C_COMP_SUPPORTS="no"
51427  fi
51428
51429
51430
51431
51432
51433
51434
51435
51436
51437
51438
51439
51440
51441
51442
51443
51444
51445
51446
51447
51448
51449
51450
51451
51452
51453
51454
51455
51456
51457
51458
51459
51460
51461
51462
51463
51464
51465
51466
51467
51468
51469
51470
51471
51472
51473
51474
51475
51476
51477
51478
51479
51480
51481
51482
51483
51484
51485
51486
51487    # Execute function body
51488
51489  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51490$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51491  supports=yes
51492
51493  saved_cxxflags="$CXXFLAGS"
51494  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51495  ac_ext=cpp
51496ac_cpp='$CXXCPP $CPPFLAGS'
51497ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51498ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51499ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51500
51501  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51502/* end confdefs.h.  */
51503int i;
51504_ACEOF
51505if ac_fn_cxx_try_compile "$LINENO"; then :
51506
51507else
51508  supports=no
51509fi
51510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51511  ac_ext=cpp
51512ac_cpp='$CXXCPP $CPPFLAGS'
51513ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51514ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51515ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51516
51517  CXXFLAGS="$saved_cxxflags"
51518
51519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51520$as_echo "$supports" >&6; }
51521  if test "x$supports" = "xyes" ; then
51522    :
51523    CXX_COMP_SUPPORTS="yes"
51524  else
51525    :
51526    CXX_COMP_SUPPORTS="no"
51527  fi
51528
51529
51530
51531
51532
51533
51534
51535
51536
51537
51538
51539
51540
51541  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51542$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51543  supports=no
51544  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51545
51546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51547$as_echo "$supports" >&6; }
51548  if test "x$supports" = "xyes" ; then
51549    :
51550    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51551  else
51552    :
51553    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51554  fi
51555
51556
51557
51558
51559
51560
51561
51562
51563  # Check whether --enable-warnings-as-errors was given.
51564if test "${enable_warnings_as_errors+set}" = set; then :
51565  enableval=$enable_warnings_as_errors;
51566fi
51567
51568
51569  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51570$as_echo_n "checking if native warnings are errors... " >&6; }
51571  if test "x$enable_warnings_as_errors" = "xyes"; then
51572    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51573$as_echo "yes (explicitely set)" >&6; }
51574    WARNINGS_AS_ERRORS=true
51575  elif test "x$enable_warnings_as_errors" = "xno"; then
51576    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51577$as_echo "no" >&6; }
51578    WARNINGS_AS_ERRORS=false
51579  elif test "x$enable_warnings_as_errors" = "x"; then
51580    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51581$as_echo "yes (default)" >&6; }
51582    WARNINGS_AS_ERRORS=true
51583  else
51584    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51585  fi
51586
51587  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51588    # Set legacy hotspot variable
51589    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51590  else
51591    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51592  fi
51593
51594
51595
51596
51597  case "${TOOLCHAIN_TYPE}" in
51598    microsoft)
51599      DISABLE_WARNING_PREFIX="-wd"
51600      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51601      ;;
51602    solstudio)
51603      DISABLE_WARNING_PREFIX="-erroff="
51604      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51605      ;;
51606    gcc)
51607      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51608
51609
51610
51611
51612
51613
51614
51615
51616
51617
51618
51619
51620
51621
51622
51623
51624
51625
51626
51627
51628
51629
51630
51631
51632
51633
51634
51635
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655    # Execute function body
51656
51657
51658
51659
51660
51661
51662
51663
51664
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674
51675
51676
51677
51678
51679
51680
51681
51682
51683
51684
51685
51686
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699
51700
51701
51702
51703
51704    # Execute function body
51705
51706  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51707$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51708  supports=yes
51709
51710  saved_cflags="$CFLAGS"
51711  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
51712  ac_ext=c
51713ac_cpp='$CPP $CPPFLAGS'
51714ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51715ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51716ac_compiler_gnu=$ac_cv_c_compiler_gnu
51717
51718  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51719/* end confdefs.h.  */
51720int i;
51721_ACEOF
51722if ac_fn_c_try_compile "$LINENO"; then :
51723
51724else
51725  supports=no
51726fi
51727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51728  ac_ext=cpp
51729ac_cpp='$CXXCPP $CPPFLAGS'
51730ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51731ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51732ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51733
51734  CFLAGS="$saved_cflags"
51735
51736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51737$as_echo "$supports" >&6; }
51738  if test "x$supports" = "xyes" ; then
51739    :
51740    C_COMP_SUPPORTS="yes"
51741  else
51742    :
51743    C_COMP_SUPPORTS="no"
51744  fi
51745
51746
51747
51748
51749
51750
51751
51752
51753
51754
51755
51756
51757
51758
51759
51760
51761
51762
51763
51764
51765
51766
51767
51768
51769
51770
51771
51772
51773
51774
51775
51776
51777
51778
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799
51800
51801
51802
51803
51804    # Execute function body
51805
51806  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51807$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51808  supports=yes
51809
51810  saved_cxxflags="$CXXFLAGS"
51811  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
51812  ac_ext=cpp
51813ac_cpp='$CXXCPP $CPPFLAGS'
51814ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51815ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51816ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51817
51818  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51819/* end confdefs.h.  */
51820int i;
51821_ACEOF
51822if ac_fn_cxx_try_compile "$LINENO"; then :
51823
51824else
51825  supports=no
51826fi
51827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51828  ac_ext=cpp
51829ac_cpp='$CXXCPP $CPPFLAGS'
51830ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51831ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51832ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51833
51834  CXXFLAGS="$saved_cxxflags"
51835
51836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51837$as_echo "$supports" >&6; }
51838  if test "x$supports" = "xyes" ; then
51839    :
51840    CXX_COMP_SUPPORTS="yes"
51841  else
51842    :
51843    CXX_COMP_SUPPORTS="no"
51844  fi
51845
51846
51847
51848
51849
51850
51851
51852
51853
51854
51855
51856
51857
51858  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51859$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51860  supports=no
51861  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51862
51863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51864$as_echo "$supports" >&6; }
51865  if test "x$supports" = "xyes" ; then
51866    :
51867    GCC_CAN_DISABLE_WARNINGS=true
51868  else
51869    :
51870    GCC_CAN_DISABLE_WARNINGS=false
51871
51872  fi
51873
51874
51875
51876
51877
51878
51879      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
51880        DISABLE_WARNING_PREFIX="-Wno-"
51881      else
51882        DISABLE_WARNING_PREFIX=
51883      fi
51884      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
51885      # Repeate the check for the BUILD_CC
51886      CC_OLD="$CC"
51887      CC="$BUILD_CC"
51888
51889
51890
51891
51892
51893
51894
51895
51896
51897
51898
51899
51900
51901
51902
51903
51904
51905
51906
51907
51908
51909
51910
51911
51912
51913
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931
51932
51933
51934
51935    # Execute function body
51936
51937
51938
51939
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    # Execute function body
51985
51986  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51987$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51988  supports=yes
51989
51990  saved_cflags="$CFLAGS"
51991  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
51992  ac_ext=c
51993ac_cpp='$CPP $CPPFLAGS'
51994ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51995ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51996ac_compiler_gnu=$ac_cv_c_compiler_gnu
51997
51998  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51999/* end confdefs.h.  */
52000int i;
52001_ACEOF
52002if ac_fn_c_try_compile "$LINENO"; then :
52003
52004else
52005  supports=no
52006fi
52007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52008  ac_ext=cpp
52009ac_cpp='$CXXCPP $CPPFLAGS'
52010ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52011ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52012ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52013
52014  CFLAGS="$saved_cflags"
52015
52016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52017$as_echo "$supports" >&6; }
52018  if test "x$supports" = "xyes" ; then
52019    :
52020    C_COMP_SUPPORTS="yes"
52021  else
52022    :
52023    C_COMP_SUPPORTS="no"
52024  fi
52025
52026
52027
52028
52029
52030
52031
52032
52033
52034
52035
52036
52037
52038
52039
52040
52041
52042
52043
52044
52045
52046
52047
52048
52049
52050
52051
52052
52053
52054
52055
52056
52057
52058
52059
52060
52061
52062
52063
52064
52065
52066
52067
52068
52069
52070
52071
52072
52073
52074
52075
52076
52077
52078
52079
52080
52081
52082
52083
52084    # Execute function body
52085
52086  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52087$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52088  supports=yes
52089
52090  saved_cxxflags="$CXXFLAGS"
52091  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52092  ac_ext=cpp
52093ac_cpp='$CXXCPP $CPPFLAGS'
52094ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52095ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52096ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52097
52098  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52099/* end confdefs.h.  */
52100int i;
52101_ACEOF
52102if ac_fn_cxx_try_compile "$LINENO"; then :
52103
52104else
52105  supports=no
52106fi
52107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52108  ac_ext=cpp
52109ac_cpp='$CXXCPP $CPPFLAGS'
52110ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52111ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52112ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52113
52114  CXXFLAGS="$saved_cxxflags"
52115
52116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52117$as_echo "$supports" >&6; }
52118  if test "x$supports" = "xyes" ; then
52119    :
52120    CXX_COMP_SUPPORTS="yes"
52121  else
52122    :
52123    CXX_COMP_SUPPORTS="no"
52124  fi
52125
52126
52127
52128
52129
52130
52131
52132
52133
52134
52135
52136
52137
52138  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52139$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52140  supports=no
52141  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52142
52143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52144$as_echo "$supports" >&6; }
52145  if test "x$supports" = "xyes" ; then
52146    :
52147    BUILD_CC_CAN_DISABLE_WARNINGS=true
52148  else
52149    :
52150    BUILD_CC_CAN_DISABLE_WARNINGS=false
52151
52152  fi
52153
52154
52155
52156
52157
52158
52159      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52160        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52161      else
52162        BUILD_CC_DISABLE_WARNING_PREFIX=
52163      fi
52164      CC="$CC_OLD"
52165      ;;
52166    clang)
52167      DISABLE_WARNING_PREFIX="-Wno-"
52168      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52169      ;;
52170    xlc)
52171      DISABLE_WARNING_PREFIX="-qsuppress="
52172      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52173      ;;
52174  esac
52175
52176
52177
52178
52179
52180# Setup debug symbols (need objcopy from the toolchain for that)
52181
52182  #
52183  # NATIVE_DEBUG_SYMBOLS
52184  # This must be done after the toolchain is setup, since we're looking at objcopy.
52185  #
52186  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52187$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52188
52189# Check whether --with-native-debug-symbols was given.
52190if test "${with_native_debug_symbols+set}" = set; then :
52191  withval=$with_native_debug_symbols;
52192        if test "x$OPENJDK_TARGET_OS" = xaix; then
52193          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52194            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52195          fi
52196        fi
52197
52198else
52199
52200        if test "x$OPENJDK_TARGET_OS" = xaix; then
52201          # AIX doesn't support 'zipped' so use 'internal' as default
52202          with_native_debug_symbols="internal"
52203        else
52204          if test "x$STATIC_BUILD" = xtrue; then
52205            with_native_debug_symbols="none"
52206          else
52207            with_native_debug_symbols="zipped"
52208          fi
52209        fi
52210
52211fi
52212
52213  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52215$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52216
52217  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52218
52219    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52220      if test "x$OBJCOPY" = x; then
52221        # enabling of enable-debug-symbols and can't find objcopy
52222        # this is an error
52223        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52224      fi
52225    fi
52226
52227    COMPILE_WITH_DEBUG_SYMBOLS=true
52228    COPY_DEBUG_SYMBOLS=true
52229    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52230
52231    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52232    DEBUG_BINARIES=false
52233    STRIP_POLICY=min_strip
52234
52235  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52236    COMPILE_WITH_DEBUG_SYMBOLS=false
52237    COPY_DEBUG_SYMBOLS=false
52238    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52239
52240    DEBUG_BINARIES=false
52241    STRIP_POLICY=no_strip
52242  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52243    COMPILE_WITH_DEBUG_SYMBOLS=true
52244    COPY_DEBUG_SYMBOLS=false
52245    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52246
52247    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52248    DEBUG_BINARIES=true
52249    STRIP_POLICY=no_strip
52250    STRIP=""
52251
52252  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52253
52254    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52255      if test "x$OBJCOPY" = x; then
52256        # enabling of enable-debug-symbols and can't find objcopy
52257        # this is an error
52258        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52259      fi
52260    fi
52261
52262    COMPILE_WITH_DEBUG_SYMBOLS=true
52263    COPY_DEBUG_SYMBOLS=true
52264    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52265
52266    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52267    DEBUG_BINARIES=false
52268    STRIP_POLICY=min_strip
52269  else
52270    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52271  fi
52272
52273  # --enable-debug-symbols is deprecated.
52274  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52275
52276  # Check whether --enable-debug-symbols was given.
52277if test "${enable_debug_symbols+set}" = set; then :
52278  enableval=$enable_debug_symbols;
52279fi
52280
52281  if test "x$enable_debug_symbols" != x; then
52282    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52283$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52284
52285    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52286      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52287$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52288    fi
52289
52290  fi
52291
52292
52293  # --enable-zip-debug-info is deprecated.
52294  # Please use --with-native-debug-symbols=zipped .
52295
52296  # Check whether --enable-zip-debug-info was given.
52297if test "${enable_zip_debug_info+set}" = set; then :
52298  enableval=$enable_zip_debug_info;
52299fi
52300
52301  if test "x$enable_zip_debug_info" != x; then
52302    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52303$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52304
52305    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52306      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52307$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52308    fi
52309
52310  fi
52311
52312
52313
52314
52315
52316
52317  # Legacy values
52318
52319
52320
52321
52322  # Check whether --enable-native-coverage was given.
52323if test "${enable_native_coverage+set}" = set; then :
52324  enableval=$enable_native_coverage;
52325fi
52326
52327  GCOV_ENABLED="false"
52328  if test "x$enable_native_coverage" = "xyes"; then
52329    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52330      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52331$as_echo_n "checking if native coverage is enabled... " >&6; }
52332      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52333$as_echo "yes" >&6; }
52334      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52335      GCOV_LDFLAGS="-fprofile-arcs"
52336      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52337      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52338      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52339      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52340      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52341      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52342      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52343      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52344      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52345      GCOV_ENABLED="true"
52346    else
52347      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52348    fi
52349  elif test "x$enable_native_coverage" = "xno"; then
52350    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52351$as_echo_n "checking if native coverage is enabled... " >&6; }
52352    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52353$as_echo "no" >&6; }
52354  elif test "x$enable_native_coverage" != "x"; then
52355    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52356  fi
52357
52358
52359
52360
52361# Need toolchain to setup dtrace
52362
52363  # Test for dtrace dependencies
52364  # Check whether --enable-dtrace was given.
52365if test "${enable_dtrace+set}" = set; then :
52366  enableval=$enable_dtrace;
52367fi
52368
52369
52370  DTRACE_DEP_MISSING=false
52371
52372  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52373$as_echo_n "checking for dtrace tool... " >&6; }
52374  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52375    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52376$as_echo "$DTRACE" >&6; }
52377  else
52378    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52379$as_echo "not found, cannot build dtrace" >&6; }
52380    DTRACE_DEP_MISSING=true
52381  fi
52382
52383  for ac_header in sys/sdt.h
52384do :
52385  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52386if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52387  cat >>confdefs.h <<_ACEOF
52388#define HAVE_SYS_SDT_H 1
52389_ACEOF
52390 DTRACE_HEADERS_OK=yes
52391else
52392  DTRACE_HEADERS_OK=no
52393fi
52394
52395done
52396
52397  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52398    DTRACE_DEP_MISSING=true
52399  fi
52400
52401  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52402$as_echo_n "checking if dtrace should be built... " >&6; }
52403  if test "x$enable_dtrace" = "xyes"; then
52404    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52405      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52406$as_echo "no, missing dependencies" >&6; }
52407
52408  # Print a helpful message on how to acquire the necessary build dependency.
52409  # dtrace is the help tag: freetype, cups, alsa etc
52410  MISSING_DEPENDENCY=dtrace
52411
52412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52413    cygwin_help $MISSING_DEPENDENCY
52414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52415    msys_help $MISSING_DEPENDENCY
52416  else
52417    PKGHANDLER_COMMAND=
52418
52419    case $PKGHANDLER in
52420      apt-get)
52421        apt_help     $MISSING_DEPENDENCY ;;
52422      yum)
52423        yum_help     $MISSING_DEPENDENCY ;;
52424      port)
52425        port_help    $MISSING_DEPENDENCY ;;
52426      pkgutil)
52427        pkgutil_help $MISSING_DEPENDENCY ;;
52428      pkgadd)
52429        pkgadd_help  $MISSING_DEPENDENCY ;;
52430    esac
52431
52432    if test "x$PKGHANDLER_COMMAND" != x; then
52433      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52434    fi
52435  fi
52436
52437      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52438    else
52439      INCLUDE_DTRACE=true
52440      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52441$as_echo "yes, forced" >&6; }
52442    fi
52443  elif test "x$enable_dtrace" = "xno"; then
52444    INCLUDE_DTRACE=false
52445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52446$as_echo "no, forced" >&6; }
52447  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52448    if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK" != "xtrue"; then
52449      INCLUDE_DTRACE=false
52450      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, non-open linux build" >&5
52451$as_echo "no, non-open linux build" >&6; }
52452    elif test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52453      INCLUDE_DTRACE=false
52454      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52455$as_echo "no, missing dependencies" >&6; }
52456    else
52457      INCLUDE_DTRACE=true
52458      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52459$as_echo "yes, dependencies present" >&6; }
52460    fi
52461  else
52462    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52463  fi
52464
52465
52466
52467  # The user can in some cases supply additional jvm features. For the custom
52468  # variant, this defines the entire variant.
52469
52470# Check whether --with-jvm-features was given.
52471if test "${with_jvm_features+set}" = set; then :
52472  withval=$with_jvm_features;
52473fi
52474
52475  if test "x$with_jvm_features" != x; then
52476    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52477$as_echo_n "checking additional JVM features... " >&6; }
52478    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52479    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52480$as_echo "$JVM_FEATURES" >&6; }
52481  fi
52482
52483  # Verify that dependencies are met for explicitly set features.
52484  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52485    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52486  fi
52487
52488  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52489    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52490  fi
52491
52492  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && !   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ; then
52493    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2'" "$LINENO" 5
52494  fi
52495
52496  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52497    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52498  fi
52499
52500  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52501    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52502  fi
52503
52504  # Turn on additional features based on other parts of configure
52505  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52506    JVM_FEATURES="$JVM_FEATURES dtrace"
52507  else
52508    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52509      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52510    fi
52511  fi
52512
52513  if test "x$STATIC_BUILD" = "xtrue"; then
52514    JVM_FEATURES="$JVM_FEATURES static-build"
52515  else
52516    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52517      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52518    fi
52519  fi
52520
52521  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52522    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52523      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52524    fi
52525  fi
52526
52527  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52528    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52529      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52530    fi
52531  fi
52532
52533  # Only enable jvmci on x86_64, sparcv9 and aarch64, and only on server.
52534  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52535      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52536      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52537    JVM_FEATURES_jvmci="jvmci"
52538  else
52539    JVM_FEATURES_jvmci=""
52540  fi
52541
52542  # All variants but minimal (and custom) get these features
52543  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52544
52545  # Enable features depending on variant.
52546  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52547  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"
52548  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52549  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52550  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52551  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52552  JVM_FEATURES_custom="$JVM_FEATURES"
52553
52554
52555
52556
52557
52558
52559
52560
52561
52562  # Used for verification of Makefiles by check-jvm-feature
52563
52564
52565  # We don't support --with-jvm-interpreter anymore, use zero instead.
52566
52567
52568# Check whether --with-jvm-interpreter was given.
52569if test "${with_jvm_interpreter+set}" = set; then :
52570  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52571$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52572fi
52573
52574
52575
52576
52577###############################################################################
52578#
52579# Check dependencies for external and internal libraries.
52580#
52581###############################################################################
52582
52583# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52584
52585  # When using cygwin or msys, we need a wrapper binary that renames
52586  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52587  # @files and rewrites these too! This wrapper binary is
52588  # called fixpath.
52589  FIXPATH=
52590  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52591    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52592$as_echo_n "checking if fixpath can be created... " >&6; }
52593    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52594    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52595    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52596    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52597      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52598      FIXPATH="$FIXPATH_BIN -c"
52599    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52600      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52601      # @ was chosen as separator to minimize risk of other tools messing around with it
52602      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52603          | tr ' ' '\n' | grep '^/./' | sort | uniq`
52604      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52605      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52606    fi
52607    FIXPATH_SRC_W="$FIXPATH_SRC"
52608    FIXPATH_BIN_W="$FIXPATH_BIN"
52609
52610  unix_path="$FIXPATH_SRC_W"
52611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52612    windows_path=`$CYGPATH -m "$unix_path"`
52613    FIXPATH_SRC_W="$windows_path"
52614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52615    windows_path=`cmd //c echo $unix_path`
52616    FIXPATH_SRC_W="$windows_path"
52617  fi
52618
52619
52620  unix_path="$FIXPATH_BIN_W"
52621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52622    windows_path=`$CYGPATH -m "$unix_path"`
52623    FIXPATH_BIN_W="$windows_path"
52624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52625    windows_path=`cmd //c echo $unix_path`
52626    FIXPATH_BIN_W="$windows_path"
52627  fi
52628
52629    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
52630    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
52631    cd $FIXPATH_DIR
52632    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
52633    cd $CURDIR
52634
52635    if test ! -x $FIXPATH_BIN; then
52636      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52637$as_echo "no" >&6; }
52638      cat $FIXPATH_DIR/fixpath1.log
52639      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
52640    fi
52641    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52642$as_echo "yes" >&6; }
52643    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
52644$as_echo_n "checking if fixpath.exe works... " >&6; }
52645    cd $FIXPATH_DIR
52646    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
52647        > $FIXPATH_DIR/fixpath2.log 2>&1
52648    cd $CURDIR
52649    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
52650      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52651$as_echo "no" >&6; }
52652      cat $FIXPATH_DIR/fixpath2.log
52653      as_fn_error $? "fixpath did not work!" "$LINENO" 5
52654    fi
52655    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52656$as_echo "yes" >&6; }
52657
52658    FIXPATH_DETACH_FLAG="--detach"
52659  fi
52660
52661
52662
52663
52664
52665
52666  # Check if X11 is needed
52667  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
52668    # No X11 support on windows or macosx
52669    NEEDS_LIB_X11=false
52670  else
52671    if test "x$SUPPORT_HEADFUL" = xno; then
52672      # No X11 support if building headless-only
52673      NEEDS_LIB_X11=false
52674    else
52675      # All other instances need X11
52676      NEEDS_LIB_X11=true
52677    fi
52678  fi
52679
52680  # Check if cups is needed
52681  if test "x$OPENJDK_TARGET_OS" = xwindows; then
52682    # Windows have a separate print system
52683    NEEDS_LIB_CUPS=false
52684  else
52685    NEEDS_LIB_CUPS=true
52686  fi
52687
52688  # Check if freetype is needed
52689  if test "x$OPENJDK" = "xtrue"; then
52690    NEEDS_LIB_FREETYPE=true
52691  else
52692    NEEDS_LIB_FREETYPE=false
52693  fi
52694
52695  # Check if alsa is needed
52696  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52697    NEEDS_LIB_ALSA=true
52698  else
52699    NEEDS_LIB_ALSA=false
52700  fi
52701
52702  # Check if ffi is needed
52703  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52704    NEEDS_LIB_FFI=true
52705  else
52706    NEEDS_LIB_FFI=false
52707  fi
52708
52709
52710  # statically link libstdc++ before C++ ABI is stablized on Linux unless
52711  # dynamic build is configured on command line.
52712
52713# Check whether --with-stdc++lib was given.
52714if test "${with_stdc__lib+set}" = set; then :
52715  withval=$with_stdc__lib;
52716        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
52717                && test "x$with_stdc__lib" != xdefault; then
52718          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
52719        fi
52720
52721else
52722  with_stdc__lib=default
52723
52724fi
52725
52726
52727  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52728    # Test if -lstdc++ works.
52729    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
52730$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
52731    ac_ext=cpp
52732ac_cpp='$CXXCPP $CPPFLAGS'
52733ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52734ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52735ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52736
52737    OLD_CXXFLAGS="$CXXFLAGS"
52738    CXXFLAGS="$CXXFLAGS -lstdc++"
52739    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52740/* end confdefs.h.  */
52741
52742int
52743main ()
52744{
52745return 0;
52746  ;
52747  return 0;
52748}
52749_ACEOF
52750if ac_fn_cxx_try_link "$LINENO"; then :
52751  has_dynamic_libstdcxx=yes
52752else
52753  has_dynamic_libstdcxx=no
52754fi
52755rm -f core conftest.err conftest.$ac_objext \
52756    conftest$ac_exeext conftest.$ac_ext
52757    CXXFLAGS="$OLD_CXXFLAGS"
52758    ac_ext=cpp
52759ac_cpp='$CXXCPP $CPPFLAGS'
52760ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52761ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52762ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52763
52764    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
52765$as_echo "$has_dynamic_libstdcxx" >&6; }
52766
52767    # Test if stdc++ can be linked statically.
52768    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
52769$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
52770    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
52771    ac_ext=cpp
52772ac_cpp='$CXXCPP $CPPFLAGS'
52773ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52774ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52775ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52776
52777    OLD_LIBS="$LIBS"
52778    OLD_CXX="$CXX"
52779    LIBS="$STATIC_STDCXX_FLAGS"
52780    CXX="$CC"
52781    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52782/* end confdefs.h.  */
52783
52784int
52785main ()
52786{
52787return 0;
52788  ;
52789  return 0;
52790}
52791_ACEOF
52792if ac_fn_cxx_try_link "$LINENO"; then :
52793  has_static_libstdcxx=yes
52794else
52795  has_static_libstdcxx=no
52796fi
52797rm -f core conftest.err conftest.$ac_objext \
52798    conftest$ac_exeext conftest.$ac_ext
52799    LIBS="$OLD_LIBS"
52800    CXX="$OLD_CXX"
52801    ac_ext=cpp
52802ac_cpp='$CXXCPP $CPPFLAGS'
52803ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52804ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52805ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52806
52807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
52808$as_echo "$has_static_libstdcxx" >&6; }
52809
52810    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
52811      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
52812    fi
52813
52814    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
52815      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
52816    fi
52817
52818    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
52819      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
52820    fi
52821
52822    # If dynamic was requested, it's available since it would fail above otherwise.
52823    # If dynamic wasn't requested, go with static unless it isn't available.
52824    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
52825$as_echo_n "checking how to link with libstdc++... " >&6; }
52826    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52827      LIBCXX="$LIBCXX -lstdc++"
52828      # To help comparisons with old build, put stdc++ first in JVM_LIBS
52829      JVM_LIBS="-lstdc++ $JVM_LIBS"
52830      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
52831      # just use the same setting as for the TARGET toolchain.
52832      OPENJDK_BUILD_JVM_LIBS="-lstdc++ $OPENJDK_BUILD_JVM_LIBS"
52833      LDCXX="$CXX"
52834      STATIC_CXX_SETTING="STATIC_CXX=false"
52835      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
52836$as_echo "dynamic" >&6; }
52837    else
52838      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
52839      JVM_LDFLAGS="$JVM_LDFLAGS -static-libgcc"
52840      # To help comparisons with old build, put stdc++ first in JVM_LIBS
52841      JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $JVM_LIBS"
52842      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
52843      # just use the same setting as for the TARGET toolchain.
52844      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -static-libgcc"
52845      OPENJDK_BUILD_JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $OPENJDK_BUILD_JVM_LIBS"
52846      LDCXX="$CC"
52847      STATIC_CXX_SETTING="STATIC_CXX=true"
52848      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
52849$as_echo "static" >&6; }
52850    fi
52851  fi
52852
52853
52854  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
52855  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
52856    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
52857  fi
52858
52859  # TODO better (platform agnostic) test
52860  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
52861    LIBCXX="-lstdc++"
52862  fi
52863
52864
52865  # Setup Windows runtime dlls
52866  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52867
52868
52869# Check whether --with-msvcr-dll was given.
52870if test "${with_msvcr_dll+set}" = set; then :
52871  withval=$with_msvcr_dll;
52872fi
52873
52874
52875  if test "x$with_msvcr_dll" != x; then
52876    # If given explicitely by user, do not probe. If not present, fail directly.
52877
52878  DLL_NAME="$MSVCR_NAME"
52879  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
52880  METHOD="--with-msvcr-dll"
52881  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52882    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52883$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52884
52885    # Need to check if the found msvcr is correct architecture
52886    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52887$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52888    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52889    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52890      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52891      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52892      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52893        CORRECT_MSVCR_ARCH="PE32 executable"
52894      else
52895        CORRECT_MSVCR_ARCH="PE32+ executable"
52896      fi
52897    else
52898      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52899        CORRECT_MSVCR_ARCH=386
52900      else
52901        CORRECT_MSVCR_ARCH=x86-64
52902      fi
52903    fi
52904    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52905      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52906$as_echo "ok" >&6; }
52907      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52908
52909  # Only process if variable expands to non-empty
52910
52911  if test "x$MSVC_DLL" != x; then
52912    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52913
52914  # Input might be given as Windows format, start by converting to
52915  # unix format.
52916  path="$MSVC_DLL"
52917  new_path=`$CYGPATH -u "$path"`
52918
52919  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52920  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52921  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52922  # "foo.exe" is OK but "foo" is an error.
52923  #
52924  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52925  # It is also a way to make sure we got the proper file name for the real test later on.
52926  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52927  if test "x$test_shortpath" = x; then
52928    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52929$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52930    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52931  fi
52932
52933  # Call helper function which possibly converts this using DOS-style short mode.
52934  # If so, the updated path is stored in $new_path.
52935
52936  input_path="$new_path"
52937  # Check if we need to convert this using DOS-style short mode. If the path
52938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52939  # take no chances and rewrite it.
52940  # Note: m4 eats our [], so we need to use [ and ] instead.
52941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52942  if test "x$has_forbidden_chars" != x; then
52943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52944    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52945    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52946    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52947      # Going to short mode and back again did indeed matter. Since short mode is
52948      # case insensitive, let's make it lowercase to improve readability.
52949      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52950      # Now convert it back to Unix-style (cygpath)
52951      input_path=`$CYGPATH -u "$shortmode_path"`
52952      new_path="$input_path"
52953    fi
52954  fi
52955
52956  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52957  if test "x$test_cygdrive_prefix" = x; then
52958    # As a simple fix, exclude /usr/bin since it's not a real path.
52959    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52960      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52961      # a path prefixed by /cygdrive for fixpath to work.
52962      new_path="$CYGWIN_ROOT_PATH$input_path"
52963    fi
52964  fi
52965
52966
52967  if test "x$path" != "x$new_path"; then
52968    MSVC_DLL="$new_path"
52969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52970$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52971  fi
52972
52973    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52974
52975  path="$MSVC_DLL"
52976  has_colon=`$ECHO $path | $GREP ^.:`
52977  new_path="$path"
52978  if test "x$has_colon" = x; then
52979    # Not in mixed or Windows style, start by that.
52980    new_path=`cmd //c echo $path`
52981  fi
52982
52983
52984  input_path="$new_path"
52985  # Check if we need to convert this using DOS-style short mode. If the path
52986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52987  # take no chances and rewrite it.
52988  # Note: m4 eats our [], so we need to use [ and ] instead.
52989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52990  if test "x$has_forbidden_chars" != x; then
52991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52992    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52993  fi
52994
52995
52996  windows_path="$new_path"
52997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52998    unix_path=`$CYGPATH -u "$windows_path"`
52999    new_path="$unix_path"
53000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53002    new_path="$unix_path"
53003  fi
53004
53005  if test "x$path" != "x$new_path"; then
53006    MSVC_DLL="$new_path"
53007    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53008$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53009  fi
53010
53011  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53012  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53013
53014    else
53015      # We're on a unix platform. Hooray! :)
53016      path="$MSVC_DLL"
53017      has_space=`$ECHO "$path" | $GREP " "`
53018      if test "x$has_space" != x; then
53019        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53020$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53021        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53022      fi
53023
53024      # Use eval to expand a potential ~
53025      eval path="$path"
53026      if test ! -f "$path" && test ! -d "$path"; then
53027        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53028      fi
53029
53030      if test -d "$path"; then
53031        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53032      else
53033        dir="`$DIRNAME "$path"`"
53034        base="`$BASENAME "$path"`"
53035        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53036      fi
53037    fi
53038  fi
53039
53040      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53041$as_echo_n "checking for $DLL_NAME... " >&6; }
53042      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53043$as_echo "$MSVC_DLL" >&6; }
53044    else
53045      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53046$as_echo "incorrect, ignoring" >&6; }
53047      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53048$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53049    fi
53050  fi
53051
53052    if test "x$MSVC_DLL" = x; then
53053      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53054    fi
53055    MSVCR_DLL="$MSVC_DLL"
53056  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53057
53058  DLL_NAME="$MSVCR_NAME"
53059  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53060  METHOD="devkit"
53061  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53062    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53063$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53064
53065    # Need to check if the found msvcr is correct architecture
53066    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53067$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53068    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53069    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53070      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53071      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53072      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53073        CORRECT_MSVCR_ARCH="PE32 executable"
53074      else
53075        CORRECT_MSVCR_ARCH="PE32+ executable"
53076      fi
53077    else
53078      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53079        CORRECT_MSVCR_ARCH=386
53080      else
53081        CORRECT_MSVCR_ARCH=x86-64
53082      fi
53083    fi
53084    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53085      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53086$as_echo "ok" >&6; }
53087      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53088
53089  # Only process if variable expands to non-empty
53090
53091  if test "x$MSVC_DLL" != x; then
53092    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53093
53094  # Input might be given as Windows format, start by converting to
53095  # unix format.
53096  path="$MSVC_DLL"
53097  new_path=`$CYGPATH -u "$path"`
53098
53099  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53100  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53101  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53102  # "foo.exe" is OK but "foo" is an error.
53103  #
53104  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53105  # It is also a way to make sure we got the proper file name for the real test later on.
53106  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53107  if test "x$test_shortpath" = x; then
53108    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53109$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53110    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53111  fi
53112
53113  # Call helper function which possibly converts this using DOS-style short mode.
53114  # If so, the updated path is stored in $new_path.
53115
53116  input_path="$new_path"
53117  # Check if we need to convert this using DOS-style short mode. If the path
53118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53119  # take no chances and rewrite it.
53120  # Note: m4 eats our [], so we need to use [ and ] instead.
53121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53122  if test "x$has_forbidden_chars" != x; then
53123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53124    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53125    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53126    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53127      # Going to short mode and back again did indeed matter. Since short mode is
53128      # case insensitive, let's make it lowercase to improve readability.
53129      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53130      # Now convert it back to Unix-style (cygpath)
53131      input_path=`$CYGPATH -u "$shortmode_path"`
53132      new_path="$input_path"
53133    fi
53134  fi
53135
53136  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53137  if test "x$test_cygdrive_prefix" = x; then
53138    # As a simple fix, exclude /usr/bin since it's not a real path.
53139    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53140      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53141      # a path prefixed by /cygdrive for fixpath to work.
53142      new_path="$CYGWIN_ROOT_PATH$input_path"
53143    fi
53144  fi
53145
53146
53147  if test "x$path" != "x$new_path"; then
53148    MSVC_DLL="$new_path"
53149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53150$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53151  fi
53152
53153    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53154
53155  path="$MSVC_DLL"
53156  has_colon=`$ECHO $path | $GREP ^.:`
53157  new_path="$path"
53158  if test "x$has_colon" = x; then
53159    # Not in mixed or Windows style, start by that.
53160    new_path=`cmd //c echo $path`
53161  fi
53162
53163
53164  input_path="$new_path"
53165  # Check if we need to convert this using DOS-style short mode. If the path
53166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53167  # take no chances and rewrite it.
53168  # Note: m4 eats our [], so we need to use [ and ] instead.
53169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53170  if test "x$has_forbidden_chars" != x; then
53171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53172    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53173  fi
53174
53175
53176  windows_path="$new_path"
53177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53178    unix_path=`$CYGPATH -u "$windows_path"`
53179    new_path="$unix_path"
53180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53182    new_path="$unix_path"
53183  fi
53184
53185  if test "x$path" != "x$new_path"; then
53186    MSVC_DLL="$new_path"
53187    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53188$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53189  fi
53190
53191  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53192  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53193
53194    else
53195      # We're on a unix platform. Hooray! :)
53196      path="$MSVC_DLL"
53197      has_space=`$ECHO "$path" | $GREP " "`
53198      if test "x$has_space" != x; then
53199        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53200$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53201        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53202      fi
53203
53204      # Use eval to expand a potential ~
53205      eval path="$path"
53206      if test ! -f "$path" && test ! -d "$path"; then
53207        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53208      fi
53209
53210      if test -d "$path"; then
53211        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53212      else
53213        dir="`$DIRNAME "$path"`"
53214        base="`$BASENAME "$path"`"
53215        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53216      fi
53217    fi
53218  fi
53219
53220      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53221$as_echo_n "checking for $DLL_NAME... " >&6; }
53222      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53223$as_echo "$MSVC_DLL" >&6; }
53224    else
53225      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53226$as_echo "incorrect, ignoring" >&6; }
53227      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53228$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53229    fi
53230  fi
53231
53232    if test "x$MSVC_DLL" = x; then
53233      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53234    fi
53235    MSVCR_DLL="$MSVC_DLL"
53236  else
53237
53238  DLL_NAME="${MSVCR_NAME}"
53239  MSVC_DLL=
53240
53241  if test "x$MSVC_DLL" = x; then
53242    # Probe: Using well-known location from Visual Studio 10.0
53243    if test "x$VCINSTALLDIR" != x; then
53244      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53245
53246  windows_path="$CYGWIN_VC_INSTALL_DIR"
53247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53248    unix_path=`$CYGPATH -u "$windows_path"`
53249    CYGWIN_VC_INSTALL_DIR="$unix_path"
53250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53252    CYGWIN_VC_INSTALL_DIR="$unix_path"
53253  fi
53254
53255      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53256        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53257      else
53258        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53259      fi
53260      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53261
53262  DLL_NAME="$DLL_NAME"
53263  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53264  METHOD="well-known location in VCINSTALLDIR"
53265  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53266    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53267$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53268
53269    # Need to check if the found msvcr is correct architecture
53270    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53271$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53272    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53273    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53274      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53275      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53276      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53277        CORRECT_MSVCR_ARCH="PE32 executable"
53278      else
53279        CORRECT_MSVCR_ARCH="PE32+ executable"
53280      fi
53281    else
53282      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53283        CORRECT_MSVCR_ARCH=386
53284      else
53285        CORRECT_MSVCR_ARCH=x86-64
53286      fi
53287    fi
53288    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53289      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53290$as_echo "ok" >&6; }
53291      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53292
53293  # Only process if variable expands to non-empty
53294
53295  if test "x$MSVC_DLL" != x; then
53296    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53297
53298  # Input might be given as Windows format, start by converting to
53299  # unix format.
53300  path="$MSVC_DLL"
53301  new_path=`$CYGPATH -u "$path"`
53302
53303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53306  # "foo.exe" is OK but "foo" is an error.
53307  #
53308  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53309  # It is also a way to make sure we got the proper file name for the real test later on.
53310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53311  if test "x$test_shortpath" = x; then
53312    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53313$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53314    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53315  fi
53316
53317  # Call helper function which possibly converts this using DOS-style short mode.
53318  # If so, the updated path is stored in $new_path.
53319
53320  input_path="$new_path"
53321  # Check if we need to convert this using DOS-style short mode. If the path
53322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53323  # take no chances and rewrite it.
53324  # Note: m4 eats our [], so we need to use [ and ] instead.
53325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53326  if test "x$has_forbidden_chars" != x; then
53327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53331      # Going to short mode and back again did indeed matter. Since short mode is
53332      # case insensitive, let's make it lowercase to improve readability.
53333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53334      # Now convert it back to Unix-style (cygpath)
53335      input_path=`$CYGPATH -u "$shortmode_path"`
53336      new_path="$input_path"
53337    fi
53338  fi
53339
53340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53341  if test "x$test_cygdrive_prefix" = x; then
53342    # As a simple fix, exclude /usr/bin since it's not a real path.
53343    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53345      # a path prefixed by /cygdrive for fixpath to work.
53346      new_path="$CYGWIN_ROOT_PATH$input_path"
53347    fi
53348  fi
53349
53350
53351  if test "x$path" != "x$new_path"; then
53352    MSVC_DLL="$new_path"
53353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53354$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53355  fi
53356
53357    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53358
53359  path="$MSVC_DLL"
53360  has_colon=`$ECHO $path | $GREP ^.:`
53361  new_path="$path"
53362  if test "x$has_colon" = x; then
53363    # Not in mixed or Windows style, start by that.
53364    new_path=`cmd //c echo $path`
53365  fi
53366
53367
53368  input_path="$new_path"
53369  # Check if we need to convert this using DOS-style short mode. If the path
53370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53371  # take no chances and rewrite it.
53372  # Note: m4 eats our [], so we need to use [ and ] instead.
53373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53374  if test "x$has_forbidden_chars" != x; then
53375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53376    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53377  fi
53378
53379
53380  windows_path="$new_path"
53381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53382    unix_path=`$CYGPATH -u "$windows_path"`
53383    new_path="$unix_path"
53384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53386    new_path="$unix_path"
53387  fi
53388
53389  if test "x$path" != "x$new_path"; then
53390    MSVC_DLL="$new_path"
53391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53392$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53393  fi
53394
53395  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53396  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53397
53398    else
53399      # We're on a unix platform. Hooray! :)
53400      path="$MSVC_DLL"
53401      has_space=`$ECHO "$path" | $GREP " "`
53402      if test "x$has_space" != x; then
53403        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53404$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53405        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53406      fi
53407
53408      # Use eval to expand a potential ~
53409      eval path="$path"
53410      if test ! -f "$path" && test ! -d "$path"; then
53411        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53412      fi
53413
53414      if test -d "$path"; then
53415        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53416      else
53417        dir="`$DIRNAME "$path"`"
53418        base="`$BASENAME "$path"`"
53419        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53420      fi
53421    fi
53422  fi
53423
53424      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53425$as_echo_n "checking for $DLL_NAME... " >&6; }
53426      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53427$as_echo "$MSVC_DLL" >&6; }
53428    else
53429      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53430$as_echo "incorrect, ignoring" >&6; }
53431      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53432$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53433    fi
53434  fi
53435
53436    fi
53437  fi
53438
53439  if test "x$MSVC_DLL" = x; then
53440    # Probe: Check in the Boot JDK directory.
53441    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53442
53443  DLL_NAME="$DLL_NAME"
53444  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53445  METHOD="well-known location in Boot JDK"
53446  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53447    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53448$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53449
53450    # Need to check if the found msvcr is correct architecture
53451    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53452$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53453    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53454    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53455      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53456      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53457      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53458        CORRECT_MSVCR_ARCH="PE32 executable"
53459      else
53460        CORRECT_MSVCR_ARCH="PE32+ executable"
53461      fi
53462    else
53463      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53464        CORRECT_MSVCR_ARCH=386
53465      else
53466        CORRECT_MSVCR_ARCH=x86-64
53467      fi
53468    fi
53469    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53470      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53471$as_echo "ok" >&6; }
53472      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53473
53474  # Only process if variable expands to non-empty
53475
53476  if test "x$MSVC_DLL" != x; then
53477    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53478
53479  # Input might be given as Windows format, start by converting to
53480  # unix format.
53481  path="$MSVC_DLL"
53482  new_path=`$CYGPATH -u "$path"`
53483
53484  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53485  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53486  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53487  # "foo.exe" is OK but "foo" is an error.
53488  #
53489  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53490  # It is also a way to make sure we got the proper file name for the real test later on.
53491  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53492  if test "x$test_shortpath" = x; then
53493    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53494$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53495    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53496  fi
53497
53498  # Call helper function which possibly converts this using DOS-style short mode.
53499  # If so, the updated path is stored in $new_path.
53500
53501  input_path="$new_path"
53502  # Check if we need to convert this using DOS-style short mode. If the path
53503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53504  # take no chances and rewrite it.
53505  # Note: m4 eats our [], so we need to use [ and ] instead.
53506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53507  if test "x$has_forbidden_chars" != x; then
53508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53509    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53510    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53511    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53512      # Going to short mode and back again did indeed matter. Since short mode is
53513      # case insensitive, let's make it lowercase to improve readability.
53514      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53515      # Now convert it back to Unix-style (cygpath)
53516      input_path=`$CYGPATH -u "$shortmode_path"`
53517      new_path="$input_path"
53518    fi
53519  fi
53520
53521  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53522  if test "x$test_cygdrive_prefix" = x; then
53523    # As a simple fix, exclude /usr/bin since it's not a real path.
53524    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53525      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53526      # a path prefixed by /cygdrive for fixpath to work.
53527      new_path="$CYGWIN_ROOT_PATH$input_path"
53528    fi
53529  fi
53530
53531
53532  if test "x$path" != "x$new_path"; then
53533    MSVC_DLL="$new_path"
53534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53535$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53536  fi
53537
53538    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53539
53540  path="$MSVC_DLL"
53541  has_colon=`$ECHO $path | $GREP ^.:`
53542  new_path="$path"
53543  if test "x$has_colon" = x; then
53544    # Not in mixed or Windows style, start by that.
53545    new_path=`cmd //c echo $path`
53546  fi
53547
53548
53549  input_path="$new_path"
53550  # Check if we need to convert this using DOS-style short mode. If the path
53551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53552  # take no chances and rewrite it.
53553  # Note: m4 eats our [], so we need to use [ and ] instead.
53554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53555  if test "x$has_forbidden_chars" != x; then
53556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53557    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53558  fi
53559
53560
53561  windows_path="$new_path"
53562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53563    unix_path=`$CYGPATH -u "$windows_path"`
53564    new_path="$unix_path"
53565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53567    new_path="$unix_path"
53568  fi
53569
53570  if test "x$path" != "x$new_path"; then
53571    MSVC_DLL="$new_path"
53572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53573$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53574  fi
53575
53576  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53577  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53578
53579    else
53580      # We're on a unix platform. Hooray! :)
53581      path="$MSVC_DLL"
53582      has_space=`$ECHO "$path" | $GREP " "`
53583      if test "x$has_space" != x; then
53584        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53585$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53586        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53587      fi
53588
53589      # Use eval to expand a potential ~
53590      eval path="$path"
53591      if test ! -f "$path" && test ! -d "$path"; then
53592        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53593      fi
53594
53595      if test -d "$path"; then
53596        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53597      else
53598        dir="`$DIRNAME "$path"`"
53599        base="`$BASENAME "$path"`"
53600        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53601      fi
53602    fi
53603  fi
53604
53605      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53606$as_echo_n "checking for $DLL_NAME... " >&6; }
53607      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53608$as_echo "$MSVC_DLL" >&6; }
53609    else
53610      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53611$as_echo "incorrect, ignoring" >&6; }
53612      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53613$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53614    fi
53615  fi
53616
53617  fi
53618
53619  if test "x$MSVC_DLL" = x; then
53620    # Probe: Look in the Windows system32 directory
53621    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53622
53623  windows_path="$CYGWIN_SYSTEMROOT"
53624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53625    unix_path=`$CYGPATH -u "$windows_path"`
53626    CYGWIN_SYSTEMROOT="$unix_path"
53627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53629    CYGWIN_SYSTEMROOT="$unix_path"
53630  fi
53631
53632    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53633
53634  DLL_NAME="$DLL_NAME"
53635  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53636  METHOD="well-known location in SYSTEMROOT"
53637  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53638    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53639$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53640
53641    # Need to check if the found msvcr is correct architecture
53642    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53643$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53644    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53645    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53646      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53647      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53648      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53649        CORRECT_MSVCR_ARCH="PE32 executable"
53650      else
53651        CORRECT_MSVCR_ARCH="PE32+ executable"
53652      fi
53653    else
53654      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53655        CORRECT_MSVCR_ARCH=386
53656      else
53657        CORRECT_MSVCR_ARCH=x86-64
53658      fi
53659    fi
53660    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53661      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53662$as_echo "ok" >&6; }
53663      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53664
53665  # Only process if variable expands to non-empty
53666
53667  if test "x$MSVC_DLL" != x; then
53668    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53669
53670  # Input might be given as Windows format, start by converting to
53671  # unix format.
53672  path="$MSVC_DLL"
53673  new_path=`$CYGPATH -u "$path"`
53674
53675  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53676  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53677  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53678  # "foo.exe" is OK but "foo" is an error.
53679  #
53680  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53681  # It is also a way to make sure we got the proper file name for the real test later on.
53682  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53683  if test "x$test_shortpath" = x; then
53684    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53685$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53686    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53687  fi
53688
53689  # Call helper function which possibly converts this using DOS-style short mode.
53690  # If so, the updated path is stored in $new_path.
53691
53692  input_path="$new_path"
53693  # Check if we need to convert this using DOS-style short mode. If the path
53694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53695  # take no chances and rewrite it.
53696  # Note: m4 eats our [], so we need to use [ and ] instead.
53697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53698  if test "x$has_forbidden_chars" != x; then
53699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53700    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53701    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53702    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53703      # Going to short mode and back again did indeed matter. Since short mode is
53704      # case insensitive, let's make it lowercase to improve readability.
53705      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53706      # Now convert it back to Unix-style (cygpath)
53707      input_path=`$CYGPATH -u "$shortmode_path"`
53708      new_path="$input_path"
53709    fi
53710  fi
53711
53712  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53713  if test "x$test_cygdrive_prefix" = x; then
53714    # As a simple fix, exclude /usr/bin since it's not a real path.
53715    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53716      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53717      # a path prefixed by /cygdrive for fixpath to work.
53718      new_path="$CYGWIN_ROOT_PATH$input_path"
53719    fi
53720  fi
53721
53722
53723  if test "x$path" != "x$new_path"; then
53724    MSVC_DLL="$new_path"
53725    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53726$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53727  fi
53728
53729    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53730
53731  path="$MSVC_DLL"
53732  has_colon=`$ECHO $path | $GREP ^.:`
53733  new_path="$path"
53734  if test "x$has_colon" = x; then
53735    # Not in mixed or Windows style, start by that.
53736    new_path=`cmd //c echo $path`
53737  fi
53738
53739
53740  input_path="$new_path"
53741  # Check if we need to convert this using DOS-style short mode. If the path
53742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53743  # take no chances and rewrite it.
53744  # Note: m4 eats our [], so we need to use [ and ] instead.
53745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53746  if test "x$has_forbidden_chars" != x; then
53747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53748    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53749  fi
53750
53751
53752  windows_path="$new_path"
53753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53754    unix_path=`$CYGPATH -u "$windows_path"`
53755    new_path="$unix_path"
53756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53758    new_path="$unix_path"
53759  fi
53760
53761  if test "x$path" != "x$new_path"; then
53762    MSVC_DLL="$new_path"
53763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53764$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53765  fi
53766
53767  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53768  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53769
53770    else
53771      # We're on a unix platform. Hooray! :)
53772      path="$MSVC_DLL"
53773      has_space=`$ECHO "$path" | $GREP " "`
53774      if test "x$has_space" != x; then
53775        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53776$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53777        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53778      fi
53779
53780      # Use eval to expand a potential ~
53781      eval path="$path"
53782      if test ! -f "$path" && test ! -d "$path"; then
53783        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53784      fi
53785
53786      if test -d "$path"; then
53787        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53788      else
53789        dir="`$DIRNAME "$path"`"
53790        base="`$BASENAME "$path"`"
53791        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53792      fi
53793    fi
53794  fi
53795
53796      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53797$as_echo_n "checking for $DLL_NAME... " >&6; }
53798      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53799$as_echo "$MSVC_DLL" >&6; }
53800    else
53801      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53802$as_echo "incorrect, ignoring" >&6; }
53803      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53804$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53805    fi
53806  fi
53807
53808  fi
53809
53810  if test "x$MSVC_DLL" = x; then
53811    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
53812    if test "x$VS100COMNTOOLS" != x; then
53813      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
53814
53815  windows_path="$CYGWIN_VS_TOOLS_DIR"
53816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53817    unix_path=`$CYGPATH -u "$windows_path"`
53818    CYGWIN_VS_TOOLS_DIR="$unix_path"
53819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53821    CYGWIN_VS_TOOLS_DIR="$unix_path"
53822  fi
53823
53824      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53825        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53826	    | $GREP -i /x64/ | $HEAD --lines 1`
53827      else
53828        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53829	    | $GREP -i /x86/ | $HEAD --lines 1`
53830      fi
53831
53832  DLL_NAME="$DLL_NAME"
53833  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53834  METHOD="search of VS100COMNTOOLS"
53835  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53836    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53837$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53838
53839    # Need to check if the found msvcr is correct architecture
53840    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53841$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53842    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53843    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53844      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53845      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53846      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53847        CORRECT_MSVCR_ARCH="PE32 executable"
53848      else
53849        CORRECT_MSVCR_ARCH="PE32+ executable"
53850      fi
53851    else
53852      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53853        CORRECT_MSVCR_ARCH=386
53854      else
53855        CORRECT_MSVCR_ARCH=x86-64
53856      fi
53857    fi
53858    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53859      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53860$as_echo "ok" >&6; }
53861      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53862
53863  # Only process if variable expands to non-empty
53864
53865  if test "x$MSVC_DLL" != x; then
53866    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53867
53868  # Input might be given as Windows format, start by converting to
53869  # unix format.
53870  path="$MSVC_DLL"
53871  new_path=`$CYGPATH -u "$path"`
53872
53873  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53874  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53875  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53876  # "foo.exe" is OK but "foo" is an error.
53877  #
53878  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53879  # It is also a way to make sure we got the proper file name for the real test later on.
53880  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53881  if test "x$test_shortpath" = x; then
53882    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53883$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53884    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53885  fi
53886
53887  # Call helper function which possibly converts this using DOS-style short mode.
53888  # If so, the updated path is stored in $new_path.
53889
53890  input_path="$new_path"
53891  # Check if we need to convert this using DOS-style short mode. If the path
53892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53893  # take no chances and rewrite it.
53894  # Note: m4 eats our [], so we need to use [ and ] instead.
53895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53896  if test "x$has_forbidden_chars" != x; then
53897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53898    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53899    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53900    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53901      # Going to short mode and back again did indeed matter. Since short mode is
53902      # case insensitive, let's make it lowercase to improve readability.
53903      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53904      # Now convert it back to Unix-style (cygpath)
53905      input_path=`$CYGPATH -u "$shortmode_path"`
53906      new_path="$input_path"
53907    fi
53908  fi
53909
53910  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53911  if test "x$test_cygdrive_prefix" = x; then
53912    # As a simple fix, exclude /usr/bin since it's not a real path.
53913    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53914      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53915      # a path prefixed by /cygdrive for fixpath to work.
53916      new_path="$CYGWIN_ROOT_PATH$input_path"
53917    fi
53918  fi
53919
53920
53921  if test "x$path" != "x$new_path"; then
53922    MSVC_DLL="$new_path"
53923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53924$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53925  fi
53926
53927    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53928
53929  path="$MSVC_DLL"
53930  has_colon=`$ECHO $path | $GREP ^.:`
53931  new_path="$path"
53932  if test "x$has_colon" = x; then
53933    # Not in mixed or Windows style, start by that.
53934    new_path=`cmd //c echo $path`
53935  fi
53936
53937
53938  input_path="$new_path"
53939  # Check if we need to convert this using DOS-style short mode. If the path
53940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53941  # take no chances and rewrite it.
53942  # Note: m4 eats our [], so we need to use [ and ] instead.
53943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53944  if test "x$has_forbidden_chars" != x; then
53945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53946    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53947  fi
53948
53949
53950  windows_path="$new_path"
53951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53952    unix_path=`$CYGPATH -u "$windows_path"`
53953    new_path="$unix_path"
53954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53956    new_path="$unix_path"
53957  fi
53958
53959  if test "x$path" != "x$new_path"; then
53960    MSVC_DLL="$new_path"
53961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53962$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53963  fi
53964
53965  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53966  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53967
53968    else
53969      # We're on a unix platform. Hooray! :)
53970      path="$MSVC_DLL"
53971      has_space=`$ECHO "$path" | $GREP " "`
53972      if test "x$has_space" != x; then
53973        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53974$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53975        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53976      fi
53977
53978      # Use eval to expand a potential ~
53979      eval path="$path"
53980      if test ! -f "$path" && test ! -d "$path"; then
53981        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53982      fi
53983
53984      if test -d "$path"; then
53985        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53986      else
53987        dir="`$DIRNAME "$path"`"
53988        base="`$BASENAME "$path"`"
53989        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53990      fi
53991    fi
53992  fi
53993
53994      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53995$as_echo_n "checking for $DLL_NAME... " >&6; }
53996      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53997$as_echo "$MSVC_DLL" >&6; }
53998    else
53999      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54000$as_echo "incorrect, ignoring" >&6; }
54001      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54002$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54003    fi
54004  fi
54005
54006    fi
54007  fi
54008
54009  if test "x$MSVC_DLL" = x; then
54010    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54011    # (This was the original behaviour; kept since it might turn something up)
54012    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54013      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54014        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54015	    | $GREP x64 | $HEAD --lines 1`
54016      else
54017        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54018	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54019        if test "x$POSSIBLE_MSVC_DLL" = x; then
54020          # We're grasping at straws now...
54021          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54022	      | $HEAD --lines 1`
54023        fi
54024      fi
54025
54026
54027  DLL_NAME="$DLL_NAME"
54028  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54029  METHOD="search of VCINSTALLDIR"
54030  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54031    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54032$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54033
54034    # Need to check if the found msvcr is correct architecture
54035    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54036$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54037    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54038    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54039      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54040      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54041      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54042        CORRECT_MSVCR_ARCH="PE32 executable"
54043      else
54044        CORRECT_MSVCR_ARCH="PE32+ executable"
54045      fi
54046    else
54047      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54048        CORRECT_MSVCR_ARCH=386
54049      else
54050        CORRECT_MSVCR_ARCH=x86-64
54051      fi
54052    fi
54053    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54054      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54055$as_echo "ok" >&6; }
54056      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54057
54058  # Only process if variable expands to non-empty
54059
54060  if test "x$MSVC_DLL" != x; then
54061    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54062
54063  # Input might be given as Windows format, start by converting to
54064  # unix format.
54065  path="$MSVC_DLL"
54066  new_path=`$CYGPATH -u "$path"`
54067
54068  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54069  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54070  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54071  # "foo.exe" is OK but "foo" is an error.
54072  #
54073  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54074  # It is also a way to make sure we got the proper file name for the real test later on.
54075  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54076  if test "x$test_shortpath" = x; then
54077    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54078$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54079    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54080  fi
54081
54082  # Call helper function which possibly converts this using DOS-style short mode.
54083  # If so, the updated path is stored in $new_path.
54084
54085  input_path="$new_path"
54086  # Check if we need to convert this using DOS-style short mode. If the path
54087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54088  # take no chances and rewrite it.
54089  # Note: m4 eats our [], so we need to use [ and ] instead.
54090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54091  if test "x$has_forbidden_chars" != x; then
54092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54093    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54094    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54095    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54096      # Going to short mode and back again did indeed matter. Since short mode is
54097      # case insensitive, let's make it lowercase to improve readability.
54098      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54099      # Now convert it back to Unix-style (cygpath)
54100      input_path=`$CYGPATH -u "$shortmode_path"`
54101      new_path="$input_path"
54102    fi
54103  fi
54104
54105  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54106  if test "x$test_cygdrive_prefix" = x; then
54107    # As a simple fix, exclude /usr/bin since it's not a real path.
54108    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54109      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54110      # a path prefixed by /cygdrive for fixpath to work.
54111      new_path="$CYGWIN_ROOT_PATH$input_path"
54112    fi
54113  fi
54114
54115
54116  if test "x$path" != "x$new_path"; then
54117    MSVC_DLL="$new_path"
54118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54119$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54120  fi
54121
54122    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54123
54124  path="$MSVC_DLL"
54125  has_colon=`$ECHO $path | $GREP ^.:`
54126  new_path="$path"
54127  if test "x$has_colon" = x; then
54128    # Not in mixed or Windows style, start by that.
54129    new_path=`cmd //c echo $path`
54130  fi
54131
54132
54133  input_path="$new_path"
54134  # Check if we need to convert this using DOS-style short mode. If the path
54135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54136  # take no chances and rewrite it.
54137  # Note: m4 eats our [], so we need to use [ and ] instead.
54138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54139  if test "x$has_forbidden_chars" != x; then
54140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54141    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54142  fi
54143
54144
54145  windows_path="$new_path"
54146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54147    unix_path=`$CYGPATH -u "$windows_path"`
54148    new_path="$unix_path"
54149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54151    new_path="$unix_path"
54152  fi
54153
54154  if test "x$path" != "x$new_path"; then
54155    MSVC_DLL="$new_path"
54156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54157$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54158  fi
54159
54160  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54161  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54162
54163    else
54164      # We're on a unix platform. Hooray! :)
54165      path="$MSVC_DLL"
54166      has_space=`$ECHO "$path" | $GREP " "`
54167      if test "x$has_space" != x; then
54168        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54169$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54170        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54171      fi
54172
54173      # Use eval to expand a potential ~
54174      eval path="$path"
54175      if test ! -f "$path" && test ! -d "$path"; then
54176        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54177      fi
54178
54179      if test -d "$path"; then
54180        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54181      else
54182        dir="`$DIRNAME "$path"`"
54183        base="`$BASENAME "$path"`"
54184        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54185      fi
54186    fi
54187  fi
54188
54189      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54190$as_echo_n "checking for $DLL_NAME... " >&6; }
54191      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54192$as_echo "$MSVC_DLL" >&6; }
54193    else
54194      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54195$as_echo "incorrect, ignoring" >&6; }
54196      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54197$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54198    fi
54199  fi
54200
54201    fi
54202  fi
54203
54204  if test "x$MSVC_DLL" = x; then
54205    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54206$as_echo_n "checking for $DLL_NAME... " >&6; }
54207    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54208$as_echo "no" >&6; }
54209    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54210  fi
54211
54212    MSVCR_DLL="$MSVC_DLL"
54213  fi
54214
54215
54216
54217# Check whether --with-msvcp-dll was given.
54218if test "${with_msvcp_dll+set}" = set; then :
54219  withval=$with_msvcp_dll;
54220fi
54221
54222
54223  if test "x$MSVCP_NAME" != "x"; then
54224    if test "x$with_msvcp_dll" != x; then
54225      # If given explicitely by user, do not probe. If not present, fail directly.
54226
54227  DLL_NAME="$MSVCP_NAME"
54228  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54229  METHOD="--with-msvcp-dll"
54230  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54231    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54232$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54233
54234    # Need to check if the found msvcr is correct architecture
54235    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54236$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54237    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54238    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54239      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54240      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54241      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54242        CORRECT_MSVCR_ARCH="PE32 executable"
54243      else
54244        CORRECT_MSVCR_ARCH="PE32+ executable"
54245      fi
54246    else
54247      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54248        CORRECT_MSVCR_ARCH=386
54249      else
54250        CORRECT_MSVCR_ARCH=x86-64
54251      fi
54252    fi
54253    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54254      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54255$as_echo "ok" >&6; }
54256      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54257
54258  # Only process if variable expands to non-empty
54259
54260  if test "x$MSVC_DLL" != x; then
54261    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54262
54263  # Input might be given as Windows format, start by converting to
54264  # unix format.
54265  path="$MSVC_DLL"
54266  new_path=`$CYGPATH -u "$path"`
54267
54268  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54269  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54270  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54271  # "foo.exe" is OK but "foo" is an error.
54272  #
54273  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54274  # It is also a way to make sure we got the proper file name for the real test later on.
54275  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54276  if test "x$test_shortpath" = x; then
54277    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54278$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54279    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54280  fi
54281
54282  # Call helper function which possibly converts this using DOS-style short mode.
54283  # If so, the updated path is stored in $new_path.
54284
54285  input_path="$new_path"
54286  # Check if we need to convert this using DOS-style short mode. If the path
54287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54288  # take no chances and rewrite it.
54289  # Note: m4 eats our [], so we need to use [ and ] instead.
54290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54291  if test "x$has_forbidden_chars" != x; then
54292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54293    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54294    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54295    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54296      # Going to short mode and back again did indeed matter. Since short mode is
54297      # case insensitive, let's make it lowercase to improve readability.
54298      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54299      # Now convert it back to Unix-style (cygpath)
54300      input_path=`$CYGPATH -u "$shortmode_path"`
54301      new_path="$input_path"
54302    fi
54303  fi
54304
54305  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54306  if test "x$test_cygdrive_prefix" = x; then
54307    # As a simple fix, exclude /usr/bin since it's not a real path.
54308    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54309      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54310      # a path prefixed by /cygdrive for fixpath to work.
54311      new_path="$CYGWIN_ROOT_PATH$input_path"
54312    fi
54313  fi
54314
54315
54316  if test "x$path" != "x$new_path"; then
54317    MSVC_DLL="$new_path"
54318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54319$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54320  fi
54321
54322    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54323
54324  path="$MSVC_DLL"
54325  has_colon=`$ECHO $path | $GREP ^.:`
54326  new_path="$path"
54327  if test "x$has_colon" = x; then
54328    # Not in mixed or Windows style, start by that.
54329    new_path=`cmd //c echo $path`
54330  fi
54331
54332
54333  input_path="$new_path"
54334  # Check if we need to convert this using DOS-style short mode. If the path
54335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54336  # take no chances and rewrite it.
54337  # Note: m4 eats our [], so we need to use [ and ] instead.
54338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54339  if test "x$has_forbidden_chars" != x; then
54340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54341    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54342  fi
54343
54344
54345  windows_path="$new_path"
54346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54347    unix_path=`$CYGPATH -u "$windows_path"`
54348    new_path="$unix_path"
54349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54351    new_path="$unix_path"
54352  fi
54353
54354  if test "x$path" != "x$new_path"; then
54355    MSVC_DLL="$new_path"
54356    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54357$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54358  fi
54359
54360  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54361  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54362
54363    else
54364      # We're on a unix platform. Hooray! :)
54365      path="$MSVC_DLL"
54366      has_space=`$ECHO "$path" | $GREP " "`
54367      if test "x$has_space" != x; then
54368        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54369$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54370        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54371      fi
54372
54373      # Use eval to expand a potential ~
54374      eval path="$path"
54375      if test ! -f "$path" && test ! -d "$path"; then
54376        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54377      fi
54378
54379      if test -d "$path"; then
54380        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54381      else
54382        dir="`$DIRNAME "$path"`"
54383        base="`$BASENAME "$path"`"
54384        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54385      fi
54386    fi
54387  fi
54388
54389      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54390$as_echo_n "checking for $DLL_NAME... " >&6; }
54391      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54392$as_echo "$MSVC_DLL" >&6; }
54393    else
54394      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54395$as_echo "incorrect, ignoring" >&6; }
54396      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54397$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54398    fi
54399  fi
54400
54401      if test "x$MSVC_DLL" = x; then
54402        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54403      fi
54404      MSVCP_DLL="$MSVC_DLL"
54405    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54406
54407  DLL_NAME="$MSVCP_NAME"
54408  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54409  METHOD="devkit"
54410  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54411    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54412$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54413
54414    # Need to check if the found msvcr is correct architecture
54415    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54416$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54417    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54418    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54419      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54420      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54421      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54422        CORRECT_MSVCR_ARCH="PE32 executable"
54423      else
54424        CORRECT_MSVCR_ARCH="PE32+ executable"
54425      fi
54426    else
54427      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54428        CORRECT_MSVCR_ARCH=386
54429      else
54430        CORRECT_MSVCR_ARCH=x86-64
54431      fi
54432    fi
54433    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54434      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54435$as_echo "ok" >&6; }
54436      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54437
54438  # Only process if variable expands to non-empty
54439
54440  if test "x$MSVC_DLL" != x; then
54441    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54442
54443  # Input might be given as Windows format, start by converting to
54444  # unix format.
54445  path="$MSVC_DLL"
54446  new_path=`$CYGPATH -u "$path"`
54447
54448  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54449  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54450  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54451  # "foo.exe" is OK but "foo" is an error.
54452  #
54453  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54454  # It is also a way to make sure we got the proper file name for the real test later on.
54455  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54456  if test "x$test_shortpath" = x; then
54457    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54458$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54459    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54460  fi
54461
54462  # Call helper function which possibly converts this using DOS-style short mode.
54463  # If so, the updated path is stored in $new_path.
54464
54465  input_path="$new_path"
54466  # Check if we need to convert this using DOS-style short mode. If the path
54467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54468  # take no chances and rewrite it.
54469  # Note: m4 eats our [], so we need to use [ and ] instead.
54470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54471  if test "x$has_forbidden_chars" != x; then
54472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54473    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54474    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54475    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54476      # Going to short mode and back again did indeed matter. Since short mode is
54477      # case insensitive, let's make it lowercase to improve readability.
54478      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54479      # Now convert it back to Unix-style (cygpath)
54480      input_path=`$CYGPATH -u "$shortmode_path"`
54481      new_path="$input_path"
54482    fi
54483  fi
54484
54485  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54486  if test "x$test_cygdrive_prefix" = x; then
54487    # As a simple fix, exclude /usr/bin since it's not a real path.
54488    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54489      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54490      # a path prefixed by /cygdrive for fixpath to work.
54491      new_path="$CYGWIN_ROOT_PATH$input_path"
54492    fi
54493  fi
54494
54495
54496  if test "x$path" != "x$new_path"; then
54497    MSVC_DLL="$new_path"
54498    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54499$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54500  fi
54501
54502    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54503
54504  path="$MSVC_DLL"
54505  has_colon=`$ECHO $path | $GREP ^.:`
54506  new_path="$path"
54507  if test "x$has_colon" = x; then
54508    # Not in mixed or Windows style, start by that.
54509    new_path=`cmd //c echo $path`
54510  fi
54511
54512
54513  input_path="$new_path"
54514  # Check if we need to convert this using DOS-style short mode. If the path
54515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54516  # take no chances and rewrite it.
54517  # Note: m4 eats our [], so we need to use [ and ] instead.
54518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54519  if test "x$has_forbidden_chars" != x; then
54520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54521    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54522  fi
54523
54524
54525  windows_path="$new_path"
54526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54527    unix_path=`$CYGPATH -u "$windows_path"`
54528    new_path="$unix_path"
54529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54531    new_path="$unix_path"
54532  fi
54533
54534  if test "x$path" != "x$new_path"; then
54535    MSVC_DLL="$new_path"
54536    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54537$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54538  fi
54539
54540  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54541  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54542
54543    else
54544      # We're on a unix platform. Hooray! :)
54545      path="$MSVC_DLL"
54546      has_space=`$ECHO "$path" | $GREP " "`
54547      if test "x$has_space" != x; then
54548        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54549$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54550        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54551      fi
54552
54553      # Use eval to expand a potential ~
54554      eval path="$path"
54555      if test ! -f "$path" && test ! -d "$path"; then
54556        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54557      fi
54558
54559      if test -d "$path"; then
54560        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54561      else
54562        dir="`$DIRNAME "$path"`"
54563        base="`$BASENAME "$path"`"
54564        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54565      fi
54566    fi
54567  fi
54568
54569      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54570$as_echo_n "checking for $DLL_NAME... " >&6; }
54571      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54572$as_echo "$MSVC_DLL" >&6; }
54573    else
54574      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54575$as_echo "incorrect, ignoring" >&6; }
54576      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54577$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54578    fi
54579  fi
54580
54581      if test "x$MSVC_DLL" = x; then
54582        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54583      fi
54584      MSVCP_DLL="$MSVC_DLL"
54585    else
54586
54587  DLL_NAME="${MSVCP_NAME}"
54588  MSVC_DLL=
54589
54590  if test "x$MSVC_DLL" = x; then
54591    # Probe: Using well-known location from Visual Studio 10.0
54592    if test "x$VCINSTALLDIR" != x; then
54593      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54594
54595  windows_path="$CYGWIN_VC_INSTALL_DIR"
54596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54597    unix_path=`$CYGPATH -u "$windows_path"`
54598    CYGWIN_VC_INSTALL_DIR="$unix_path"
54599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54601    CYGWIN_VC_INSTALL_DIR="$unix_path"
54602  fi
54603
54604      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54605        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54606      else
54607        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54608      fi
54609      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54610
54611  DLL_NAME="$DLL_NAME"
54612  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54613  METHOD="well-known location in VCINSTALLDIR"
54614  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54615    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54616$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54617
54618    # Need to check if the found msvcr is correct architecture
54619    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54620$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54621    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54622    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54623      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54624      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54625      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54626        CORRECT_MSVCR_ARCH="PE32 executable"
54627      else
54628        CORRECT_MSVCR_ARCH="PE32+ executable"
54629      fi
54630    else
54631      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54632        CORRECT_MSVCR_ARCH=386
54633      else
54634        CORRECT_MSVCR_ARCH=x86-64
54635      fi
54636    fi
54637    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54638      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54639$as_echo "ok" >&6; }
54640      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54641
54642  # Only process if variable expands to non-empty
54643
54644  if test "x$MSVC_DLL" != x; then
54645    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54646
54647  # Input might be given as Windows format, start by converting to
54648  # unix format.
54649  path="$MSVC_DLL"
54650  new_path=`$CYGPATH -u "$path"`
54651
54652  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54653  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54654  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54655  # "foo.exe" is OK but "foo" is an error.
54656  #
54657  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54658  # It is also a way to make sure we got the proper file name for the real test later on.
54659  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54660  if test "x$test_shortpath" = x; then
54661    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54662$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54663    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54664  fi
54665
54666  # Call helper function which possibly converts this using DOS-style short mode.
54667  # If so, the updated path is stored in $new_path.
54668
54669  input_path="$new_path"
54670  # Check if we need to convert this using DOS-style short mode. If the path
54671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54672  # take no chances and rewrite it.
54673  # Note: m4 eats our [], so we need to use [ and ] instead.
54674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54675  if test "x$has_forbidden_chars" != x; then
54676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54677    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54678    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54679    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54680      # Going to short mode and back again did indeed matter. Since short mode is
54681      # case insensitive, let's make it lowercase to improve readability.
54682      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54683      # Now convert it back to Unix-style (cygpath)
54684      input_path=`$CYGPATH -u "$shortmode_path"`
54685      new_path="$input_path"
54686    fi
54687  fi
54688
54689  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54690  if test "x$test_cygdrive_prefix" = x; then
54691    # As a simple fix, exclude /usr/bin since it's not a real path.
54692    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54693      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54694      # a path prefixed by /cygdrive for fixpath to work.
54695      new_path="$CYGWIN_ROOT_PATH$input_path"
54696    fi
54697  fi
54698
54699
54700  if test "x$path" != "x$new_path"; then
54701    MSVC_DLL="$new_path"
54702    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54703$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54704  fi
54705
54706    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54707
54708  path="$MSVC_DLL"
54709  has_colon=`$ECHO $path | $GREP ^.:`
54710  new_path="$path"
54711  if test "x$has_colon" = x; then
54712    # Not in mixed or Windows style, start by that.
54713    new_path=`cmd //c echo $path`
54714  fi
54715
54716
54717  input_path="$new_path"
54718  # Check if we need to convert this using DOS-style short mode. If the path
54719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54720  # take no chances and rewrite it.
54721  # Note: m4 eats our [], so we need to use [ and ] instead.
54722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54723  if test "x$has_forbidden_chars" != x; then
54724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54725    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54726  fi
54727
54728
54729  windows_path="$new_path"
54730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54731    unix_path=`$CYGPATH -u "$windows_path"`
54732    new_path="$unix_path"
54733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54735    new_path="$unix_path"
54736  fi
54737
54738  if test "x$path" != "x$new_path"; then
54739    MSVC_DLL="$new_path"
54740    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54741$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54742  fi
54743
54744  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54745  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54746
54747    else
54748      # We're on a unix platform. Hooray! :)
54749      path="$MSVC_DLL"
54750      has_space=`$ECHO "$path" | $GREP " "`
54751      if test "x$has_space" != x; then
54752        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54753$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54754        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54755      fi
54756
54757      # Use eval to expand a potential ~
54758      eval path="$path"
54759      if test ! -f "$path" && test ! -d "$path"; then
54760        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54761      fi
54762
54763      if test -d "$path"; then
54764        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54765      else
54766        dir="`$DIRNAME "$path"`"
54767        base="`$BASENAME "$path"`"
54768        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54769      fi
54770    fi
54771  fi
54772
54773      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54774$as_echo_n "checking for $DLL_NAME... " >&6; }
54775      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54776$as_echo "$MSVC_DLL" >&6; }
54777    else
54778      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54779$as_echo "incorrect, ignoring" >&6; }
54780      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54781$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54782    fi
54783  fi
54784
54785    fi
54786  fi
54787
54788  if test "x$MSVC_DLL" = x; then
54789    # Probe: Check in the Boot JDK directory.
54790    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54791
54792  DLL_NAME="$DLL_NAME"
54793  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54794  METHOD="well-known location in Boot JDK"
54795  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54796    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54797$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54798
54799    # Need to check if the found msvcr is correct architecture
54800    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54801$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54802    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54803    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54804      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54805      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54806      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54807        CORRECT_MSVCR_ARCH="PE32 executable"
54808      else
54809        CORRECT_MSVCR_ARCH="PE32+ executable"
54810      fi
54811    else
54812      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54813        CORRECT_MSVCR_ARCH=386
54814      else
54815        CORRECT_MSVCR_ARCH=x86-64
54816      fi
54817    fi
54818    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54819      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54820$as_echo "ok" >&6; }
54821      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54822
54823  # Only process if variable expands to non-empty
54824
54825  if test "x$MSVC_DLL" != x; then
54826    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54827
54828  # Input might be given as Windows format, start by converting to
54829  # unix format.
54830  path="$MSVC_DLL"
54831  new_path=`$CYGPATH -u "$path"`
54832
54833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54836  # "foo.exe" is OK but "foo" is an error.
54837  #
54838  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54839  # It is also a way to make sure we got the proper file name for the real test later on.
54840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54841  if test "x$test_shortpath" = x; then
54842    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54843$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54844    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54845  fi
54846
54847  # Call helper function which possibly converts this using DOS-style short mode.
54848  # If so, the updated path is stored in $new_path.
54849
54850  input_path="$new_path"
54851  # Check if we need to convert this using DOS-style short mode. If the path
54852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54853  # take no chances and rewrite it.
54854  # Note: m4 eats our [], so we need to use [ and ] instead.
54855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54856  if test "x$has_forbidden_chars" != x; then
54857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54861      # Going to short mode and back again did indeed matter. Since short mode is
54862      # case insensitive, let's make it lowercase to improve readability.
54863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54864      # Now convert it back to Unix-style (cygpath)
54865      input_path=`$CYGPATH -u "$shortmode_path"`
54866      new_path="$input_path"
54867    fi
54868  fi
54869
54870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54871  if test "x$test_cygdrive_prefix" = x; then
54872    # As a simple fix, exclude /usr/bin since it's not a real path.
54873    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54875      # a path prefixed by /cygdrive for fixpath to work.
54876      new_path="$CYGWIN_ROOT_PATH$input_path"
54877    fi
54878  fi
54879
54880
54881  if test "x$path" != "x$new_path"; then
54882    MSVC_DLL="$new_path"
54883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54884$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54885  fi
54886
54887    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54888
54889  path="$MSVC_DLL"
54890  has_colon=`$ECHO $path | $GREP ^.:`
54891  new_path="$path"
54892  if test "x$has_colon" = x; then
54893    # Not in mixed or Windows style, start by that.
54894    new_path=`cmd //c echo $path`
54895  fi
54896
54897
54898  input_path="$new_path"
54899  # Check if we need to convert this using DOS-style short mode. If the path
54900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54901  # take no chances and rewrite it.
54902  # Note: m4 eats our [], so we need to use [ and ] instead.
54903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54904  if test "x$has_forbidden_chars" != x; then
54905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54907  fi
54908
54909
54910  windows_path="$new_path"
54911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54912    unix_path=`$CYGPATH -u "$windows_path"`
54913    new_path="$unix_path"
54914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54916    new_path="$unix_path"
54917  fi
54918
54919  if test "x$path" != "x$new_path"; then
54920    MSVC_DLL="$new_path"
54921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54922$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54923  fi
54924
54925  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54926  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54927
54928    else
54929      # We're on a unix platform. Hooray! :)
54930      path="$MSVC_DLL"
54931      has_space=`$ECHO "$path" | $GREP " "`
54932      if test "x$has_space" != x; then
54933        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54934$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54935        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54936      fi
54937
54938      # Use eval to expand a potential ~
54939      eval path="$path"
54940      if test ! -f "$path" && test ! -d "$path"; then
54941        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54942      fi
54943
54944      if test -d "$path"; then
54945        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54946      else
54947        dir="`$DIRNAME "$path"`"
54948        base="`$BASENAME "$path"`"
54949        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54950      fi
54951    fi
54952  fi
54953
54954      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54955$as_echo_n "checking for $DLL_NAME... " >&6; }
54956      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54957$as_echo "$MSVC_DLL" >&6; }
54958    else
54959      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54960$as_echo "incorrect, ignoring" >&6; }
54961      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54962$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54963    fi
54964  fi
54965
54966  fi
54967
54968  if test "x$MSVC_DLL" = x; then
54969    # Probe: Look in the Windows system32 directory
54970    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54971
54972  windows_path="$CYGWIN_SYSTEMROOT"
54973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54974    unix_path=`$CYGPATH -u "$windows_path"`
54975    CYGWIN_SYSTEMROOT="$unix_path"
54976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54978    CYGWIN_SYSTEMROOT="$unix_path"
54979  fi
54980
54981    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54982
54983  DLL_NAME="$DLL_NAME"
54984  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54985  METHOD="well-known location in SYSTEMROOT"
54986  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54987    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54988$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54989
54990    # Need to check if the found msvcr is correct architecture
54991    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54992$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54993    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54994    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54995      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54996      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54997      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54998        CORRECT_MSVCR_ARCH="PE32 executable"
54999      else
55000        CORRECT_MSVCR_ARCH="PE32+ executable"
55001      fi
55002    else
55003      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55004        CORRECT_MSVCR_ARCH=386
55005      else
55006        CORRECT_MSVCR_ARCH=x86-64
55007      fi
55008    fi
55009    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55010      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55011$as_echo "ok" >&6; }
55012      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55013
55014  # Only process if variable expands to non-empty
55015
55016  if test "x$MSVC_DLL" != x; then
55017    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55018
55019  # Input might be given as Windows format, start by converting to
55020  # unix format.
55021  path="$MSVC_DLL"
55022  new_path=`$CYGPATH -u "$path"`
55023
55024  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55025  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55026  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55027  # "foo.exe" is OK but "foo" is an error.
55028  #
55029  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55030  # It is also a way to make sure we got the proper file name for the real test later on.
55031  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55032  if test "x$test_shortpath" = x; then
55033    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55034$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55035    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55036  fi
55037
55038  # Call helper function which possibly converts this using DOS-style short mode.
55039  # If so, the updated path is stored in $new_path.
55040
55041  input_path="$new_path"
55042  # Check if we need to convert this using DOS-style short mode. If the path
55043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55044  # take no chances and rewrite it.
55045  # Note: m4 eats our [], so we need to use [ and ] instead.
55046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55047  if test "x$has_forbidden_chars" != x; then
55048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55049    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55050    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55051    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55052      # Going to short mode and back again did indeed matter. Since short mode is
55053      # case insensitive, let's make it lowercase to improve readability.
55054      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55055      # Now convert it back to Unix-style (cygpath)
55056      input_path=`$CYGPATH -u "$shortmode_path"`
55057      new_path="$input_path"
55058    fi
55059  fi
55060
55061  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55062  if test "x$test_cygdrive_prefix" = x; then
55063    # As a simple fix, exclude /usr/bin since it's not a real path.
55064    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55065      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55066      # a path prefixed by /cygdrive for fixpath to work.
55067      new_path="$CYGWIN_ROOT_PATH$input_path"
55068    fi
55069  fi
55070
55071
55072  if test "x$path" != "x$new_path"; then
55073    MSVC_DLL="$new_path"
55074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55075$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55076  fi
55077
55078    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55079
55080  path="$MSVC_DLL"
55081  has_colon=`$ECHO $path | $GREP ^.:`
55082  new_path="$path"
55083  if test "x$has_colon" = x; then
55084    # Not in mixed or Windows style, start by that.
55085    new_path=`cmd //c echo $path`
55086  fi
55087
55088
55089  input_path="$new_path"
55090  # Check if we need to convert this using DOS-style short mode. If the path
55091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55092  # take no chances and rewrite it.
55093  # Note: m4 eats our [], so we need to use [ and ] instead.
55094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55095  if test "x$has_forbidden_chars" != x; then
55096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55097    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55098  fi
55099
55100
55101  windows_path="$new_path"
55102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55103    unix_path=`$CYGPATH -u "$windows_path"`
55104    new_path="$unix_path"
55105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55107    new_path="$unix_path"
55108  fi
55109
55110  if test "x$path" != "x$new_path"; then
55111    MSVC_DLL="$new_path"
55112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55113$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55114  fi
55115
55116  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55117  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55118
55119    else
55120      # We're on a unix platform. Hooray! :)
55121      path="$MSVC_DLL"
55122      has_space=`$ECHO "$path" | $GREP " "`
55123      if test "x$has_space" != x; then
55124        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55125$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55126        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55127      fi
55128
55129      # Use eval to expand a potential ~
55130      eval path="$path"
55131      if test ! -f "$path" && test ! -d "$path"; then
55132        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55133      fi
55134
55135      if test -d "$path"; then
55136        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55137      else
55138        dir="`$DIRNAME "$path"`"
55139        base="`$BASENAME "$path"`"
55140        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55141      fi
55142    fi
55143  fi
55144
55145      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55146$as_echo_n "checking for $DLL_NAME... " >&6; }
55147      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55148$as_echo "$MSVC_DLL" >&6; }
55149    else
55150      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55151$as_echo "incorrect, ignoring" >&6; }
55152      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55153$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55154    fi
55155  fi
55156
55157  fi
55158
55159  if test "x$MSVC_DLL" = x; then
55160    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55161    if test "x$VS100COMNTOOLS" != x; then
55162      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55163
55164  windows_path="$CYGWIN_VS_TOOLS_DIR"
55165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55166    unix_path=`$CYGPATH -u "$windows_path"`
55167    CYGWIN_VS_TOOLS_DIR="$unix_path"
55168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55170    CYGWIN_VS_TOOLS_DIR="$unix_path"
55171  fi
55172
55173      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55174        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55175	    | $GREP -i /x64/ | $HEAD --lines 1`
55176      else
55177        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55178	    | $GREP -i /x86/ | $HEAD --lines 1`
55179      fi
55180
55181  DLL_NAME="$DLL_NAME"
55182  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55183  METHOD="search of VS100COMNTOOLS"
55184  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55185    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55186$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55187
55188    # Need to check if the found msvcr is correct architecture
55189    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55190$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55191    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55192    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55193      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55194      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55195      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55196        CORRECT_MSVCR_ARCH="PE32 executable"
55197      else
55198        CORRECT_MSVCR_ARCH="PE32+ executable"
55199      fi
55200    else
55201      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55202        CORRECT_MSVCR_ARCH=386
55203      else
55204        CORRECT_MSVCR_ARCH=x86-64
55205      fi
55206    fi
55207    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55208      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55209$as_echo "ok" >&6; }
55210      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55211
55212  # Only process if variable expands to non-empty
55213
55214  if test "x$MSVC_DLL" != x; then
55215    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55216
55217  # Input might be given as Windows format, start by converting to
55218  # unix format.
55219  path="$MSVC_DLL"
55220  new_path=`$CYGPATH -u "$path"`
55221
55222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55225  # "foo.exe" is OK but "foo" is an error.
55226  #
55227  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55228  # It is also a way to make sure we got the proper file name for the real test later on.
55229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55230  if test "x$test_shortpath" = x; then
55231    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55232$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55233    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55234  fi
55235
55236  # Call helper function which possibly converts this using DOS-style short mode.
55237  # If so, the updated path is stored in $new_path.
55238
55239  input_path="$new_path"
55240  # Check if we need to convert this using DOS-style short mode. If the path
55241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55242  # take no chances and rewrite it.
55243  # Note: m4 eats our [], so we need to use [ and ] instead.
55244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55245  if test "x$has_forbidden_chars" != x; then
55246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55250      # Going to short mode and back again did indeed matter. Since short mode is
55251      # case insensitive, let's make it lowercase to improve readability.
55252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55253      # Now convert it back to Unix-style (cygpath)
55254      input_path=`$CYGPATH -u "$shortmode_path"`
55255      new_path="$input_path"
55256    fi
55257  fi
55258
55259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55260  if test "x$test_cygdrive_prefix" = x; then
55261    # As a simple fix, exclude /usr/bin since it's not a real path.
55262    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55264      # a path prefixed by /cygdrive for fixpath to work.
55265      new_path="$CYGWIN_ROOT_PATH$input_path"
55266    fi
55267  fi
55268
55269
55270  if test "x$path" != "x$new_path"; then
55271    MSVC_DLL="$new_path"
55272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55273$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55274  fi
55275
55276    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55277
55278  path="$MSVC_DLL"
55279  has_colon=`$ECHO $path | $GREP ^.:`
55280  new_path="$path"
55281  if test "x$has_colon" = x; then
55282    # Not in mixed or Windows style, start by that.
55283    new_path=`cmd //c echo $path`
55284  fi
55285
55286
55287  input_path="$new_path"
55288  # Check if we need to convert this using DOS-style short mode. If the path
55289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55290  # take no chances and rewrite it.
55291  # Note: m4 eats our [], so we need to use [ and ] instead.
55292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55293  if test "x$has_forbidden_chars" != x; then
55294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55296  fi
55297
55298
55299  windows_path="$new_path"
55300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55301    unix_path=`$CYGPATH -u "$windows_path"`
55302    new_path="$unix_path"
55303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55305    new_path="$unix_path"
55306  fi
55307
55308  if test "x$path" != "x$new_path"; then
55309    MSVC_DLL="$new_path"
55310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55311$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55312  fi
55313
55314  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55315  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55316
55317    else
55318      # We're on a unix platform. Hooray! :)
55319      path="$MSVC_DLL"
55320      has_space=`$ECHO "$path" | $GREP " "`
55321      if test "x$has_space" != x; then
55322        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55323$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55324        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55325      fi
55326
55327      # Use eval to expand a potential ~
55328      eval path="$path"
55329      if test ! -f "$path" && test ! -d "$path"; then
55330        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55331      fi
55332
55333      if test -d "$path"; then
55334        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55335      else
55336        dir="`$DIRNAME "$path"`"
55337        base="`$BASENAME "$path"`"
55338        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55339      fi
55340    fi
55341  fi
55342
55343      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55344$as_echo_n "checking for $DLL_NAME... " >&6; }
55345      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55346$as_echo "$MSVC_DLL" >&6; }
55347    else
55348      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55349$as_echo "incorrect, ignoring" >&6; }
55350      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55351$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55352    fi
55353  fi
55354
55355    fi
55356  fi
55357
55358  if test "x$MSVC_DLL" = x; then
55359    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55360    # (This was the original behaviour; kept since it might turn something up)
55361    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55362      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55363        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55364	    | $GREP x64 | $HEAD --lines 1`
55365      else
55366        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55367	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55368        if test "x$POSSIBLE_MSVC_DLL" = x; then
55369          # We're grasping at straws now...
55370          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55371	      | $HEAD --lines 1`
55372        fi
55373      fi
55374
55375
55376  DLL_NAME="$DLL_NAME"
55377  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55378  METHOD="search of VCINSTALLDIR"
55379  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55380    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55381$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55382
55383    # Need to check if the found msvcr is correct architecture
55384    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55385$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55386    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55387    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55388      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55389      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55390      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55391        CORRECT_MSVCR_ARCH="PE32 executable"
55392      else
55393        CORRECT_MSVCR_ARCH="PE32+ executable"
55394      fi
55395    else
55396      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55397        CORRECT_MSVCR_ARCH=386
55398      else
55399        CORRECT_MSVCR_ARCH=x86-64
55400      fi
55401    fi
55402    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55403      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55404$as_echo "ok" >&6; }
55405      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55406
55407  # Only process if variable expands to non-empty
55408
55409  if test "x$MSVC_DLL" != x; then
55410    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55411
55412  # Input might be given as Windows format, start by converting to
55413  # unix format.
55414  path="$MSVC_DLL"
55415  new_path=`$CYGPATH -u "$path"`
55416
55417  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55418  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55419  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55420  # "foo.exe" is OK but "foo" is an error.
55421  #
55422  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55423  # It is also a way to make sure we got the proper file name for the real test later on.
55424  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55425  if test "x$test_shortpath" = x; then
55426    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55427$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55428    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55429  fi
55430
55431  # Call helper function which possibly converts this using DOS-style short mode.
55432  # If so, the updated path is stored in $new_path.
55433
55434  input_path="$new_path"
55435  # Check if we need to convert this using DOS-style short mode. If the path
55436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55437  # take no chances and rewrite it.
55438  # Note: m4 eats our [], so we need to use [ and ] instead.
55439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55440  if test "x$has_forbidden_chars" != x; then
55441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55442    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55443    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55444    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55445      # Going to short mode and back again did indeed matter. Since short mode is
55446      # case insensitive, let's make it lowercase to improve readability.
55447      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55448      # Now convert it back to Unix-style (cygpath)
55449      input_path=`$CYGPATH -u "$shortmode_path"`
55450      new_path="$input_path"
55451    fi
55452  fi
55453
55454  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55455  if test "x$test_cygdrive_prefix" = x; then
55456    # As a simple fix, exclude /usr/bin since it's not a real path.
55457    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55458      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55459      # a path prefixed by /cygdrive for fixpath to work.
55460      new_path="$CYGWIN_ROOT_PATH$input_path"
55461    fi
55462  fi
55463
55464
55465  if test "x$path" != "x$new_path"; then
55466    MSVC_DLL="$new_path"
55467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55468$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55469  fi
55470
55471    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55472
55473  path="$MSVC_DLL"
55474  has_colon=`$ECHO $path | $GREP ^.:`
55475  new_path="$path"
55476  if test "x$has_colon" = x; then
55477    # Not in mixed or Windows style, start by that.
55478    new_path=`cmd //c echo $path`
55479  fi
55480
55481
55482  input_path="$new_path"
55483  # Check if we need to convert this using DOS-style short mode. If the path
55484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55485  # take no chances and rewrite it.
55486  # Note: m4 eats our [], so we need to use [ and ] instead.
55487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55488  if test "x$has_forbidden_chars" != x; then
55489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55491  fi
55492
55493
55494  windows_path="$new_path"
55495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55496    unix_path=`$CYGPATH -u "$windows_path"`
55497    new_path="$unix_path"
55498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55500    new_path="$unix_path"
55501  fi
55502
55503  if test "x$path" != "x$new_path"; then
55504    MSVC_DLL="$new_path"
55505    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55506$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55507  fi
55508
55509  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55510  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55511
55512    else
55513      # We're on a unix platform. Hooray! :)
55514      path="$MSVC_DLL"
55515      has_space=`$ECHO "$path" | $GREP " "`
55516      if test "x$has_space" != x; then
55517        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55518$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55519        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55520      fi
55521
55522      # Use eval to expand a potential ~
55523      eval path="$path"
55524      if test ! -f "$path" && test ! -d "$path"; then
55525        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55526      fi
55527
55528      if test -d "$path"; then
55529        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55530      else
55531        dir="`$DIRNAME "$path"`"
55532        base="`$BASENAME "$path"`"
55533        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55534      fi
55535    fi
55536  fi
55537
55538      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55539$as_echo_n "checking for $DLL_NAME... " >&6; }
55540      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55541$as_echo "$MSVC_DLL" >&6; }
55542    else
55543      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55544$as_echo "incorrect, ignoring" >&6; }
55545      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55546$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55547    fi
55548  fi
55549
55550    fi
55551  fi
55552
55553  if test "x$MSVC_DLL" = x; then
55554    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55555$as_echo_n "checking for $DLL_NAME... " >&6; }
55556    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55557$as_echo "no" >&6; }
55558    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55559  fi
55560
55561      MSVCP_DLL="$MSVC_DLL"
55562    fi
55563
55564  fi
55565
55566  fi
55567
55568
55569  if test "x$NEEDS_LIB_X11" = xfalse; then
55570    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55571      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55572$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55573    fi
55574    X_CFLAGS=
55575    X_LIBS=
55576  else
55577
55578    if test "x${with_x}" = xno; then
55579      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55580    fi
55581
55582    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55583      # The user has specified a X11 base directory. Use it for includes and
55584      # libraries, unless explicitely overridden.
55585      if test "x$x_includes" = xNONE; then
55586        x_includes="${with_x}/include"
55587      fi
55588      if test "x$x_libraries" = xNONE; then
55589        x_libraries="${with_x}/lib"
55590      fi
55591    else
55592      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55593      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55594      # --x-libraries for the sysroot, if that seems to be correct.
55595      if test "x$SYSROOT" != "x"; then
55596        if test "x$x_includes" = xNONE; then
55597          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55598            x_includes="$SYSROOT/usr/X11R6/include"
55599          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55600            x_includes="$SYSROOT/usr/include"
55601          fi
55602        fi
55603        if test "x$x_libraries" = xNONE; then
55604          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55605            x_libraries="$SYSROOT/usr/X11R6/lib"
55606          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55607            x_libraries="$SYSROOT/usr/lib64"
55608          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55609            x_libraries="$SYSROOT/usr/lib"
55610          fi
55611        fi
55612      fi
55613    fi
55614
55615    # Now let autoconf do it's magic
55616    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55617$as_echo_n "checking for X... " >&6; }
55618
55619
55620# Check whether --with-x was given.
55621if test "${with_x+set}" = set; then :
55622  withval=$with_x;
55623fi
55624
55625# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55626if test "x$with_x" = xno; then
55627  # The user explicitly disabled X.
55628  have_x=disabled
55629else
55630  case $x_includes,$x_libraries in #(
55631    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55632    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55633  $as_echo_n "(cached) " >&6
55634else
55635  # One or both of the vars are not set, and there is no cached value.
55636ac_x_includes=no ac_x_libraries=no
55637rm -f -r conftest.dir
55638if mkdir conftest.dir; then
55639  cd conftest.dir
55640  cat >Imakefile <<'_ACEOF'
55641incroot:
55642	@echo incroot='${INCROOT}'
55643usrlibdir:
55644	@echo usrlibdir='${USRLIBDIR}'
55645libdir:
55646	@echo libdir='${LIBDIR}'
55647_ACEOF
55648  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55649    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55650    for ac_var in incroot usrlibdir libdir; do
55651      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55652    done
55653    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55654    for ac_extension in a so sl dylib la dll; do
55655      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55656	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55657	ac_im_usrlibdir=$ac_im_libdir; break
55658      fi
55659    done
55660    # Screen out bogus values from the imake configuration.  They are
55661    # bogus both because they are the default anyway, and because
55662    # using them would break gcc on systems where it needs fixed includes.
55663    case $ac_im_incroot in
55664	/usr/include) ac_x_includes= ;;
55665	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55666    esac
55667    case $ac_im_usrlibdir in
55668	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55669	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55670    esac
55671  fi
55672  cd ..
55673  rm -f -r conftest.dir
55674fi
55675
55676# Standard set of common directories for X headers.
55677# Check X11 before X11Rn because it is often a symlink to the current release.
55678ac_x_header_dirs='
55679/usr/X11/include
55680/usr/X11R7/include
55681/usr/X11R6/include
55682/usr/X11R5/include
55683/usr/X11R4/include
55684
55685/usr/include/X11
55686/usr/include/X11R7
55687/usr/include/X11R6
55688/usr/include/X11R5
55689/usr/include/X11R4
55690
55691/usr/local/X11/include
55692/usr/local/X11R7/include
55693/usr/local/X11R6/include
55694/usr/local/X11R5/include
55695/usr/local/X11R4/include
55696
55697/usr/local/include/X11
55698/usr/local/include/X11R7
55699/usr/local/include/X11R6
55700/usr/local/include/X11R5
55701/usr/local/include/X11R4
55702
55703/usr/X386/include
55704/usr/x386/include
55705/usr/XFree86/include/X11
55706
55707/usr/include
55708/usr/local/include
55709/usr/unsupported/include
55710/usr/athena/include
55711/usr/local/x11r5/include
55712/usr/lpp/Xamples/include
55713
55714/usr/openwin/include
55715/usr/openwin/share/include'
55716
55717if test "$ac_x_includes" = no; then
55718  # Guess where to find include files, by looking for Xlib.h.
55719  # First, try using that file with no special directory specified.
55720  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55721/* end confdefs.h.  */
55722#include <X11/Xlib.h>
55723_ACEOF
55724if ac_fn_cxx_try_cpp "$LINENO"; then :
55725  # We can compile using X headers with no special include directory.
55726ac_x_includes=
55727else
55728  for ac_dir in $ac_x_header_dirs; do
55729  if test -r "$ac_dir/X11/Xlib.h"; then
55730    ac_x_includes=$ac_dir
55731    break
55732  fi
55733done
55734fi
55735rm -f conftest.err conftest.i conftest.$ac_ext
55736fi # $ac_x_includes = no
55737
55738if test "$ac_x_libraries" = no; then
55739  # Check for the libraries.
55740  # See if we find them without any special options.
55741  # Don't add to $LIBS permanently.
55742  ac_save_LIBS=$LIBS
55743  LIBS="-lX11 $LIBS"
55744  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55745/* end confdefs.h.  */
55746#include <X11/Xlib.h>
55747int
55748main ()
55749{
55750XrmInitialize ()
55751  ;
55752  return 0;
55753}
55754_ACEOF
55755if ac_fn_cxx_try_link "$LINENO"; then :
55756  LIBS=$ac_save_LIBS
55757# We can link X programs with no special library path.
55758ac_x_libraries=
55759else
55760  LIBS=$ac_save_LIBS
55761for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
55762do
55763  # Don't even attempt the hair of trying to link an X program!
55764  for ac_extension in a so sl dylib la dll; do
55765    if test -r "$ac_dir/libX11.$ac_extension"; then
55766      ac_x_libraries=$ac_dir
55767      break 2
55768    fi
55769  done
55770done
55771fi
55772rm -f core conftest.err conftest.$ac_objext \
55773    conftest$ac_exeext conftest.$ac_ext
55774fi # $ac_x_libraries = no
55775
55776case $ac_x_includes,$ac_x_libraries in #(
55777  no,* | *,no | *\'*)
55778    # Didn't find X, or a directory has "'" in its name.
55779    ac_cv_have_x="have_x=no";; #(
55780  *)
55781    # Record where we found X for the cache.
55782    ac_cv_have_x="have_x=yes\
55783	ac_x_includes='$ac_x_includes'\
55784	ac_x_libraries='$ac_x_libraries'"
55785esac
55786fi
55787;; #(
55788    *) have_x=yes;;
55789  esac
55790  eval "$ac_cv_have_x"
55791fi # $with_x != no
55792
55793if test "$have_x" != yes; then
55794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
55795$as_echo "$have_x" >&6; }
55796  no_x=yes
55797else
55798  # If each of the values was on the command line, it overrides each guess.
55799  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
55800  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
55801  # Update the cache value to reflect the command line values.
55802  ac_cv_have_x="have_x=yes\
55803	ac_x_includes='$x_includes'\
55804	ac_x_libraries='$x_libraries'"
55805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
55806$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
55807fi
55808
55809    if test "$no_x" = yes; then
55810  # Not all programs may use this symbol, but it does not hurt to define it.
55811
55812$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
55813
55814  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
55815else
55816  if test -n "$x_includes"; then
55817    X_CFLAGS="$X_CFLAGS -I$x_includes"
55818  fi
55819
55820  # It would also be nice to do this for all -L options, not just this one.
55821  if test -n "$x_libraries"; then
55822    X_LIBS="$X_LIBS -L$x_libraries"
55823    # For Solaris; some versions of Sun CC require a space after -R and
55824    # others require no space.  Words are not sufficient . . . .
55825    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
55826$as_echo_n "checking whether -R must be followed by a space... " >&6; }
55827    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
55828    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
55829    ac_cxx_werror_flag=yes
55830    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55831/* end confdefs.h.  */
55832
55833int
55834main ()
55835{
55836
55837  ;
55838  return 0;
55839}
55840_ACEOF
55841if ac_fn_cxx_try_link "$LINENO"; then :
55842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55843$as_echo "no" >&6; }
55844       X_LIBS="$X_LIBS -R$x_libraries"
55845else
55846  LIBS="$ac_xsave_LIBS -R $x_libraries"
55847       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55848/* end confdefs.h.  */
55849
55850int
55851main ()
55852{
55853
55854  ;
55855  return 0;
55856}
55857_ACEOF
55858if ac_fn_cxx_try_link "$LINENO"; then :
55859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55860$as_echo "yes" >&6; }
55861	  X_LIBS="$X_LIBS -R $x_libraries"
55862else
55863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
55864$as_echo "neither works" >&6; }
55865fi
55866rm -f core conftest.err conftest.$ac_objext \
55867    conftest$ac_exeext conftest.$ac_ext
55868fi
55869rm -f core conftest.err conftest.$ac_objext \
55870    conftest$ac_exeext conftest.$ac_ext
55871    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
55872    LIBS=$ac_xsave_LIBS
55873  fi
55874
55875  # Check for system-dependent libraries X programs must link with.
55876  # Do this before checking for the system-independent R6 libraries
55877  # (-lICE), since we may need -lsocket or whatever for X linking.
55878
55879  if test "$ISC" = yes; then
55880    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
55881  else
55882    # Martyn Johnson says this is needed for Ultrix, if the X
55883    # libraries were built with DECnet support.  And Karl Berry says
55884    # the Alpha needs dnet_stub (dnet does not exist).
55885    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
55886    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55887/* end confdefs.h.  */
55888
55889/* Override any GCC internal prototype to avoid an error.
55890   Use char because int might match the return type of a GCC
55891   builtin and then its argument prototype would still apply.  */
55892#ifdef __cplusplus
55893extern "C"
55894#endif
55895char XOpenDisplay ();
55896int
55897main ()
55898{
55899return XOpenDisplay ();
55900  ;
55901  return 0;
55902}
55903_ACEOF
55904if ac_fn_cxx_try_link "$LINENO"; then :
55905
55906else
55907  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
55908$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
55909if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
55910  $as_echo_n "(cached) " >&6
55911else
55912  ac_check_lib_save_LIBS=$LIBS
55913LIBS="-ldnet  $LIBS"
55914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55915/* end confdefs.h.  */
55916
55917/* Override any GCC internal prototype to avoid an error.
55918   Use char because int might match the return type of a GCC
55919   builtin and then its argument prototype would still apply.  */
55920#ifdef __cplusplus
55921extern "C"
55922#endif
55923char dnet_ntoa ();
55924int
55925main ()
55926{
55927return dnet_ntoa ();
55928  ;
55929  return 0;
55930}
55931_ACEOF
55932if ac_fn_cxx_try_link "$LINENO"; then :
55933  ac_cv_lib_dnet_dnet_ntoa=yes
55934else
55935  ac_cv_lib_dnet_dnet_ntoa=no
55936fi
55937rm -f core conftest.err conftest.$ac_objext \
55938    conftest$ac_exeext conftest.$ac_ext
55939LIBS=$ac_check_lib_save_LIBS
55940fi
55941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
55942$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
55943if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
55944  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
55945fi
55946
55947    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
55948      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
55949$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
55950if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
55951  $as_echo_n "(cached) " >&6
55952else
55953  ac_check_lib_save_LIBS=$LIBS
55954LIBS="-ldnet_stub  $LIBS"
55955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55956/* end confdefs.h.  */
55957
55958/* Override any GCC internal prototype to avoid an error.
55959   Use char because int might match the return type of a GCC
55960   builtin and then its argument prototype would still apply.  */
55961#ifdef __cplusplus
55962extern "C"
55963#endif
55964char dnet_ntoa ();
55965int
55966main ()
55967{
55968return dnet_ntoa ();
55969  ;
55970  return 0;
55971}
55972_ACEOF
55973if ac_fn_cxx_try_link "$LINENO"; then :
55974  ac_cv_lib_dnet_stub_dnet_ntoa=yes
55975else
55976  ac_cv_lib_dnet_stub_dnet_ntoa=no
55977fi
55978rm -f core conftest.err conftest.$ac_objext \
55979    conftest$ac_exeext conftest.$ac_ext
55980LIBS=$ac_check_lib_save_LIBS
55981fi
55982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
55983$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
55984if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
55985  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
55986fi
55987
55988    fi
55989fi
55990rm -f core conftest.err conftest.$ac_objext \
55991    conftest$ac_exeext conftest.$ac_ext
55992    LIBS="$ac_xsave_LIBS"
55993
55994    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
55995    # to get the SysV transport functions.
55996    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
55997    # needs -lnsl.
55998    # The nsl library prevents programs from opening the X display
55999    # on Irix 5.2, according to T.E. Dickey.
56000    # The functions gethostbyname, getservbyname, and inet_addr are
56001    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56002    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56003if test "x$ac_cv_func_gethostbyname" = xyes; then :
56004
56005fi
56006
56007    if test $ac_cv_func_gethostbyname = no; then
56008      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56009$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56010if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56011  $as_echo_n "(cached) " >&6
56012else
56013  ac_check_lib_save_LIBS=$LIBS
56014LIBS="-lnsl  $LIBS"
56015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56016/* end confdefs.h.  */
56017
56018/* Override any GCC internal prototype to avoid an error.
56019   Use char because int might match the return type of a GCC
56020   builtin and then its argument prototype would still apply.  */
56021#ifdef __cplusplus
56022extern "C"
56023#endif
56024char gethostbyname ();
56025int
56026main ()
56027{
56028return gethostbyname ();
56029  ;
56030  return 0;
56031}
56032_ACEOF
56033if ac_fn_cxx_try_link "$LINENO"; then :
56034  ac_cv_lib_nsl_gethostbyname=yes
56035else
56036  ac_cv_lib_nsl_gethostbyname=no
56037fi
56038rm -f core conftest.err conftest.$ac_objext \
56039    conftest$ac_exeext conftest.$ac_ext
56040LIBS=$ac_check_lib_save_LIBS
56041fi
56042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56043$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56044if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56045  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56046fi
56047
56048      if test $ac_cv_lib_nsl_gethostbyname = no; then
56049	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56050$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56051if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56052  $as_echo_n "(cached) " >&6
56053else
56054  ac_check_lib_save_LIBS=$LIBS
56055LIBS="-lbsd  $LIBS"
56056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56057/* end confdefs.h.  */
56058
56059/* Override any GCC internal prototype to avoid an error.
56060   Use char because int might match the return type of a GCC
56061   builtin and then its argument prototype would still apply.  */
56062#ifdef __cplusplus
56063extern "C"
56064#endif
56065char gethostbyname ();
56066int
56067main ()
56068{
56069return gethostbyname ();
56070  ;
56071  return 0;
56072}
56073_ACEOF
56074if ac_fn_cxx_try_link "$LINENO"; then :
56075  ac_cv_lib_bsd_gethostbyname=yes
56076else
56077  ac_cv_lib_bsd_gethostbyname=no
56078fi
56079rm -f core conftest.err conftest.$ac_objext \
56080    conftest$ac_exeext conftest.$ac_ext
56081LIBS=$ac_check_lib_save_LIBS
56082fi
56083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56084$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56085if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56086  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56087fi
56088
56089      fi
56090    fi
56091
56092    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56093    # socket/setsockopt and other routines are undefined under SCO ODT
56094    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56095    # on later versions), says Simon Leinen: it contains gethostby*
56096    # variants that don't use the name server (or something).  -lsocket
56097    # must be given before -lnsl if both are needed.  We assume that
56098    # if connect needs -lnsl, so does gethostbyname.
56099    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56100if test "x$ac_cv_func_connect" = xyes; then :
56101
56102fi
56103
56104    if test $ac_cv_func_connect = no; then
56105      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56106$as_echo_n "checking for connect in -lsocket... " >&6; }
56107if ${ac_cv_lib_socket_connect+:} false; then :
56108  $as_echo_n "(cached) " >&6
56109else
56110  ac_check_lib_save_LIBS=$LIBS
56111LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56113/* end confdefs.h.  */
56114
56115/* Override any GCC internal prototype to avoid an error.
56116   Use char because int might match the return type of a GCC
56117   builtin and then its argument prototype would still apply.  */
56118#ifdef __cplusplus
56119extern "C"
56120#endif
56121char connect ();
56122int
56123main ()
56124{
56125return connect ();
56126  ;
56127  return 0;
56128}
56129_ACEOF
56130if ac_fn_cxx_try_link "$LINENO"; then :
56131  ac_cv_lib_socket_connect=yes
56132else
56133  ac_cv_lib_socket_connect=no
56134fi
56135rm -f core conftest.err conftest.$ac_objext \
56136    conftest$ac_exeext conftest.$ac_ext
56137LIBS=$ac_check_lib_save_LIBS
56138fi
56139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56140$as_echo "$ac_cv_lib_socket_connect" >&6; }
56141if test "x$ac_cv_lib_socket_connect" = xyes; then :
56142  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56143fi
56144
56145    fi
56146
56147    # Guillermo Gomez says -lposix is necessary on A/UX.
56148    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56149if test "x$ac_cv_func_remove" = xyes; then :
56150
56151fi
56152
56153    if test $ac_cv_func_remove = no; then
56154      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56155$as_echo_n "checking for remove in -lposix... " >&6; }
56156if ${ac_cv_lib_posix_remove+:} false; then :
56157  $as_echo_n "(cached) " >&6
56158else
56159  ac_check_lib_save_LIBS=$LIBS
56160LIBS="-lposix  $LIBS"
56161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56162/* end confdefs.h.  */
56163
56164/* Override any GCC internal prototype to avoid an error.
56165   Use char because int might match the return type of a GCC
56166   builtin and then its argument prototype would still apply.  */
56167#ifdef __cplusplus
56168extern "C"
56169#endif
56170char remove ();
56171int
56172main ()
56173{
56174return remove ();
56175  ;
56176  return 0;
56177}
56178_ACEOF
56179if ac_fn_cxx_try_link "$LINENO"; then :
56180  ac_cv_lib_posix_remove=yes
56181else
56182  ac_cv_lib_posix_remove=no
56183fi
56184rm -f core conftest.err conftest.$ac_objext \
56185    conftest$ac_exeext conftest.$ac_ext
56186LIBS=$ac_check_lib_save_LIBS
56187fi
56188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56189$as_echo "$ac_cv_lib_posix_remove" >&6; }
56190if test "x$ac_cv_lib_posix_remove" = xyes; then :
56191  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56192fi
56193
56194    fi
56195
56196    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56197    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56198if test "x$ac_cv_func_shmat" = xyes; then :
56199
56200fi
56201
56202    if test $ac_cv_func_shmat = no; then
56203      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56204$as_echo_n "checking for shmat in -lipc... " >&6; }
56205if ${ac_cv_lib_ipc_shmat+:} false; then :
56206  $as_echo_n "(cached) " >&6
56207else
56208  ac_check_lib_save_LIBS=$LIBS
56209LIBS="-lipc  $LIBS"
56210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56211/* end confdefs.h.  */
56212
56213/* Override any GCC internal prototype to avoid an error.
56214   Use char because int might match the return type of a GCC
56215   builtin and then its argument prototype would still apply.  */
56216#ifdef __cplusplus
56217extern "C"
56218#endif
56219char shmat ();
56220int
56221main ()
56222{
56223return shmat ();
56224  ;
56225  return 0;
56226}
56227_ACEOF
56228if ac_fn_cxx_try_link "$LINENO"; then :
56229  ac_cv_lib_ipc_shmat=yes
56230else
56231  ac_cv_lib_ipc_shmat=no
56232fi
56233rm -f core conftest.err conftest.$ac_objext \
56234    conftest$ac_exeext conftest.$ac_ext
56235LIBS=$ac_check_lib_save_LIBS
56236fi
56237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56238$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56239if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56240  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56241fi
56242
56243    fi
56244  fi
56245
56246  # Check for libraries that X11R6 Xt/Xaw programs need.
56247  ac_save_LDFLAGS=$LDFLAGS
56248  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56249  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56250  # check for ICE first), but we must link in the order -lSM -lICE or
56251  # we get undefined symbols.  So assume we have SM if we have ICE.
56252  # These have to be linked with before -lX11, unlike the other
56253  # libraries we check for below, so use a different variable.
56254  # John Interrante, Karl Berry
56255  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56256$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56257if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56258  $as_echo_n "(cached) " >&6
56259else
56260  ac_check_lib_save_LIBS=$LIBS
56261LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56263/* end confdefs.h.  */
56264
56265/* Override any GCC internal prototype to avoid an error.
56266   Use char because int might match the return type of a GCC
56267   builtin and then its argument prototype would still apply.  */
56268#ifdef __cplusplus
56269extern "C"
56270#endif
56271char IceConnectionNumber ();
56272int
56273main ()
56274{
56275return IceConnectionNumber ();
56276  ;
56277  return 0;
56278}
56279_ACEOF
56280if ac_fn_cxx_try_link "$LINENO"; then :
56281  ac_cv_lib_ICE_IceConnectionNumber=yes
56282else
56283  ac_cv_lib_ICE_IceConnectionNumber=no
56284fi
56285rm -f core conftest.err conftest.$ac_objext \
56286    conftest$ac_exeext conftest.$ac_ext
56287LIBS=$ac_check_lib_save_LIBS
56288fi
56289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56290$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56291if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56292  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56293fi
56294
56295  LDFLAGS=$ac_save_LDFLAGS
56296
56297fi
56298
56299
56300    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56301    # this doesn't make sense so we remove it.
56302    if test "x$COMPILE_TYPE" = xcross; then
56303      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56304    fi
56305
56306    if test "x$no_x" = xyes; then
56307
56308  # Print a helpful message on how to acquire the necessary build dependency.
56309  # x11 is the help tag: freetype, cups, alsa etc
56310  MISSING_DEPENDENCY=x11
56311
56312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56313    cygwin_help $MISSING_DEPENDENCY
56314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56315    msys_help $MISSING_DEPENDENCY
56316  else
56317    PKGHANDLER_COMMAND=
56318
56319    case $PKGHANDLER in
56320      apt-get)
56321        apt_help     $MISSING_DEPENDENCY ;;
56322      yum)
56323        yum_help     $MISSING_DEPENDENCY ;;
56324      port)
56325        port_help    $MISSING_DEPENDENCY ;;
56326      pkgutil)
56327        pkgutil_help $MISSING_DEPENDENCY ;;
56328      pkgadd)
56329        pkgadd_help  $MISSING_DEPENDENCY ;;
56330    esac
56331
56332    if test "x$PKGHANDLER_COMMAND" != x; then
56333      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56334    fi
56335  fi
56336
56337      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56338    fi
56339
56340    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56341      OPENWIN_HOME="/usr/openwin"
56342      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56343      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56344          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56345          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56346          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56347    fi
56348
56349    ac_ext=c
56350ac_cpp='$CPP $CPPFLAGS'
56351ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56352ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56353ac_compiler_gnu=$ac_cv_c_compiler_gnu
56354
56355    OLD_CFLAGS="$CFLAGS"
56356    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56357
56358    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56359    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56360do :
56361  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56362ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56363          # include <X11/Xlib.h>
56364          # include <X11/Xutil.h>
56365
56366
56367"
56368if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56369  cat >>confdefs.h <<_ACEOF
56370#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56371_ACEOF
56372 X11_HEADERS_OK=yes
56373else
56374  X11_HEADERS_OK=no; break
56375fi
56376
56377done
56378
56379
56380    if test "x$X11_HEADERS_OK" = xno; then
56381
56382  # Print a helpful message on how to acquire the necessary build dependency.
56383  # x11 is the help tag: freetype, cups, alsa etc
56384  MISSING_DEPENDENCY=x11
56385
56386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56387    cygwin_help $MISSING_DEPENDENCY
56388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56389    msys_help $MISSING_DEPENDENCY
56390  else
56391    PKGHANDLER_COMMAND=
56392
56393    case $PKGHANDLER in
56394      apt-get)
56395        apt_help     $MISSING_DEPENDENCY ;;
56396      yum)
56397        yum_help     $MISSING_DEPENDENCY ;;
56398      port)
56399        port_help    $MISSING_DEPENDENCY ;;
56400      pkgutil)
56401        pkgutil_help $MISSING_DEPENDENCY ;;
56402      pkgadd)
56403        pkgadd_help  $MISSING_DEPENDENCY ;;
56404    esac
56405
56406    if test "x$PKGHANDLER_COMMAND" != x; then
56407      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56408    fi
56409  fi
56410
56411      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56412    fi
56413
56414    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56415    # defined in libawt_xawt.
56416    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56417$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56418    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56419/* end confdefs.h.  */
56420#include <X11/extensions/Xrender.h>
56421int
56422main ()
56423{
56424XLinearGradient x;
56425  ;
56426  return 0;
56427}
56428_ACEOF
56429if ac_fn_c_try_compile "$LINENO"; then :
56430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56431$as_echo "yes" >&6; }
56432else
56433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56434$as_echo "no" >&6; }
56435         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56436fi
56437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56438
56439    CFLAGS="$OLD_CFLAGS"
56440    ac_ext=cpp
56441ac_cpp='$CXXCPP $CPPFLAGS'
56442ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56443ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56444ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56445
56446  fi # NEEDS_LIB_X11
56447
56448
56449
56450
56451
56452
56453# Check whether --with-cups was given.
56454if test "${with_cups+set}" = set; then :
56455  withval=$with_cups;
56456fi
56457
56458
56459# Check whether --with-cups-include was given.
56460if test "${with_cups_include+set}" = set; then :
56461  withval=$with_cups_include;
56462fi
56463
56464
56465  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56466    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56467        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56468      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56469$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56470    fi
56471    CUPS_CFLAGS=
56472  else
56473    CUPS_FOUND=no
56474
56475    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56476      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56477    fi
56478
56479    if test "x${with_cups}" != x; then
56480      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56481$as_echo_n "checking for cups headers... " >&6; }
56482      if test -s "${with_cups}/include/cups/cups.h"; then
56483        CUPS_CFLAGS="-I${with_cups}/include"
56484        CUPS_FOUND=yes
56485        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56486$as_echo "$CUPS_FOUND" >&6; }
56487      else
56488        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56489      fi
56490    fi
56491    if test "x${with_cups_include}" != x; then
56492      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56493$as_echo_n "checking for cups headers... " >&6; }
56494      if test -s "${with_cups_include}/cups/cups.h"; then
56495        CUPS_CFLAGS="-I${with_cups_include}"
56496        CUPS_FOUND=yes
56497        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56498$as_echo "$CUPS_FOUND" >&6; }
56499      else
56500        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56501      fi
56502    fi
56503    if test "x$CUPS_FOUND" = xno; then
56504      # Are the cups headers installed in the default /usr/include location?
56505      for ac_header in cups/cups.h cups/ppd.h
56506do :
56507  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56508ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56509if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56510  cat >>confdefs.h <<_ACEOF
56511#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56512_ACEOF
56513
56514          CUPS_FOUND=yes
56515          CUPS_CFLAGS=
56516          DEFAULT_CUPS=yes
56517
56518fi
56519
56520done
56521
56522    fi
56523    if test "x$CUPS_FOUND" = xno; then
56524      # Getting nervous now? Lets poke around for standard Solaris third-party
56525      # package installation locations.
56526      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56527$as_echo_n "checking for cups headers... " >&6; }
56528      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
56529        # An SFW package seems to be installed!
56530        CUPS_FOUND=yes
56531        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
56532      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
56533        # A CSW package seems to be installed!
56534        CUPS_FOUND=yes
56535        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
56536      fi
56537      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56538$as_echo "$CUPS_FOUND" >&6; }
56539    fi
56540    if test "x$CUPS_FOUND" = xno; then
56541
56542  # Print a helpful message on how to acquire the necessary build dependency.
56543  # cups is the help tag: freetype, cups, alsa etc
56544  MISSING_DEPENDENCY=cups
56545
56546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56547    cygwin_help $MISSING_DEPENDENCY
56548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56549    msys_help $MISSING_DEPENDENCY
56550  else
56551    PKGHANDLER_COMMAND=
56552
56553    case $PKGHANDLER in
56554      apt-get)
56555        apt_help     $MISSING_DEPENDENCY ;;
56556      yum)
56557        yum_help     $MISSING_DEPENDENCY ;;
56558      port)
56559        port_help    $MISSING_DEPENDENCY ;;
56560      pkgutil)
56561        pkgutil_help $MISSING_DEPENDENCY ;;
56562      pkgadd)
56563        pkgadd_help  $MISSING_DEPENDENCY ;;
56564    esac
56565
56566    if test "x$PKGHANDLER_COMMAND" != x; then
56567      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56568    fi
56569  fi
56570
56571      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56572    fi
56573  fi
56574
56575
56576
56577
56578
56579# Check whether --with-freetype was given.
56580if test "${with_freetype+set}" = set; then :
56581  withval=$with_freetype;
56582fi
56583
56584
56585# Check whether --with-freetype-include was given.
56586if test "${with_freetype_include+set}" = set; then :
56587  withval=$with_freetype_include;
56588fi
56589
56590
56591# Check whether --with-freetype-lib was given.
56592if test "${with_freetype_lib+set}" = set; then :
56593  withval=$with_freetype_lib;
56594fi
56595
56596
56597# Check whether --with-freetype-src was given.
56598if test "${with_freetype_src+set}" = set; then :
56599  withval=$with_freetype_src;
56600fi
56601
56602  # Check whether --enable-freetype-bundling was given.
56603if test "${enable_freetype_bundling+set}" = set; then :
56604  enableval=$enable_freetype_bundling;
56605fi
56606
56607
56608  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56609  FREETYPE_BASE_NAME=freetype
56610  FREETYPE_CFLAGS=
56611  FREETYPE_LIBS=
56612  FREETYPE_BUNDLE_LIB_PATH=
56613
56614  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56615    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56616        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56617        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56618        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56619      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56620$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56621    fi
56622    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56623      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56624$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56625    fi
56626  else
56627    # freetype is needed to build; go get it!
56628
56629    BUNDLE_FREETYPE="$enable_freetype_bundling"
56630
56631    if  test "x$with_freetype_src" != x; then
56632      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56633        # Try to build freetype if --with-freetype-src was given on Windows
56634
56635  FREETYPE_SRC_PATH="$with_freetype_src"
56636  BUILD_FREETYPE=yes
56637
56638  # Check if the freetype sources are acessible..
56639  if ! test -d $FREETYPE_SRC_PATH; then
56640    { $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
56641$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56642    BUILD_FREETYPE=no
56643  fi
56644  # ..and contain a vc2010 project file
56645  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56646  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56647    { $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
56648$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56649    BUILD_FREETYPE=no
56650  fi
56651  # Now check if configure found a version of 'msbuild.exe'
56652  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56653    { $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
56654$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;}
56655    BUILD_FREETYPE=no
56656  fi
56657
56658  # Ready to go..
56659  if test "x$BUILD_FREETYPE" = xyes; then
56660    # msbuild requires trailing slashes for output directories
56661    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56662    freetype_lib_path_unix="$freetype_lib_path"
56663    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56664
56665  unix_path="$vcxproj_path"
56666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56667    windows_path=`$CYGPATH -m "$unix_path"`
56668    vcxproj_path="$windows_path"
56669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56670    windows_path=`cmd //c echo $unix_path`
56671    vcxproj_path="$windows_path"
56672  fi
56673
56674
56675  unix_path="$freetype_lib_path"
56676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56677    windows_path=`$CYGPATH -m "$unix_path"`
56678    freetype_lib_path="$windows_path"
56679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56680    windows_path=`cmd //c echo $unix_path`
56681    freetype_lib_path="$windows_path"
56682  fi
56683
56684
56685  unix_path="$freetype_obj_path"
56686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56687    windows_path=`$CYGPATH -m "$unix_path"`
56688    freetype_obj_path="$windows_path"
56689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56690    windows_path=`cmd //c echo $unix_path`
56691    freetype_obj_path="$windows_path"
56692  fi
56693
56694    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56695      freetype_platform=x64
56696    else
56697      freetype_platform=win32
56698    fi
56699
56700    # The original freetype project file is for VS 2010 (i.e. 'v100'),
56701    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56702    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56703    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56704    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56705$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
56706
56707    # First we try to build the freetype.dll
56708    $ECHO -e "@echo off\n"\
56709        "$MSBUILD $vcxproj_path "\
56710        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56711        "/p:Configuration=\"Release Multithreaded\" "\
56712        "/p:Platform=$freetype_platform "\
56713        "/p:ConfigurationType=DynamicLibrary "\
56714        "/p:TargetName=freetype "\
56715        "/p:OutDir=\"$freetype_lib_path\" "\
56716        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
56717    cmd /c freetype.bat
56718
56719    if test -s "$freetype_lib_path_unix/freetype.dll"; then
56720      # If that succeeds we also build freetype.lib
56721      $ECHO -e "@echo off\n"\
56722          "$MSBUILD $vcxproj_path "\
56723          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56724          "/p:Configuration=\"Release Multithreaded\" "\
56725          "/p:Platform=$freetype_platform "\
56726          "/p:ConfigurationType=StaticLibrary "\
56727          "/p:TargetName=freetype "\
56728          "/p:OutDir=\"$freetype_lib_path\" "\
56729          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
56730      cmd /c freetype.bat
56731
56732      if test -s "$freetype_lib_path_unix/freetype.lib"; then
56733        # Once we build both, lib and dll, set freetype lib and include path appropriately
56734        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
56735        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
56736        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
56737$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
56738      else
56739        BUILD_FREETYPE=no
56740      fi
56741    else
56742      BUILD_FREETYPE=no
56743    fi
56744  fi
56745
56746        if test "x$BUILD_FREETYPE" = xyes; then
56747          # Okay, we built it. Check that it works.
56748
56749  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56750  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56751  METHOD="--with-freetype-src"
56752
56753  # Let's start with an optimistic view of the world :-)
56754  FOUND_FREETYPE=yes
56755
56756  # First look for the canonical freetype main include file ft2build.h.
56757  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56758    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56759    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56760    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56761      # Fail.
56762      FOUND_FREETYPE=no
56763    fi
56764  fi
56765
56766  if test "x$FOUND_FREETYPE" = xyes; then
56767    # Include file found, let's continue the sanity check.
56768    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56769$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56770
56771    # Reset to default value
56772    FREETYPE_BASE_NAME=freetype
56773    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56774    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56775      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56776          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56777        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56778        # for the .6 version explicitly.
56779        FREETYPE_BASE_NAME=freetype.6
56780        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56781        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56782$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56783      else
56784        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56785$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56786        FOUND_FREETYPE=no
56787      fi
56788    else
56789      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56790        # On Windows, we will need both .lib and .dll file.
56791        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56792          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56793$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56794          FOUND_FREETYPE=no
56795        fi
56796      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56797          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56798        # Found lib in isa dir, use that instead.
56799        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56800        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56801$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56802      fi
56803    fi
56804  fi
56805
56806  if test "x$FOUND_FREETYPE" = xyes; then
56807
56808  # Only process if variable expands to non-empty
56809
56810  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56811    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56812
56813  # Input might be given as Windows format, start by converting to
56814  # unix format.
56815  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56816  new_path=`$CYGPATH -u "$path"`
56817
56818  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56819  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56820  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56821  # "foo.exe" is OK but "foo" is an error.
56822  #
56823  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56824  # It is also a way to make sure we got the proper file name for the real test later on.
56825  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56826  if test "x$test_shortpath" = x; then
56827    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56828$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56829    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56830  fi
56831
56832  # Call helper function which possibly converts this using DOS-style short mode.
56833  # If so, the updated path is stored in $new_path.
56834
56835  input_path="$new_path"
56836  # Check if we need to convert this using DOS-style short mode. If the path
56837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56838  # take no chances and rewrite it.
56839  # Note: m4 eats our [], so we need to use [ and ] instead.
56840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56841  if test "x$has_forbidden_chars" != x; then
56842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56843    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56844    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56845    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56846      # Going to short mode and back again did indeed matter. Since short mode is
56847      # case insensitive, let's make it lowercase to improve readability.
56848      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56849      # Now convert it back to Unix-style (cygpath)
56850      input_path=`$CYGPATH -u "$shortmode_path"`
56851      new_path="$input_path"
56852    fi
56853  fi
56854
56855  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56856  if test "x$test_cygdrive_prefix" = x; then
56857    # As a simple fix, exclude /usr/bin since it's not a real path.
56858    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56859      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56860      # a path prefixed by /cygdrive for fixpath to work.
56861      new_path="$CYGWIN_ROOT_PATH$input_path"
56862    fi
56863  fi
56864
56865
56866  if test "x$path" != "x$new_path"; then
56867    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56869$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56870  fi
56871
56872    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56873
56874  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56875  has_colon=`$ECHO $path | $GREP ^.:`
56876  new_path="$path"
56877  if test "x$has_colon" = x; then
56878    # Not in mixed or Windows style, start by that.
56879    new_path=`cmd //c echo $path`
56880  fi
56881
56882
56883  input_path="$new_path"
56884  # Check if we need to convert this using DOS-style short mode. If the path
56885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56886  # take no chances and rewrite it.
56887  # Note: m4 eats our [], so we need to use [ and ] instead.
56888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56889  if test "x$has_forbidden_chars" != x; then
56890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56891    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56892  fi
56893
56894
56895  windows_path="$new_path"
56896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56897    unix_path=`$CYGPATH -u "$windows_path"`
56898    new_path="$unix_path"
56899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56901    new_path="$unix_path"
56902  fi
56903
56904  if test "x$path" != "x$new_path"; then
56905    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56907$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56908  fi
56909
56910  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56911  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56912
56913    else
56914      # We're on a unix platform. Hooray! :)
56915      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56916      has_space=`$ECHO "$path" | $GREP " "`
56917      if test "x$has_space" != x; then
56918        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56919$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56920        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56921      fi
56922
56923      # Use eval to expand a potential ~
56924      eval path="$path"
56925      if test ! -f "$path" && test ! -d "$path"; then
56926        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56927      fi
56928
56929      if test -d "$path"; then
56930        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56931      else
56932        dir="`$DIRNAME "$path"`"
56933        base="`$BASENAME "$path"`"
56934        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56935      fi
56936    fi
56937  fi
56938
56939
56940  # Only process if variable expands to non-empty
56941
56942  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56943    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56944
56945  # Input might be given as Windows format, start by converting to
56946  # unix format.
56947  path="$POTENTIAL_FREETYPE_LIB_PATH"
56948  new_path=`$CYGPATH -u "$path"`
56949
56950  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56951  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56952  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56953  # "foo.exe" is OK but "foo" is an error.
56954  #
56955  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56956  # It is also a way to make sure we got the proper file name for the real test later on.
56957  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56958  if test "x$test_shortpath" = x; then
56959    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56960$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56961    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56962  fi
56963
56964  # Call helper function which possibly converts this using DOS-style short mode.
56965  # If so, the updated path is stored in $new_path.
56966
56967  input_path="$new_path"
56968  # Check if we need to convert this using DOS-style short mode. If the path
56969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56970  # take no chances and rewrite it.
56971  # Note: m4 eats our [], so we need to use [ and ] instead.
56972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56973  if test "x$has_forbidden_chars" != x; then
56974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56975    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56976    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56977    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56978      # Going to short mode and back again did indeed matter. Since short mode is
56979      # case insensitive, let's make it lowercase to improve readability.
56980      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56981      # Now convert it back to Unix-style (cygpath)
56982      input_path=`$CYGPATH -u "$shortmode_path"`
56983      new_path="$input_path"
56984    fi
56985  fi
56986
56987  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56988  if test "x$test_cygdrive_prefix" = x; then
56989    # As a simple fix, exclude /usr/bin since it's not a real path.
56990    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56991      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56992      # a path prefixed by /cygdrive for fixpath to work.
56993      new_path="$CYGWIN_ROOT_PATH$input_path"
56994    fi
56995  fi
56996
56997
56998  if test "x$path" != "x$new_path"; then
56999    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57000    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57001$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57002  fi
57003
57004    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57005
57006  path="$POTENTIAL_FREETYPE_LIB_PATH"
57007  has_colon=`$ECHO $path | $GREP ^.:`
57008  new_path="$path"
57009  if test "x$has_colon" = x; then
57010    # Not in mixed or Windows style, start by that.
57011    new_path=`cmd //c echo $path`
57012  fi
57013
57014
57015  input_path="$new_path"
57016  # Check if we need to convert this using DOS-style short mode. If the path
57017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57018  # take no chances and rewrite it.
57019  # Note: m4 eats our [], so we need to use [ and ] instead.
57020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57021  if test "x$has_forbidden_chars" != x; then
57022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57023    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57024  fi
57025
57026
57027  windows_path="$new_path"
57028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57029    unix_path=`$CYGPATH -u "$windows_path"`
57030    new_path="$unix_path"
57031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57033    new_path="$unix_path"
57034  fi
57035
57036  if test "x$path" != "x$new_path"; then
57037    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57038    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57039$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57040  fi
57041
57042  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57043  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57044
57045    else
57046      # We're on a unix platform. Hooray! :)
57047      path="$POTENTIAL_FREETYPE_LIB_PATH"
57048      has_space=`$ECHO "$path" | $GREP " "`
57049      if test "x$has_space" != x; then
57050        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57051$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57052        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57053      fi
57054
57055      # Use eval to expand a potential ~
57056      eval path="$path"
57057      if test ! -f "$path" && test ! -d "$path"; then
57058        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57059      fi
57060
57061      if test -d "$path"; then
57062        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57063      else
57064        dir="`$DIRNAME "$path"`"
57065        base="`$BASENAME "$path"`"
57066        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57067      fi
57068    fi
57069  fi
57070
57071
57072    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57073    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57074$as_echo_n "checking for freetype includes... " >&6; }
57075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57076$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57077    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57078    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57079$as_echo_n "checking for freetype libraries... " >&6; }
57080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57081$as_echo "$FREETYPE_LIB_PATH" >&6; }
57082  fi
57083
57084          if test "x$FOUND_FREETYPE" != xyes; then
57085            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57086          fi
57087        else
57088          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57089$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57090          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57091        fi
57092      else
57093        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57094$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57095      fi
57096    fi
57097
57098    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57099      # User has specified settings
57100
57101      if test "x$BUNDLE_FREETYPE" = x; then
57102        # If not specified, default is to bundle freetype
57103        BUNDLE_FREETYPE=yes
57104      fi
57105
57106      if test "x$with_freetype" != x; then
57107        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57108        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57109      fi
57110
57111      # Allow --with-freetype-lib and --with-freetype-include to override
57112      if test "x$with_freetype_include" != x; then
57113        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57114      fi
57115      if test "x$with_freetype_lib" != x; then
57116        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57117      fi
57118
57119      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57120        # Okay, we got it. Check that it works.
57121
57122  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57123  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57124  METHOD="--with-freetype"
57125
57126  # Let's start with an optimistic view of the world :-)
57127  FOUND_FREETYPE=yes
57128
57129  # First look for the canonical freetype main include file ft2build.h.
57130  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57131    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57132    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57133    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57134      # Fail.
57135      FOUND_FREETYPE=no
57136    fi
57137  fi
57138
57139  if test "x$FOUND_FREETYPE" = xyes; then
57140    # Include file found, let's continue the sanity check.
57141    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57142$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57143
57144    # Reset to default value
57145    FREETYPE_BASE_NAME=freetype
57146    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57147    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57148      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57149          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57150        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57151        # for the .6 version explicitly.
57152        FREETYPE_BASE_NAME=freetype.6
57153        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57154        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57155$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57156      else
57157        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57158$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57159        FOUND_FREETYPE=no
57160      fi
57161    else
57162      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57163        # On Windows, we will need both .lib and .dll file.
57164        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57165          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57166$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57167          FOUND_FREETYPE=no
57168        fi
57169      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57170          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57171        # Found lib in isa dir, use that instead.
57172        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57173        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57174$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57175      fi
57176    fi
57177  fi
57178
57179  if test "x$FOUND_FREETYPE" = xyes; then
57180
57181  # Only process if variable expands to non-empty
57182
57183  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57184    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57185
57186  # Input might be given as Windows format, start by converting to
57187  # unix format.
57188  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57189  new_path=`$CYGPATH -u "$path"`
57190
57191  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57192  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57193  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57194  # "foo.exe" is OK but "foo" is an error.
57195  #
57196  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57197  # It is also a way to make sure we got the proper file name for the real test later on.
57198  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57199  if test "x$test_shortpath" = x; then
57200    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57201$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57202    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57203  fi
57204
57205  # Call helper function which possibly converts this using DOS-style short mode.
57206  # If so, the updated path is stored in $new_path.
57207
57208  input_path="$new_path"
57209  # Check if we need to convert this using DOS-style short mode. If the path
57210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57211  # take no chances and rewrite it.
57212  # Note: m4 eats our [], so we need to use [ and ] instead.
57213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57214  if test "x$has_forbidden_chars" != x; then
57215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57216    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57217    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57218    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57219      # Going to short mode and back again did indeed matter. Since short mode is
57220      # case insensitive, let's make it lowercase to improve readability.
57221      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57222      # Now convert it back to Unix-style (cygpath)
57223      input_path=`$CYGPATH -u "$shortmode_path"`
57224      new_path="$input_path"
57225    fi
57226  fi
57227
57228  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57229  if test "x$test_cygdrive_prefix" = x; then
57230    # As a simple fix, exclude /usr/bin since it's not a real path.
57231    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57232      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57233      # a path prefixed by /cygdrive for fixpath to work.
57234      new_path="$CYGWIN_ROOT_PATH$input_path"
57235    fi
57236  fi
57237
57238
57239  if test "x$path" != "x$new_path"; then
57240    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57242$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57243  fi
57244
57245    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57246
57247  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57248  has_colon=`$ECHO $path | $GREP ^.:`
57249  new_path="$path"
57250  if test "x$has_colon" = x; then
57251    # Not in mixed or Windows style, start by that.
57252    new_path=`cmd //c echo $path`
57253  fi
57254
57255
57256  input_path="$new_path"
57257  # Check if we need to convert this using DOS-style short mode. If the path
57258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57259  # take no chances and rewrite it.
57260  # Note: m4 eats our [], so we need to use [ and ] instead.
57261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57262  if test "x$has_forbidden_chars" != x; then
57263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57264    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57265  fi
57266
57267
57268  windows_path="$new_path"
57269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57270    unix_path=`$CYGPATH -u "$windows_path"`
57271    new_path="$unix_path"
57272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57274    new_path="$unix_path"
57275  fi
57276
57277  if test "x$path" != "x$new_path"; then
57278    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57280$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57281  fi
57282
57283  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57284  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57285
57286    else
57287      # We're on a unix platform. Hooray! :)
57288      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57289      has_space=`$ECHO "$path" | $GREP " "`
57290      if test "x$has_space" != x; then
57291        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57292$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57293        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57294      fi
57295
57296      # Use eval to expand a potential ~
57297      eval path="$path"
57298      if test ! -f "$path" && test ! -d "$path"; then
57299        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57300      fi
57301
57302      if test -d "$path"; then
57303        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57304      else
57305        dir="`$DIRNAME "$path"`"
57306        base="`$BASENAME "$path"`"
57307        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57308      fi
57309    fi
57310  fi
57311
57312
57313  # Only process if variable expands to non-empty
57314
57315  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57316    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57317
57318  # Input might be given as Windows format, start by converting to
57319  # unix format.
57320  path="$POTENTIAL_FREETYPE_LIB_PATH"
57321  new_path=`$CYGPATH -u "$path"`
57322
57323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57326  # "foo.exe" is OK but "foo" is an error.
57327  #
57328  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57329  # It is also a way to make sure we got the proper file name for the real test later on.
57330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57331  if test "x$test_shortpath" = x; then
57332    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57333$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57334    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57335  fi
57336
57337  # Call helper function which possibly converts this using DOS-style short mode.
57338  # If so, the updated path is stored in $new_path.
57339
57340  input_path="$new_path"
57341  # Check if we need to convert this using DOS-style short mode. If the path
57342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57343  # take no chances and rewrite it.
57344  # Note: m4 eats our [], so we need to use [ and ] instead.
57345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57346  if test "x$has_forbidden_chars" != x; then
57347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57348    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57349    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57350    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57351      # Going to short mode and back again did indeed matter. Since short mode is
57352      # case insensitive, let's make it lowercase to improve readability.
57353      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57354      # Now convert it back to Unix-style (cygpath)
57355      input_path=`$CYGPATH -u "$shortmode_path"`
57356      new_path="$input_path"
57357    fi
57358  fi
57359
57360  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57361  if test "x$test_cygdrive_prefix" = x; then
57362    # As a simple fix, exclude /usr/bin since it's not a real path.
57363    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57364      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57365      # a path prefixed by /cygdrive for fixpath to work.
57366      new_path="$CYGWIN_ROOT_PATH$input_path"
57367    fi
57368  fi
57369
57370
57371  if test "x$path" != "x$new_path"; then
57372    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57374$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57375  fi
57376
57377    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57378
57379  path="$POTENTIAL_FREETYPE_LIB_PATH"
57380  has_colon=`$ECHO $path | $GREP ^.:`
57381  new_path="$path"
57382  if test "x$has_colon" = x; then
57383    # Not in mixed or Windows style, start by that.
57384    new_path=`cmd //c echo $path`
57385  fi
57386
57387
57388  input_path="$new_path"
57389  # Check if we need to convert this using DOS-style short mode. If the path
57390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57391  # take no chances and rewrite it.
57392  # Note: m4 eats our [], so we need to use [ and ] instead.
57393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57394  if test "x$has_forbidden_chars" != x; then
57395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57397  fi
57398
57399
57400  windows_path="$new_path"
57401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57402    unix_path=`$CYGPATH -u "$windows_path"`
57403    new_path="$unix_path"
57404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57406    new_path="$unix_path"
57407  fi
57408
57409  if test "x$path" != "x$new_path"; then
57410    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57412$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57413  fi
57414
57415  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57416  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57417
57418    else
57419      # We're on a unix platform. Hooray! :)
57420      path="$POTENTIAL_FREETYPE_LIB_PATH"
57421      has_space=`$ECHO "$path" | $GREP " "`
57422      if test "x$has_space" != x; then
57423        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57424$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57425        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57426      fi
57427
57428      # Use eval to expand a potential ~
57429      eval path="$path"
57430      if test ! -f "$path" && test ! -d "$path"; then
57431        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57432      fi
57433
57434      if test -d "$path"; then
57435        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57436      else
57437        dir="`$DIRNAME "$path"`"
57438        base="`$BASENAME "$path"`"
57439        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57440      fi
57441    fi
57442  fi
57443
57444
57445    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57446    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57447$as_echo_n "checking for freetype includes... " >&6; }
57448    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57449$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57450    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57451    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57452$as_echo_n "checking for freetype libraries... " >&6; }
57453    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57454$as_echo "$FREETYPE_LIB_PATH" >&6; }
57455  fi
57456
57457        if test "x$FOUND_FREETYPE" != xyes; then
57458          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57459        fi
57460      else
57461        # User specified only one of lib or include. This is an error.
57462        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57463          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57464$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57465          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57466        else
57467          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57468$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57469          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57470        fi
57471      fi
57472    else
57473      # User did not specify settings, but we need freetype. Try to locate it.
57474
57475      if test "x$BUNDLE_FREETYPE" = x; then
57476        # If not specified, default is to bundle freetype only on windows
57477        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57478          BUNDLE_FREETYPE=yes
57479        else
57480          BUNDLE_FREETYPE=no
57481        fi
57482      fi
57483
57484      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57485      if test "x$SYSROOT" = x; then
57486        if test "x$FOUND_FREETYPE" != xyes; then
57487          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57488          if test "x$PKG_CONFIG" != x; then
57489
57490pkg_failed=no
57491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57492$as_echo_n "checking for FREETYPE... " >&6; }
57493
57494if test -n "$FREETYPE_CFLAGS"; then
57495    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57496 elif test -n "$PKG_CONFIG"; then
57497    if test -n "$PKG_CONFIG" && \
57498    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57499  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57500  ac_status=$?
57501  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57502  test $ac_status = 0; }; then
57503  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57504else
57505  pkg_failed=yes
57506fi
57507 else
57508    pkg_failed=untried
57509fi
57510if test -n "$FREETYPE_LIBS"; then
57511    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57512 elif test -n "$PKG_CONFIG"; then
57513    if test -n "$PKG_CONFIG" && \
57514    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57515  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57516  ac_status=$?
57517  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57518  test $ac_status = 0; }; then
57519  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57520else
57521  pkg_failed=yes
57522fi
57523 else
57524    pkg_failed=untried
57525fi
57526
57527
57528
57529if test $pkg_failed = yes; then
57530
57531if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57532        _pkg_short_errors_supported=yes
57533else
57534        _pkg_short_errors_supported=no
57535fi
57536        if test $_pkg_short_errors_supported = yes; then
57537	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57538        else
57539	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57540        fi
57541	# Put the nasty error message in config.log where it belongs
57542	echo "$FREETYPE_PKG_ERRORS" >&5
57543
57544	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57545$as_echo "no" >&6; }
57546                FOUND_FREETYPE=no
57547elif test $pkg_failed = untried; then
57548	FOUND_FREETYPE=no
57549else
57550	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57551	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57553$as_echo "yes" >&6; }
57554	FOUND_FREETYPE=yes
57555fi
57556            if test "x$FOUND_FREETYPE" = xyes; then
57557              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57558              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57559              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57560              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57561                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57562              fi
57563              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57564              if test "x$BUNDLE_FREETYPE" = xyes; then
57565                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57566$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57567                FOUND_FREETYPE=no
57568              else
57569                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57570$as_echo_n "checking for freetype... " >&6; }
57571                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57572$as_echo "yes (using pkg-config)" >&6; }
57573              fi
57574            fi
57575          fi
57576        fi
57577      fi
57578
57579      if test "x$FOUND_FREETYPE" != xyes; then
57580        # Check in well-known locations
57581        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57582          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57583
57584  windows_path="$FREETYPE_BASE_DIR"
57585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57586    unix_path=`$CYGPATH -u "$windows_path"`
57587    FREETYPE_BASE_DIR="$unix_path"
57588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57590    FREETYPE_BASE_DIR="$unix_path"
57591  fi
57592
57593
57594  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57595  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57596  METHOD="well-known location"
57597
57598  # Let's start with an optimistic view of the world :-)
57599  FOUND_FREETYPE=yes
57600
57601  # First look for the canonical freetype main include file ft2build.h.
57602  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57603    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57604    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57605    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57606      # Fail.
57607      FOUND_FREETYPE=no
57608    fi
57609  fi
57610
57611  if test "x$FOUND_FREETYPE" = xyes; then
57612    # Include file found, let's continue the sanity check.
57613    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57614$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57615
57616    # Reset to default value
57617    FREETYPE_BASE_NAME=freetype
57618    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57619    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57620      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57621          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57622        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57623        # for the .6 version explicitly.
57624        FREETYPE_BASE_NAME=freetype.6
57625        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57626        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57627$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57628      else
57629        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57630$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57631        FOUND_FREETYPE=no
57632      fi
57633    else
57634      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57635        # On Windows, we will need both .lib and .dll file.
57636        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57637          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57638$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57639          FOUND_FREETYPE=no
57640        fi
57641      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57642          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57643        # Found lib in isa dir, use that instead.
57644        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57645        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57646$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57647      fi
57648    fi
57649  fi
57650
57651  if test "x$FOUND_FREETYPE" = xyes; then
57652
57653  # Only process if variable expands to non-empty
57654
57655  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57656    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57657
57658  # Input might be given as Windows format, start by converting to
57659  # unix format.
57660  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57661  new_path=`$CYGPATH -u "$path"`
57662
57663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57666  # "foo.exe" is OK but "foo" is an error.
57667  #
57668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57669  # It is also a way to make sure we got the proper file name for the real test later on.
57670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57671  if test "x$test_shortpath" = x; then
57672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57673$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57674    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57675  fi
57676
57677  # Call helper function which possibly converts this using DOS-style short mode.
57678  # If so, the updated path is stored in $new_path.
57679
57680  input_path="$new_path"
57681  # Check if we need to convert this using DOS-style short mode. If the path
57682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57683  # take no chances and rewrite it.
57684  # Note: m4 eats our [], so we need to use [ and ] instead.
57685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57686  if test "x$has_forbidden_chars" != x; then
57687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57691      # Going to short mode and back again did indeed matter. Since short mode is
57692      # case insensitive, let's make it lowercase to improve readability.
57693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57694      # Now convert it back to Unix-style (cygpath)
57695      input_path=`$CYGPATH -u "$shortmode_path"`
57696      new_path="$input_path"
57697    fi
57698  fi
57699
57700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57701  if test "x$test_cygdrive_prefix" = x; then
57702    # As a simple fix, exclude /usr/bin since it's not a real path.
57703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57705      # a path prefixed by /cygdrive for fixpath to work.
57706      new_path="$CYGWIN_ROOT_PATH$input_path"
57707    fi
57708  fi
57709
57710
57711  if test "x$path" != "x$new_path"; then
57712    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57714$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57715  fi
57716
57717    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57718
57719  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57720  has_colon=`$ECHO $path | $GREP ^.:`
57721  new_path="$path"
57722  if test "x$has_colon" = x; then
57723    # Not in mixed or Windows style, start by that.
57724    new_path=`cmd //c echo $path`
57725  fi
57726
57727
57728  input_path="$new_path"
57729  # Check if we need to convert this using DOS-style short mode. If the path
57730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57731  # take no chances and rewrite it.
57732  # Note: m4 eats our [], so we need to use [ and ] instead.
57733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57734  if test "x$has_forbidden_chars" != x; then
57735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57737  fi
57738
57739
57740  windows_path="$new_path"
57741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57742    unix_path=`$CYGPATH -u "$windows_path"`
57743    new_path="$unix_path"
57744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57746    new_path="$unix_path"
57747  fi
57748
57749  if test "x$path" != "x$new_path"; then
57750    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57752$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57753  fi
57754
57755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57757
57758    else
57759      # We're on a unix platform. Hooray! :)
57760      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57761      has_space=`$ECHO "$path" | $GREP " "`
57762      if test "x$has_space" != x; then
57763        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57764$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57765        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57766      fi
57767
57768      # Use eval to expand a potential ~
57769      eval path="$path"
57770      if test ! -f "$path" && test ! -d "$path"; then
57771        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57772      fi
57773
57774      if test -d "$path"; then
57775        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57776      else
57777        dir="`$DIRNAME "$path"`"
57778        base="`$BASENAME "$path"`"
57779        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57780      fi
57781    fi
57782  fi
57783
57784
57785  # Only process if variable expands to non-empty
57786
57787  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57788    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57789
57790  # Input might be given as Windows format, start by converting to
57791  # unix format.
57792  path="$POTENTIAL_FREETYPE_LIB_PATH"
57793  new_path=`$CYGPATH -u "$path"`
57794
57795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57798  # "foo.exe" is OK but "foo" is an error.
57799  #
57800  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57801  # It is also a way to make sure we got the proper file name for the real test later on.
57802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57803  if test "x$test_shortpath" = x; then
57804    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57805$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57806    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57807  fi
57808
57809  # Call helper function which possibly converts this using DOS-style short mode.
57810  # If so, the updated path is stored in $new_path.
57811
57812  input_path="$new_path"
57813  # Check if we need to convert this using DOS-style short mode. If the path
57814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57815  # take no chances and rewrite it.
57816  # Note: m4 eats our [], so we need to use [ and ] instead.
57817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57818  if test "x$has_forbidden_chars" != x; then
57819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57823      # Going to short mode and back again did indeed matter. Since short mode is
57824      # case insensitive, let's make it lowercase to improve readability.
57825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57826      # Now convert it back to Unix-style (cygpath)
57827      input_path=`$CYGPATH -u "$shortmode_path"`
57828      new_path="$input_path"
57829    fi
57830  fi
57831
57832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57833  if test "x$test_cygdrive_prefix" = x; then
57834    # As a simple fix, exclude /usr/bin since it's not a real path.
57835    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57837      # a path prefixed by /cygdrive for fixpath to work.
57838      new_path="$CYGWIN_ROOT_PATH$input_path"
57839    fi
57840  fi
57841
57842
57843  if test "x$path" != "x$new_path"; then
57844    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57846$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57847  fi
57848
57849    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57850
57851  path="$POTENTIAL_FREETYPE_LIB_PATH"
57852  has_colon=`$ECHO $path | $GREP ^.:`
57853  new_path="$path"
57854  if test "x$has_colon" = x; then
57855    # Not in mixed or Windows style, start by that.
57856    new_path=`cmd //c echo $path`
57857  fi
57858
57859
57860  input_path="$new_path"
57861  # Check if we need to convert this using DOS-style short mode. If the path
57862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57863  # take no chances and rewrite it.
57864  # Note: m4 eats our [], so we need to use [ and ] instead.
57865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57866  if test "x$has_forbidden_chars" != x; then
57867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57869  fi
57870
57871
57872  windows_path="$new_path"
57873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57874    unix_path=`$CYGPATH -u "$windows_path"`
57875    new_path="$unix_path"
57876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57878    new_path="$unix_path"
57879  fi
57880
57881  if test "x$path" != "x$new_path"; then
57882    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57884$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57885  fi
57886
57887  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57888  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57889
57890    else
57891      # We're on a unix platform. Hooray! :)
57892      path="$POTENTIAL_FREETYPE_LIB_PATH"
57893      has_space=`$ECHO "$path" | $GREP " "`
57894      if test "x$has_space" != x; then
57895        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57896$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57897        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57898      fi
57899
57900      # Use eval to expand a potential ~
57901      eval path="$path"
57902      if test ! -f "$path" && test ! -d "$path"; then
57903        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57904      fi
57905
57906      if test -d "$path"; then
57907        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57908      else
57909        dir="`$DIRNAME "$path"`"
57910        base="`$BASENAME "$path"`"
57911        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57912      fi
57913    fi
57914  fi
57915
57916
57917    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57918    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57919$as_echo_n "checking for freetype includes... " >&6; }
57920    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57921$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57922    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57923    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57924$as_echo_n "checking for freetype libraries... " >&6; }
57925    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57926$as_echo "$FREETYPE_LIB_PATH" >&6; }
57927  fi
57928
57929          if test "x$FOUND_FREETYPE" != xyes; then
57930            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
57931
57932  windows_path="$FREETYPE_BASE_DIR"
57933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57934    unix_path=`$CYGPATH -u "$windows_path"`
57935    FREETYPE_BASE_DIR="$unix_path"
57936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57938    FREETYPE_BASE_DIR="$unix_path"
57939  fi
57940
57941
57942  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57943  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57944  METHOD="well-known location"
57945
57946  # Let's start with an optimistic view of the world :-)
57947  FOUND_FREETYPE=yes
57948
57949  # First look for the canonical freetype main include file ft2build.h.
57950  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57951    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57952    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57953    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57954      # Fail.
57955      FOUND_FREETYPE=no
57956    fi
57957  fi
57958
57959  if test "x$FOUND_FREETYPE" = xyes; then
57960    # Include file found, let's continue the sanity check.
57961    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57962$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57963
57964    # Reset to default value
57965    FREETYPE_BASE_NAME=freetype
57966    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57967    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57968      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57969          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57970        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57971        # for the .6 version explicitly.
57972        FREETYPE_BASE_NAME=freetype.6
57973        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57974        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57975$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57976      else
57977        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57978$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57979        FOUND_FREETYPE=no
57980      fi
57981    else
57982      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57983        # On Windows, we will need both .lib and .dll file.
57984        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57985          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57986$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57987          FOUND_FREETYPE=no
57988        fi
57989      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57990          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57991        # Found lib in isa dir, use that instead.
57992        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57993        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57994$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57995      fi
57996    fi
57997  fi
57998
57999  if test "x$FOUND_FREETYPE" = xyes; then
58000
58001  # Only process if variable expands to non-empty
58002
58003  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58004    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58005
58006  # Input might be given as Windows format, start by converting to
58007  # unix format.
58008  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58009  new_path=`$CYGPATH -u "$path"`
58010
58011  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58012  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58013  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58014  # "foo.exe" is OK but "foo" is an error.
58015  #
58016  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58017  # It is also a way to make sure we got the proper file name for the real test later on.
58018  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58019  if test "x$test_shortpath" = x; then
58020    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58021$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58022    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58023  fi
58024
58025  # Call helper function which possibly converts this using DOS-style short mode.
58026  # If so, the updated path is stored in $new_path.
58027
58028  input_path="$new_path"
58029  # Check if we need to convert this using DOS-style short mode. If the path
58030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58031  # take no chances and rewrite it.
58032  # Note: m4 eats our [], so we need to use [ and ] instead.
58033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58034  if test "x$has_forbidden_chars" != x; then
58035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58036    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58037    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58038    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58039      # Going to short mode and back again did indeed matter. Since short mode is
58040      # case insensitive, let's make it lowercase to improve readability.
58041      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58042      # Now convert it back to Unix-style (cygpath)
58043      input_path=`$CYGPATH -u "$shortmode_path"`
58044      new_path="$input_path"
58045    fi
58046  fi
58047
58048  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58049  if test "x$test_cygdrive_prefix" = x; then
58050    # As a simple fix, exclude /usr/bin since it's not a real path.
58051    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58052      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58053      # a path prefixed by /cygdrive for fixpath to work.
58054      new_path="$CYGWIN_ROOT_PATH$input_path"
58055    fi
58056  fi
58057
58058
58059  if test "x$path" != "x$new_path"; then
58060    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58062$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58063  fi
58064
58065    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58066
58067  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58068  has_colon=`$ECHO $path | $GREP ^.:`
58069  new_path="$path"
58070  if test "x$has_colon" = x; then
58071    # Not in mixed or Windows style, start by that.
58072    new_path=`cmd //c echo $path`
58073  fi
58074
58075
58076  input_path="$new_path"
58077  # Check if we need to convert this using DOS-style short mode. If the path
58078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58079  # take no chances and rewrite it.
58080  # Note: m4 eats our [], so we need to use [ and ] instead.
58081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58082  if test "x$has_forbidden_chars" != x; then
58083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58084    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58085  fi
58086
58087
58088  windows_path="$new_path"
58089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58090    unix_path=`$CYGPATH -u "$windows_path"`
58091    new_path="$unix_path"
58092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58094    new_path="$unix_path"
58095  fi
58096
58097  if test "x$path" != "x$new_path"; then
58098    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58099    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58100$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58101  fi
58102
58103  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58104  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58105
58106    else
58107      # We're on a unix platform. Hooray! :)
58108      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58109      has_space=`$ECHO "$path" | $GREP " "`
58110      if test "x$has_space" != x; then
58111        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58112$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58113        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58114      fi
58115
58116      # Use eval to expand a potential ~
58117      eval path="$path"
58118      if test ! -f "$path" && test ! -d "$path"; then
58119        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58120      fi
58121
58122      if test -d "$path"; then
58123        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58124      else
58125        dir="`$DIRNAME "$path"`"
58126        base="`$BASENAME "$path"`"
58127        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58128      fi
58129    fi
58130  fi
58131
58132
58133  # Only process if variable expands to non-empty
58134
58135  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58136    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58137
58138  # Input might be given as Windows format, start by converting to
58139  # unix format.
58140  path="$POTENTIAL_FREETYPE_LIB_PATH"
58141  new_path=`$CYGPATH -u "$path"`
58142
58143  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58144  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58145  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58146  # "foo.exe" is OK but "foo" is an error.
58147  #
58148  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58149  # It is also a way to make sure we got the proper file name for the real test later on.
58150  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58151  if test "x$test_shortpath" = x; then
58152    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58153$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58154    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58155  fi
58156
58157  # Call helper function which possibly converts this using DOS-style short mode.
58158  # If so, the updated path is stored in $new_path.
58159
58160  input_path="$new_path"
58161  # Check if we need to convert this using DOS-style short mode. If the path
58162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58163  # take no chances and rewrite it.
58164  # Note: m4 eats our [], so we need to use [ and ] instead.
58165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58166  if test "x$has_forbidden_chars" != x; then
58167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58168    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58169    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58170    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58171      # Going to short mode and back again did indeed matter. Since short mode is
58172      # case insensitive, let's make it lowercase to improve readability.
58173      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58174      # Now convert it back to Unix-style (cygpath)
58175      input_path=`$CYGPATH -u "$shortmode_path"`
58176      new_path="$input_path"
58177    fi
58178  fi
58179
58180  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58181  if test "x$test_cygdrive_prefix" = x; then
58182    # As a simple fix, exclude /usr/bin since it's not a real path.
58183    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58184      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58185      # a path prefixed by /cygdrive for fixpath to work.
58186      new_path="$CYGWIN_ROOT_PATH$input_path"
58187    fi
58188  fi
58189
58190
58191  if test "x$path" != "x$new_path"; then
58192    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58193    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58194$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58195  fi
58196
58197    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58198
58199  path="$POTENTIAL_FREETYPE_LIB_PATH"
58200  has_colon=`$ECHO $path | $GREP ^.:`
58201  new_path="$path"
58202  if test "x$has_colon" = x; then
58203    # Not in mixed or Windows style, start by that.
58204    new_path=`cmd //c echo $path`
58205  fi
58206
58207
58208  input_path="$new_path"
58209  # Check if we need to convert this using DOS-style short mode. If the path
58210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58211  # take no chances and rewrite it.
58212  # Note: m4 eats our [], so we need to use [ and ] instead.
58213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58214  if test "x$has_forbidden_chars" != x; then
58215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58216    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58217  fi
58218
58219
58220  windows_path="$new_path"
58221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58222    unix_path=`$CYGPATH -u "$windows_path"`
58223    new_path="$unix_path"
58224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58226    new_path="$unix_path"
58227  fi
58228
58229  if test "x$path" != "x$new_path"; then
58230    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58231    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58232$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58233  fi
58234
58235  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58236  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58237
58238    else
58239      # We're on a unix platform. Hooray! :)
58240      path="$POTENTIAL_FREETYPE_LIB_PATH"
58241      has_space=`$ECHO "$path" | $GREP " "`
58242      if test "x$has_space" != x; then
58243        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58244$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58245        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58246      fi
58247
58248      # Use eval to expand a potential ~
58249      eval path="$path"
58250      if test ! -f "$path" && test ! -d "$path"; then
58251        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58252      fi
58253
58254      if test -d "$path"; then
58255        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58256      else
58257        dir="`$DIRNAME "$path"`"
58258        base="`$BASENAME "$path"`"
58259        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58260      fi
58261    fi
58262  fi
58263
58264
58265    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58266    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58267$as_echo_n "checking for freetype includes... " >&6; }
58268    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58269$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58270    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58271    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58272$as_echo_n "checking for freetype libraries... " >&6; }
58273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58274$as_echo "$FREETYPE_LIB_PATH" >&6; }
58275  fi
58276
58277          fi
58278          if test "x$FOUND_FREETYPE" != xyes; then
58279            FREETYPE_BASE_DIR="$HOME/freetype"
58280
58281  windows_path="$FREETYPE_BASE_DIR"
58282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58283    unix_path=`$CYGPATH -u "$windows_path"`
58284    FREETYPE_BASE_DIR="$unix_path"
58285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58287    FREETYPE_BASE_DIR="$unix_path"
58288  fi
58289
58290            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58291
58292  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58293  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58294  METHOD="well-known location"
58295
58296  # Let's start with an optimistic view of the world :-)
58297  FOUND_FREETYPE=yes
58298
58299  # First look for the canonical freetype main include file ft2build.h.
58300  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58301    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58302    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58303    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58304      # Fail.
58305      FOUND_FREETYPE=no
58306    fi
58307  fi
58308
58309  if test "x$FOUND_FREETYPE" = xyes; then
58310    # Include file found, let's continue the sanity check.
58311    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58312$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58313
58314    # Reset to default value
58315    FREETYPE_BASE_NAME=freetype
58316    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58317    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58318      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58319          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58320        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58321        # for the .6 version explicitly.
58322        FREETYPE_BASE_NAME=freetype.6
58323        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58324        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58325$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58326      else
58327        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58328$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58329        FOUND_FREETYPE=no
58330      fi
58331    else
58332      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58333        # On Windows, we will need both .lib and .dll file.
58334        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58335          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58336$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58337          FOUND_FREETYPE=no
58338        fi
58339      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58340          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58341        # Found lib in isa dir, use that instead.
58342        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58343        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58344$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58345      fi
58346    fi
58347  fi
58348
58349  if test "x$FOUND_FREETYPE" = xyes; then
58350
58351  # Only process if variable expands to non-empty
58352
58353  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58354    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58355
58356  # Input might be given as Windows format, start by converting to
58357  # unix format.
58358  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58359  new_path=`$CYGPATH -u "$path"`
58360
58361  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58362  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58363  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58364  # "foo.exe" is OK but "foo" is an error.
58365  #
58366  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58367  # It is also a way to make sure we got the proper file name for the real test later on.
58368  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58369  if test "x$test_shortpath" = x; then
58370    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58371$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58372    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58373  fi
58374
58375  # Call helper function which possibly converts this using DOS-style short mode.
58376  # If so, the updated path is stored in $new_path.
58377
58378  input_path="$new_path"
58379  # Check if we need to convert this using DOS-style short mode. If the path
58380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58381  # take no chances and rewrite it.
58382  # Note: m4 eats our [], so we need to use [ and ] instead.
58383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58384  if test "x$has_forbidden_chars" != x; then
58385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58386    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58387    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58388    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58389      # Going to short mode and back again did indeed matter. Since short mode is
58390      # case insensitive, let's make it lowercase to improve readability.
58391      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58392      # Now convert it back to Unix-style (cygpath)
58393      input_path=`$CYGPATH -u "$shortmode_path"`
58394      new_path="$input_path"
58395    fi
58396  fi
58397
58398  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58399  if test "x$test_cygdrive_prefix" = x; then
58400    # As a simple fix, exclude /usr/bin since it's not a real path.
58401    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58402      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58403      # a path prefixed by /cygdrive for fixpath to work.
58404      new_path="$CYGWIN_ROOT_PATH$input_path"
58405    fi
58406  fi
58407
58408
58409  if test "x$path" != "x$new_path"; then
58410    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58412$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58413  fi
58414
58415    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58416
58417  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58418  has_colon=`$ECHO $path | $GREP ^.:`
58419  new_path="$path"
58420  if test "x$has_colon" = x; then
58421    # Not in mixed or Windows style, start by that.
58422    new_path=`cmd //c echo $path`
58423  fi
58424
58425
58426  input_path="$new_path"
58427  # Check if we need to convert this using DOS-style short mode. If the path
58428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58429  # take no chances and rewrite it.
58430  # Note: m4 eats our [], so we need to use [ and ] instead.
58431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58432  if test "x$has_forbidden_chars" != x; then
58433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58434    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58435  fi
58436
58437
58438  windows_path="$new_path"
58439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58440    unix_path=`$CYGPATH -u "$windows_path"`
58441    new_path="$unix_path"
58442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58444    new_path="$unix_path"
58445  fi
58446
58447  if test "x$path" != "x$new_path"; then
58448    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58449    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58450$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58451  fi
58452
58453  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58454  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58455
58456    else
58457      # We're on a unix platform. Hooray! :)
58458      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58459      has_space=`$ECHO "$path" | $GREP " "`
58460      if test "x$has_space" != x; then
58461        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58462$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58463        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58464      fi
58465
58466      # Use eval to expand a potential ~
58467      eval path="$path"
58468      if test ! -f "$path" && test ! -d "$path"; then
58469        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58470      fi
58471
58472      if test -d "$path"; then
58473        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58474      else
58475        dir="`$DIRNAME "$path"`"
58476        base="`$BASENAME "$path"`"
58477        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58478      fi
58479    fi
58480  fi
58481
58482
58483  # Only process if variable expands to non-empty
58484
58485  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58486    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58487
58488  # Input might be given as Windows format, start by converting to
58489  # unix format.
58490  path="$POTENTIAL_FREETYPE_LIB_PATH"
58491  new_path=`$CYGPATH -u "$path"`
58492
58493  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58494  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58495  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58496  # "foo.exe" is OK but "foo" is an error.
58497  #
58498  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58499  # It is also a way to make sure we got the proper file name for the real test later on.
58500  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58501  if test "x$test_shortpath" = x; then
58502    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58503$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58504    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58505  fi
58506
58507  # Call helper function which possibly converts this using DOS-style short mode.
58508  # If so, the updated path is stored in $new_path.
58509
58510  input_path="$new_path"
58511  # Check if we need to convert this using DOS-style short mode. If the path
58512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58513  # take no chances and rewrite it.
58514  # Note: m4 eats our [], so we need to use [ and ] instead.
58515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58516  if test "x$has_forbidden_chars" != x; then
58517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58518    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58519    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58520    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58521      # Going to short mode and back again did indeed matter. Since short mode is
58522      # case insensitive, let's make it lowercase to improve readability.
58523      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58524      # Now convert it back to Unix-style (cygpath)
58525      input_path=`$CYGPATH -u "$shortmode_path"`
58526      new_path="$input_path"
58527    fi
58528  fi
58529
58530  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58531  if test "x$test_cygdrive_prefix" = x; then
58532    # As a simple fix, exclude /usr/bin since it's not a real path.
58533    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58534      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58535      # a path prefixed by /cygdrive for fixpath to work.
58536      new_path="$CYGWIN_ROOT_PATH$input_path"
58537    fi
58538  fi
58539
58540
58541  if test "x$path" != "x$new_path"; then
58542    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58543    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58544$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58545  fi
58546
58547    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58548
58549  path="$POTENTIAL_FREETYPE_LIB_PATH"
58550  has_colon=`$ECHO $path | $GREP ^.:`
58551  new_path="$path"
58552  if test "x$has_colon" = x; then
58553    # Not in mixed or Windows style, start by that.
58554    new_path=`cmd //c echo $path`
58555  fi
58556
58557
58558  input_path="$new_path"
58559  # Check if we need to convert this using DOS-style short mode. If the path
58560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58561  # take no chances and rewrite it.
58562  # Note: m4 eats our [], so we need to use [ and ] instead.
58563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58564  if test "x$has_forbidden_chars" != x; then
58565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58566    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58567  fi
58568
58569
58570  windows_path="$new_path"
58571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58572    unix_path=`$CYGPATH -u "$windows_path"`
58573    new_path="$unix_path"
58574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58576    new_path="$unix_path"
58577  fi
58578
58579  if test "x$path" != "x$new_path"; then
58580    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58581    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58582$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58583  fi
58584
58585  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58586  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58587
58588    else
58589      # We're on a unix platform. Hooray! :)
58590      path="$POTENTIAL_FREETYPE_LIB_PATH"
58591      has_space=`$ECHO "$path" | $GREP " "`
58592      if test "x$has_space" != x; then
58593        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58594$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58595        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58596      fi
58597
58598      # Use eval to expand a potential ~
58599      eval path="$path"
58600      if test ! -f "$path" && test ! -d "$path"; then
58601        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58602      fi
58603
58604      if test -d "$path"; then
58605        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58606      else
58607        dir="`$DIRNAME "$path"`"
58608        base="`$BASENAME "$path"`"
58609        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58610      fi
58611    fi
58612  fi
58613
58614
58615    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58616    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58617$as_echo_n "checking for freetype includes... " >&6; }
58618    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58619$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58620    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58621    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58622$as_echo_n "checking for freetype libraries... " >&6; }
58623    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58624$as_echo "$FREETYPE_LIB_PATH" >&6; }
58625  fi
58626
58627            else
58628
58629  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58630  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58631  METHOD="well-known location"
58632
58633  # Let's start with an optimistic view of the world :-)
58634  FOUND_FREETYPE=yes
58635
58636  # First look for the canonical freetype main include file ft2build.h.
58637  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58638    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58639    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58640    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58641      # Fail.
58642      FOUND_FREETYPE=no
58643    fi
58644  fi
58645
58646  if test "x$FOUND_FREETYPE" = xyes; then
58647    # Include file found, let's continue the sanity check.
58648    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58649$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58650
58651    # Reset to default value
58652    FREETYPE_BASE_NAME=freetype
58653    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58654    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58655      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58656          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58657        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58658        # for the .6 version explicitly.
58659        FREETYPE_BASE_NAME=freetype.6
58660        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58661        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58662$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58663      else
58664        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58665$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58666        FOUND_FREETYPE=no
58667      fi
58668    else
58669      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58670        # On Windows, we will need both .lib and .dll file.
58671        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58672          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58673$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58674          FOUND_FREETYPE=no
58675        fi
58676      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58677          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58678        # Found lib in isa dir, use that instead.
58679        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58680        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58681$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58682      fi
58683    fi
58684  fi
58685
58686  if test "x$FOUND_FREETYPE" = xyes; then
58687
58688  # Only process if variable expands to non-empty
58689
58690  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58691    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58692
58693  # Input might be given as Windows format, start by converting to
58694  # unix format.
58695  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58696  new_path=`$CYGPATH -u "$path"`
58697
58698  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58699  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58700  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58701  # "foo.exe" is OK but "foo" is an error.
58702  #
58703  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58704  # It is also a way to make sure we got the proper file name for the real test later on.
58705  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58706  if test "x$test_shortpath" = x; then
58707    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58708$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58709    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58710  fi
58711
58712  # Call helper function which possibly converts this using DOS-style short mode.
58713  # If so, the updated path is stored in $new_path.
58714
58715  input_path="$new_path"
58716  # Check if we need to convert this using DOS-style short mode. If the path
58717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58718  # take no chances and rewrite it.
58719  # Note: m4 eats our [], so we need to use [ and ] instead.
58720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58721  if test "x$has_forbidden_chars" != x; then
58722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58723    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58724    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58725    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58726      # Going to short mode and back again did indeed matter. Since short mode is
58727      # case insensitive, let's make it lowercase to improve readability.
58728      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58729      # Now convert it back to Unix-style (cygpath)
58730      input_path=`$CYGPATH -u "$shortmode_path"`
58731      new_path="$input_path"
58732    fi
58733  fi
58734
58735  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58736  if test "x$test_cygdrive_prefix" = x; then
58737    # As a simple fix, exclude /usr/bin since it's not a real path.
58738    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58739      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58740      # a path prefixed by /cygdrive for fixpath to work.
58741      new_path="$CYGWIN_ROOT_PATH$input_path"
58742    fi
58743  fi
58744
58745
58746  if test "x$path" != "x$new_path"; then
58747    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58749$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58750  fi
58751
58752    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58753
58754  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58755  has_colon=`$ECHO $path | $GREP ^.:`
58756  new_path="$path"
58757  if test "x$has_colon" = x; then
58758    # Not in mixed or Windows style, start by that.
58759    new_path=`cmd //c echo $path`
58760  fi
58761
58762
58763  input_path="$new_path"
58764  # Check if we need to convert this using DOS-style short mode. If the path
58765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58766  # take no chances and rewrite it.
58767  # Note: m4 eats our [], so we need to use [ and ] instead.
58768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58769  if test "x$has_forbidden_chars" != x; then
58770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58771    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58772  fi
58773
58774
58775  windows_path="$new_path"
58776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58777    unix_path=`$CYGPATH -u "$windows_path"`
58778    new_path="$unix_path"
58779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58781    new_path="$unix_path"
58782  fi
58783
58784  if test "x$path" != "x$new_path"; then
58785    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58787$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58788  fi
58789
58790  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58791  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58792
58793    else
58794      # We're on a unix platform. Hooray! :)
58795      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58796      has_space=`$ECHO "$path" | $GREP " "`
58797      if test "x$has_space" != x; then
58798        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58799$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58800        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58801      fi
58802
58803      # Use eval to expand a potential ~
58804      eval path="$path"
58805      if test ! -f "$path" && test ! -d "$path"; then
58806        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58807      fi
58808
58809      if test -d "$path"; then
58810        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58811      else
58812        dir="`$DIRNAME "$path"`"
58813        base="`$BASENAME "$path"`"
58814        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58815      fi
58816    fi
58817  fi
58818
58819
58820  # Only process if variable expands to non-empty
58821
58822  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58823    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58824
58825  # Input might be given as Windows format, start by converting to
58826  # unix format.
58827  path="$POTENTIAL_FREETYPE_LIB_PATH"
58828  new_path=`$CYGPATH -u "$path"`
58829
58830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58833  # "foo.exe" is OK but "foo" is an error.
58834  #
58835  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58836  # It is also a way to make sure we got the proper file name for the real test later on.
58837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58838  if test "x$test_shortpath" = x; then
58839    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58840$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58841    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58842  fi
58843
58844  # Call helper function which possibly converts this using DOS-style short mode.
58845  # If so, the updated path is stored in $new_path.
58846
58847  input_path="$new_path"
58848  # Check if we need to convert this using DOS-style short mode. If the path
58849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58850  # take no chances and rewrite it.
58851  # Note: m4 eats our [], so we need to use [ and ] instead.
58852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58853  if test "x$has_forbidden_chars" != x; then
58854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58855    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58856    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58857    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58858      # Going to short mode and back again did indeed matter. Since short mode is
58859      # case insensitive, let's make it lowercase to improve readability.
58860      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58861      # Now convert it back to Unix-style (cygpath)
58862      input_path=`$CYGPATH -u "$shortmode_path"`
58863      new_path="$input_path"
58864    fi
58865  fi
58866
58867  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58868  if test "x$test_cygdrive_prefix" = x; then
58869    # As a simple fix, exclude /usr/bin since it's not a real path.
58870    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58871      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58872      # a path prefixed by /cygdrive for fixpath to work.
58873      new_path="$CYGWIN_ROOT_PATH$input_path"
58874    fi
58875  fi
58876
58877
58878  if test "x$path" != "x$new_path"; then
58879    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58881$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58882  fi
58883
58884    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58885
58886  path="$POTENTIAL_FREETYPE_LIB_PATH"
58887  has_colon=`$ECHO $path | $GREP ^.:`
58888  new_path="$path"
58889  if test "x$has_colon" = x; then
58890    # Not in mixed or Windows style, start by that.
58891    new_path=`cmd //c echo $path`
58892  fi
58893
58894
58895  input_path="$new_path"
58896  # Check if we need to convert this using DOS-style short mode. If the path
58897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58898  # take no chances and rewrite it.
58899  # Note: m4 eats our [], so we need to use [ and ] instead.
58900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58901  if test "x$has_forbidden_chars" != x; then
58902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58903    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58904  fi
58905
58906
58907  windows_path="$new_path"
58908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58909    unix_path=`$CYGPATH -u "$windows_path"`
58910    new_path="$unix_path"
58911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58913    new_path="$unix_path"
58914  fi
58915
58916  if test "x$path" != "x$new_path"; then
58917    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58919$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58920  fi
58921
58922  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58923  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58924
58925    else
58926      # We're on a unix platform. Hooray! :)
58927      path="$POTENTIAL_FREETYPE_LIB_PATH"
58928      has_space=`$ECHO "$path" | $GREP " "`
58929      if test "x$has_space" != x; then
58930        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58931$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58932        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58933      fi
58934
58935      # Use eval to expand a potential ~
58936      eval path="$path"
58937      if test ! -f "$path" && test ! -d "$path"; then
58938        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58939      fi
58940
58941      if test -d "$path"; then
58942        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58943      else
58944        dir="`$DIRNAME "$path"`"
58945        base="`$BASENAME "$path"`"
58946        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58947      fi
58948    fi
58949  fi
58950
58951
58952    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58953    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58954$as_echo_n "checking for freetype includes... " >&6; }
58955    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58956$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58957    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58958    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58959$as_echo_n "checking for freetype libraries... " >&6; }
58960    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58961$as_echo "$FREETYPE_LIB_PATH" >&6; }
58962  fi
58963
58964            fi
58965            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
58966                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
58967              # Source is available, as a last resort try to build freetype in default location
58968
58969  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
58970  BUILD_FREETYPE=yes
58971
58972  # Check if the freetype sources are acessible..
58973  if ! test -d $FREETYPE_SRC_PATH; then
58974    { $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
58975$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
58976    BUILD_FREETYPE=no
58977  fi
58978  # ..and contain a vc2010 project file
58979  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
58980  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
58981    { $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
58982$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
58983    BUILD_FREETYPE=no
58984  fi
58985  # Now check if configure found a version of 'msbuild.exe'
58986  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
58987    { $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
58988$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;}
58989    BUILD_FREETYPE=no
58990  fi
58991
58992  # Ready to go..
58993  if test "x$BUILD_FREETYPE" = xyes; then
58994    # msbuild requires trailing slashes for output directories
58995    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
58996    freetype_lib_path_unix="$freetype_lib_path"
58997    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
58998
58999  unix_path="$vcxproj_path"
59000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59001    windows_path=`$CYGPATH -m "$unix_path"`
59002    vcxproj_path="$windows_path"
59003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59004    windows_path=`cmd //c echo $unix_path`
59005    vcxproj_path="$windows_path"
59006  fi
59007
59008
59009  unix_path="$freetype_lib_path"
59010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59011    windows_path=`$CYGPATH -m "$unix_path"`
59012    freetype_lib_path="$windows_path"
59013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59014    windows_path=`cmd //c echo $unix_path`
59015    freetype_lib_path="$windows_path"
59016  fi
59017
59018
59019  unix_path="$freetype_obj_path"
59020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59021    windows_path=`$CYGPATH -m "$unix_path"`
59022    freetype_obj_path="$windows_path"
59023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59024    windows_path=`cmd //c echo $unix_path`
59025    freetype_obj_path="$windows_path"
59026  fi
59027
59028    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59029      freetype_platform=x64
59030    else
59031      freetype_platform=win32
59032    fi
59033
59034    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59035    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59036    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59037    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59038    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59039$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59040
59041    # First we try to build the freetype.dll
59042    $ECHO -e "@echo off\n"\
59043        "$MSBUILD $vcxproj_path "\
59044        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59045        "/p:Configuration=\"Release Multithreaded\" "\
59046        "/p:Platform=$freetype_platform "\
59047        "/p:ConfigurationType=DynamicLibrary "\
59048        "/p:TargetName=freetype "\
59049        "/p:OutDir=\"$freetype_lib_path\" "\
59050        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59051    cmd /c freetype.bat
59052
59053    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59054      # If that succeeds we also build freetype.lib
59055      $ECHO -e "@echo off\n"\
59056          "$MSBUILD $vcxproj_path "\
59057          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59058          "/p:Configuration=\"Release Multithreaded\" "\
59059          "/p:Platform=$freetype_platform "\
59060          "/p:ConfigurationType=StaticLibrary "\
59061          "/p:TargetName=freetype "\
59062          "/p:OutDir=\"$freetype_lib_path\" "\
59063          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59064      cmd /c freetype.bat
59065
59066      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59067        # Once we build both, lib and dll, set freetype lib and include path appropriately
59068        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59069        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59070        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59071$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59072      else
59073        BUILD_FREETYPE=no
59074      fi
59075    else
59076      BUILD_FREETYPE=no
59077    fi
59078  fi
59079
59080              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59081
59082  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59083  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59084  METHOD="well-known location"
59085
59086  # Let's start with an optimistic view of the world :-)
59087  FOUND_FREETYPE=yes
59088
59089  # First look for the canonical freetype main include file ft2build.h.
59090  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59091    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59092    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59093    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59094      # Fail.
59095      FOUND_FREETYPE=no
59096    fi
59097  fi
59098
59099  if test "x$FOUND_FREETYPE" = xyes; then
59100    # Include file found, let's continue the sanity check.
59101    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59102$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59103
59104    # Reset to default value
59105    FREETYPE_BASE_NAME=freetype
59106    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59107    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59108      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59109          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59110        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59111        # for the .6 version explicitly.
59112        FREETYPE_BASE_NAME=freetype.6
59113        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59114        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59115$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59116      else
59117        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59118$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59119        FOUND_FREETYPE=no
59120      fi
59121    else
59122      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59123        # On Windows, we will need both .lib and .dll file.
59124        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59125          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59126$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59127          FOUND_FREETYPE=no
59128        fi
59129      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59130          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59131        # Found lib in isa dir, use that instead.
59132        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59133        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59134$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59135      fi
59136    fi
59137  fi
59138
59139  if test "x$FOUND_FREETYPE" = xyes; then
59140
59141  # Only process if variable expands to non-empty
59142
59143  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59144    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59145
59146  # Input might be given as Windows format, start by converting to
59147  # unix format.
59148  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59149  new_path=`$CYGPATH -u "$path"`
59150
59151  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59152  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59153  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59154  # "foo.exe" is OK but "foo" is an error.
59155  #
59156  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59157  # It is also a way to make sure we got the proper file name for the real test later on.
59158  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59159  if test "x$test_shortpath" = x; then
59160    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59161$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59162    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59163  fi
59164
59165  # Call helper function which possibly converts this using DOS-style short mode.
59166  # If so, the updated path is stored in $new_path.
59167
59168  input_path="$new_path"
59169  # Check if we need to convert this using DOS-style short mode. If the path
59170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59171  # take no chances and rewrite it.
59172  # Note: m4 eats our [], so we need to use [ and ] instead.
59173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59174  if test "x$has_forbidden_chars" != x; then
59175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59176    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59177    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59178    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59179      # Going to short mode and back again did indeed matter. Since short mode is
59180      # case insensitive, let's make it lowercase to improve readability.
59181      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59182      # Now convert it back to Unix-style (cygpath)
59183      input_path=`$CYGPATH -u "$shortmode_path"`
59184      new_path="$input_path"
59185    fi
59186  fi
59187
59188  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59189  if test "x$test_cygdrive_prefix" = x; then
59190    # As a simple fix, exclude /usr/bin since it's not a real path.
59191    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59192      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59193      # a path prefixed by /cygdrive for fixpath to work.
59194      new_path="$CYGWIN_ROOT_PATH$input_path"
59195    fi
59196  fi
59197
59198
59199  if test "x$path" != "x$new_path"; then
59200    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59201    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59202$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59203  fi
59204
59205    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59206
59207  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59208  has_colon=`$ECHO $path | $GREP ^.:`
59209  new_path="$path"
59210  if test "x$has_colon" = x; then
59211    # Not in mixed or Windows style, start by that.
59212    new_path=`cmd //c echo $path`
59213  fi
59214
59215
59216  input_path="$new_path"
59217  # Check if we need to convert this using DOS-style short mode. If the path
59218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59219  # take no chances and rewrite it.
59220  # Note: m4 eats our [], so we need to use [ and ] instead.
59221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59222  if test "x$has_forbidden_chars" != x; then
59223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59224    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59225  fi
59226
59227
59228  windows_path="$new_path"
59229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59230    unix_path=`$CYGPATH -u "$windows_path"`
59231    new_path="$unix_path"
59232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59234    new_path="$unix_path"
59235  fi
59236
59237  if test "x$path" != "x$new_path"; then
59238    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59240$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59241  fi
59242
59243  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59244  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59245
59246    else
59247      # We're on a unix platform. Hooray! :)
59248      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59249      has_space=`$ECHO "$path" | $GREP " "`
59250      if test "x$has_space" != x; then
59251        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59252$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59253        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59254      fi
59255
59256      # Use eval to expand a potential ~
59257      eval path="$path"
59258      if test ! -f "$path" && test ! -d "$path"; then
59259        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59260      fi
59261
59262      if test -d "$path"; then
59263        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59264      else
59265        dir="`$DIRNAME "$path"`"
59266        base="`$BASENAME "$path"`"
59267        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59268      fi
59269    fi
59270  fi
59271
59272
59273  # Only process if variable expands to non-empty
59274
59275  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59276    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59277
59278  # Input might be given as Windows format, start by converting to
59279  # unix format.
59280  path="$POTENTIAL_FREETYPE_LIB_PATH"
59281  new_path=`$CYGPATH -u "$path"`
59282
59283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59286  # "foo.exe" is OK but "foo" is an error.
59287  #
59288  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59289  # It is also a way to make sure we got the proper file name for the real test later on.
59290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59291  if test "x$test_shortpath" = x; then
59292    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59293$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59294    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59295  fi
59296
59297  # Call helper function which possibly converts this using DOS-style short mode.
59298  # If so, the updated path is stored in $new_path.
59299
59300  input_path="$new_path"
59301  # Check if we need to convert this using DOS-style short mode. If the path
59302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59303  # take no chances and rewrite it.
59304  # Note: m4 eats our [], so we need to use [ and ] instead.
59305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59306  if test "x$has_forbidden_chars" != x; then
59307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59311      # Going to short mode and back again did indeed matter. Since short mode is
59312      # case insensitive, let's make it lowercase to improve readability.
59313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59314      # Now convert it back to Unix-style (cygpath)
59315      input_path=`$CYGPATH -u "$shortmode_path"`
59316      new_path="$input_path"
59317    fi
59318  fi
59319
59320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59321  if test "x$test_cygdrive_prefix" = x; then
59322    # As a simple fix, exclude /usr/bin since it's not a real path.
59323    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59325      # a path prefixed by /cygdrive for fixpath to work.
59326      new_path="$CYGWIN_ROOT_PATH$input_path"
59327    fi
59328  fi
59329
59330
59331  if test "x$path" != "x$new_path"; then
59332    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59334$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59335  fi
59336
59337    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59338
59339  path="$POTENTIAL_FREETYPE_LIB_PATH"
59340  has_colon=`$ECHO $path | $GREP ^.:`
59341  new_path="$path"
59342  if test "x$has_colon" = x; then
59343    # Not in mixed or Windows style, start by that.
59344    new_path=`cmd //c echo $path`
59345  fi
59346
59347
59348  input_path="$new_path"
59349  # Check if we need to convert this using DOS-style short mode. If the path
59350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59351  # take no chances and rewrite it.
59352  # Note: m4 eats our [], so we need to use [ and ] instead.
59353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59354  if test "x$has_forbidden_chars" != x; then
59355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59356    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59357  fi
59358
59359
59360  windows_path="$new_path"
59361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59362    unix_path=`$CYGPATH -u "$windows_path"`
59363    new_path="$unix_path"
59364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59366    new_path="$unix_path"
59367  fi
59368
59369  if test "x$path" != "x$new_path"; then
59370    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59372$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59373  fi
59374
59375  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59376  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59377
59378    else
59379      # We're on a unix platform. Hooray! :)
59380      path="$POTENTIAL_FREETYPE_LIB_PATH"
59381      has_space=`$ECHO "$path" | $GREP " "`
59382      if test "x$has_space" != x; then
59383        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59384$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59385        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59386      fi
59387
59388      # Use eval to expand a potential ~
59389      eval path="$path"
59390      if test ! -f "$path" && test ! -d "$path"; then
59391        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59392      fi
59393
59394      if test -d "$path"; then
59395        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59396      else
59397        dir="`$DIRNAME "$path"`"
59398        base="`$BASENAME "$path"`"
59399        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59400      fi
59401    fi
59402  fi
59403
59404
59405    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59406    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59407$as_echo_n "checking for freetype includes... " >&6; }
59408    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59409$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59410    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59411    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59412$as_echo_n "checking for freetype libraries... " >&6; }
59413    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59414$as_echo "$FREETYPE_LIB_PATH" >&6; }
59415  fi
59416
59417              else
59418
59419  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59420  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59421  METHOD="well-known location"
59422
59423  # Let's start with an optimistic view of the world :-)
59424  FOUND_FREETYPE=yes
59425
59426  # First look for the canonical freetype main include file ft2build.h.
59427  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59428    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59429    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59430    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59431      # Fail.
59432      FOUND_FREETYPE=no
59433    fi
59434  fi
59435
59436  if test "x$FOUND_FREETYPE" = xyes; then
59437    # Include file found, let's continue the sanity check.
59438    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59439$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59440
59441    # Reset to default value
59442    FREETYPE_BASE_NAME=freetype
59443    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59444    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59445      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59446          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59447        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59448        # for the .6 version explicitly.
59449        FREETYPE_BASE_NAME=freetype.6
59450        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59451        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59452$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59453      else
59454        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59455$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59456        FOUND_FREETYPE=no
59457      fi
59458    else
59459      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59460        # On Windows, we will need both .lib and .dll file.
59461        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59462          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59463$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59464          FOUND_FREETYPE=no
59465        fi
59466      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59467          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59468        # Found lib in isa dir, use that instead.
59469        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59470        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59471$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59472      fi
59473    fi
59474  fi
59475
59476  if test "x$FOUND_FREETYPE" = xyes; then
59477
59478  # Only process if variable expands to non-empty
59479
59480  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59481    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59482
59483  # Input might be given as Windows format, start by converting to
59484  # unix format.
59485  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59486  new_path=`$CYGPATH -u "$path"`
59487
59488  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59489  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59490  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59491  # "foo.exe" is OK but "foo" is an error.
59492  #
59493  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59494  # It is also a way to make sure we got the proper file name for the real test later on.
59495  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59496  if test "x$test_shortpath" = x; then
59497    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59498$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59499    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59500  fi
59501
59502  # Call helper function which possibly converts this using DOS-style short mode.
59503  # If so, the updated path is stored in $new_path.
59504
59505  input_path="$new_path"
59506  # Check if we need to convert this using DOS-style short mode. If the path
59507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59508  # take no chances and rewrite it.
59509  # Note: m4 eats our [], so we need to use [ and ] instead.
59510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59511  if test "x$has_forbidden_chars" != x; then
59512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59513    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59514    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59515    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59516      # Going to short mode and back again did indeed matter. Since short mode is
59517      # case insensitive, let's make it lowercase to improve readability.
59518      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59519      # Now convert it back to Unix-style (cygpath)
59520      input_path=`$CYGPATH -u "$shortmode_path"`
59521      new_path="$input_path"
59522    fi
59523  fi
59524
59525  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59526  if test "x$test_cygdrive_prefix" = x; then
59527    # As a simple fix, exclude /usr/bin since it's not a real path.
59528    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59529      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59530      # a path prefixed by /cygdrive for fixpath to work.
59531      new_path="$CYGWIN_ROOT_PATH$input_path"
59532    fi
59533  fi
59534
59535
59536  if test "x$path" != "x$new_path"; then
59537    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59539$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59540  fi
59541
59542    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59543
59544  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59545  has_colon=`$ECHO $path | $GREP ^.:`
59546  new_path="$path"
59547  if test "x$has_colon" = x; then
59548    # Not in mixed or Windows style, start by that.
59549    new_path=`cmd //c echo $path`
59550  fi
59551
59552
59553  input_path="$new_path"
59554  # Check if we need to convert this using DOS-style short mode. If the path
59555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59556  # take no chances and rewrite it.
59557  # Note: m4 eats our [], so we need to use [ and ] instead.
59558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59559  if test "x$has_forbidden_chars" != x; then
59560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59561    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59562  fi
59563
59564
59565  windows_path="$new_path"
59566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59567    unix_path=`$CYGPATH -u "$windows_path"`
59568    new_path="$unix_path"
59569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59571    new_path="$unix_path"
59572  fi
59573
59574  if test "x$path" != "x$new_path"; then
59575    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59576    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59577$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59578  fi
59579
59580  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59581  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59582
59583    else
59584      # We're on a unix platform. Hooray! :)
59585      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59586      has_space=`$ECHO "$path" | $GREP " "`
59587      if test "x$has_space" != x; then
59588        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59589$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59590        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59591      fi
59592
59593      # Use eval to expand a potential ~
59594      eval path="$path"
59595      if test ! -f "$path" && test ! -d "$path"; then
59596        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59597      fi
59598
59599      if test -d "$path"; then
59600        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59601      else
59602        dir="`$DIRNAME "$path"`"
59603        base="`$BASENAME "$path"`"
59604        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59605      fi
59606    fi
59607  fi
59608
59609
59610  # Only process if variable expands to non-empty
59611
59612  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59613    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59614
59615  # Input might be given as Windows format, start by converting to
59616  # unix format.
59617  path="$POTENTIAL_FREETYPE_LIB_PATH"
59618  new_path=`$CYGPATH -u "$path"`
59619
59620  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59621  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59622  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59623  # "foo.exe" is OK but "foo" is an error.
59624  #
59625  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59626  # It is also a way to make sure we got the proper file name for the real test later on.
59627  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59628  if test "x$test_shortpath" = x; then
59629    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59630$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59631    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59632  fi
59633
59634  # Call helper function which possibly converts this using DOS-style short mode.
59635  # If so, the updated path is stored in $new_path.
59636
59637  input_path="$new_path"
59638  # Check if we need to convert this using DOS-style short mode. If the path
59639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59640  # take no chances and rewrite it.
59641  # Note: m4 eats our [], so we need to use [ and ] instead.
59642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59643  if test "x$has_forbidden_chars" != x; then
59644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59645    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59646    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59647    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59648      # Going to short mode and back again did indeed matter. Since short mode is
59649      # case insensitive, let's make it lowercase to improve readability.
59650      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59651      # Now convert it back to Unix-style (cygpath)
59652      input_path=`$CYGPATH -u "$shortmode_path"`
59653      new_path="$input_path"
59654    fi
59655  fi
59656
59657  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59658  if test "x$test_cygdrive_prefix" = x; then
59659    # As a simple fix, exclude /usr/bin since it's not a real path.
59660    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59661      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59662      # a path prefixed by /cygdrive for fixpath to work.
59663      new_path="$CYGWIN_ROOT_PATH$input_path"
59664    fi
59665  fi
59666
59667
59668  if test "x$path" != "x$new_path"; then
59669    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59671$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59672  fi
59673
59674    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59675
59676  path="$POTENTIAL_FREETYPE_LIB_PATH"
59677  has_colon=`$ECHO $path | $GREP ^.:`
59678  new_path="$path"
59679  if test "x$has_colon" = x; then
59680    # Not in mixed or Windows style, start by that.
59681    new_path=`cmd //c echo $path`
59682  fi
59683
59684
59685  input_path="$new_path"
59686  # Check if we need to convert this using DOS-style short mode. If the path
59687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59688  # take no chances and rewrite it.
59689  # Note: m4 eats our [], so we need to use [ and ] instead.
59690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59691  if test "x$has_forbidden_chars" != x; then
59692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59694  fi
59695
59696
59697  windows_path="$new_path"
59698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59699    unix_path=`$CYGPATH -u "$windows_path"`
59700    new_path="$unix_path"
59701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59703    new_path="$unix_path"
59704  fi
59705
59706  if test "x$path" != "x$new_path"; then
59707    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59709$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59710  fi
59711
59712  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59713  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59714
59715    else
59716      # We're on a unix platform. Hooray! :)
59717      path="$POTENTIAL_FREETYPE_LIB_PATH"
59718      has_space=`$ECHO "$path" | $GREP " "`
59719      if test "x$has_space" != x; then
59720        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59721$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59722        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59723      fi
59724
59725      # Use eval to expand a potential ~
59726      eval path="$path"
59727      if test ! -f "$path" && test ! -d "$path"; then
59728        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59729      fi
59730
59731      if test -d "$path"; then
59732        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59733      else
59734        dir="`$DIRNAME "$path"`"
59735        base="`$BASENAME "$path"`"
59736        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59737      fi
59738    fi
59739  fi
59740
59741
59742    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59743    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59744$as_echo_n "checking for freetype includes... " >&6; }
59745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59746$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59747    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59748    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59749$as_echo_n "checking for freetype libraries... " >&6; }
59750    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59751$as_echo "$FREETYPE_LIB_PATH" >&6; }
59752  fi
59753
59754              fi
59755            fi
59756          fi
59757        else
59758          FREETYPE_BASE_DIR="$SYSROOT/usr"
59759
59760  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59761  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59762  METHOD="well-known location"
59763
59764  # Let's start with an optimistic view of the world :-)
59765  FOUND_FREETYPE=yes
59766
59767  # First look for the canonical freetype main include file ft2build.h.
59768  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59769    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59770    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59771    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59772      # Fail.
59773      FOUND_FREETYPE=no
59774    fi
59775  fi
59776
59777  if test "x$FOUND_FREETYPE" = xyes; then
59778    # Include file found, let's continue the sanity check.
59779    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59780$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59781
59782    # Reset to default value
59783    FREETYPE_BASE_NAME=freetype
59784    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59785    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59786      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59787          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59788        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59789        # for the .6 version explicitly.
59790        FREETYPE_BASE_NAME=freetype.6
59791        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59792        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59793$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59794      else
59795        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59796$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59797        FOUND_FREETYPE=no
59798      fi
59799    else
59800      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59801        # On Windows, we will need both .lib and .dll file.
59802        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59803          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59804$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59805          FOUND_FREETYPE=no
59806        fi
59807      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59808          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59809        # Found lib in isa dir, use that instead.
59810        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59811        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59812$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59813      fi
59814    fi
59815  fi
59816
59817  if test "x$FOUND_FREETYPE" = xyes; then
59818
59819  # Only process if variable expands to non-empty
59820
59821  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59822    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59823
59824  # Input might be given as Windows format, start by converting to
59825  # unix format.
59826  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59827  new_path=`$CYGPATH -u "$path"`
59828
59829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59832  # "foo.exe" is OK but "foo" is an error.
59833  #
59834  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59835  # It is also a way to make sure we got the proper file name for the real test later on.
59836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59837  if test "x$test_shortpath" = x; then
59838    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59839$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59840    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59841  fi
59842
59843  # Call helper function which possibly converts this using DOS-style short mode.
59844  # If so, the updated path is stored in $new_path.
59845
59846  input_path="$new_path"
59847  # Check if we need to convert this using DOS-style short mode. If the path
59848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59849  # take no chances and rewrite it.
59850  # Note: m4 eats our [], so we need to use [ and ] instead.
59851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59852  if test "x$has_forbidden_chars" != x; then
59853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59857      # Going to short mode and back again did indeed matter. Since short mode is
59858      # case insensitive, let's make it lowercase to improve readability.
59859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59860      # Now convert it back to Unix-style (cygpath)
59861      input_path=`$CYGPATH -u "$shortmode_path"`
59862      new_path="$input_path"
59863    fi
59864  fi
59865
59866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59867  if test "x$test_cygdrive_prefix" = x; then
59868    # As a simple fix, exclude /usr/bin since it's not a real path.
59869    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59871      # a path prefixed by /cygdrive for fixpath to work.
59872      new_path="$CYGWIN_ROOT_PATH$input_path"
59873    fi
59874  fi
59875
59876
59877  if test "x$path" != "x$new_path"; then
59878    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59880$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59881  fi
59882
59883    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59884
59885  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59886  has_colon=`$ECHO $path | $GREP ^.:`
59887  new_path="$path"
59888  if test "x$has_colon" = x; then
59889    # Not in mixed or Windows style, start by that.
59890    new_path=`cmd //c echo $path`
59891  fi
59892
59893
59894  input_path="$new_path"
59895  # Check if we need to convert this using DOS-style short mode. If the path
59896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59897  # take no chances and rewrite it.
59898  # Note: m4 eats our [], so we need to use [ and ] instead.
59899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59900  if test "x$has_forbidden_chars" != x; then
59901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59903  fi
59904
59905
59906  windows_path="$new_path"
59907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59908    unix_path=`$CYGPATH -u "$windows_path"`
59909    new_path="$unix_path"
59910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59912    new_path="$unix_path"
59913  fi
59914
59915  if test "x$path" != "x$new_path"; then
59916    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59918$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59919  fi
59920
59921  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59922  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59923
59924    else
59925      # We're on a unix platform. Hooray! :)
59926      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59927      has_space=`$ECHO "$path" | $GREP " "`
59928      if test "x$has_space" != x; then
59929        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59930$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59931        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59932      fi
59933
59934      # Use eval to expand a potential ~
59935      eval path="$path"
59936      if test ! -f "$path" && test ! -d "$path"; then
59937        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59938      fi
59939
59940      if test -d "$path"; then
59941        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59942      else
59943        dir="`$DIRNAME "$path"`"
59944        base="`$BASENAME "$path"`"
59945        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59946      fi
59947    fi
59948  fi
59949
59950
59951  # Only process if variable expands to non-empty
59952
59953  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59954    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59955
59956  # Input might be given as Windows format, start by converting to
59957  # unix format.
59958  path="$POTENTIAL_FREETYPE_LIB_PATH"
59959  new_path=`$CYGPATH -u "$path"`
59960
59961  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59962  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59963  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59964  # "foo.exe" is OK but "foo" is an error.
59965  #
59966  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59967  # It is also a way to make sure we got the proper file name for the real test later on.
59968  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59969  if test "x$test_shortpath" = x; then
59970    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59971$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59972    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59973  fi
59974
59975  # Call helper function which possibly converts this using DOS-style short mode.
59976  # If so, the updated path is stored in $new_path.
59977
59978  input_path="$new_path"
59979  # Check if we need to convert this using DOS-style short mode. If the path
59980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59981  # take no chances and rewrite it.
59982  # Note: m4 eats our [], so we need to use [ and ] instead.
59983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59984  if test "x$has_forbidden_chars" != x; then
59985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59986    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59987    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59988    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59989      # Going to short mode and back again did indeed matter. Since short mode is
59990      # case insensitive, let's make it lowercase to improve readability.
59991      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59992      # Now convert it back to Unix-style (cygpath)
59993      input_path=`$CYGPATH -u "$shortmode_path"`
59994      new_path="$input_path"
59995    fi
59996  fi
59997
59998  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59999  if test "x$test_cygdrive_prefix" = x; then
60000    # As a simple fix, exclude /usr/bin since it's not a real path.
60001    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60002      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60003      # a path prefixed by /cygdrive for fixpath to work.
60004      new_path="$CYGWIN_ROOT_PATH$input_path"
60005    fi
60006  fi
60007
60008
60009  if test "x$path" != "x$new_path"; then
60010    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60012$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60013  fi
60014
60015    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60016
60017  path="$POTENTIAL_FREETYPE_LIB_PATH"
60018  has_colon=`$ECHO $path | $GREP ^.:`
60019  new_path="$path"
60020  if test "x$has_colon" = x; then
60021    # Not in mixed or Windows style, start by that.
60022    new_path=`cmd //c echo $path`
60023  fi
60024
60025
60026  input_path="$new_path"
60027  # Check if we need to convert this using DOS-style short mode. If the path
60028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60029  # take no chances and rewrite it.
60030  # Note: m4 eats our [], so we need to use [ and ] instead.
60031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60032  if test "x$has_forbidden_chars" != x; then
60033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60034    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60035  fi
60036
60037
60038  windows_path="$new_path"
60039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60040    unix_path=`$CYGPATH -u "$windows_path"`
60041    new_path="$unix_path"
60042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60044    new_path="$unix_path"
60045  fi
60046
60047  if test "x$path" != "x$new_path"; then
60048    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60049    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60050$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60051  fi
60052
60053  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60054  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60055
60056    else
60057      # We're on a unix platform. Hooray! :)
60058      path="$POTENTIAL_FREETYPE_LIB_PATH"
60059      has_space=`$ECHO "$path" | $GREP " "`
60060      if test "x$has_space" != x; then
60061        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60062$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60063        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60064      fi
60065
60066      # Use eval to expand a potential ~
60067      eval path="$path"
60068      if test ! -f "$path" && test ! -d "$path"; then
60069        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60070      fi
60071
60072      if test -d "$path"; then
60073        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60074      else
60075        dir="`$DIRNAME "$path"`"
60076        base="`$BASENAME "$path"`"
60077        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60078      fi
60079    fi
60080  fi
60081
60082
60083    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60084    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60085$as_echo_n "checking for freetype includes... " >&6; }
60086    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60087$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60088    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60090$as_echo_n "checking for freetype libraries... " >&6; }
60091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60092$as_echo "$FREETYPE_LIB_PATH" >&6; }
60093  fi
60094
60095
60096          if test "x$FOUND_FREETYPE" != xyes; then
60097            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60098
60099  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60100  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60101  METHOD="well-known location"
60102
60103  # Let's start with an optimistic view of the world :-)
60104  FOUND_FREETYPE=yes
60105
60106  # First look for the canonical freetype main include file ft2build.h.
60107  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60108    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60109    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60110    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60111      # Fail.
60112      FOUND_FREETYPE=no
60113    fi
60114  fi
60115
60116  if test "x$FOUND_FREETYPE" = xyes; then
60117    # Include file found, let's continue the sanity check.
60118    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60119$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60120
60121    # Reset to default value
60122    FREETYPE_BASE_NAME=freetype
60123    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60124    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60125      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60126          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60127        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60128        # for the .6 version explicitly.
60129        FREETYPE_BASE_NAME=freetype.6
60130        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60131        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60132$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60133      else
60134        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60135$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60136        FOUND_FREETYPE=no
60137      fi
60138    else
60139      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60140        # On Windows, we will need both .lib and .dll file.
60141        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60142          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60143$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60144          FOUND_FREETYPE=no
60145        fi
60146      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60147          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60148        # Found lib in isa dir, use that instead.
60149        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60150        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60151$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60152      fi
60153    fi
60154  fi
60155
60156  if test "x$FOUND_FREETYPE" = xyes; then
60157
60158  # Only process if variable expands to non-empty
60159
60160  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60161    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60162
60163  # Input might be given as Windows format, start by converting to
60164  # unix format.
60165  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60166  new_path=`$CYGPATH -u "$path"`
60167
60168  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60169  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60170  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60171  # "foo.exe" is OK but "foo" is an error.
60172  #
60173  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60174  # It is also a way to make sure we got the proper file name for the real test later on.
60175  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60176  if test "x$test_shortpath" = x; then
60177    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60178$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60179    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60180  fi
60181
60182  # Call helper function which possibly converts this using DOS-style short mode.
60183  # If so, the updated path is stored in $new_path.
60184
60185  input_path="$new_path"
60186  # Check if we need to convert this using DOS-style short mode. If the path
60187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60188  # take no chances and rewrite it.
60189  # Note: m4 eats our [], so we need to use [ and ] instead.
60190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60191  if test "x$has_forbidden_chars" != x; then
60192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60193    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60194    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60195    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60196      # Going to short mode and back again did indeed matter. Since short mode is
60197      # case insensitive, let's make it lowercase to improve readability.
60198      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60199      # Now convert it back to Unix-style (cygpath)
60200      input_path=`$CYGPATH -u "$shortmode_path"`
60201      new_path="$input_path"
60202    fi
60203  fi
60204
60205  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60206  if test "x$test_cygdrive_prefix" = x; then
60207    # As a simple fix, exclude /usr/bin since it's not a real path.
60208    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60209      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60210      # a path prefixed by /cygdrive for fixpath to work.
60211      new_path="$CYGWIN_ROOT_PATH$input_path"
60212    fi
60213  fi
60214
60215
60216  if test "x$path" != "x$new_path"; then
60217    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60219$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60220  fi
60221
60222    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60223
60224  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60225  has_colon=`$ECHO $path | $GREP ^.:`
60226  new_path="$path"
60227  if test "x$has_colon" = x; then
60228    # Not in mixed or Windows style, start by that.
60229    new_path=`cmd //c echo $path`
60230  fi
60231
60232
60233  input_path="$new_path"
60234  # Check if we need to convert this using DOS-style short mode. If the path
60235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60236  # take no chances and rewrite it.
60237  # Note: m4 eats our [], so we need to use [ and ] instead.
60238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60239  if test "x$has_forbidden_chars" != x; then
60240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60242  fi
60243
60244
60245  windows_path="$new_path"
60246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60247    unix_path=`$CYGPATH -u "$windows_path"`
60248    new_path="$unix_path"
60249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60251    new_path="$unix_path"
60252  fi
60253
60254  if test "x$path" != "x$new_path"; then
60255    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60257$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60258  fi
60259
60260  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60261  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60262
60263    else
60264      # We're on a unix platform. Hooray! :)
60265      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60266      has_space=`$ECHO "$path" | $GREP " "`
60267      if test "x$has_space" != x; then
60268        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60269$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60270        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60271      fi
60272
60273      # Use eval to expand a potential ~
60274      eval path="$path"
60275      if test ! -f "$path" && test ! -d "$path"; then
60276        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60277      fi
60278
60279      if test -d "$path"; then
60280        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60281      else
60282        dir="`$DIRNAME "$path"`"
60283        base="`$BASENAME "$path"`"
60284        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60285      fi
60286    fi
60287  fi
60288
60289
60290  # Only process if variable expands to non-empty
60291
60292  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60293    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60294
60295  # Input might be given as Windows format, start by converting to
60296  # unix format.
60297  path="$POTENTIAL_FREETYPE_LIB_PATH"
60298  new_path=`$CYGPATH -u "$path"`
60299
60300  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60301  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60302  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60303  # "foo.exe" is OK but "foo" is an error.
60304  #
60305  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60306  # It is also a way to make sure we got the proper file name for the real test later on.
60307  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60308  if test "x$test_shortpath" = x; then
60309    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60310$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60311    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60312  fi
60313
60314  # Call helper function which possibly converts this using DOS-style short mode.
60315  # If so, the updated path is stored in $new_path.
60316
60317  input_path="$new_path"
60318  # Check if we need to convert this using DOS-style short mode. If the path
60319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60320  # take no chances and rewrite it.
60321  # Note: m4 eats our [], so we need to use [ and ] instead.
60322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60323  if test "x$has_forbidden_chars" != x; then
60324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60328      # Going to short mode and back again did indeed matter. Since short mode is
60329      # case insensitive, let's make it lowercase to improve readability.
60330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60331      # Now convert it back to Unix-style (cygpath)
60332      input_path=`$CYGPATH -u "$shortmode_path"`
60333      new_path="$input_path"
60334    fi
60335  fi
60336
60337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60338  if test "x$test_cygdrive_prefix" = x; then
60339    # As a simple fix, exclude /usr/bin since it's not a real path.
60340    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60342      # a path prefixed by /cygdrive for fixpath to work.
60343      new_path="$CYGWIN_ROOT_PATH$input_path"
60344    fi
60345  fi
60346
60347
60348  if test "x$path" != "x$new_path"; then
60349    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60351$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60352  fi
60353
60354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60355
60356  path="$POTENTIAL_FREETYPE_LIB_PATH"
60357  has_colon=`$ECHO $path | $GREP ^.:`
60358  new_path="$path"
60359  if test "x$has_colon" = x; then
60360    # Not in mixed or Windows style, start by that.
60361    new_path=`cmd //c echo $path`
60362  fi
60363
60364
60365  input_path="$new_path"
60366  # Check if we need to convert this using DOS-style short mode. If the path
60367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60368  # take no chances and rewrite it.
60369  # Note: m4 eats our [], so we need to use [ and ] instead.
60370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60371  if test "x$has_forbidden_chars" != x; then
60372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60373    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60374  fi
60375
60376
60377  windows_path="$new_path"
60378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60379    unix_path=`$CYGPATH -u "$windows_path"`
60380    new_path="$unix_path"
60381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60383    new_path="$unix_path"
60384  fi
60385
60386  if test "x$path" != "x$new_path"; then
60387    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60389$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60390  fi
60391
60392  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60393  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60394
60395    else
60396      # We're on a unix platform. Hooray! :)
60397      path="$POTENTIAL_FREETYPE_LIB_PATH"
60398      has_space=`$ECHO "$path" | $GREP " "`
60399      if test "x$has_space" != x; then
60400        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60401$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60402        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60403      fi
60404
60405      # Use eval to expand a potential ~
60406      eval path="$path"
60407      if test ! -f "$path" && test ! -d "$path"; then
60408        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60409      fi
60410
60411      if test -d "$path"; then
60412        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60413      else
60414        dir="`$DIRNAME "$path"`"
60415        base="`$BASENAME "$path"`"
60416        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60417      fi
60418    fi
60419  fi
60420
60421
60422    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60423    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60424$as_echo_n "checking for freetype includes... " >&6; }
60425    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60426$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60427    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60428    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60429$as_echo_n "checking for freetype libraries... " >&6; }
60430    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60431$as_echo "$FREETYPE_LIB_PATH" >&6; }
60432  fi
60433
60434          fi
60435
60436          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60437            if test "x$FOUND_FREETYPE" != xyes; then
60438              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60439              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60440
60441  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60442  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60443  METHOD="well-known location"
60444
60445  # Let's start with an optimistic view of the world :-)
60446  FOUND_FREETYPE=yes
60447
60448  # First look for the canonical freetype main include file ft2build.h.
60449  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60450    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60451    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60452    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60453      # Fail.
60454      FOUND_FREETYPE=no
60455    fi
60456  fi
60457
60458  if test "x$FOUND_FREETYPE" = xyes; then
60459    # Include file found, let's continue the sanity check.
60460    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60461$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60462
60463    # Reset to default value
60464    FREETYPE_BASE_NAME=freetype
60465    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60466    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60467      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60468          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60469        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60470        # for the .6 version explicitly.
60471        FREETYPE_BASE_NAME=freetype.6
60472        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60473        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60474$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60475      else
60476        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60477$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60478        FOUND_FREETYPE=no
60479      fi
60480    else
60481      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60482        # On Windows, we will need both .lib and .dll file.
60483        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60484          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60485$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60486          FOUND_FREETYPE=no
60487        fi
60488      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60489          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60490        # Found lib in isa dir, use that instead.
60491        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60492        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60493$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60494      fi
60495    fi
60496  fi
60497
60498  if test "x$FOUND_FREETYPE" = xyes; then
60499
60500  # Only process if variable expands to non-empty
60501
60502  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60503    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60504
60505  # Input might be given as Windows format, start by converting to
60506  # unix format.
60507  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60508  new_path=`$CYGPATH -u "$path"`
60509
60510  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60511  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60512  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60513  # "foo.exe" is OK but "foo" is an error.
60514  #
60515  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60516  # It is also a way to make sure we got the proper file name for the real test later on.
60517  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60518  if test "x$test_shortpath" = x; then
60519    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60520$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60521    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60522  fi
60523
60524  # Call helper function which possibly converts this using DOS-style short mode.
60525  # If so, the updated path is stored in $new_path.
60526
60527  input_path="$new_path"
60528  # Check if we need to convert this using DOS-style short mode. If the path
60529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60530  # take no chances and rewrite it.
60531  # Note: m4 eats our [], so we need to use [ and ] instead.
60532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60533  if test "x$has_forbidden_chars" != x; then
60534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60535    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60536    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60537    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60538      # Going to short mode and back again did indeed matter. Since short mode is
60539      # case insensitive, let's make it lowercase to improve readability.
60540      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60541      # Now convert it back to Unix-style (cygpath)
60542      input_path=`$CYGPATH -u "$shortmode_path"`
60543      new_path="$input_path"
60544    fi
60545  fi
60546
60547  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60548  if test "x$test_cygdrive_prefix" = x; then
60549    # As a simple fix, exclude /usr/bin since it's not a real path.
60550    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60551      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60552      # a path prefixed by /cygdrive for fixpath to work.
60553      new_path="$CYGWIN_ROOT_PATH$input_path"
60554    fi
60555  fi
60556
60557
60558  if test "x$path" != "x$new_path"; then
60559    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60560    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60561$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60562  fi
60563
60564    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60565
60566  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60567  has_colon=`$ECHO $path | $GREP ^.:`
60568  new_path="$path"
60569  if test "x$has_colon" = x; then
60570    # Not in mixed or Windows style, start by that.
60571    new_path=`cmd //c echo $path`
60572  fi
60573
60574
60575  input_path="$new_path"
60576  # Check if we need to convert this using DOS-style short mode. If the path
60577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60578  # take no chances and rewrite it.
60579  # Note: m4 eats our [], so we need to use [ and ] instead.
60580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60581  if test "x$has_forbidden_chars" != x; then
60582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60583    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60584  fi
60585
60586
60587  windows_path="$new_path"
60588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60589    unix_path=`$CYGPATH -u "$windows_path"`
60590    new_path="$unix_path"
60591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60593    new_path="$unix_path"
60594  fi
60595
60596  if test "x$path" != "x$new_path"; then
60597    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60599$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60600  fi
60601
60602  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60603  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60604
60605    else
60606      # We're on a unix platform. Hooray! :)
60607      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60608      has_space=`$ECHO "$path" | $GREP " "`
60609      if test "x$has_space" != x; then
60610        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60611$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60612        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60613      fi
60614
60615      # Use eval to expand a potential ~
60616      eval path="$path"
60617      if test ! -f "$path" && test ! -d "$path"; then
60618        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60619      fi
60620
60621      if test -d "$path"; then
60622        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60623      else
60624        dir="`$DIRNAME "$path"`"
60625        base="`$BASENAME "$path"`"
60626        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60627      fi
60628    fi
60629  fi
60630
60631
60632  # Only process if variable expands to non-empty
60633
60634  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60635    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60636
60637  # Input might be given as Windows format, start by converting to
60638  # unix format.
60639  path="$POTENTIAL_FREETYPE_LIB_PATH"
60640  new_path=`$CYGPATH -u "$path"`
60641
60642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60645  # "foo.exe" is OK but "foo" is an error.
60646  #
60647  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60648  # It is also a way to make sure we got the proper file name for the real test later on.
60649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60650  if test "x$test_shortpath" = x; then
60651    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60652$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60653    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60654  fi
60655
60656  # Call helper function which possibly converts this using DOS-style short mode.
60657  # If so, the updated path is stored in $new_path.
60658
60659  input_path="$new_path"
60660  # Check if we need to convert this using DOS-style short mode. If the path
60661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60662  # take no chances and rewrite it.
60663  # Note: m4 eats our [], so we need to use [ and ] instead.
60664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60665  if test "x$has_forbidden_chars" != x; then
60666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60670      # Going to short mode and back again did indeed matter. Since short mode is
60671      # case insensitive, let's make it lowercase to improve readability.
60672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60673      # Now convert it back to Unix-style (cygpath)
60674      input_path=`$CYGPATH -u "$shortmode_path"`
60675      new_path="$input_path"
60676    fi
60677  fi
60678
60679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60680  if test "x$test_cygdrive_prefix" = x; then
60681    # As a simple fix, exclude /usr/bin since it's not a real path.
60682    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60684      # a path prefixed by /cygdrive for fixpath to work.
60685      new_path="$CYGWIN_ROOT_PATH$input_path"
60686    fi
60687  fi
60688
60689
60690  if test "x$path" != "x$new_path"; then
60691    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60693$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60694  fi
60695
60696    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60697
60698  path="$POTENTIAL_FREETYPE_LIB_PATH"
60699  has_colon=`$ECHO $path | $GREP ^.:`
60700  new_path="$path"
60701  if test "x$has_colon" = x; then
60702    # Not in mixed or Windows style, start by that.
60703    new_path=`cmd //c echo $path`
60704  fi
60705
60706
60707  input_path="$new_path"
60708  # Check if we need to convert this using DOS-style short mode. If the path
60709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60710  # take no chances and rewrite it.
60711  # Note: m4 eats our [], so we need to use [ and ] instead.
60712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60713  if test "x$has_forbidden_chars" != x; then
60714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60716  fi
60717
60718
60719  windows_path="$new_path"
60720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60721    unix_path=`$CYGPATH -u "$windows_path"`
60722    new_path="$unix_path"
60723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60725    new_path="$unix_path"
60726  fi
60727
60728  if test "x$path" != "x$new_path"; then
60729    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60731$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60732  fi
60733
60734  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60735  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60736
60737    else
60738      # We're on a unix platform. Hooray! :)
60739      path="$POTENTIAL_FREETYPE_LIB_PATH"
60740      has_space=`$ECHO "$path" | $GREP " "`
60741      if test "x$has_space" != x; then
60742        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60743$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60744        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60745      fi
60746
60747      # Use eval to expand a potential ~
60748      eval path="$path"
60749      if test ! -f "$path" && test ! -d "$path"; then
60750        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60751      fi
60752
60753      if test -d "$path"; then
60754        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60755      else
60756        dir="`$DIRNAME "$path"`"
60757        base="`$BASENAME "$path"`"
60758        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60759      fi
60760    fi
60761  fi
60762
60763
60764    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60765    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60766$as_echo_n "checking for freetype includes... " >&6; }
60767    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60768$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60769    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60770    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60771$as_echo_n "checking for freetype libraries... " >&6; }
60772    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60773$as_echo "$FREETYPE_LIB_PATH" >&6; }
60774  fi
60775
60776            fi
60777          fi
60778
60779          if test "x$FOUND_FREETYPE" != xyes; then
60780            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
60781
60782  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60783  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60784  METHOD="well-known location"
60785
60786  # Let's start with an optimistic view of the world :-)
60787  FOUND_FREETYPE=yes
60788
60789  # First look for the canonical freetype main include file ft2build.h.
60790  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60791    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60792    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60793    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60794      # Fail.
60795      FOUND_FREETYPE=no
60796    fi
60797  fi
60798
60799  if test "x$FOUND_FREETYPE" = xyes; then
60800    # Include file found, let's continue the sanity check.
60801    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60802$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60803
60804    # Reset to default value
60805    FREETYPE_BASE_NAME=freetype
60806    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60807    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60808      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60809          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60810        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60811        # for the .6 version explicitly.
60812        FREETYPE_BASE_NAME=freetype.6
60813        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60814        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60815$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60816      else
60817        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60818$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60819        FOUND_FREETYPE=no
60820      fi
60821    else
60822      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60823        # On Windows, we will need both .lib and .dll file.
60824        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60825          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60826$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60827          FOUND_FREETYPE=no
60828        fi
60829      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60830          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60831        # Found lib in isa dir, use that instead.
60832        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60833        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60834$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60835      fi
60836    fi
60837  fi
60838
60839  if test "x$FOUND_FREETYPE" = xyes; then
60840
60841  # Only process if variable expands to non-empty
60842
60843  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60844    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60845
60846  # Input might be given as Windows format, start by converting to
60847  # unix format.
60848  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60849  new_path=`$CYGPATH -u "$path"`
60850
60851  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60852  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60853  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60854  # "foo.exe" is OK but "foo" is an error.
60855  #
60856  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60857  # It is also a way to make sure we got the proper file name for the real test later on.
60858  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60859  if test "x$test_shortpath" = x; then
60860    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60861$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60862    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60863  fi
60864
60865  # Call helper function which possibly converts this using DOS-style short mode.
60866  # If so, the updated path is stored in $new_path.
60867
60868  input_path="$new_path"
60869  # Check if we need to convert this using DOS-style short mode. If the path
60870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60871  # take no chances and rewrite it.
60872  # Note: m4 eats our [], so we need to use [ and ] instead.
60873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60874  if test "x$has_forbidden_chars" != x; then
60875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60876    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60877    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60878    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60879      # Going to short mode and back again did indeed matter. Since short mode is
60880      # case insensitive, let's make it lowercase to improve readability.
60881      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60882      # Now convert it back to Unix-style (cygpath)
60883      input_path=`$CYGPATH -u "$shortmode_path"`
60884      new_path="$input_path"
60885    fi
60886  fi
60887
60888  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60889  if test "x$test_cygdrive_prefix" = x; then
60890    # As a simple fix, exclude /usr/bin since it's not a real path.
60891    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60892      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60893      # a path prefixed by /cygdrive for fixpath to work.
60894      new_path="$CYGWIN_ROOT_PATH$input_path"
60895    fi
60896  fi
60897
60898
60899  if test "x$path" != "x$new_path"; then
60900    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60902$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60903  fi
60904
60905    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60906
60907  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60908  has_colon=`$ECHO $path | $GREP ^.:`
60909  new_path="$path"
60910  if test "x$has_colon" = x; then
60911    # Not in mixed or Windows style, start by that.
60912    new_path=`cmd //c echo $path`
60913  fi
60914
60915
60916  input_path="$new_path"
60917  # Check if we need to convert this using DOS-style short mode. If the path
60918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60919  # take no chances and rewrite it.
60920  # Note: m4 eats our [], so we need to use [ and ] instead.
60921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60922  if test "x$has_forbidden_chars" != x; then
60923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60924    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60925  fi
60926
60927
60928  windows_path="$new_path"
60929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60930    unix_path=`$CYGPATH -u "$windows_path"`
60931    new_path="$unix_path"
60932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60934    new_path="$unix_path"
60935  fi
60936
60937  if test "x$path" != "x$new_path"; then
60938    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60939    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60940$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60941  fi
60942
60943  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60944  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60945
60946    else
60947      # We're on a unix platform. Hooray! :)
60948      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60949      has_space=`$ECHO "$path" | $GREP " "`
60950      if test "x$has_space" != x; then
60951        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60952$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60953        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60954      fi
60955
60956      # Use eval to expand a potential ~
60957      eval path="$path"
60958      if test ! -f "$path" && test ! -d "$path"; then
60959        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60960      fi
60961
60962      if test -d "$path"; then
60963        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60964      else
60965        dir="`$DIRNAME "$path"`"
60966        base="`$BASENAME "$path"`"
60967        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60968      fi
60969    fi
60970  fi
60971
60972
60973  # Only process if variable expands to non-empty
60974
60975  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60976    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60977
60978  # Input might be given as Windows format, start by converting to
60979  # unix format.
60980  path="$POTENTIAL_FREETYPE_LIB_PATH"
60981  new_path=`$CYGPATH -u "$path"`
60982
60983  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60984  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60985  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60986  # "foo.exe" is OK but "foo" is an error.
60987  #
60988  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60989  # It is also a way to make sure we got the proper file name for the real test later on.
60990  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60991  if test "x$test_shortpath" = x; then
60992    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60993$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60994    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60995  fi
60996
60997  # Call helper function which possibly converts this using DOS-style short mode.
60998  # If so, the updated path is stored in $new_path.
60999
61000  input_path="$new_path"
61001  # Check if we need to convert this using DOS-style short mode. If the path
61002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61003  # take no chances and rewrite it.
61004  # Note: m4 eats our [], so we need to use [ and ] instead.
61005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61006  if test "x$has_forbidden_chars" != x; then
61007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61008    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61009    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61010    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61011      # Going to short mode and back again did indeed matter. Since short mode is
61012      # case insensitive, let's make it lowercase to improve readability.
61013      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61014      # Now convert it back to Unix-style (cygpath)
61015      input_path=`$CYGPATH -u "$shortmode_path"`
61016      new_path="$input_path"
61017    fi
61018  fi
61019
61020  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61021  if test "x$test_cygdrive_prefix" = x; then
61022    # As a simple fix, exclude /usr/bin since it's not a real path.
61023    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61024      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61025      # a path prefixed by /cygdrive for fixpath to work.
61026      new_path="$CYGWIN_ROOT_PATH$input_path"
61027    fi
61028  fi
61029
61030
61031  if test "x$path" != "x$new_path"; then
61032    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61034$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61035  fi
61036
61037    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61038
61039  path="$POTENTIAL_FREETYPE_LIB_PATH"
61040  has_colon=`$ECHO $path | $GREP ^.:`
61041  new_path="$path"
61042  if test "x$has_colon" = x; then
61043    # Not in mixed or Windows style, start by that.
61044    new_path=`cmd //c echo $path`
61045  fi
61046
61047
61048  input_path="$new_path"
61049  # Check if we need to convert this using DOS-style short mode. If the path
61050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61051  # take no chances and rewrite it.
61052  # Note: m4 eats our [], so we need to use [ and ] instead.
61053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61054  if test "x$has_forbidden_chars" != x; then
61055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61056    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61057  fi
61058
61059
61060  windows_path="$new_path"
61061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61062    unix_path=`$CYGPATH -u "$windows_path"`
61063    new_path="$unix_path"
61064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61066    new_path="$unix_path"
61067  fi
61068
61069  if test "x$path" != "x$new_path"; then
61070    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61072$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61073  fi
61074
61075  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61076  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61077
61078    else
61079      # We're on a unix platform. Hooray! :)
61080      path="$POTENTIAL_FREETYPE_LIB_PATH"
61081      has_space=`$ECHO "$path" | $GREP " "`
61082      if test "x$has_space" != x; then
61083        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61084$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61085        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61086      fi
61087
61088      # Use eval to expand a potential ~
61089      eval path="$path"
61090      if test ! -f "$path" && test ! -d "$path"; then
61091        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61092      fi
61093
61094      if test -d "$path"; then
61095        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61096      else
61097        dir="`$DIRNAME "$path"`"
61098        base="`$BASENAME "$path"`"
61099        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61100      fi
61101    fi
61102  fi
61103
61104
61105    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61106    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61107$as_echo_n "checking for freetype includes... " >&6; }
61108    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61109$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61110    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61111    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61112$as_echo_n "checking for freetype libraries... " >&6; }
61113    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61114$as_echo "$FREETYPE_LIB_PATH" >&6; }
61115  fi
61116
61117          fi
61118
61119          if test "x$FOUND_FREETYPE" != xyes; then
61120            FREETYPE_BASE_DIR="$SYSROOT/usr"
61121            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61122
61123  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61124  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61125  METHOD="well-known location"
61126
61127  # Let's start with an optimistic view of the world :-)
61128  FOUND_FREETYPE=yes
61129
61130  # First look for the canonical freetype main include file ft2build.h.
61131  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61132    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61133    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61134    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61135      # Fail.
61136      FOUND_FREETYPE=no
61137    fi
61138  fi
61139
61140  if test "x$FOUND_FREETYPE" = xyes; then
61141    # Include file found, let's continue the sanity check.
61142    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61143$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61144
61145    # Reset to default value
61146    FREETYPE_BASE_NAME=freetype
61147    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61148    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61149      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61150          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61151        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61152        # for the .6 version explicitly.
61153        FREETYPE_BASE_NAME=freetype.6
61154        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61155        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61156$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61157      else
61158        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61159$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61160        FOUND_FREETYPE=no
61161      fi
61162    else
61163      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61164        # On Windows, we will need both .lib and .dll file.
61165        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61166          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61167$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61168          FOUND_FREETYPE=no
61169        fi
61170      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61171          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61172        # Found lib in isa dir, use that instead.
61173        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61174        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61175$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61176      fi
61177    fi
61178  fi
61179
61180  if test "x$FOUND_FREETYPE" = xyes; then
61181
61182  # Only process if variable expands to non-empty
61183
61184  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61185    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61186
61187  # Input might be given as Windows format, start by converting to
61188  # unix format.
61189  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61190  new_path=`$CYGPATH -u "$path"`
61191
61192  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61193  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61194  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61195  # "foo.exe" is OK but "foo" is an error.
61196  #
61197  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61198  # It is also a way to make sure we got the proper file name for the real test later on.
61199  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61200  if test "x$test_shortpath" = x; then
61201    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61202$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61203    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61204  fi
61205
61206  # Call helper function which possibly converts this using DOS-style short mode.
61207  # If so, the updated path is stored in $new_path.
61208
61209  input_path="$new_path"
61210  # Check if we need to convert this using DOS-style short mode. If the path
61211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61212  # take no chances and rewrite it.
61213  # Note: m4 eats our [], so we need to use [ and ] instead.
61214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61215  if test "x$has_forbidden_chars" != x; then
61216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61217    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61218    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61219    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61220      # Going to short mode and back again did indeed matter. Since short mode is
61221      # case insensitive, let's make it lowercase to improve readability.
61222      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61223      # Now convert it back to Unix-style (cygpath)
61224      input_path=`$CYGPATH -u "$shortmode_path"`
61225      new_path="$input_path"
61226    fi
61227  fi
61228
61229  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61230  if test "x$test_cygdrive_prefix" = x; then
61231    # As a simple fix, exclude /usr/bin since it's not a real path.
61232    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61233      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61234      # a path prefixed by /cygdrive for fixpath to work.
61235      new_path="$CYGWIN_ROOT_PATH$input_path"
61236    fi
61237  fi
61238
61239
61240  if test "x$path" != "x$new_path"; then
61241    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61243$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61244  fi
61245
61246    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61247
61248  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61249  has_colon=`$ECHO $path | $GREP ^.:`
61250  new_path="$path"
61251  if test "x$has_colon" = x; then
61252    # Not in mixed or Windows style, start by that.
61253    new_path=`cmd //c echo $path`
61254  fi
61255
61256
61257  input_path="$new_path"
61258  # Check if we need to convert this using DOS-style short mode. If the path
61259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61260  # take no chances and rewrite it.
61261  # Note: m4 eats our [], so we need to use [ and ] instead.
61262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61263  if test "x$has_forbidden_chars" != x; then
61264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61265    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61266  fi
61267
61268
61269  windows_path="$new_path"
61270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61271    unix_path=`$CYGPATH -u "$windows_path"`
61272    new_path="$unix_path"
61273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61275    new_path="$unix_path"
61276  fi
61277
61278  if test "x$path" != "x$new_path"; then
61279    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61281$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61282  fi
61283
61284  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61285  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61286
61287    else
61288      # We're on a unix platform. Hooray! :)
61289      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61290      has_space=`$ECHO "$path" | $GREP " "`
61291      if test "x$has_space" != x; then
61292        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61293$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61294        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61295      fi
61296
61297      # Use eval to expand a potential ~
61298      eval path="$path"
61299      if test ! -f "$path" && test ! -d "$path"; then
61300        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61301      fi
61302
61303      if test -d "$path"; then
61304        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61305      else
61306        dir="`$DIRNAME "$path"`"
61307        base="`$BASENAME "$path"`"
61308        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61309      fi
61310    fi
61311  fi
61312
61313
61314  # Only process if variable expands to non-empty
61315
61316  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61317    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61318
61319  # Input might be given as Windows format, start by converting to
61320  # unix format.
61321  path="$POTENTIAL_FREETYPE_LIB_PATH"
61322  new_path=`$CYGPATH -u "$path"`
61323
61324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61327  # "foo.exe" is OK but "foo" is an error.
61328  #
61329  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61330  # It is also a way to make sure we got the proper file name for the real test later on.
61331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61332  if test "x$test_shortpath" = x; then
61333    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61334$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61335    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61336  fi
61337
61338  # Call helper function which possibly converts this using DOS-style short mode.
61339  # If so, the updated path is stored in $new_path.
61340
61341  input_path="$new_path"
61342  # Check if we need to convert this using DOS-style short mode. If the path
61343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61344  # take no chances and rewrite it.
61345  # Note: m4 eats our [], so we need to use [ and ] instead.
61346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61347  if test "x$has_forbidden_chars" != x; then
61348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61352      # Going to short mode and back again did indeed matter. Since short mode is
61353      # case insensitive, let's make it lowercase to improve readability.
61354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61355      # Now convert it back to Unix-style (cygpath)
61356      input_path=`$CYGPATH -u "$shortmode_path"`
61357      new_path="$input_path"
61358    fi
61359  fi
61360
61361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61362  if test "x$test_cygdrive_prefix" = x; then
61363    # As a simple fix, exclude /usr/bin since it's not a real path.
61364    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61366      # a path prefixed by /cygdrive for fixpath to work.
61367      new_path="$CYGWIN_ROOT_PATH$input_path"
61368    fi
61369  fi
61370
61371
61372  if test "x$path" != "x$new_path"; then
61373    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61375$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61376  fi
61377
61378    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61379
61380  path="$POTENTIAL_FREETYPE_LIB_PATH"
61381  has_colon=`$ECHO $path | $GREP ^.:`
61382  new_path="$path"
61383  if test "x$has_colon" = x; then
61384    # Not in mixed or Windows style, start by that.
61385    new_path=`cmd //c echo $path`
61386  fi
61387
61388
61389  input_path="$new_path"
61390  # Check if we need to convert this using DOS-style short mode. If the path
61391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61392  # take no chances and rewrite it.
61393  # Note: m4 eats our [], so we need to use [ and ] instead.
61394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61395  if test "x$has_forbidden_chars" != x; then
61396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61398  fi
61399
61400
61401  windows_path="$new_path"
61402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61403    unix_path=`$CYGPATH -u "$windows_path"`
61404    new_path="$unix_path"
61405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61407    new_path="$unix_path"
61408  fi
61409
61410  if test "x$path" != "x$new_path"; then
61411    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61413$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61414  fi
61415
61416  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61417  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61418
61419    else
61420      # We're on a unix platform. Hooray! :)
61421      path="$POTENTIAL_FREETYPE_LIB_PATH"
61422      has_space=`$ECHO "$path" | $GREP " "`
61423      if test "x$has_space" != x; then
61424        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61425$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61426        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61427      fi
61428
61429      # Use eval to expand a potential ~
61430      eval path="$path"
61431      if test ! -f "$path" && test ! -d "$path"; then
61432        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61433      fi
61434
61435      if test -d "$path"; then
61436        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61437      else
61438        dir="`$DIRNAME "$path"`"
61439        base="`$BASENAME "$path"`"
61440        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61441      fi
61442    fi
61443  fi
61444
61445
61446    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61447    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61448$as_echo_n "checking for freetype includes... " >&6; }
61449    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61450$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61451    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61452    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61453$as_echo_n "checking for freetype libraries... " >&6; }
61454    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61455$as_echo "$FREETYPE_LIB_PATH" >&6; }
61456  fi
61457
61458            else
61459
61460  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61461  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61462  METHOD="well-known location"
61463
61464  # Let's start with an optimistic view of the world :-)
61465  FOUND_FREETYPE=yes
61466
61467  # First look for the canonical freetype main include file ft2build.h.
61468  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61469    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61470    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61471    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61472      # Fail.
61473      FOUND_FREETYPE=no
61474    fi
61475  fi
61476
61477  if test "x$FOUND_FREETYPE" = xyes; then
61478    # Include file found, let's continue the sanity check.
61479    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61480$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61481
61482    # Reset to default value
61483    FREETYPE_BASE_NAME=freetype
61484    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61485    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61486      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61487          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61488        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61489        # for the .6 version explicitly.
61490        FREETYPE_BASE_NAME=freetype.6
61491        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61492        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61493$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61494      else
61495        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61496$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61497        FOUND_FREETYPE=no
61498      fi
61499    else
61500      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61501        # On Windows, we will need both .lib and .dll file.
61502        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61503          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61504$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61505          FOUND_FREETYPE=no
61506        fi
61507      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61508          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61509        # Found lib in isa dir, use that instead.
61510        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61511        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61512$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61513      fi
61514    fi
61515  fi
61516
61517  if test "x$FOUND_FREETYPE" = xyes; then
61518
61519  # Only process if variable expands to non-empty
61520
61521  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61522    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61523
61524  # Input might be given as Windows format, start by converting to
61525  # unix format.
61526  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61527  new_path=`$CYGPATH -u "$path"`
61528
61529  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61530  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61531  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61532  # "foo.exe" is OK but "foo" is an error.
61533  #
61534  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61535  # It is also a way to make sure we got the proper file name for the real test later on.
61536  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61537  if test "x$test_shortpath" = x; then
61538    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61539$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61540    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61541  fi
61542
61543  # Call helper function which possibly converts this using DOS-style short mode.
61544  # If so, the updated path is stored in $new_path.
61545
61546  input_path="$new_path"
61547  # Check if we need to convert this using DOS-style short mode. If the path
61548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61549  # take no chances and rewrite it.
61550  # Note: m4 eats our [], so we need to use [ and ] instead.
61551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61552  if test "x$has_forbidden_chars" != x; then
61553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61554    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61555    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61556    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61557      # Going to short mode and back again did indeed matter. Since short mode is
61558      # case insensitive, let's make it lowercase to improve readability.
61559      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61560      # Now convert it back to Unix-style (cygpath)
61561      input_path=`$CYGPATH -u "$shortmode_path"`
61562      new_path="$input_path"
61563    fi
61564  fi
61565
61566  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61567  if test "x$test_cygdrive_prefix" = x; then
61568    # As a simple fix, exclude /usr/bin since it's not a real path.
61569    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61570      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61571      # a path prefixed by /cygdrive for fixpath to work.
61572      new_path="$CYGWIN_ROOT_PATH$input_path"
61573    fi
61574  fi
61575
61576
61577  if test "x$path" != "x$new_path"; then
61578    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61579    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61580$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61581  fi
61582
61583    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61584
61585  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61586  has_colon=`$ECHO $path | $GREP ^.:`
61587  new_path="$path"
61588  if test "x$has_colon" = x; then
61589    # Not in mixed or Windows style, start by that.
61590    new_path=`cmd //c echo $path`
61591  fi
61592
61593
61594  input_path="$new_path"
61595  # Check if we need to convert this using DOS-style short mode. If the path
61596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61597  # take no chances and rewrite it.
61598  # Note: m4 eats our [], so we need to use [ and ] instead.
61599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61600  if test "x$has_forbidden_chars" != x; then
61601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61602    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61603  fi
61604
61605
61606  windows_path="$new_path"
61607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61608    unix_path=`$CYGPATH -u "$windows_path"`
61609    new_path="$unix_path"
61610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61612    new_path="$unix_path"
61613  fi
61614
61615  if test "x$path" != "x$new_path"; then
61616    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61617    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61618$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61619  fi
61620
61621  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61622  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61623
61624    else
61625      # We're on a unix platform. Hooray! :)
61626      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61627      has_space=`$ECHO "$path" | $GREP " "`
61628      if test "x$has_space" != x; then
61629        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61630$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61631        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61632      fi
61633
61634      # Use eval to expand a potential ~
61635      eval path="$path"
61636      if test ! -f "$path" && test ! -d "$path"; then
61637        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61638      fi
61639
61640      if test -d "$path"; then
61641        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61642      else
61643        dir="`$DIRNAME "$path"`"
61644        base="`$BASENAME "$path"`"
61645        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61646      fi
61647    fi
61648  fi
61649
61650
61651  # Only process if variable expands to non-empty
61652
61653  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61654    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61655
61656  # Input might be given as Windows format, start by converting to
61657  # unix format.
61658  path="$POTENTIAL_FREETYPE_LIB_PATH"
61659  new_path=`$CYGPATH -u "$path"`
61660
61661  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61662  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61663  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61664  # "foo.exe" is OK but "foo" is an error.
61665  #
61666  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61667  # It is also a way to make sure we got the proper file name for the real test later on.
61668  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61669  if test "x$test_shortpath" = x; then
61670    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61671$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61672    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61673  fi
61674
61675  # Call helper function which possibly converts this using DOS-style short mode.
61676  # If so, the updated path is stored in $new_path.
61677
61678  input_path="$new_path"
61679  # Check if we need to convert this using DOS-style short mode. If the path
61680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61681  # take no chances and rewrite it.
61682  # Note: m4 eats our [], so we need to use [ and ] instead.
61683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61684  if test "x$has_forbidden_chars" != x; then
61685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61686    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61687    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61688    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61689      # Going to short mode and back again did indeed matter. Since short mode is
61690      # case insensitive, let's make it lowercase to improve readability.
61691      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61692      # Now convert it back to Unix-style (cygpath)
61693      input_path=`$CYGPATH -u "$shortmode_path"`
61694      new_path="$input_path"
61695    fi
61696  fi
61697
61698  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61699  if test "x$test_cygdrive_prefix" = x; then
61700    # As a simple fix, exclude /usr/bin since it's not a real path.
61701    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61702      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61703      # a path prefixed by /cygdrive for fixpath to work.
61704      new_path="$CYGWIN_ROOT_PATH$input_path"
61705    fi
61706  fi
61707
61708
61709  if test "x$path" != "x$new_path"; then
61710    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61711    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61712$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61713  fi
61714
61715    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61716
61717  path="$POTENTIAL_FREETYPE_LIB_PATH"
61718  has_colon=`$ECHO $path | $GREP ^.:`
61719  new_path="$path"
61720  if test "x$has_colon" = x; then
61721    # Not in mixed or Windows style, start by that.
61722    new_path=`cmd //c echo $path`
61723  fi
61724
61725
61726  input_path="$new_path"
61727  # Check if we need to convert this using DOS-style short mode. If the path
61728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61729  # take no chances and rewrite it.
61730  # Note: m4 eats our [], so we need to use [ and ] instead.
61731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61732  if test "x$has_forbidden_chars" != x; then
61733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61734    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61735  fi
61736
61737
61738  windows_path="$new_path"
61739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61740    unix_path=`$CYGPATH -u "$windows_path"`
61741    new_path="$unix_path"
61742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61744    new_path="$unix_path"
61745  fi
61746
61747  if test "x$path" != "x$new_path"; then
61748    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61750$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61751  fi
61752
61753  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61754  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61755
61756    else
61757      # We're on a unix platform. Hooray! :)
61758      path="$POTENTIAL_FREETYPE_LIB_PATH"
61759      has_space=`$ECHO "$path" | $GREP " "`
61760      if test "x$has_space" != x; then
61761        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61762$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61763        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61764      fi
61765
61766      # Use eval to expand a potential ~
61767      eval path="$path"
61768      if test ! -f "$path" && test ! -d "$path"; then
61769        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61770      fi
61771
61772      if test -d "$path"; then
61773        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61774      else
61775        dir="`$DIRNAME "$path"`"
61776        base="`$BASENAME "$path"`"
61777        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61778      fi
61779    fi
61780  fi
61781
61782
61783    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61784    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61785$as_echo_n "checking for freetype includes... " >&6; }
61786    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61787$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61788    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61789    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61790$as_echo_n "checking for freetype libraries... " >&6; }
61791    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61792$as_echo "$FREETYPE_LIB_PATH" >&6; }
61793  fi
61794
61795              if test "x$FOUND_FREETYPE" != xyes; then
61796
61797  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61798  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61799  METHOD="well-known location"
61800
61801  # Let's start with an optimistic view of the world :-)
61802  FOUND_FREETYPE=yes
61803
61804  # First look for the canonical freetype main include file ft2build.h.
61805  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61806    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61807    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61808    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61809      # Fail.
61810      FOUND_FREETYPE=no
61811    fi
61812  fi
61813
61814  if test "x$FOUND_FREETYPE" = xyes; then
61815    # Include file found, let's continue the sanity check.
61816    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61817$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61818
61819    # Reset to default value
61820    FREETYPE_BASE_NAME=freetype
61821    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61822    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61823      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61824          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61825        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61826        # for the .6 version explicitly.
61827        FREETYPE_BASE_NAME=freetype.6
61828        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61829        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61830$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61831      else
61832        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61833$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61834        FOUND_FREETYPE=no
61835      fi
61836    else
61837      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61838        # On Windows, we will need both .lib and .dll file.
61839        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61840          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61841$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61842          FOUND_FREETYPE=no
61843        fi
61844      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61845          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61846        # Found lib in isa dir, use that instead.
61847        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61848        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61849$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61850      fi
61851    fi
61852  fi
61853
61854  if test "x$FOUND_FREETYPE" = xyes; then
61855
61856  # Only process if variable expands to non-empty
61857
61858  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61859    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61860
61861  # Input might be given as Windows format, start by converting to
61862  # unix format.
61863  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61864  new_path=`$CYGPATH -u "$path"`
61865
61866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61869  # "foo.exe" is OK but "foo" is an error.
61870  #
61871  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61872  # It is also a way to make sure we got the proper file name for the real test later on.
61873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61874  if test "x$test_shortpath" = x; then
61875    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61876$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61877    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61878  fi
61879
61880  # Call helper function which possibly converts this using DOS-style short mode.
61881  # If so, the updated path is stored in $new_path.
61882
61883  input_path="$new_path"
61884  # Check if we need to convert this using DOS-style short mode. If the path
61885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61886  # take no chances and rewrite it.
61887  # Note: m4 eats our [], so we need to use [ and ] instead.
61888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61889  if test "x$has_forbidden_chars" != x; then
61890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61894      # Going to short mode and back again did indeed matter. Since short mode is
61895      # case insensitive, let's make it lowercase to improve readability.
61896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61897      # Now convert it back to Unix-style (cygpath)
61898      input_path=`$CYGPATH -u "$shortmode_path"`
61899      new_path="$input_path"
61900    fi
61901  fi
61902
61903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61904  if test "x$test_cygdrive_prefix" = x; then
61905    # As a simple fix, exclude /usr/bin since it's not a real path.
61906    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61908      # a path prefixed by /cygdrive for fixpath to work.
61909      new_path="$CYGWIN_ROOT_PATH$input_path"
61910    fi
61911  fi
61912
61913
61914  if test "x$path" != "x$new_path"; then
61915    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61917$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61918  fi
61919
61920    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61921
61922  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61923  has_colon=`$ECHO $path | $GREP ^.:`
61924  new_path="$path"
61925  if test "x$has_colon" = x; then
61926    # Not in mixed or Windows style, start by that.
61927    new_path=`cmd //c echo $path`
61928  fi
61929
61930
61931  input_path="$new_path"
61932  # Check if we need to convert this using DOS-style short mode. If the path
61933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61934  # take no chances and rewrite it.
61935  # Note: m4 eats our [], so we need to use [ and ] instead.
61936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61937  if test "x$has_forbidden_chars" != x; then
61938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61940  fi
61941
61942
61943  windows_path="$new_path"
61944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61945    unix_path=`$CYGPATH -u "$windows_path"`
61946    new_path="$unix_path"
61947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61949    new_path="$unix_path"
61950  fi
61951
61952  if test "x$path" != "x$new_path"; then
61953    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61955$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61956  fi
61957
61958  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61959  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61960
61961    else
61962      # We're on a unix platform. Hooray! :)
61963      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61964      has_space=`$ECHO "$path" | $GREP " "`
61965      if test "x$has_space" != x; then
61966        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61967$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61968        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61969      fi
61970
61971      # Use eval to expand a potential ~
61972      eval path="$path"
61973      if test ! -f "$path" && test ! -d "$path"; then
61974        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61975      fi
61976
61977      if test -d "$path"; then
61978        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61979      else
61980        dir="`$DIRNAME "$path"`"
61981        base="`$BASENAME "$path"`"
61982        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61983      fi
61984    fi
61985  fi
61986
61987
61988  # Only process if variable expands to non-empty
61989
61990  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61991    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61992
61993  # Input might be given as Windows format, start by converting to
61994  # unix format.
61995  path="$POTENTIAL_FREETYPE_LIB_PATH"
61996  new_path=`$CYGPATH -u "$path"`
61997
61998  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61999  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62000  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62001  # "foo.exe" is OK but "foo" is an error.
62002  #
62003  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62004  # It is also a way to make sure we got the proper file name for the real test later on.
62005  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62006  if test "x$test_shortpath" = x; then
62007    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62008$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62009    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62010  fi
62011
62012  # Call helper function which possibly converts this using DOS-style short mode.
62013  # If so, the updated path is stored in $new_path.
62014
62015  input_path="$new_path"
62016  # Check if we need to convert this using DOS-style short mode. If the path
62017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62018  # take no chances and rewrite it.
62019  # Note: m4 eats our [], so we need to use [ and ] instead.
62020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62021  if test "x$has_forbidden_chars" != x; then
62022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62023    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62024    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62025    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62026      # Going to short mode and back again did indeed matter. Since short mode is
62027      # case insensitive, let's make it lowercase to improve readability.
62028      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62029      # Now convert it back to Unix-style (cygpath)
62030      input_path=`$CYGPATH -u "$shortmode_path"`
62031      new_path="$input_path"
62032    fi
62033  fi
62034
62035  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62036  if test "x$test_cygdrive_prefix" = x; then
62037    # As a simple fix, exclude /usr/bin since it's not a real path.
62038    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62039      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62040      # a path prefixed by /cygdrive for fixpath to work.
62041      new_path="$CYGWIN_ROOT_PATH$input_path"
62042    fi
62043  fi
62044
62045
62046  if test "x$path" != "x$new_path"; then
62047    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62049$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62050  fi
62051
62052    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62053
62054  path="$POTENTIAL_FREETYPE_LIB_PATH"
62055  has_colon=`$ECHO $path | $GREP ^.:`
62056  new_path="$path"
62057  if test "x$has_colon" = x; then
62058    # Not in mixed or Windows style, start by that.
62059    new_path=`cmd //c echo $path`
62060  fi
62061
62062
62063  input_path="$new_path"
62064  # Check if we need to convert this using DOS-style short mode. If the path
62065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62066  # take no chances and rewrite it.
62067  # Note: m4 eats our [], so we need to use [ and ] instead.
62068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62069  if test "x$has_forbidden_chars" != x; then
62070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62071    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62072  fi
62073
62074
62075  windows_path="$new_path"
62076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62077    unix_path=`$CYGPATH -u "$windows_path"`
62078    new_path="$unix_path"
62079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62081    new_path="$unix_path"
62082  fi
62083
62084  if test "x$path" != "x$new_path"; then
62085    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62087$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62088  fi
62089
62090  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62091  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62092
62093    else
62094      # We're on a unix platform. Hooray! :)
62095      path="$POTENTIAL_FREETYPE_LIB_PATH"
62096      has_space=`$ECHO "$path" | $GREP " "`
62097      if test "x$has_space" != x; then
62098        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62099$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62100        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62101      fi
62102
62103      # Use eval to expand a potential ~
62104      eval path="$path"
62105      if test ! -f "$path" && test ! -d "$path"; then
62106        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62107      fi
62108
62109      if test -d "$path"; then
62110        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62111      else
62112        dir="`$DIRNAME "$path"`"
62113        base="`$BASENAME "$path"`"
62114        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62115      fi
62116    fi
62117  fi
62118
62119
62120    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62121    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62122$as_echo_n "checking for freetype includes... " >&6; }
62123    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62124$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62125    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62126    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62127$as_echo_n "checking for freetype libraries... " >&6; }
62128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62129$as_echo "$FREETYPE_LIB_PATH" >&6; }
62130  fi
62131
62132              fi
62133            fi
62134          fi
62135        fi
62136      fi # end check in well-known locations
62137
62138      if test "x$FOUND_FREETYPE" != xyes; then
62139
62140  # Print a helpful message on how to acquire the necessary build dependency.
62141  # freetype is the help tag: freetype, cups, alsa etc
62142  MISSING_DEPENDENCY=freetype
62143
62144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62145    cygwin_help $MISSING_DEPENDENCY
62146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62147    msys_help $MISSING_DEPENDENCY
62148  else
62149    PKGHANDLER_COMMAND=
62150
62151    case $PKGHANDLER in
62152      apt-get)
62153        apt_help     $MISSING_DEPENDENCY ;;
62154      yum)
62155        yum_help     $MISSING_DEPENDENCY ;;
62156      port)
62157        port_help    $MISSING_DEPENDENCY ;;
62158      pkgutil)
62159        pkgutil_help $MISSING_DEPENDENCY ;;
62160      pkgadd)
62161        pkgadd_help  $MISSING_DEPENDENCY ;;
62162    esac
62163
62164    if test "x$PKGHANDLER_COMMAND" != x; then
62165      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62166    fi
62167  fi
62168
62169        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62170      fi
62171    fi # end user specified settings
62172
62173    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62174    if test "x$FREETYPE_CFLAGS" = x; then
62175
62176  # Only process if variable expands to non-empty
62177
62178  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62179    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62180
62181  # Input might be given as Windows format, start by converting to
62182  # unix format.
62183  path="$FREETYPE_INCLUDE_PATH"
62184  new_path=`$CYGPATH -u "$path"`
62185
62186  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62187  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62188  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62189  # "foo.exe" is OK but "foo" is an error.
62190  #
62191  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62192  # It is also a way to make sure we got the proper file name for the real test later on.
62193  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62194  if test "x$test_shortpath" = x; then
62195    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62196$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62197    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62198  fi
62199
62200  # Call helper function which possibly converts this using DOS-style short mode.
62201  # If so, the updated path is stored in $new_path.
62202
62203  input_path="$new_path"
62204  # Check if we need to convert this using DOS-style short mode. If the path
62205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62206  # take no chances and rewrite it.
62207  # Note: m4 eats our [], so we need to use [ and ] instead.
62208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62209  if test "x$has_forbidden_chars" != x; then
62210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62211    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62212    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62213    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62214      # Going to short mode and back again did indeed matter. Since short mode is
62215      # case insensitive, let's make it lowercase to improve readability.
62216      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62217      # Now convert it back to Unix-style (cygpath)
62218      input_path=`$CYGPATH -u "$shortmode_path"`
62219      new_path="$input_path"
62220    fi
62221  fi
62222
62223  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62224  if test "x$test_cygdrive_prefix" = x; then
62225    # As a simple fix, exclude /usr/bin since it's not a real path.
62226    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62227      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62228      # a path prefixed by /cygdrive for fixpath to work.
62229      new_path="$CYGWIN_ROOT_PATH$input_path"
62230    fi
62231  fi
62232
62233
62234  if test "x$path" != "x$new_path"; then
62235    FREETYPE_INCLUDE_PATH="$new_path"
62236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62237$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62238  fi
62239
62240    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62241
62242  path="$FREETYPE_INCLUDE_PATH"
62243  has_colon=`$ECHO $path | $GREP ^.:`
62244  new_path="$path"
62245  if test "x$has_colon" = x; then
62246    # Not in mixed or Windows style, start by that.
62247    new_path=`cmd //c echo $path`
62248  fi
62249
62250
62251  input_path="$new_path"
62252  # Check if we need to convert this using DOS-style short mode. If the path
62253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62254  # take no chances and rewrite it.
62255  # Note: m4 eats our [], so we need to use [ and ] instead.
62256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62257  if test "x$has_forbidden_chars" != x; then
62258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62259    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62260  fi
62261
62262
62263  windows_path="$new_path"
62264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62265    unix_path=`$CYGPATH -u "$windows_path"`
62266    new_path="$unix_path"
62267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62269    new_path="$unix_path"
62270  fi
62271
62272  if test "x$path" != "x$new_path"; then
62273    FREETYPE_INCLUDE_PATH="$new_path"
62274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62275$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62276  fi
62277
62278  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62279  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62280
62281    else
62282      # We're on a unix platform. Hooray! :)
62283      path="$FREETYPE_INCLUDE_PATH"
62284      has_space=`$ECHO "$path" | $GREP " "`
62285      if test "x$has_space" != x; then
62286        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62287$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62288        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62289      fi
62290
62291      # Use eval to expand a potential ~
62292      eval path="$path"
62293      if test ! -f "$path" && test ! -d "$path"; then
62294        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62295      fi
62296
62297      if test -d "$path"; then
62298        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62299      else
62300        dir="`$DIRNAME "$path"`"
62301        base="`$BASENAME "$path"`"
62302        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62303      fi
62304    fi
62305  fi
62306
62307      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62308        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62309      else
62310        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62311      fi
62312    fi
62313
62314    if test "x$FREETYPE_LIBS" = x; then
62315
62316  # Only process if variable expands to non-empty
62317
62318  if test "x$FREETYPE_LIB_PATH" != x; then
62319    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62320
62321  # Input might be given as Windows format, start by converting to
62322  # unix format.
62323  path="$FREETYPE_LIB_PATH"
62324  new_path=`$CYGPATH -u "$path"`
62325
62326  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62327  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62328  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62329  # "foo.exe" is OK but "foo" is an error.
62330  #
62331  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62332  # It is also a way to make sure we got the proper file name for the real test later on.
62333  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62334  if test "x$test_shortpath" = x; then
62335    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62336$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62337    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62338  fi
62339
62340  # Call helper function which possibly converts this using DOS-style short mode.
62341  # If so, the updated path is stored in $new_path.
62342
62343  input_path="$new_path"
62344  # Check if we need to convert this using DOS-style short mode. If the path
62345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62346  # take no chances and rewrite it.
62347  # Note: m4 eats our [], so we need to use [ and ] instead.
62348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62349  if test "x$has_forbidden_chars" != x; then
62350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62354      # Going to short mode and back again did indeed matter. Since short mode is
62355      # case insensitive, let's make it lowercase to improve readability.
62356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62357      # Now convert it back to Unix-style (cygpath)
62358      input_path=`$CYGPATH -u "$shortmode_path"`
62359      new_path="$input_path"
62360    fi
62361  fi
62362
62363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62364  if test "x$test_cygdrive_prefix" = x; then
62365    # As a simple fix, exclude /usr/bin since it's not a real path.
62366    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62368      # a path prefixed by /cygdrive for fixpath to work.
62369      new_path="$CYGWIN_ROOT_PATH$input_path"
62370    fi
62371  fi
62372
62373
62374  if test "x$path" != "x$new_path"; then
62375    FREETYPE_LIB_PATH="$new_path"
62376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62377$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62378  fi
62379
62380    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62381
62382  path="$FREETYPE_LIB_PATH"
62383  has_colon=`$ECHO $path | $GREP ^.:`
62384  new_path="$path"
62385  if test "x$has_colon" = x; then
62386    # Not in mixed or Windows style, start by that.
62387    new_path=`cmd //c echo $path`
62388  fi
62389
62390
62391  input_path="$new_path"
62392  # Check if we need to convert this using DOS-style short mode. If the path
62393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62394  # take no chances and rewrite it.
62395  # Note: m4 eats our [], so we need to use [ and ] instead.
62396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62397  if test "x$has_forbidden_chars" != x; then
62398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62400  fi
62401
62402
62403  windows_path="$new_path"
62404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62405    unix_path=`$CYGPATH -u "$windows_path"`
62406    new_path="$unix_path"
62407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62409    new_path="$unix_path"
62410  fi
62411
62412  if test "x$path" != "x$new_path"; then
62413    FREETYPE_LIB_PATH="$new_path"
62414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62415$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62416  fi
62417
62418  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62419  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62420
62421    else
62422      # We're on a unix platform. Hooray! :)
62423      path="$FREETYPE_LIB_PATH"
62424      has_space=`$ECHO "$path" | $GREP " "`
62425      if test "x$has_space" != x; then
62426        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62427$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62428        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62429      fi
62430
62431      # Use eval to expand a potential ~
62432      eval path="$path"
62433      if test ! -f "$path" && test ! -d "$path"; then
62434        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62435      fi
62436
62437      if test -d "$path"; then
62438        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62439      else
62440        dir="`$DIRNAME "$path"`"
62441        base="`$BASENAME "$path"`"
62442        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62443      fi
62444    fi
62445  fi
62446
62447      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62448        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62449      else
62450        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62451      fi
62452    fi
62453
62454    # Try to compile it
62455    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62456$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62457    ac_ext=cpp
62458ac_cpp='$CXXCPP $CPPFLAGS'
62459ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62460ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62461ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62462
62463    PREV_CXXCFLAGS="$CXXFLAGS"
62464    PREV_LIBS="$LIBS"
62465    PREV_CXX="$CXX"
62466    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62467    LIBS="$LIBS $FREETYPE_LIBS"
62468    CXX="$FIXPATH $CXX"
62469    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62470/* end confdefs.h.  */
62471
62472          #include<ft2build.h>
62473          #include FT_FREETYPE_H
62474          int main () {
62475            FT_Init_FreeType(NULL);
62476            return 0;
62477          }
62478
62479_ACEOF
62480if ac_fn_cxx_try_link "$LINENO"; then :
62481
62482          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62483$as_echo "yes" >&6; }
62484
62485else
62486
62487          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62488$as_echo "no" >&6; }
62489          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62490$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62491          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62492$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62493
62494
62495  # Print a helpful message on how to acquire the necessary build dependency.
62496  # freetype is the help tag: freetype, cups, alsa etc
62497  MISSING_DEPENDENCY=freetype
62498
62499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62500    cygwin_help $MISSING_DEPENDENCY
62501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62502    msys_help $MISSING_DEPENDENCY
62503  else
62504    PKGHANDLER_COMMAND=
62505
62506    case $PKGHANDLER in
62507      apt-get)
62508        apt_help     $MISSING_DEPENDENCY ;;
62509      yum)
62510        yum_help     $MISSING_DEPENDENCY ;;
62511      port)
62512        port_help    $MISSING_DEPENDENCY ;;
62513      pkgutil)
62514        pkgutil_help $MISSING_DEPENDENCY ;;
62515      pkgadd)
62516        pkgadd_help  $MISSING_DEPENDENCY ;;
62517    esac
62518
62519    if test "x$PKGHANDLER_COMMAND" != x; then
62520      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62521    fi
62522  fi
62523
62524
62525          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62526
62527
62528fi
62529rm -f core conftest.err conftest.$ac_objext \
62530    conftest$ac_exeext conftest.$ac_ext
62531    CXXCFLAGS="$PREV_CXXFLAGS"
62532    LIBS="$PREV_LIBS"
62533    CXX="$PREV_CXX"
62534    ac_ext=cpp
62535ac_cpp='$CXXCPP $CPPFLAGS'
62536ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62537ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62538ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62539
62540
62541    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62542$as_echo_n "checking if we should bundle freetype... " >&6; }
62543    if test "x$BUNDLE_FREETYPE" = xyes; then
62544      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62545    fi
62546    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62547$as_echo "$BUNDLE_FREETYPE" >&6; }
62548
62549  fi # end freetype needed
62550
62551
62552
62553
62554
62555
62556
62557# Check whether --with-alsa was given.
62558if test "${with_alsa+set}" = set; then :
62559  withval=$with_alsa;
62560fi
62561
62562
62563# Check whether --with-alsa-include was given.
62564if test "${with_alsa_include+set}" = set; then :
62565  withval=$with_alsa_include;
62566fi
62567
62568
62569# Check whether --with-alsa-lib was given.
62570if test "${with_alsa_lib+set}" = set; then :
62571  withval=$with_alsa_lib;
62572fi
62573
62574
62575  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62576    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62577        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62578        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62579      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62580$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62581    fi
62582    ALSA_CFLAGS=
62583    ALSA_LIBS=
62584  else
62585    ALSA_FOUND=no
62586
62587    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62588      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62589    fi
62590
62591    if test "x${with_alsa}" != x; then
62592      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62593      ALSA_CFLAGS="-I${with_alsa}/include"
62594      ALSA_FOUND=yes
62595    fi
62596    if test "x${with_alsa_include}" != x; then
62597      ALSA_CFLAGS="-I${with_alsa_include}"
62598      ALSA_FOUND=yes
62599    fi
62600    if test "x${with_alsa_lib}" != x; then
62601      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62602      ALSA_FOUND=yes
62603    fi
62604    # Do not try pkg-config if we have a sysroot set.
62605    if test "x$SYSROOT" = x; then
62606      if test "x$ALSA_FOUND" = xno; then
62607
62608pkg_failed=no
62609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62610$as_echo_n "checking for ALSA... " >&6; }
62611
62612if test -n "$ALSA_CFLAGS"; then
62613    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62614 elif test -n "$PKG_CONFIG"; then
62615    if test -n "$PKG_CONFIG" && \
62616    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62617  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62618  ac_status=$?
62619  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62620  test $ac_status = 0; }; then
62621  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62622else
62623  pkg_failed=yes
62624fi
62625 else
62626    pkg_failed=untried
62627fi
62628if test -n "$ALSA_LIBS"; then
62629    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62630 elif test -n "$PKG_CONFIG"; then
62631    if test -n "$PKG_CONFIG" && \
62632    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62633  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62634  ac_status=$?
62635  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62636  test $ac_status = 0; }; then
62637  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62638else
62639  pkg_failed=yes
62640fi
62641 else
62642    pkg_failed=untried
62643fi
62644
62645
62646
62647if test $pkg_failed = yes; then
62648
62649if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62650        _pkg_short_errors_supported=yes
62651else
62652        _pkg_short_errors_supported=no
62653fi
62654        if test $_pkg_short_errors_supported = yes; then
62655	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62656        else
62657	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62658        fi
62659	# Put the nasty error message in config.log where it belongs
62660	echo "$ALSA_PKG_ERRORS" >&5
62661
62662	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62663$as_echo "no" >&6; }
62664                ALSA_FOUND=no
62665elif test $pkg_failed = untried; then
62666	ALSA_FOUND=no
62667else
62668	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62669	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62670        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62671$as_echo "yes" >&6; }
62672	ALSA_FOUND=yes
62673fi
62674      fi
62675    fi
62676    if test "x$ALSA_FOUND" = xno; then
62677      for ac_header in alsa/asoundlib.h
62678do :
62679  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62680if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62681  cat >>confdefs.h <<_ACEOF
62682#define HAVE_ALSA_ASOUNDLIB_H 1
62683_ACEOF
62684
62685            ALSA_FOUND=yes
62686            ALSA_CFLAGS=-Iignoreme
62687            ALSA_LIBS=-lasound
62688            DEFAULT_ALSA=yes
62689
62690else
62691  ALSA_FOUND=no
62692
62693fi
62694
62695done
62696
62697    fi
62698    if test "x$ALSA_FOUND" = xno; then
62699
62700  # Print a helpful message on how to acquire the necessary build dependency.
62701  # alsa is the help tag: freetype, cups, alsa etc
62702  MISSING_DEPENDENCY=alsa
62703
62704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62705    cygwin_help $MISSING_DEPENDENCY
62706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62707    msys_help $MISSING_DEPENDENCY
62708  else
62709    PKGHANDLER_COMMAND=
62710
62711    case $PKGHANDLER in
62712      apt-get)
62713        apt_help     $MISSING_DEPENDENCY ;;
62714      yum)
62715        yum_help     $MISSING_DEPENDENCY ;;
62716      port)
62717        port_help    $MISSING_DEPENDENCY ;;
62718      pkgutil)
62719        pkgutil_help $MISSING_DEPENDENCY ;;
62720      pkgadd)
62721        pkgadd_help  $MISSING_DEPENDENCY ;;
62722    esac
62723
62724    if test "x$PKGHANDLER_COMMAND" != x; then
62725      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62726    fi
62727  fi
62728
62729      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62730    fi
62731  fi
62732
62733
62734
62735
62736
62737
62738# Check whether --with-libffi was given.
62739if test "${with_libffi+set}" = set; then :
62740  withval=$with_libffi;
62741fi
62742
62743
62744# Check whether --with-libffi-include was given.
62745if test "${with_libffi_include+set}" = set; then :
62746  withval=$with_libffi_include;
62747fi
62748
62749
62750# Check whether --with-libffi-lib was given.
62751if test "${with_libffi_lib+set}" = set; then :
62752  withval=$with_libffi_lib;
62753fi
62754
62755
62756  if test "x$NEEDS_LIB_FFI" = xfalse; then
62757    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62758        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62759        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62760      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62761$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62762    fi
62763    LIBFFI_CFLAGS=
62764    LIBFFI_LIBS=
62765  else
62766    LIBFFI_FOUND=no
62767
62768    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62769      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62770    fi
62771
62772    if test "x${with_libffi}" != x; then
62773      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62774      LIBFFI_CFLAGS="-I${with_libffi}/include"
62775      LIBFFI_FOUND=yes
62776    fi
62777    if test "x${with_libffi_include}" != x; then
62778      LIBFFI_CFLAGS="-I${with_libffi_include}"
62779      LIBFFI_FOUND=yes
62780    fi
62781    if test "x${with_libffi_lib}" != x; then
62782      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62783      LIBFFI_FOUND=yes
62784    fi
62785    # Do not try pkg-config if we have a sysroot set.
62786    if test "x$SYSROOT" = x; then
62787      if test "x$LIBFFI_FOUND" = xno; then
62788        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62789
62790pkg_failed=no
62791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62792$as_echo_n "checking for LIBFFI... " >&6; }
62793
62794if test -n "$LIBFFI_CFLAGS"; then
62795    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62796 elif test -n "$PKG_CONFIG"; then
62797    if test -n "$PKG_CONFIG" && \
62798    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62799  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62800  ac_status=$?
62801  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62802  test $ac_status = 0; }; then
62803  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62804else
62805  pkg_failed=yes
62806fi
62807 else
62808    pkg_failed=untried
62809fi
62810if test -n "$LIBFFI_LIBS"; then
62811    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62812 elif test -n "$PKG_CONFIG"; then
62813    if test -n "$PKG_CONFIG" && \
62814    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62815  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62816  ac_status=$?
62817  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62818  test $ac_status = 0; }; then
62819  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62820else
62821  pkg_failed=yes
62822fi
62823 else
62824    pkg_failed=untried
62825fi
62826
62827
62828
62829if test $pkg_failed = yes; then
62830
62831if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62832        _pkg_short_errors_supported=yes
62833else
62834        _pkg_short_errors_supported=no
62835fi
62836        if test $_pkg_short_errors_supported = yes; then
62837	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62838        else
62839	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62840        fi
62841	# Put the nasty error message in config.log where it belongs
62842	echo "$LIBFFI_PKG_ERRORS" >&5
62843
62844	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62845$as_echo "no" >&6; }
62846                LIBFFI_FOUND=no
62847elif test $pkg_failed = untried; then
62848	LIBFFI_FOUND=no
62849else
62850	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62851	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62852        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62853$as_echo "yes" >&6; }
62854	LIBFFI_FOUND=yes
62855fi
62856      fi
62857    fi
62858    if test "x$LIBFFI_FOUND" = xno; then
62859      for ac_header in ffi.h
62860do :
62861  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62862if test "x$ac_cv_header_ffi_h" = xyes; then :
62863  cat >>confdefs.h <<_ACEOF
62864#define HAVE_FFI_H 1
62865_ACEOF
62866
62867            LIBFFI_FOUND=yes
62868            LIBFFI_CFLAGS=
62869            LIBFFI_LIBS=-lffi
62870
62871else
62872  LIBFFI_FOUND=no
62873
62874fi
62875
62876done
62877
62878    fi
62879    if test "x$LIBFFI_FOUND" = xno; then
62880
62881  # Print a helpful message on how to acquire the necessary build dependency.
62882  # ffi is the help tag: freetype, cups, alsa etc
62883  MISSING_DEPENDENCY=ffi
62884
62885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62886    cygwin_help $MISSING_DEPENDENCY
62887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62888    msys_help $MISSING_DEPENDENCY
62889  else
62890    PKGHANDLER_COMMAND=
62891
62892    case $PKGHANDLER in
62893      apt-get)
62894        apt_help     $MISSING_DEPENDENCY ;;
62895      yum)
62896        yum_help     $MISSING_DEPENDENCY ;;
62897      port)
62898        port_help    $MISSING_DEPENDENCY ;;
62899      pkgutil)
62900        pkgutil_help $MISSING_DEPENDENCY ;;
62901      pkgadd)
62902        pkgadd_help  $MISSING_DEPENDENCY ;;
62903    esac
62904
62905    if test "x$PKGHANDLER_COMMAND" != x; then
62906      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62907    fi
62908  fi
62909
62910      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62911    fi
62912
62913    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62914$as_echo_n "checking if libffi works... " >&6; }
62915    ac_ext=c
62916ac_cpp='$CPP $CPPFLAGS'
62917ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62918ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62919ac_compiler_gnu=$ac_cv_c_compiler_gnu
62920
62921    OLD_CFLAGS="$CFLAGS"
62922    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62923    OLD_LIBS="$LIBS"
62924    LIBS="$LIBS $LIBFFI_LIBS"
62925    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62926/* end confdefs.h.  */
62927#include <ffi.h>
62928int
62929main ()
62930{
62931
62932          ffi_call(NULL, NULL, NULL, NULL);
62933          return 0;
62934
62935  ;
62936  return 0;
62937}
62938_ACEOF
62939if ac_fn_c_try_link "$LINENO"; then :
62940  LIBFFI_WORKS=yes
62941else
62942  LIBFFI_WORKS=no
62943
62944fi
62945rm -f core conftest.err conftest.$ac_objext \
62946    conftest$ac_exeext conftest.$ac_ext
62947    CFLAGS="$OLD_CFLAGS"
62948    LIBS="$OLD_LIBS"
62949    ac_ext=cpp
62950ac_cpp='$CXXCPP $CPPFLAGS'
62951ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62952ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62953ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62954
62955    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62956$as_echo "$LIBFFI_WORKS" >&6; }
62957
62958    if test "x$LIBFFI_WORKS" = xno; then
62959
62960  # Print a helpful message on how to acquire the necessary build dependency.
62961  # ffi is the help tag: freetype, cups, alsa etc
62962  MISSING_DEPENDENCY=ffi
62963
62964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62965    cygwin_help $MISSING_DEPENDENCY
62966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62967    msys_help $MISSING_DEPENDENCY
62968  else
62969    PKGHANDLER_COMMAND=
62970
62971    case $PKGHANDLER in
62972      apt-get)
62973        apt_help     $MISSING_DEPENDENCY ;;
62974      yum)
62975        yum_help     $MISSING_DEPENDENCY ;;
62976      port)
62977        port_help    $MISSING_DEPENDENCY ;;
62978      pkgutil)
62979        pkgutil_help $MISSING_DEPENDENCY ;;
62980      pkgadd)
62981        pkgadd_help  $MISSING_DEPENDENCY ;;
62982    esac
62983
62984    if test "x$PKGHANDLER_COMMAND" != x; then
62985      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62986    fi
62987  fi
62988
62989      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
62990    fi
62991  fi
62992
62993
62994
62995
62996
62997  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
62998    # Extract the first word of "llvm-config", so it can be a program name with args.
62999set dummy llvm-config; ac_word=$2
63000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63001$as_echo_n "checking for $ac_word... " >&6; }
63002if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63003  $as_echo_n "(cached) " >&6
63004else
63005  if test -n "$LLVM_CONFIG"; then
63006  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63007else
63008as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63009for as_dir in $PATH
63010do
63011  IFS=$as_save_IFS
63012  test -z "$as_dir" && as_dir=.
63013    for ac_exec_ext in '' $ac_executable_extensions; do
63014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63015    ac_cv_prog_LLVM_CONFIG="llvm-config"
63016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63017    break 2
63018  fi
63019done
63020  done
63021IFS=$as_save_IFS
63022
63023fi
63024fi
63025LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63026if test -n "$LLVM_CONFIG"; then
63027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63028$as_echo "$LLVM_CONFIG" >&6; }
63029else
63030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63031$as_echo "no" >&6; }
63032fi
63033
63034
63035
63036    if test "x$LLVM_CONFIG" != xllvm-config; then
63037      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63038    fi
63039
63040    llvm_components="jit mcjit engine nativecodegen native"
63041    unset LLVM_CFLAGS
63042    for flag in $("$LLVM_CONFIG" --cxxflags); do
63043      if echo "${flag}" | grep -q '^-[ID]'; then
63044        if test "${flag}" != "-D_DEBUG" ; then
63045          if test "${LLVM_CFLAGS}" != "" ; then
63046            LLVM_CFLAGS="${LLVM_CFLAGS} "
63047          fi
63048          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63049        fi
63050      fi
63051    done
63052    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
63053    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63054
63055    unset LLVM_LDFLAGS
63056    for flag in $("${LLVM_CONFIG}" --ldflags); do
63057      if echo "${flag}" | grep -q '^-L'; then
63058        if test "${LLVM_LDFLAGS}" != ""; then
63059          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63060        fi
63061        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63062      fi
63063    done
63064
63065    unset LLVM_LIBS
63066    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63067      if echo "${flag}" | grep -q '^-l'; then
63068        if test "${LLVM_LIBS}" != ""; then
63069          LLVM_LIBS="${LLVM_LIBS} "
63070        fi
63071        LLVM_LIBS="${LLVM_LIBS}${flag}"
63072      fi
63073    done
63074
63075    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63076    # always properly detect -ltinfo
63077    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63078
63079
63080
63081
63082  fi
63083
63084
63085
63086# Check whether --with-libjpeg was given.
63087if test "${with_libjpeg+set}" = set; then :
63088  withval=$with_libjpeg;
63089fi
63090
63091
63092  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63093$as_echo_n "checking for which libjpeg to use... " >&6; }
63094  # default is bundled
63095  DEFAULT_LIBJPEG=bundled
63096  # if user didn't specify, use DEFAULT_LIBJPEG
63097  if test "x${with_libjpeg}" = "x"; then
63098    with_libjpeg=${DEFAULT_LIBJPEG}
63099  fi
63100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63101$as_echo "${with_libjpeg}" >&6; }
63102
63103  if test "x${with_libjpeg}" = "xbundled"; then
63104    USE_EXTERNAL_LIBJPEG=false
63105  elif test "x${with_libjpeg}" = "xsystem"; then
63106    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63107if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63108
63109else
63110   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63111fi
63112
63113
63114    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63115$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63116if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63117  $as_echo_n "(cached) " >&6
63118else
63119  ac_check_lib_save_LIBS=$LIBS
63120LIBS="-ljpeg  $LIBS"
63121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63122/* end confdefs.h.  */
63123
63124/* Override any GCC internal prototype to avoid an error.
63125   Use char because int might match the return type of a GCC
63126   builtin and then its argument prototype would still apply.  */
63127#ifdef __cplusplus
63128extern "C"
63129#endif
63130char jpeg_CreateDecompress ();
63131int
63132main ()
63133{
63134return jpeg_CreateDecompress ();
63135  ;
63136  return 0;
63137}
63138_ACEOF
63139if ac_fn_cxx_try_link "$LINENO"; then :
63140  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63141else
63142  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63143fi
63144rm -f core conftest.err conftest.$ac_objext \
63145    conftest$ac_exeext conftest.$ac_ext
63146LIBS=$ac_check_lib_save_LIBS
63147fi
63148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63149$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63150if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63151  cat >>confdefs.h <<_ACEOF
63152#define HAVE_LIBJPEG 1
63153_ACEOF
63154
63155  LIBS="-ljpeg $LIBS"
63156
63157else
63158   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63159fi
63160
63161
63162    USE_EXTERNAL_LIBJPEG=true
63163  else
63164    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63165  fi
63166
63167
63168
63169
63170
63171# Check whether --with-giflib was given.
63172if test "${with_giflib+set}" = set; then :
63173  withval=$with_giflib;
63174fi
63175
63176
63177  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63178$as_echo_n "checking for which giflib to use... " >&6; }
63179  # default is bundled
63180  DEFAULT_GIFLIB=bundled
63181  # if user didn't specify, use DEFAULT_GIFLIB
63182  if test "x${with_giflib}" = "x"; then
63183    with_giflib=${DEFAULT_GIFLIB}
63184  fi
63185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63186$as_echo "${with_giflib}" >&6; }
63187
63188  if test "x${with_giflib}" = "xbundled"; then
63189    USE_EXTERNAL_LIBGIF=false
63190  elif test "x${with_giflib}" = "xsystem"; then
63191    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63192if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63193
63194else
63195   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63196fi
63197
63198
63199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63200$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63201if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63202  $as_echo_n "(cached) " >&6
63203else
63204  ac_check_lib_save_LIBS=$LIBS
63205LIBS="-lgif  $LIBS"
63206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63207/* end confdefs.h.  */
63208
63209/* Override any GCC internal prototype to avoid an error.
63210   Use char because int might match the return type of a GCC
63211   builtin and then its argument prototype would still apply.  */
63212#ifdef __cplusplus
63213extern "C"
63214#endif
63215char DGifGetCode ();
63216int
63217main ()
63218{
63219return DGifGetCode ();
63220  ;
63221  return 0;
63222}
63223_ACEOF
63224if ac_fn_cxx_try_link "$LINENO"; then :
63225  ac_cv_lib_gif_DGifGetCode=yes
63226else
63227  ac_cv_lib_gif_DGifGetCode=no
63228fi
63229rm -f core conftest.err conftest.$ac_objext \
63230    conftest$ac_exeext conftest.$ac_ext
63231LIBS=$ac_check_lib_save_LIBS
63232fi
63233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63234$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63235if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63236  cat >>confdefs.h <<_ACEOF
63237#define HAVE_LIBGIF 1
63238_ACEOF
63239
63240  LIBS="-lgif $LIBS"
63241
63242else
63243   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63244fi
63245
63246
63247    USE_EXTERNAL_LIBGIF=true
63248  else
63249    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63250  fi
63251
63252
63253
63254
63255
63256# Check whether --with-libpng was given.
63257if test "${with_libpng+set}" = set; then :
63258  withval=$with_libpng;
63259fi
63260
63261
63262  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63263$as_echo_n "checking for which libpng to use... " >&6; }
63264
63265  # default is bundled
63266  DEFAULT_LIBPNG=bundled
63267  # if user didn't specify, use DEFAULT_LIBPNG
63268  if test "x${with_libpng}" = "x"; then
63269      with_libpng=${DEFAULT_LIBPNG}
63270  fi
63271
63272  if test "x${with_libpng}" = "xbundled"; then
63273      USE_EXTERNAL_LIBPNG=false
63274      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63275$as_echo "bundled" >&6; }
63276  elif test "x${with_libpng}" = "xsystem"; then
63277
63278pkg_failed=no
63279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63280$as_echo_n "checking for PNG... " >&6; }
63281
63282if test -n "$PNG_CFLAGS"; then
63283    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63284 elif test -n "$PKG_CONFIG"; then
63285    if test -n "$PKG_CONFIG" && \
63286    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63287  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63288  ac_status=$?
63289  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63290  test $ac_status = 0; }; then
63291  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63292else
63293  pkg_failed=yes
63294fi
63295 else
63296    pkg_failed=untried
63297fi
63298if test -n "$PNG_LIBS"; then
63299    pkg_cv_PNG_LIBS="$PNG_LIBS"
63300 elif test -n "$PKG_CONFIG"; then
63301    if test -n "$PKG_CONFIG" && \
63302    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63303  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63304  ac_status=$?
63305  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63306  test $ac_status = 0; }; then
63307  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63308else
63309  pkg_failed=yes
63310fi
63311 else
63312    pkg_failed=untried
63313fi
63314
63315
63316
63317if test $pkg_failed = yes; then
63318
63319if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63320        _pkg_short_errors_supported=yes
63321else
63322        _pkg_short_errors_supported=no
63323fi
63324        if test $_pkg_short_errors_supported = yes; then
63325	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63326        else
63327	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63328        fi
63329	# Put the nasty error message in config.log where it belongs
63330	echo "$PNG_PKG_ERRORS" >&5
63331
63332	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63333$as_echo "no" >&6; }
63334                 LIBPNG_FOUND=no
63335elif test $pkg_failed = untried; then
63336	 LIBPNG_FOUND=no
63337else
63338	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63339	PNG_LIBS=$pkg_cv_PNG_LIBS
63340        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63341$as_echo "yes" >&6; }
63342	 LIBPNG_FOUND=yes
63343fi
63344      if test "x${LIBPNG_FOUND}" = "xyes"; then
63345          USE_EXTERNAL_LIBPNG=true
63346          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63347$as_echo "system" >&6; }
63348      else
63349          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63350$as_echo "system not found" >&6; }
63351          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63352      fi
63353  else
63354      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63355  fi
63356
63357
63358
63359
63360
63361# Check whether --with-zlib was given.
63362if test "${with_zlib+set}" = set; then :
63363  withval=$with_zlib;
63364fi
63365
63366
63367  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63368$as_echo_n "checking for compress in -lz... " >&6; }
63369if ${ac_cv_lib_z_compress+:} false; then :
63370  $as_echo_n "(cached) " >&6
63371else
63372  ac_check_lib_save_LIBS=$LIBS
63373LIBS="-lz  $LIBS"
63374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63375/* end confdefs.h.  */
63376
63377/* Override any GCC internal prototype to avoid an error.
63378   Use char because int might match the return type of a GCC
63379   builtin and then its argument prototype would still apply.  */
63380#ifdef __cplusplus
63381extern "C"
63382#endif
63383char compress ();
63384int
63385main ()
63386{
63387return compress ();
63388  ;
63389  return 0;
63390}
63391_ACEOF
63392if ac_fn_cxx_try_link "$LINENO"; then :
63393  ac_cv_lib_z_compress=yes
63394else
63395  ac_cv_lib_z_compress=no
63396fi
63397rm -f core conftest.err conftest.$ac_objext \
63398    conftest$ac_exeext conftest.$ac_ext
63399LIBS=$ac_check_lib_save_LIBS
63400fi
63401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63402$as_echo "$ac_cv_lib_z_compress" >&6; }
63403if test "x$ac_cv_lib_z_compress" = xyes; then :
63404   ZLIB_FOUND=yes
63405else
63406   ZLIB_FOUND=no
63407fi
63408
63409
63410  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63411$as_echo_n "checking for which zlib to use... " >&6; }
63412
63413  DEFAULT_ZLIB=system
63414  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63415    # On windows default is bundled...on others default is system
63416    DEFAULT_ZLIB=bundled
63417  fi
63418
63419  if test "x${ZLIB_FOUND}" != "xyes"; then
63420    # If we don't find any system...set default to bundled
63421    DEFAULT_ZLIB=bundled
63422  fi
63423
63424  # If user didn't specify, use DEFAULT_ZLIB
63425  if test "x${with_zlib}" = "x"; then
63426    with_zlib=${DEFAULT_ZLIB}
63427  fi
63428
63429  if test "x${with_zlib}" = "xbundled"; then
63430    USE_EXTERNAL_LIBZ=false
63431    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63432$as_echo "bundled" >&6; }
63433  elif test "x${with_zlib}" = "xsystem"; then
63434    if test "x${ZLIB_FOUND}" = "xyes"; then
63435      USE_EXTERNAL_LIBZ=true
63436      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63437$as_echo "system" >&6; }
63438    else
63439      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63440$as_echo "system not found" >&6; }
63441      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63442    fi
63443  else
63444    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63445  fi
63446
63447
63448
63449
63450
63451# Check whether --with-lcms was given.
63452if test "${with_lcms+set}" = set; then :
63453  withval=$with_lcms;
63454fi
63455
63456
63457  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63458$as_echo_n "checking for which lcms to use... " >&6; }
63459
63460  DEFAULT_LCMS=bundled
63461  # If user didn't specify, use DEFAULT_LCMS
63462  if test "x${with_lcms}" = "x"; then
63463      with_lcms=${DEFAULT_LCMS}
63464  fi
63465
63466  if test "x${with_lcms}" = "xbundled"; then
63467    USE_EXTERNAL_LCMS=false
63468    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63469$as_echo "bundled" >&6; }
63470  elif test "x${with_lcms}" = "xsystem"; then
63471    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63472$as_echo "system" >&6; }
63473
63474pkg_failed=no
63475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63476$as_echo_n "checking for LCMS... " >&6; }
63477
63478if test -n "$LCMS_CFLAGS"; then
63479    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63480 elif test -n "$PKG_CONFIG"; then
63481    if test -n "$PKG_CONFIG" && \
63482    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63483  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63484  ac_status=$?
63485  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63486  test $ac_status = 0; }; then
63487  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63488else
63489  pkg_failed=yes
63490fi
63491 else
63492    pkg_failed=untried
63493fi
63494if test -n "$LCMS_LIBS"; then
63495    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63496 elif test -n "$PKG_CONFIG"; then
63497    if test -n "$PKG_CONFIG" && \
63498    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63499  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63500  ac_status=$?
63501  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63502  test $ac_status = 0; }; then
63503  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63504else
63505  pkg_failed=yes
63506fi
63507 else
63508    pkg_failed=untried
63509fi
63510
63511
63512
63513if test $pkg_failed = yes; then
63514
63515if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63516        _pkg_short_errors_supported=yes
63517else
63518        _pkg_short_errors_supported=no
63519fi
63520        if test $_pkg_short_errors_supported = yes; then
63521	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63522        else
63523	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63524        fi
63525	# Put the nasty error message in config.log where it belongs
63526	echo "$LCMS_PKG_ERRORS" >&5
63527
63528	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63529$as_echo "no" >&6; }
63530                LCMS_FOUND=no
63531elif test $pkg_failed = untried; then
63532	LCMS_FOUND=no
63533else
63534	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63535	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63537$as_echo "yes" >&6; }
63538	LCMS_FOUND=yes
63539fi
63540    if test "x${LCMS_FOUND}" = "xyes"; then
63541      USE_EXTERNAL_LCMS=true
63542    else
63543      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63544    fi
63545  else
63546    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63547  fi
63548
63549
63550
63551
63552
63553
63554
63555
63556
63557
63558
63559  # Setup libm (the maths library)
63560  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63561    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63562$as_echo_n "checking for cos in -lm... " >&6; }
63563if ${ac_cv_lib_m_cos+:} false; then :
63564  $as_echo_n "(cached) " >&6
63565else
63566  ac_check_lib_save_LIBS=$LIBS
63567LIBS="-lm  $LIBS"
63568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63569/* end confdefs.h.  */
63570
63571/* Override any GCC internal prototype to avoid an error.
63572   Use char because int might match the return type of a GCC
63573   builtin and then its argument prototype would still apply.  */
63574#ifdef __cplusplus
63575extern "C"
63576#endif
63577char cos ();
63578int
63579main ()
63580{
63581return cos ();
63582  ;
63583  return 0;
63584}
63585_ACEOF
63586if ac_fn_cxx_try_link "$LINENO"; then :
63587  ac_cv_lib_m_cos=yes
63588else
63589  ac_cv_lib_m_cos=no
63590fi
63591rm -f core conftest.err conftest.$ac_objext \
63592    conftest$ac_exeext conftest.$ac_ext
63593LIBS=$ac_check_lib_save_LIBS
63594fi
63595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63596$as_echo "$ac_cv_lib_m_cos" >&6; }
63597if test "x$ac_cv_lib_m_cos" = xyes; then :
63598  cat >>confdefs.h <<_ACEOF
63599#define HAVE_LIBM 1
63600_ACEOF
63601
63602  LIBS="-lm $LIBS"
63603
63604else
63605
63606        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63607$as_echo "$as_me: Maths library was not found" >&6;}
63608
63609fi
63610
63611    LIBM="-lm"
63612  else
63613    LIBM=""
63614  fi
63615
63616
63617  # Setup libdl (for dynamic library loading)
63618  save_LIBS="$LIBS"
63619  LIBS=""
63620  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63621$as_echo_n "checking for dlopen in -ldl... " >&6; }
63622if ${ac_cv_lib_dl_dlopen+:} false; then :
63623  $as_echo_n "(cached) " >&6
63624else
63625  ac_check_lib_save_LIBS=$LIBS
63626LIBS="-ldl  $LIBS"
63627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63628/* end confdefs.h.  */
63629
63630/* Override any GCC internal prototype to avoid an error.
63631   Use char because int might match the return type of a GCC
63632   builtin and then its argument prototype would still apply.  */
63633#ifdef __cplusplus
63634extern "C"
63635#endif
63636char dlopen ();
63637int
63638main ()
63639{
63640return dlopen ();
63641  ;
63642  return 0;
63643}
63644_ACEOF
63645if ac_fn_cxx_try_link "$LINENO"; then :
63646  ac_cv_lib_dl_dlopen=yes
63647else
63648  ac_cv_lib_dl_dlopen=no
63649fi
63650rm -f core conftest.err conftest.$ac_objext \
63651    conftest$ac_exeext conftest.$ac_ext
63652LIBS=$ac_check_lib_save_LIBS
63653fi
63654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63655$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63656if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63657  cat >>confdefs.h <<_ACEOF
63658#define HAVE_LIBDL 1
63659_ACEOF
63660
63661  LIBS="-ldl $LIBS"
63662
63663fi
63664
63665  LIBDL="$LIBS"
63666
63667  LIBS="$save_LIBS"
63668
63669  # Deprecated libraries, keep the flags for backwards compatibility
63670  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63671
63672
63673# Check whether --with-dxsdk was given.
63674if test "${with_dxsdk+set}" = set; then :
63675  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63676$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63677fi
63678
63679
63680
63681
63682# Check whether --with-dxsdk-lib was given.
63683if test "${with_dxsdk_lib+set}" = set; then :
63684  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63685$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63686fi
63687
63688
63689
63690
63691# Check whether --with-dxsdk-include was given.
63692if test "${with_dxsdk_include+set}" = set; then :
63693  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63694$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63695fi
63696
63697
63698  fi
63699
63700  # Control if libzip can use mmap. Available for purposes of overriding.
63701  LIBZIP_CAN_USE_MMAP=true
63702
63703
63704
63705  if test "$OPENJDK_TARGET_OS" = "solaris"; then
63706    # Find the root of the Solaris Studio installation from the compiler path
63707    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63708    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63710$as_echo_n "checking for libstlport.so.1... " >&6; }
63711    if test -f "$STLPORT_LIB"; then
63712      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63713$as_echo "yes, $STLPORT_LIB" >&6; }
63714
63715  # Only process if variable expands to non-empty
63716
63717  if test "x$STLPORT_LIB" != x; then
63718    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63719
63720  # Input might be given as Windows format, start by converting to
63721  # unix format.
63722  path="$STLPORT_LIB"
63723  new_path=`$CYGPATH -u "$path"`
63724
63725  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63726  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63727  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63728  # "foo.exe" is OK but "foo" is an error.
63729  #
63730  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63731  # It is also a way to make sure we got the proper file name for the real test later on.
63732  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63733  if test "x$test_shortpath" = x; then
63734    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63735$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63736    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63737  fi
63738
63739  # Call helper function which possibly converts this using DOS-style short mode.
63740  # If so, the updated path is stored in $new_path.
63741
63742  input_path="$new_path"
63743  # Check if we need to convert this using DOS-style short mode. If the path
63744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63745  # take no chances and rewrite it.
63746  # Note: m4 eats our [], so we need to use [ and ] instead.
63747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63748  if test "x$has_forbidden_chars" != x; then
63749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63750    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63751    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63752    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63753      # Going to short mode and back again did indeed matter. Since short mode is
63754      # case insensitive, let's make it lowercase to improve readability.
63755      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63756      # Now convert it back to Unix-style (cygpath)
63757      input_path=`$CYGPATH -u "$shortmode_path"`
63758      new_path="$input_path"
63759    fi
63760  fi
63761
63762  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63763  if test "x$test_cygdrive_prefix" = x; then
63764    # As a simple fix, exclude /usr/bin since it's not a real path.
63765    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63766      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63767      # a path prefixed by /cygdrive for fixpath to work.
63768      new_path="$CYGWIN_ROOT_PATH$input_path"
63769    fi
63770  fi
63771
63772
63773  if test "x$path" != "x$new_path"; then
63774    STLPORT_LIB="$new_path"
63775    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63776$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63777  fi
63778
63779    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63780
63781  path="$STLPORT_LIB"
63782  has_colon=`$ECHO $path | $GREP ^.:`
63783  new_path="$path"
63784  if test "x$has_colon" = x; then
63785    # Not in mixed or Windows style, start by that.
63786    new_path=`cmd //c echo $path`
63787  fi
63788
63789
63790  input_path="$new_path"
63791  # Check if we need to convert this using DOS-style short mode. If the path
63792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63793  # take no chances and rewrite it.
63794  # Note: m4 eats our [], so we need to use [ and ] instead.
63795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63796  if test "x$has_forbidden_chars" != x; then
63797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63798    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63799  fi
63800
63801
63802  windows_path="$new_path"
63803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63804    unix_path=`$CYGPATH -u "$windows_path"`
63805    new_path="$unix_path"
63806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63808    new_path="$unix_path"
63809  fi
63810
63811  if test "x$path" != "x$new_path"; then
63812    STLPORT_LIB="$new_path"
63813    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63814$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63815  fi
63816
63817  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63818  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63819
63820    else
63821      # We're on a unix platform. Hooray! :)
63822      path="$STLPORT_LIB"
63823      has_space=`$ECHO "$path" | $GREP " "`
63824      if test "x$has_space" != x; then
63825        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63826$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63827        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63828      fi
63829
63830      # Use eval to expand a potential ~
63831      eval path="$path"
63832      if test ! -f "$path" && test ! -d "$path"; then
63833        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63834      fi
63835
63836      if test -d "$path"; then
63837        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63838      else
63839        dir="`$DIRNAME "$path"`"
63840        base="`$BASENAME "$path"`"
63841        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63842      fi
63843    fi
63844  fi
63845
63846    else
63847      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63848$as_echo "no, not found at $STLPORT_LIB" >&6; }
63849      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63850    fi
63851
63852  fi
63853
63854
63855
63856
63857
63858
63859
63860
63861
63862
63863
63864
63865
63866
63867###############################################################################
63868#
63869# We need to do some final tweaking, when everything else is done.
63870#
63871###############################################################################
63872
63873
63874  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63875$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63876
63877  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63878    ENABLE_INTREE_EC=yes
63879    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63880$as_echo "yes" >&6; }
63881  else
63882    ENABLE_INTREE_EC=no
63883    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63884$as_echo "no" >&6; }
63885  fi
63886
63887
63888
63889
63890  # Check whether --enable-jtreg-failure-handler was given.
63891if test "${enable_jtreg_failure_handler+set}" = set; then :
63892  enableval=$enable_jtreg_failure_handler;
63893fi
63894
63895
63896  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63897$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63898
63899  if test "x$enable_jtreg_failure_handler" = "xyes"; then
63900    if test "x$JT_HOME" = "x"; then
63901      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63902    else
63903      BUILD_FAILURE_HANDLER=true
63904      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63905$as_echo "yes, forced" >&6; }
63906    fi
63907  elif test "x$enable_jtreg_failure_handler" = "xno"; then
63908    BUILD_FAILURE_HANDLER=false
63909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63910$as_echo "no, forced" >&6; }
63911  elif test "x$enable_jtreg_failure_handler" = "xauto" \
63912      || test "x$enable_jtreg_failure_handler" = "x"; then
63913    if test "x$JT_HOME" = "x"; then
63914      BUILD_FAILURE_HANDLER=false
63915      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63916$as_echo "no, missing jtreg" >&6; }
63917    else
63918      BUILD_FAILURE_HANDLER=true
63919      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63920$as_echo "yes, jtreg present" >&6; }
63921    fi
63922  else
63923    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63924  fi
63925
63926
63927
63928
63929###############################################################################
63930#
63931# Configure parts of the build that only affect the build performance,
63932# not the result.
63933#
63934###############################################################################
63935
63936
63937  # How many cores do we have on this build system?
63938
63939# Check whether --with-num-cores was given.
63940if test "${with_num_cores+set}" = set; then :
63941  withval=$with_num_cores;
63942fi
63943
63944  if test "x$with_num_cores" = x; then
63945    # The number of cores were not specified, try to probe them.
63946
63947  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63948$as_echo_n "checking for number of cores... " >&6; }
63949  NUM_CORES=1
63950  FOUND_CORES=no
63951
63952  if test -f /proc/cpuinfo; then
63953    # Looks like a Linux (or cygwin) system
63954    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63955    FOUND_CORES=yes
63956  elif test -x /usr/sbin/psrinfo; then
63957    # Looks like a Solaris system
63958    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63959    FOUND_CORES=yes
63960  elif test -x /usr/sbin/sysctl; then
63961    # Looks like a MacOSX system
63962    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63963    FOUND_CORES=yes
63964  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63965    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63966    FOUND_CORES=yes
63967  elif test -n "$NUMBER_OF_PROCESSORS"; then
63968    # On windows, look in the env
63969    NUM_CORES=$NUMBER_OF_PROCESSORS
63970    FOUND_CORES=yes
63971  fi
63972
63973  if test "x$FOUND_CORES" = xyes; then
63974    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63975$as_echo "$NUM_CORES" >&6; }
63976  else
63977    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63978$as_echo "could not detect number of cores, defaulting to 1" >&6; }
63979    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63980$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63981  fi
63982
63983  else
63984    NUM_CORES=$with_num_cores
63985  fi
63986
63987
63988
63989  # How much memory do we have on this build system?
63990
63991# Check whether --with-memory-size was given.
63992if test "${with_memory_size+set}" = set; then :
63993  withval=$with_memory_size;
63994fi
63995
63996  if test "x$with_memory_size" = x; then
63997    # The memory size was not specified, try to probe it.
63998
63999  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64000$as_echo_n "checking for memory size... " >&6; }
64001  # Default to 1024 MB
64002  MEMORY_SIZE=1024
64003  FOUND_MEM=no
64004
64005  if test -f /proc/meminfo; then
64006    # Looks like a Linux (or cygwin) system
64007    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64008    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64009    FOUND_MEM=yes
64010  elif test -x /usr/sbin/prtconf; then
64011    # Looks like a Solaris or AIX system
64012    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64013    FOUND_MEM=yes
64014  elif test -x /usr/sbin/sysctl; then
64015    # Looks like a MacOSX system
64016    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64017    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64018    FOUND_MEM=yes
64019  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64020    # Windows, but without cygwin
64021    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64022    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64023    FOUND_MEM=yes
64024  fi
64025
64026  if test "x$FOUND_MEM" = xyes; then
64027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64028$as_echo "$MEMORY_SIZE MB" >&6; }
64029  else
64030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64031$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64032    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64033$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64034  fi
64035
64036  else
64037    MEMORY_SIZE=$with_memory_size
64038  fi
64039
64040
64041
64042  # Provide a decent default number of parallel jobs for make depending on
64043  # number of cores, amount of memory and machine architecture.
64044
64045# Check whether --with-jobs was given.
64046if test "${with_jobs+set}" = set; then :
64047  withval=$with_jobs;
64048fi
64049
64050  if test "x$with_jobs" = x; then
64051    # Number of jobs was not specified, calculate.
64052    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64053$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64054    # Approximate memory in GB.
64055    memory_gb=`expr $MEMORY_SIZE / 1024`
64056    # Pick the lowest of memory in gb and number of cores.
64057    if test "$memory_gb" -lt "$NUM_CORES"; then
64058      JOBS="$memory_gb"
64059    else
64060      JOBS="$NUM_CORES"
64061    fi
64062    if test "$JOBS" -eq "0"; then
64063      JOBS=1
64064    fi
64065    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64066$as_echo "$JOBS" >&6; }
64067  else
64068    JOBS=$with_jobs
64069  fi
64070
64071
64072
64073  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64074
64075# Check whether --with-test-jobs was given.
64076if test "${with_test_jobs+set}" = set; then :
64077  withval=$with_test_jobs;
64078fi
64079
64080  if test "x$with_test_jobs" = x; then
64081      TEST_JOBS=0
64082  else
64083      TEST_JOBS=$with_test_jobs
64084  fi
64085
64086
64087
64088# Setup arguments for the boot jdk (after cores and memory have been setup)
64089
64090  ##############################################################################
64091  #
64092  # Specify jvm options for anything that is run with the Boot JDK.
64093  # Not all JVM:s accept the same arguments on the command line.
64094  #
64095
64096# Check whether --with-boot-jdk-jvmargs was given.
64097if test "${with_boot_jdk_jvmargs+set}" = set; then :
64098  withval=$with_boot_jdk_jvmargs;
64099fi
64100
64101
64102  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64103$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64104
64105  # Disable special log output when a debug build is used as Boot JDK...
64106
64107  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64108  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64109  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64110  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64111  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64112  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64113    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64114    JVM_ARG_OK=true
64115  else
64116    $ECHO "Arg failed:" >&5
64117    $ECHO "$OUTPUT" >&5
64118    JVM_ARG_OK=false
64119  fi
64120
64121
64122  # Apply user provided options.
64123
64124  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64125  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64126  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64127  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64128  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64129  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64130    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64131    JVM_ARG_OK=true
64132  else
64133    $ECHO "Arg failed:" >&5
64134    $ECHO "$OUTPUT" >&5
64135    JVM_ARG_OK=false
64136  fi
64137
64138
64139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64140$as_echo "$boot_jdk_jvmargs" >&6; }
64141
64142  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64143  JAVA_FLAGS=$boot_jdk_jvmargs
64144
64145
64146
64147  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64148$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64149
64150  # Starting amount of heap memory.
64151
64152  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64153  $ECHO "Command: $JAVA -Xms64M -version" >&5
64154  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64155  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64156  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64157  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64158    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64159    JVM_ARG_OK=true
64160  else
64161    $ECHO "Arg failed:" >&5
64162    $ECHO "$OUTPUT" >&5
64163    JVM_ARG_OK=false
64164  fi
64165
64166
64167  # Maximum amount of heap memory.
64168  # Maximum stack size.
64169  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
64170  if test "x$BOOT_JDK_BITS" = "x32"; then
64171    if test "$JVM_MAX_HEAP" -gt "1100"; then
64172      JVM_MAX_HEAP=1100
64173    elif test "$JVM_MAX_HEAP" -lt "512"; then
64174      JVM_MAX_HEAP=512
64175    fi
64176    STACK_SIZE=768
64177  else
64178    # Running a 64 bit JVM allows for and requires a bigger heap
64179    if test "$JVM_MAX_HEAP" -gt "1600"; then
64180      JVM_MAX_HEAP=1600
64181    elif test "$JVM_MAX_HEAP" -lt "512"; then
64182      JVM_MAX_HEAP=512
64183    fi
64184    STACK_SIZE=1536
64185  fi
64186
64187  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64188  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64189  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64190  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64191  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64192  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64193    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64194    JVM_ARG_OK=true
64195  else
64196    $ECHO "Arg failed:" >&5
64197    $ECHO "$OUTPUT" >&5
64198    JVM_ARG_OK=false
64199  fi
64200
64201
64202  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64203  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64204  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64205  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64206  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64207  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64208    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64209    JVM_ARG_OK=true
64210  else
64211    $ECHO "Arg failed:" >&5
64212    $ECHO "$OUTPUT" >&5
64213    JVM_ARG_OK=false
64214  fi
64215
64216
64217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64218$as_echo "$boot_jdk_jvmargs_big" >&6; }
64219
64220  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64221
64222
64223  # By default, the main javac compilations use big
64224  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64225
64226
64227  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64228$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64229
64230  # Use serial gc for small short lived tools if possible
64231
64232  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64233  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64234  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64235  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64236  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64237  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64238    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64239    JVM_ARG_OK=true
64240  else
64241    $ECHO "Arg failed:" >&5
64242    $ECHO "$OUTPUT" >&5
64243    JVM_ARG_OK=false
64244  fi
64245
64246
64247  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64248  $ECHO "Command: $JAVA -Xms32M -version" >&5
64249  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64250  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64251  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64252  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64253    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64254    JVM_ARG_OK=true
64255  else
64256    $ECHO "Arg failed:" >&5
64257    $ECHO "$OUTPUT" >&5
64258    JVM_ARG_OK=false
64259  fi
64260
64261
64262  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64263  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64264  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64265  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64266  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64267  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64268    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64269    JVM_ARG_OK=true
64270  else
64271    $ECHO "Arg failed:" >&5
64272    $ECHO "$OUTPUT" >&5
64273    JVM_ARG_OK=false
64274  fi
64275
64276
64277  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64278  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64279  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64280  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64281  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64282  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64283    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64284    JVM_ARG_OK=true
64285  else
64286    $ECHO "Arg failed:" >&5
64287    $ECHO "$OUTPUT" >&5
64288    JVM_ARG_OK=false
64289  fi
64290
64291
64292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64293$as_echo "$boot_jdk_jvmargs_small" >&6; }
64294
64295  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64296
64297
64298  JAVA_TOOL_FLAGS_SMALL=""
64299  for f in $JAVA_FLAGS_SMALL; do
64300    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64301  done
64302
64303
64304
64305# Setup smart javac (after cores and memory have been setup)
64306
64307
64308# Check whether --with-sjavac-server-java was given.
64309if test "${with_sjavac_server_java+set}" = set; then :
64310  withval=$with_sjavac_server_java;
64311fi
64312
64313
64314  if test "x$with_sjavac_server_java" != x; then
64315    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64316    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64317    if test "x$FOUND_VERSION" = x; then
64318      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64319    fi
64320  else
64321    SJAVAC_SERVER_JAVA="$JAVA"
64322  fi
64323
64324
64325  if test "$MEMORY_SIZE" -gt "3000"; then
64326
64327  $ECHO "Check if jvm arg is ok: -d64" >&5
64328  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64329  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64330  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64331  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64332  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64333    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64334    JVM_ARG_OK=true
64335  else
64336    $ECHO "Arg failed:" >&5
64337    $ECHO "$OUTPUT" >&5
64338    JVM_ARG_OK=false
64339  fi
64340
64341    if test "$JVM_ARG_OK" = true; then
64342      JVM_64BIT=true
64343      JVM_ARG_OK=false
64344    fi
64345  fi
64346
64347  MX_VALUE=`expr $MEMORY_SIZE / 2`
64348  if test "$JVM_64BIT" = true; then
64349    # Set ms lower than mx since more than one instance of the server might
64350    # get launched at the same time before they figure out which instance won.
64351    MS_VALUE=512
64352    if test "$MX_VALUE" -gt "2048"; then
64353      MX_VALUE=2048
64354    fi
64355  else
64356    MS_VALUE=256
64357    if test "$MX_VALUE" -gt "1500"; then
64358      MX_VALUE=1500
64359    fi
64360  fi
64361  if test "$MX_VALUE" -lt "512"; then
64362    MX_VALUE=512
64363  fi
64364
64365  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64366  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64367  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64368  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64369  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64370  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64371    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64372    JVM_ARG_OK=true
64373  else
64374    $ECHO "Arg failed:" >&5
64375    $ECHO "$OUTPUT" >&5
64376    JVM_ARG_OK=false
64377  fi
64378
64379
64380
64381  # Check whether --enable-sjavac was given.
64382if test "${enable_sjavac+set}" = set; then :
64383  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64384else
64385  ENABLE_SJAVAC="no"
64386fi
64387
64388  if test "x$JVM_ARG_OK" = "xfalse"; then
64389    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64390$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64391    ENABLE_SJAVAC="no"
64392  fi
64393  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64394$as_echo_n "checking whether to use sjavac... " >&6; }
64395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64396$as_echo "$ENABLE_SJAVAC" >&6; }
64397
64398
64399  # Check whether --enable-javac-server was given.
64400if test "${enable_javac_server+set}" = set; then :
64401  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64402else
64403  ENABLE_JAVAC_SERVER="yes"
64404fi
64405
64406  if test "x$JVM_ARG_OK" = "xfalse"; then
64407    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64408$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64409    ENABLE_JAVAC_SERVER="no"
64410  fi
64411  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64412$as_echo_n "checking whether to use javac server... " >&6; }
64413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64414$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64415
64416
64417  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64418    # When using a server javac, the small client instances do not need much
64419    # resources.
64420    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64421  fi
64422
64423
64424# Setup use of icecc if requested
64425
64426  # Check whether --enable-icecc was given.
64427if test "${enable_icecc+set}" = set; then :
64428  enableval=$enable_icecc;
64429fi
64430
64431
64432  if test "x${enable_icecc}" = "xyes"; then
64433
64434
64435
64436  # Publish this variable in the help.
64437
64438
64439  if [ -z "${ICECC_CMD+x}" ]; then
64440    # The variable is not set by user, try to locate tool using the code snippet
64441    for ac_prog in icecc
64442do
64443  # Extract the first word of "$ac_prog", so it can be a program name with args.
64444set dummy $ac_prog; ac_word=$2
64445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64446$as_echo_n "checking for $ac_word... " >&6; }
64447if ${ac_cv_path_ICECC_CMD+:} false; then :
64448  $as_echo_n "(cached) " >&6
64449else
64450  case $ICECC_CMD in
64451  [\\/]* | ?:[\\/]*)
64452  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64453  ;;
64454  *)
64455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64456for as_dir in $PATH
64457do
64458  IFS=$as_save_IFS
64459  test -z "$as_dir" && as_dir=.
64460    for ac_exec_ext in '' $ac_executable_extensions; do
64461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64462    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64464    break 2
64465  fi
64466done
64467  done
64468IFS=$as_save_IFS
64469
64470  ;;
64471esac
64472fi
64473ICECC_CMD=$ac_cv_path_ICECC_CMD
64474if test -n "$ICECC_CMD"; then
64475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64476$as_echo "$ICECC_CMD" >&6; }
64477else
64478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64479$as_echo "no" >&6; }
64480fi
64481
64482
64483  test -n "$ICECC_CMD" && break
64484done
64485
64486  else
64487    # The variable is set, but is it from the command line or the environment?
64488
64489    # Try to remove the string !ICECC_CMD! from our list.
64490    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64491    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64492      # If it failed, the variable was not from the command line. Ignore it,
64493      # but warn the user (except for BASH, which is always set by the calling BASH).
64494      if test "xICECC_CMD" != xBASH; then
64495        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64496$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64497      fi
64498      # Try to locate tool using the code snippet
64499      for ac_prog in icecc
64500do
64501  # Extract the first word of "$ac_prog", so it can be a program name with args.
64502set dummy $ac_prog; ac_word=$2
64503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64504$as_echo_n "checking for $ac_word... " >&6; }
64505if ${ac_cv_path_ICECC_CMD+:} false; then :
64506  $as_echo_n "(cached) " >&6
64507else
64508  case $ICECC_CMD in
64509  [\\/]* | ?:[\\/]*)
64510  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64511  ;;
64512  *)
64513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64514for as_dir in $PATH
64515do
64516  IFS=$as_save_IFS
64517  test -z "$as_dir" && as_dir=.
64518    for ac_exec_ext in '' $ac_executable_extensions; do
64519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64520    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64522    break 2
64523  fi
64524done
64525  done
64526IFS=$as_save_IFS
64527
64528  ;;
64529esac
64530fi
64531ICECC_CMD=$ac_cv_path_ICECC_CMD
64532if test -n "$ICECC_CMD"; then
64533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64534$as_echo "$ICECC_CMD" >&6; }
64535else
64536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64537$as_echo "no" >&6; }
64538fi
64539
64540
64541  test -n "$ICECC_CMD" && break
64542done
64543
64544    else
64545      # If it succeeded, then it was overridden by the user. We will use it
64546      # for the tool.
64547
64548      # First remove it from the list of overridden variables, so we can test
64549      # for unknown variables in the end.
64550      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64551
64552      # Check if we try to supply an empty value
64553      if test "x$ICECC_CMD" = x; then
64554        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64555$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64556        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64557$as_echo_n "checking for ICECC_CMD... " >&6; }
64558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64559$as_echo "disabled" >&6; }
64560      else
64561        # Check if the provided tool contains a complete path.
64562        tool_specified="$ICECC_CMD"
64563        tool_basename="${tool_specified##*/}"
64564        if test "x$tool_basename" = "x$tool_specified"; then
64565          # A command without a complete path is provided, search $PATH.
64566          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64567$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64568          # Extract the first word of "$tool_basename", so it can be a program name with args.
64569set dummy $tool_basename; ac_word=$2
64570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64571$as_echo_n "checking for $ac_word... " >&6; }
64572if ${ac_cv_path_ICECC_CMD+:} false; then :
64573  $as_echo_n "(cached) " >&6
64574else
64575  case $ICECC_CMD in
64576  [\\/]* | ?:[\\/]*)
64577  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64578  ;;
64579  *)
64580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64581for as_dir in $PATH
64582do
64583  IFS=$as_save_IFS
64584  test -z "$as_dir" && as_dir=.
64585    for ac_exec_ext in '' $ac_executable_extensions; do
64586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64587    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64589    break 2
64590  fi
64591done
64592  done
64593IFS=$as_save_IFS
64594
64595  ;;
64596esac
64597fi
64598ICECC_CMD=$ac_cv_path_ICECC_CMD
64599if test -n "$ICECC_CMD"; then
64600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64601$as_echo "$ICECC_CMD" >&6; }
64602else
64603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64604$as_echo "no" >&6; }
64605fi
64606
64607
64608          if test "x$ICECC_CMD" = x; then
64609            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64610          fi
64611        else
64612          # Otherwise we believe it is a complete path. Use it as it is.
64613          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64614$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64615          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64616$as_echo_n "checking for ICECC_CMD... " >&6; }
64617          if test ! -x "$tool_specified"; then
64618            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64619$as_echo "not found" >&6; }
64620            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64621          fi
64622          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64623$as_echo "$tool_specified" >&6; }
64624        fi
64625      fi
64626    fi
64627
64628  fi
64629
64630
64631
64632  if test "x$ICECC_CMD" = x; then
64633    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64634  fi
64635
64636
64637    old_path="$PATH"
64638
64639    # Look for icecc-create-env in some known places
64640    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64641
64642
64643
64644  # Publish this variable in the help.
64645
64646
64647  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64648    # The variable is not set by user, try to locate tool using the code snippet
64649    for ac_prog in icecc-create-env
64650do
64651  # Extract the first word of "$ac_prog", so it can be a program name with args.
64652set dummy $ac_prog; ac_word=$2
64653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64654$as_echo_n "checking for $ac_word... " >&6; }
64655if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64656  $as_echo_n "(cached) " >&6
64657else
64658  case $ICECC_CREATE_ENV in
64659  [\\/]* | ?:[\\/]*)
64660  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64661  ;;
64662  *)
64663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64664for as_dir in $PATH
64665do
64666  IFS=$as_save_IFS
64667  test -z "$as_dir" && as_dir=.
64668    for ac_exec_ext in '' $ac_executable_extensions; do
64669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64670    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64672    break 2
64673  fi
64674done
64675  done
64676IFS=$as_save_IFS
64677
64678  ;;
64679esac
64680fi
64681ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64682if test -n "$ICECC_CREATE_ENV"; then
64683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64684$as_echo "$ICECC_CREATE_ENV" >&6; }
64685else
64686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64687$as_echo "no" >&6; }
64688fi
64689
64690
64691  test -n "$ICECC_CREATE_ENV" && break
64692done
64693
64694  else
64695    # The variable is set, but is it from the command line or the environment?
64696
64697    # Try to remove the string !ICECC_CREATE_ENV! from our list.
64698    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64699    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64700      # If it failed, the variable was not from the command line. Ignore it,
64701      # but warn the user (except for BASH, which is always set by the calling BASH).
64702      if test "xICECC_CREATE_ENV" != xBASH; then
64703        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64704$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64705      fi
64706      # Try to locate tool using the code snippet
64707      for ac_prog in icecc-create-env
64708do
64709  # Extract the first word of "$ac_prog", so it can be a program name with args.
64710set dummy $ac_prog; ac_word=$2
64711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64712$as_echo_n "checking for $ac_word... " >&6; }
64713if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64714  $as_echo_n "(cached) " >&6
64715else
64716  case $ICECC_CREATE_ENV in
64717  [\\/]* | ?:[\\/]*)
64718  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64719  ;;
64720  *)
64721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64722for as_dir in $PATH
64723do
64724  IFS=$as_save_IFS
64725  test -z "$as_dir" && as_dir=.
64726    for ac_exec_ext in '' $ac_executable_extensions; do
64727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64728    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64730    break 2
64731  fi
64732done
64733  done
64734IFS=$as_save_IFS
64735
64736  ;;
64737esac
64738fi
64739ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64740if test -n "$ICECC_CREATE_ENV"; then
64741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64742$as_echo "$ICECC_CREATE_ENV" >&6; }
64743else
64744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64745$as_echo "no" >&6; }
64746fi
64747
64748
64749  test -n "$ICECC_CREATE_ENV" && break
64750done
64751
64752    else
64753      # If it succeeded, then it was overridden by the user. We will use it
64754      # for the tool.
64755
64756      # First remove it from the list of overridden variables, so we can test
64757      # for unknown variables in the end.
64758      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64759
64760      # Check if we try to supply an empty value
64761      if test "x$ICECC_CREATE_ENV" = x; then
64762        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64763$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64764        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64765$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64766        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64767$as_echo "disabled" >&6; }
64768      else
64769        # Check if the provided tool contains a complete path.
64770        tool_specified="$ICECC_CREATE_ENV"
64771        tool_basename="${tool_specified##*/}"
64772        if test "x$tool_basename" = "x$tool_specified"; then
64773          # A command without a complete path is provided, search $PATH.
64774          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64775$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64776          # Extract the first word of "$tool_basename", so it can be a program name with args.
64777set dummy $tool_basename; ac_word=$2
64778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64779$as_echo_n "checking for $ac_word... " >&6; }
64780if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64781  $as_echo_n "(cached) " >&6
64782else
64783  case $ICECC_CREATE_ENV in
64784  [\\/]* | ?:[\\/]*)
64785  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64786  ;;
64787  *)
64788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64789for as_dir in $PATH
64790do
64791  IFS=$as_save_IFS
64792  test -z "$as_dir" && as_dir=.
64793    for ac_exec_ext in '' $ac_executable_extensions; do
64794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64795    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64797    break 2
64798  fi
64799done
64800  done
64801IFS=$as_save_IFS
64802
64803  ;;
64804esac
64805fi
64806ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64807if test -n "$ICECC_CREATE_ENV"; then
64808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64809$as_echo "$ICECC_CREATE_ENV" >&6; }
64810else
64811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64812$as_echo "no" >&6; }
64813fi
64814
64815
64816          if test "x$ICECC_CREATE_ENV" = x; then
64817            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64818          fi
64819        else
64820          # Otherwise we believe it is a complete path. Use it as it is.
64821          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64822$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64823          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64824$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64825          if test ! -x "$tool_specified"; then
64826            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64827$as_echo "not found" >&6; }
64828            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64829          fi
64830          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64831$as_echo "$tool_specified" >&6; }
64832        fi
64833      fi
64834    fi
64835
64836  fi
64837
64838
64839
64840  if test "x$ICECC_CREATE_ENV" = x; then
64841    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64842  fi
64843
64844
64845    # Use icecc-create-env to create a minimal compilation environment that can
64846    # be sent to the other hosts in the icecream cluster.
64847    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64848    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64849    # Older versions of icecc does not have the --gcc parameter
64850    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64851      icecc_gcc_arg="--gcc"
64852    fi
64853    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64854
64855  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64856      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64857          ${icecc_create_env_log} 2>&1 )
64858  if test "$?" != "0"; then
64859    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64860$as_echo "$as_me: icecc-create-env output:" >&6;}
64861    cat \
64862          ${icecc_create_env_log}
64863    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64864  fi
64865
64866    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64867      # For clang, the icecc compilerwrapper is needed. It usually resides next
64868      # to icecc-create-env.
64869
64870
64871
64872  # Publish this variable in the help.
64873
64874
64875  if [ -z "${ICECC_WRAPPER+x}" ]; then
64876    # The variable is not set by user, try to locate tool using the code snippet
64877    for ac_prog in compilerwrapper
64878do
64879  # Extract the first word of "$ac_prog", so it can be a program name with args.
64880set dummy $ac_prog; ac_word=$2
64881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64882$as_echo_n "checking for $ac_word... " >&6; }
64883if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64884  $as_echo_n "(cached) " >&6
64885else
64886  case $ICECC_WRAPPER in
64887  [\\/]* | ?:[\\/]*)
64888  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64889  ;;
64890  *)
64891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64892for as_dir in $PATH
64893do
64894  IFS=$as_save_IFS
64895  test -z "$as_dir" && as_dir=.
64896    for ac_exec_ext in '' $ac_executable_extensions; do
64897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64898    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64900    break 2
64901  fi
64902done
64903  done
64904IFS=$as_save_IFS
64905
64906  ;;
64907esac
64908fi
64909ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64910if test -n "$ICECC_WRAPPER"; then
64911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64912$as_echo "$ICECC_WRAPPER" >&6; }
64913else
64914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64915$as_echo "no" >&6; }
64916fi
64917
64918
64919  test -n "$ICECC_WRAPPER" && break
64920done
64921
64922  else
64923    # The variable is set, but is it from the command line or the environment?
64924
64925    # Try to remove the string !ICECC_WRAPPER! from our list.
64926    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64927    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64928      # If it failed, the variable was not from the command line. Ignore it,
64929      # but warn the user (except for BASH, which is always set by the calling BASH).
64930      if test "xICECC_WRAPPER" != xBASH; then
64931        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64932$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64933      fi
64934      # Try to locate tool using the code snippet
64935      for ac_prog in compilerwrapper
64936do
64937  # Extract the first word of "$ac_prog", so it can be a program name with args.
64938set dummy $ac_prog; ac_word=$2
64939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64940$as_echo_n "checking for $ac_word... " >&6; }
64941if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64942  $as_echo_n "(cached) " >&6
64943else
64944  case $ICECC_WRAPPER in
64945  [\\/]* | ?:[\\/]*)
64946  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64947  ;;
64948  *)
64949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64950for as_dir in $PATH
64951do
64952  IFS=$as_save_IFS
64953  test -z "$as_dir" && as_dir=.
64954    for ac_exec_ext in '' $ac_executable_extensions; do
64955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64956    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64958    break 2
64959  fi
64960done
64961  done
64962IFS=$as_save_IFS
64963
64964  ;;
64965esac
64966fi
64967ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64968if test -n "$ICECC_WRAPPER"; then
64969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64970$as_echo "$ICECC_WRAPPER" >&6; }
64971else
64972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64973$as_echo "no" >&6; }
64974fi
64975
64976
64977  test -n "$ICECC_WRAPPER" && break
64978done
64979
64980    else
64981      # If it succeeded, then it was overridden by the user. We will use it
64982      # for the tool.
64983
64984      # First remove it from the list of overridden variables, so we can test
64985      # for unknown variables in the end.
64986      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64987
64988      # Check if we try to supply an empty value
64989      if test "x$ICECC_WRAPPER" = x; then
64990        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
64991$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
64992        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
64993$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
64994        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64995$as_echo "disabled" >&6; }
64996      else
64997        # Check if the provided tool contains a complete path.
64998        tool_specified="$ICECC_WRAPPER"
64999        tool_basename="${tool_specified##*/}"
65000        if test "x$tool_basename" = "x$tool_specified"; then
65001          # A command without a complete path is provided, search $PATH.
65002          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65003$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65004          # Extract the first word of "$tool_basename", so it can be a program name with args.
65005set dummy $tool_basename; ac_word=$2
65006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65007$as_echo_n "checking for $ac_word... " >&6; }
65008if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65009  $as_echo_n "(cached) " >&6
65010else
65011  case $ICECC_WRAPPER in
65012  [\\/]* | ?:[\\/]*)
65013  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65014  ;;
65015  *)
65016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65017for as_dir in $PATH
65018do
65019  IFS=$as_save_IFS
65020  test -z "$as_dir" && as_dir=.
65021    for ac_exec_ext in '' $ac_executable_extensions; do
65022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65023    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65025    break 2
65026  fi
65027done
65028  done
65029IFS=$as_save_IFS
65030
65031  ;;
65032esac
65033fi
65034ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65035if test -n "$ICECC_WRAPPER"; then
65036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65037$as_echo "$ICECC_WRAPPER" >&6; }
65038else
65039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65040$as_echo "no" >&6; }
65041fi
65042
65043
65044          if test "x$ICECC_WRAPPER" = x; then
65045            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65046          fi
65047        else
65048          # Otherwise we believe it is a complete path. Use it as it is.
65049          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65050$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65051          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65052$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65053          if test ! -x "$tool_specified"; then
65054            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65055$as_echo "not found" >&6; }
65056            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65057          fi
65058          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65059$as_echo "$tool_specified" >&6; }
65060        fi
65061      fi
65062    fi
65063
65064  fi
65065
65066
65067
65068  if test "x$ICECC_WRAPPER" = x; then
65069    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65070  fi
65071
65072
65073
65074  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65075      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65076  if test "$?" != "0"; then
65077    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65078$as_echo "$as_me: icecc-create-env output:" >&6;}
65079    cat ${icecc_create_env_log}
65080    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65081  fi
65082
65083    else
65084      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65085    fi
65086    PATH="$old_path"
65087    # The bundle with the compiler gets a name based on checksums. Parse log file
65088    # to find it.
65089    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65090    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65091    if test ! -f ${ICECC_ENV_BUNDLE}; then
65092      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65093    fi
65094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65095$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65096    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65097$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65098    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65099
65100    if test "x${COMPILE_TYPE}" = "xcross"; then
65101      # If cross compiling, create a separate env package for the build compiler
65102      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65103      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65104      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65105
65106  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65107      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65108            ${icecc_create_env_log_build} 2>&1 )
65109  if test "$?" != "0"; then
65110    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65111$as_echo "$as_me: icecc-create-env output:" >&6;}
65112    cat \
65113            ${icecc_create_env_log_build}
65114    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65115  fi
65116
65117      elif test "x${BUILD_CC##*/}" = "xclang"; then
65118
65119  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65120      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65121  if test "$?" != "0"; then
65122    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65123$as_echo "$as_me: icecc-create-env output:" >&6;}
65124    cat ${icecc_create_env_log_build}
65125    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65126  fi
65127
65128      else
65129        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65130      fi
65131      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65132      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65133      if test ! -f ${ICECC_ENV_BUNDLE}; then
65134        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65135      fi
65136      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65137$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65138      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65139$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65140      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65141          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65142    else
65143      BUILD_ICECC="${ICECC}"
65144    fi
65145
65146
65147  fi
65148
65149
65150# Can the C/C++ compiler use precompiled headers?
65151
65152
65153  ###############################################################################
65154  #
65155  # Can the C/C++ compiler use precompiled headers?
65156  #
65157  # Check whether --enable-precompiled-headers was given.
65158if test "${enable_precompiled_headers+set}" = set; then :
65159  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65160else
65161  ENABLE_PRECOMPH=yes
65162fi
65163
65164
65165  USE_PRECOMPILED_HEADER=1
65166  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65167$as_echo_n "checking If precompiled header is enabled... " >&6; }
65168  if test "x$ENABLE_PRECOMPH" = xno; then
65169    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65170$as_echo "no, forced" >&6; }
65171    USE_PRECOMPILED_HEADER=0
65172  elif test "x$ICECC" != "x"; then
65173    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65174$as_echo "no, does not work effectively with icecc" >&6; }
65175    USE_PRECOMPILED_HEADER=0
65176  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65177    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65178$as_echo "no, does not work with Solaris Studio" >&6; }
65179    USE_PRECOMPILED_HEADER=0
65180  else
65181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65182$as_echo "yes" >&6; }
65183  fi
65184
65185  if test "x$ENABLE_PRECOMPH" = xyes; then
65186    # Check that the compiler actually supports precomp headers.
65187    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65188      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65189$as_echo_n "checking that precompiled headers work... " >&6; }
65190      echo "int alfa();" > conftest.h
65191      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65192      if test ! -f conftest.hpp.gch; then
65193        USE_PRECOMPILED_HEADER=0
65194        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65195$as_echo "no" >&6; }
65196      else
65197        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65198$as_echo "yes" >&6; }
65199      fi
65200      rm -f conftest.h conftest.hpp.gch
65201    fi
65202  fi
65203
65204
65205
65206
65207# Setup use of ccache, if available
65208
65209  # Check whether --enable-ccache was given.
65210if test "${enable_ccache+set}" = set; then :
65211  enableval=$enable_ccache;
65212fi
65213
65214
65215  CCACHE=
65216  CCACHE_STATUS=
65217  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65218$as_echo_n "checking is ccache enabled... " >&6; }
65219  if test "x$enable_ccache" = xyes; then
65220    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65221      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65222$as_echo "yes" >&6; }
65223      OLD_PATH="$PATH"
65224      if test "x$TOOLCHAIN_PATH" != x; then
65225        PATH=$TOOLCHAIN_PATH:$PATH
65226      fi
65227
65228
65229
65230  # Publish this variable in the help.
65231
65232
65233  if [ -z "${CCACHE+x}" ]; then
65234    # The variable is not set by user, try to locate tool using the code snippet
65235    for ac_prog in ccache
65236do
65237  # Extract the first word of "$ac_prog", so it can be a program name with args.
65238set dummy $ac_prog; ac_word=$2
65239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65240$as_echo_n "checking for $ac_word... " >&6; }
65241if ${ac_cv_path_CCACHE+:} false; then :
65242  $as_echo_n "(cached) " >&6
65243else
65244  case $CCACHE in
65245  [\\/]* | ?:[\\/]*)
65246  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65247  ;;
65248  *)
65249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65250for as_dir in $PATH
65251do
65252  IFS=$as_save_IFS
65253  test -z "$as_dir" && as_dir=.
65254    for ac_exec_ext in '' $ac_executable_extensions; do
65255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65256    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65258    break 2
65259  fi
65260done
65261  done
65262IFS=$as_save_IFS
65263
65264  ;;
65265esac
65266fi
65267CCACHE=$ac_cv_path_CCACHE
65268if test -n "$CCACHE"; then
65269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65270$as_echo "$CCACHE" >&6; }
65271else
65272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65273$as_echo "no" >&6; }
65274fi
65275
65276
65277  test -n "$CCACHE" && break
65278done
65279
65280  else
65281    # The variable is set, but is it from the command line or the environment?
65282
65283    # Try to remove the string !CCACHE! from our list.
65284    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65285    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65286      # If it failed, the variable was not from the command line. Ignore it,
65287      # but warn the user (except for BASH, which is always set by the calling BASH).
65288      if test "xCCACHE" != xBASH; then
65289        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65290$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65291      fi
65292      # Try to locate tool using the code snippet
65293      for ac_prog in ccache
65294do
65295  # Extract the first word of "$ac_prog", so it can be a program name with args.
65296set dummy $ac_prog; ac_word=$2
65297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65298$as_echo_n "checking for $ac_word... " >&6; }
65299if ${ac_cv_path_CCACHE+:} false; then :
65300  $as_echo_n "(cached) " >&6
65301else
65302  case $CCACHE in
65303  [\\/]* | ?:[\\/]*)
65304  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65305  ;;
65306  *)
65307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65308for as_dir in $PATH
65309do
65310  IFS=$as_save_IFS
65311  test -z "$as_dir" && as_dir=.
65312    for ac_exec_ext in '' $ac_executable_extensions; do
65313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65314    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65316    break 2
65317  fi
65318done
65319  done
65320IFS=$as_save_IFS
65321
65322  ;;
65323esac
65324fi
65325CCACHE=$ac_cv_path_CCACHE
65326if test -n "$CCACHE"; then
65327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65328$as_echo "$CCACHE" >&6; }
65329else
65330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65331$as_echo "no" >&6; }
65332fi
65333
65334
65335  test -n "$CCACHE" && break
65336done
65337
65338    else
65339      # If it succeeded, then it was overridden by the user. We will use it
65340      # for the tool.
65341
65342      # First remove it from the list of overridden variables, so we can test
65343      # for unknown variables in the end.
65344      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65345
65346      # Check if we try to supply an empty value
65347      if test "x$CCACHE" = x; then
65348        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65349$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65350        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65351$as_echo_n "checking for CCACHE... " >&6; }
65352        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65353$as_echo "disabled" >&6; }
65354      else
65355        # Check if the provided tool contains a complete path.
65356        tool_specified="$CCACHE"
65357        tool_basename="${tool_specified##*/}"
65358        if test "x$tool_basename" = "x$tool_specified"; then
65359          # A command without a complete path is provided, search $PATH.
65360          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65361$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65362          # Extract the first word of "$tool_basename", so it can be a program name with args.
65363set dummy $tool_basename; ac_word=$2
65364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65365$as_echo_n "checking for $ac_word... " >&6; }
65366if ${ac_cv_path_CCACHE+:} false; then :
65367  $as_echo_n "(cached) " >&6
65368else
65369  case $CCACHE in
65370  [\\/]* | ?:[\\/]*)
65371  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65372  ;;
65373  *)
65374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65375for as_dir in $PATH
65376do
65377  IFS=$as_save_IFS
65378  test -z "$as_dir" && as_dir=.
65379    for ac_exec_ext in '' $ac_executable_extensions; do
65380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65381    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65383    break 2
65384  fi
65385done
65386  done
65387IFS=$as_save_IFS
65388
65389  ;;
65390esac
65391fi
65392CCACHE=$ac_cv_path_CCACHE
65393if test -n "$CCACHE"; then
65394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65395$as_echo "$CCACHE" >&6; }
65396else
65397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65398$as_echo "no" >&6; }
65399fi
65400
65401
65402          if test "x$CCACHE" = x; then
65403            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65404          fi
65405        else
65406          # Otherwise we believe it is a complete path. Use it as it is.
65407          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65408$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65409          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65410$as_echo_n "checking for CCACHE... " >&6; }
65411          if test ! -x "$tool_specified"; then
65412            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65413$as_echo "not found" >&6; }
65414            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65415          fi
65416          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65417$as_echo "$tool_specified" >&6; }
65418        fi
65419      fi
65420    fi
65421
65422  fi
65423
65424
65425
65426  if test "x$CCACHE" = x; then
65427    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65428  fi
65429
65430
65431      PATH="$OLD_PATH"
65432      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65433      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65434    else
65435      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65436$as_echo "no" >&6; }
65437      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65438$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65439    fi
65440  elif test "x$enable_ccache" = xno; then
65441    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65442$as_echo "no, explicitly disabled" >&6; }
65443    CCACHE_STATUS="Disabled"
65444  elif test "x$enable_ccache" = x; then
65445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65446$as_echo "no" >&6; }
65447  else
65448    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65449$as_echo "unknown" >&6; }
65450    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65451  fi
65452
65453
65454
65455# Check whether --with-ccache-dir was given.
65456if test "${with_ccache_dir+set}" = set; then :
65457  withval=$with_ccache_dir;
65458fi
65459
65460
65461  if test "x$with_ccache_dir" != x; then
65462    # When using a non home ccache directory, assume the use is to share ccache files
65463    # with other users. Thus change the umask.
65464    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65465    if test "x$CCACHE" = x; then
65466      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65467$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65468    fi
65469  fi
65470
65471  if test "x$CCACHE" != x; then
65472
65473  if test "x$CCACHE" != x; then
65474    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65475      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65476          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65477      if test "x$HAS_BAD_CCACHE" != "x"; then
65478        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65479      fi
65480      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65481$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65482      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65483      PUSHED_FLAGS="$CXXFLAGS"
65484      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65485      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65486/* end confdefs.h.  */
65487
65488int
65489main ()
65490{
65491
65492  ;
65493  return 0;
65494}
65495_ACEOF
65496if ac_fn_cxx_try_compile "$LINENO"; then :
65497  CC_KNOWS_CCACHE_TRICK=yes
65498else
65499  CC_KNOWS_CCACHE_TRICK=no
65500fi
65501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65502      CXXFLAGS="$PUSHED_FLAGS"
65503      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65505$as_echo "yes" >&6; }
65506        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65507
65508        CCACHE_SLOPPINESS=pch_defines,time_macros
65509      else
65510        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65511$as_echo "no" >&6; }
65512        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65513      fi
65514    fi
65515
65516    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65517        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65518
65519    if test "x$SET_CCACHE_DIR" != x; then
65520      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65521      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65522    fi
65523  fi
65524
65525  fi
65526
65527
65528###############################################################################
65529#
65530# And now the finish...
65531#
65532###############################################################################
65533
65534# Check for some common pitfalls
65535
65536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65537    file_to_test="$SRC_ROOT/LICENSE"
65538    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65539      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
65540    fi
65541  fi
65542
65543
65544  # Did user specify any unknown variables?
65545
65546  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65547    # Replace the separating ! with spaces before presenting for end user.
65548    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65549    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65550$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65551  fi
65552
65553
65554  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65555$as_echo_n "checking if build directory is on local disk... " >&6; }
65556
65557  # df -l lists only local disks; if the given directory is not found then
65558  # a non-zero exit code is given
65559  if test "x$DF" = x; then
65560    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65561      # msys does not have df; use Windows "net use" instead.
65562      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65563      if test "x$IS_NETWORK_DISK" = x; then
65564        OUTPUT_DIR_IS_LOCAL="yes"
65565      else
65566        OUTPUT_DIR_IS_LOCAL="no"
65567      fi
65568    else
65569      # No df here, say it's local
65570      OUTPUT_DIR_IS_LOCAL="yes"
65571    fi
65572  else
65573    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65574      OUTPUT_DIR_IS_LOCAL="yes"
65575    else
65576      OUTPUT_DIR_IS_LOCAL="no"
65577    fi
65578  fi
65579
65580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65581$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65582
65583
65584
65585  # Check if the user has any old-style ALT_ variables set.
65586  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65587
65588  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65589  # Since we can't properly handle the dependencies for this, warn the user about the situation
65590  if test -e $OUTPUT_ROOT/spec.gmk; then
65591    IS_RECONFIGURE=yes
65592  else
65593    IS_RECONFIGURE=no
65594  fi
65595
65596
65597# At the end, call the custom hook. (Dummy macro if no custom sources available)
65598
65599
65600# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65601
65602  # Keep feature lists sorted and free of duplicates
65603  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65604  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65605  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65606  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65607  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65608  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65609  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65610
65611  # Validate features
65612  for variant in $JVM_VARIANTS; do
65613    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65614$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65615    features_var_name=JVM_FEATURES_$variant
65616    JVM_FEATURES_TO_TEST=${!features_var_name}
65617    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65618$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65619    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65620    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65621    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65622    if test "x$INVALID_FEATURES" != x; then
65623      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65624    fi
65625  done
65626
65627
65628# We're messing a bit with internal autoconf variables to put the config.status
65629# in the output directory instead of the current directory.
65630CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65631
65632# Create the actual output files. Now the main work of configure is done.
65633cat >confcache <<\_ACEOF
65634# This file is a shell script that caches the results of configure
65635# tests run on this system so they can be shared between configure
65636# scripts and configure runs, see configure's option --config-cache.
65637# It is not useful on other systems.  If it contains results you don't
65638# want to keep, you may remove or edit it.
65639#
65640# config.status only pays attention to the cache file if you give it
65641# the --recheck option to rerun configure.
65642#
65643# `ac_cv_env_foo' variables (set or unset) will be overridden when
65644# loading this file, other *unset* `ac_cv_foo' will be assigned the
65645# following values.
65646
65647_ACEOF
65648
65649# The following way of writing the cache mishandles newlines in values,
65650# but we know of no workaround that is simple, portable, and efficient.
65651# So, we kill variables containing newlines.
65652# Ultrix sh set writes to stderr and can't be redirected directly,
65653# and sets the high bit in the cache file unless we assign to the vars.
65654(
65655  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65656    eval ac_val=\$$ac_var
65657    case $ac_val in #(
65658    *${as_nl}*)
65659      case $ac_var in #(
65660      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65661$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65662      esac
65663      case $ac_var in #(
65664      _ | IFS | as_nl) ;; #(
65665      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65666      *) { eval $ac_var=; unset $ac_var;} ;;
65667      esac ;;
65668    esac
65669  done
65670
65671  (set) 2>&1 |
65672    case $as_nl`(ac_space=' '; set) 2>&1` in #(
65673    *${as_nl}ac_space=\ *)
65674      # `set' does not quote correctly, so add quotes: double-quote
65675      # substitution turns \\\\ into \\, and sed turns \\ into \.
65676      sed -n \
65677	"s/'/'\\\\''/g;
65678	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65679      ;; #(
65680    *)
65681      # `set' quotes correctly as required by POSIX, so do not add quotes.
65682      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65683      ;;
65684    esac |
65685    sort
65686) |
65687  sed '
65688     /^ac_cv_env_/b end
65689     t clear
65690     :clear
65691     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65692     t end
65693     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65694     :end' >>confcache
65695if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65696  if test -w "$cache_file"; then
65697    if test "x$cache_file" != "x/dev/null"; then
65698      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65699$as_echo "$as_me: updating cache $cache_file" >&6;}
65700      if test ! -f "$cache_file" || test -h "$cache_file"; then
65701	cat confcache >"$cache_file"
65702      else
65703        case $cache_file in #(
65704        */* | ?:*)
65705	  mv -f confcache "$cache_file"$$ &&
65706	  mv -f "$cache_file"$$ "$cache_file" ;; #(
65707        *)
65708	  mv -f confcache "$cache_file" ;;
65709	esac
65710      fi
65711    fi
65712  else
65713    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65714$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65715  fi
65716fi
65717rm -f confcache
65718
65719test "x$prefix" = xNONE && prefix=$ac_default_prefix
65720# Let make expand exec_prefix.
65721test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65722
65723# Transform confdefs.h into DEFS.
65724# Protect against shell expansion while executing Makefile rules.
65725# Protect against Makefile macro expansion.
65726#
65727# If the first sed substitution is executed (which looks for macros that
65728# take arguments), then branch to the quote section.  Otherwise,
65729# look for a macro that doesn't take arguments.
65730ac_script='
65731:mline
65732/\\$/{
65733 N
65734 s,\\\n,,
65735 b mline
65736}
65737t clear
65738:clear
65739s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
65740t quote
65741s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
65742t quote
65743b any
65744:quote
65745s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65746s/\[/\\&/g
65747s/\]/\\&/g
65748s/\$/$$/g
65749H
65750:any
65751${
65752	g
65753	s/^\n//
65754	s/\n/ /g
65755	p
65756}
65757'
65758DEFS=`sed -n "$ac_script" confdefs.h`
65759
65760
65761ac_libobjs=
65762ac_ltlibobjs=
65763U=
65764for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65765  # 1. Remove the extension, and $U if already installed.
65766  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65767  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65768  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65769  #    will be set to the directory where LIBOBJS objects are built.
65770  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65771  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65772done
65773LIBOBJS=$ac_libobjs
65774
65775LTLIBOBJS=$ac_ltlibobjs
65776
65777
65778
65779: "${CONFIG_STATUS=./config.status}"
65780ac_write_fail=0
65781ac_clean_files_save=$ac_clean_files
65782ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65783{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65784$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65785as_write_fail=0
65786cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65787#! $SHELL
65788# Generated by $as_me.
65789# Run this file to recreate the current configuration.
65790# Compiler output produced by configure, useful for debugging
65791# configure, is in config.log if it exists.
65792
65793debug=false
65794ac_cs_recheck=false
65795ac_cs_silent=false
65796
65797SHELL=\${CONFIG_SHELL-$SHELL}
65798export SHELL
65799_ASEOF
65800cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65801## -------------------- ##
65802## M4sh Initialization. ##
65803## -------------------- ##
65804
65805# Be more Bourne compatible
65806DUALCASE=1; export DUALCASE # for MKS sh
65807if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65808  emulate sh
65809  NULLCMD=:
65810  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65811  # is contrary to our usage.  Disable this feature.
65812  alias -g '${1+"$@"}'='"$@"'
65813  setopt NO_GLOB_SUBST
65814else
65815  case `(set -o) 2>/dev/null` in #(
65816  *posix*) :
65817    set -o posix ;; #(
65818  *) :
65819     ;;
65820esac
65821fi
65822
65823
65824as_nl='
65825'
65826export as_nl
65827# Printing a long string crashes Solaris 7 /usr/bin/printf.
65828as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65829as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65830as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65831# Prefer a ksh shell builtin over an external printf program on Solaris,
65832# but without wasting forks for bash or zsh.
65833if test -z "$BASH_VERSION$ZSH_VERSION" \
65834    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65835  as_echo='print -r --'
65836  as_echo_n='print -rn --'
65837elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65838  as_echo='printf %s\n'
65839  as_echo_n='printf %s'
65840else
65841  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65842    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65843    as_echo_n='/usr/ucb/echo -n'
65844  else
65845    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65846    as_echo_n_body='eval
65847      arg=$1;
65848      case $arg in #(
65849      *"$as_nl"*)
65850	expr "X$arg" : "X\\(.*\\)$as_nl";
65851	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65852      esac;
65853      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65854    '
65855    export as_echo_n_body
65856    as_echo_n='sh -c $as_echo_n_body as_echo'
65857  fi
65858  export as_echo_body
65859  as_echo='sh -c $as_echo_body as_echo'
65860fi
65861
65862# The user is always right.
65863if test "${PATH_SEPARATOR+set}" != set; then
65864  PATH_SEPARATOR=:
65865  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65866    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65867      PATH_SEPARATOR=';'
65868  }
65869fi
65870
65871
65872# IFS
65873# We need space, tab and new line, in precisely that order.  Quoting is
65874# there to prevent editors from complaining about space-tab.
65875# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65876# splitting by setting IFS to empty value.)
65877IFS=" ""	$as_nl"
65878
65879# Find who we are.  Look in the path if we contain no directory separator.
65880as_myself=
65881case $0 in #((
65882  *[\\/]* ) as_myself=$0 ;;
65883  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65884for as_dir in $PATH
65885do
65886  IFS=$as_save_IFS
65887  test -z "$as_dir" && as_dir=.
65888    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65889  done
65890IFS=$as_save_IFS
65891
65892     ;;
65893esac
65894# We did not find ourselves, most probably we were run as `sh COMMAND'
65895# in which case we are not to be found in the path.
65896if test "x$as_myself" = x; then
65897  as_myself=$0
65898fi
65899if test ! -f "$as_myself"; then
65900  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65901  exit 1
65902fi
65903
65904# Unset variables that we do not need and which cause bugs (e.g. in
65905# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65906# suppresses any "Segmentation fault" message there.  '((' could
65907# trigger a bug in pdksh 5.2.14.
65908for as_var in BASH_ENV ENV MAIL MAILPATH
65909do eval test x\${$as_var+set} = xset \
65910  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65911done
65912PS1='$ '
65913PS2='> '
65914PS4='+ '
65915
65916# NLS nuisances.
65917LC_ALL=C
65918export LC_ALL
65919LANGUAGE=C
65920export LANGUAGE
65921
65922# CDPATH.
65923(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65924
65925
65926# as_fn_error STATUS ERROR [LINENO LOG_FD]
65927# ----------------------------------------
65928# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65929# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65930# script with STATUS, using 1 if that was 0.
65931as_fn_error ()
65932{
65933  as_status=$1; test $as_status -eq 0 && as_status=1
65934  if test "$4"; then
65935    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65936    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65937  fi
65938  $as_echo "$as_me: error: $2" >&2
65939  as_fn_exit $as_status
65940} # as_fn_error
65941
65942
65943# as_fn_set_status STATUS
65944# -----------------------
65945# Set $? to STATUS, without forking.
65946as_fn_set_status ()
65947{
65948  return $1
65949} # as_fn_set_status
65950
65951# as_fn_exit STATUS
65952# -----------------
65953# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
65954as_fn_exit ()
65955{
65956  set +e
65957  as_fn_set_status $1
65958  exit $1
65959} # as_fn_exit
65960
65961# as_fn_unset VAR
65962# ---------------
65963# Portably unset VAR.
65964as_fn_unset ()
65965{
65966  { eval $1=; unset $1;}
65967}
65968as_unset=as_fn_unset
65969# as_fn_append VAR VALUE
65970# ----------------------
65971# Append the text in VALUE to the end of the definition contained in VAR. Take
65972# advantage of any shell optimizations that allow amortized linear growth over
65973# repeated appends, instead of the typical quadratic growth present in naive
65974# implementations.
65975if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
65976  eval 'as_fn_append ()
65977  {
65978    eval $1+=\$2
65979  }'
65980else
65981  as_fn_append ()
65982  {
65983    eval $1=\$$1\$2
65984  }
65985fi # as_fn_append
65986
65987# as_fn_arith ARG...
65988# ------------------
65989# Perform arithmetic evaluation on the ARGs, and store the result in the
65990# global $as_val. Take advantage of shells that can avoid forks. The arguments
65991# must be portable across $(()) and expr.
65992if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
65993  eval 'as_fn_arith ()
65994  {
65995    as_val=$(( $* ))
65996  }'
65997else
65998  as_fn_arith ()
65999  {
66000    as_val=`expr "$@" || test $? -eq 1`
66001  }
66002fi # as_fn_arith
66003
66004
66005if expr a : '\(a\)' >/dev/null 2>&1 &&
66006   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66007  as_expr=expr
66008else
66009  as_expr=false
66010fi
66011
66012if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66013  as_basename=basename
66014else
66015  as_basename=false
66016fi
66017
66018if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66019  as_dirname=dirname
66020else
66021  as_dirname=false
66022fi
66023
66024as_me=`$as_basename -- "$0" ||
66025$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66026	 X"$0" : 'X\(//\)$' \| \
66027	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66028$as_echo X/"$0" |
66029    sed '/^.*\/\([^/][^/]*\)\/*$/{
66030	    s//\1/
66031	    q
66032	  }
66033	  /^X\/\(\/\/\)$/{
66034	    s//\1/
66035	    q
66036	  }
66037	  /^X\/\(\/\).*/{
66038	    s//\1/
66039	    q
66040	  }
66041	  s/.*/./; q'`
66042
66043# Avoid depending upon Character Ranges.
66044as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66045as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66046as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66047as_cr_digits='0123456789'
66048as_cr_alnum=$as_cr_Letters$as_cr_digits
66049
66050ECHO_C= ECHO_N= ECHO_T=
66051case `echo -n x` in #(((((
66052-n*)
66053  case `echo 'xy\c'` in
66054  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66055  xy)  ECHO_C='\c';;
66056  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66057       ECHO_T='	';;
66058  esac;;
66059*)
66060  ECHO_N='-n';;
66061esac
66062
66063rm -f conf$$ conf$$.exe conf$$.file
66064if test -d conf$$.dir; then
66065  rm -f conf$$.dir/conf$$.file
66066else
66067  rm -f conf$$.dir
66068  mkdir conf$$.dir 2>/dev/null
66069fi
66070if (echo >conf$$.file) 2>/dev/null; then
66071  if ln -s conf$$.file conf$$ 2>/dev/null; then
66072    as_ln_s='ln -s'
66073    # ... but there are two gotchas:
66074    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66075    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66076    # In both cases, we have to default to `cp -pR'.
66077    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66078      as_ln_s='cp -pR'
66079  elif ln conf$$.file conf$$ 2>/dev/null; then
66080    as_ln_s=ln
66081  else
66082    as_ln_s='cp -pR'
66083  fi
66084else
66085  as_ln_s='cp -pR'
66086fi
66087rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66088rmdir conf$$.dir 2>/dev/null
66089
66090
66091# as_fn_mkdir_p
66092# -------------
66093# Create "$as_dir" as a directory, including parents if necessary.
66094as_fn_mkdir_p ()
66095{
66096
66097  case $as_dir in #(
66098  -*) as_dir=./$as_dir;;
66099  esac
66100  test -d "$as_dir" || eval $as_mkdir_p || {
66101    as_dirs=
66102    while :; do
66103      case $as_dir in #(
66104      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66105      *) as_qdir=$as_dir;;
66106      esac
66107      as_dirs="'$as_qdir' $as_dirs"
66108      as_dir=`$as_dirname -- "$as_dir" ||
66109$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66110	 X"$as_dir" : 'X\(//\)[^/]' \| \
66111	 X"$as_dir" : 'X\(//\)$' \| \
66112	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66113$as_echo X"$as_dir" |
66114    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66115	    s//\1/
66116	    q
66117	  }
66118	  /^X\(\/\/\)[^/].*/{
66119	    s//\1/
66120	    q
66121	  }
66122	  /^X\(\/\/\)$/{
66123	    s//\1/
66124	    q
66125	  }
66126	  /^X\(\/\).*/{
66127	    s//\1/
66128	    q
66129	  }
66130	  s/.*/./; q'`
66131      test -d "$as_dir" && break
66132    done
66133    test -z "$as_dirs" || eval "mkdir $as_dirs"
66134  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66135
66136
66137} # as_fn_mkdir_p
66138if mkdir -p . 2>/dev/null; then
66139  as_mkdir_p='mkdir -p "$as_dir"'
66140else
66141  test -d ./-p && rmdir ./-p
66142  as_mkdir_p=false
66143fi
66144
66145
66146# as_fn_executable_p FILE
66147# -----------------------
66148# Test if FILE is an executable regular file.
66149as_fn_executable_p ()
66150{
66151  test -f "$1" && test -x "$1"
66152} # as_fn_executable_p
66153as_test_x='test -x'
66154as_executable_p=as_fn_executable_p
66155
66156# Sed expression to map a string onto a valid CPP name.
66157as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66158
66159# Sed expression to map a string onto a valid variable name.
66160as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66161
66162
66163exec 6>&1
66164## ----------------------------------- ##
66165## Main body of $CONFIG_STATUS script. ##
66166## ----------------------------------- ##
66167_ASEOF
66168test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66169
66170cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66171# Save the log message, to keep $0 and so on meaningful, and to
66172# report actual input values of CONFIG_FILES etc. instead of their
66173# values after options handling.
66174ac_log="
66175This file was extended by OpenJDK $as_me jdk9, which was
66176generated by GNU Autoconf 2.69.  Invocation command line was
66177
66178  CONFIG_FILES    = $CONFIG_FILES
66179  CONFIG_HEADERS  = $CONFIG_HEADERS
66180  CONFIG_LINKS    = $CONFIG_LINKS
66181  CONFIG_COMMANDS = $CONFIG_COMMANDS
66182  $ $0 $@
66183
66184on `(hostname || uname -n) 2>/dev/null | sed 1q`
66185"
66186
66187_ACEOF
66188
66189case $ac_config_files in *"
66190"*) set x $ac_config_files; shift; ac_config_files=$*;;
66191esac
66192
66193
66194
66195cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66196# Files that config.status was made for.
66197config_files="$ac_config_files"
66198
66199_ACEOF
66200
66201cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66202ac_cs_usage="\
66203\`$as_me' instantiates files and other configuration actions
66204from templates according to the current configuration.  Unless the files
66205and actions are specified as TAGs, all are instantiated by default.
66206
66207Usage: $0 [OPTION]... [TAG]...
66208
66209  -h, --help       print this help, then exit
66210  -V, --version    print version number and configuration settings, then exit
66211      --config     print configuration, then exit
66212  -q, --quiet, --silent
66213                   do not print progress messages
66214  -d, --debug      don't remove temporary files
66215      --recheck    update $as_me by reconfiguring in the same conditions
66216      --file=FILE[:TEMPLATE]
66217                   instantiate the configuration file FILE
66218
66219Configuration files:
66220$config_files
66221
66222Report bugs to <build-dev@openjdk.java.net>.
66223OpenJDK home page: <http://openjdk.java.net>."
66224
66225_ACEOF
66226cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66227ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66228ac_cs_version="\\
66229OpenJDK config.status jdk9
66230configured by $0, generated by GNU Autoconf 2.69,
66231  with options \\"\$ac_cs_config\\"
66232
66233Copyright (C) 2012 Free Software Foundation, Inc.
66234This config.status script is free software; the Free Software Foundation
66235gives unlimited permission to copy, distribute and modify it."
66236
66237ac_pwd='$ac_pwd'
66238srcdir='$srcdir'
66239AWK='$AWK'
66240test -n "\$AWK" || AWK=awk
66241_ACEOF
66242
66243cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66244# The default lists apply if the user does not specify any file.
66245ac_need_defaults=:
66246while test $# != 0
66247do
66248  case $1 in
66249  --*=?*)
66250    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66251    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66252    ac_shift=:
66253    ;;
66254  --*=)
66255    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66256    ac_optarg=
66257    ac_shift=:
66258    ;;
66259  *)
66260    ac_option=$1
66261    ac_optarg=$2
66262    ac_shift=shift
66263    ;;
66264  esac
66265
66266  case $ac_option in
66267  # Handling of the options.
66268  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66269    ac_cs_recheck=: ;;
66270  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66271    $as_echo "$ac_cs_version"; exit ;;
66272  --config | --confi | --conf | --con | --co | --c )
66273    $as_echo "$ac_cs_config"; exit ;;
66274  --debug | --debu | --deb | --de | --d | -d )
66275    debug=: ;;
66276  --file | --fil | --fi | --f )
66277    $ac_shift
66278    case $ac_optarg in
66279    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66280    '') as_fn_error $? "missing file argument" ;;
66281    esac
66282    as_fn_append CONFIG_FILES " '$ac_optarg'"
66283    ac_need_defaults=false;;
66284  --he | --h |  --help | --hel | -h )
66285    $as_echo "$ac_cs_usage"; exit ;;
66286  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66287  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66288    ac_cs_silent=: ;;
66289
66290  # This is an error.
66291  -*) as_fn_error $? "unrecognized option: \`$1'
66292Try \`$0 --help' for more information." ;;
66293
66294  *) as_fn_append ac_config_targets " $1"
66295     ac_need_defaults=false ;;
66296
66297  esac
66298  shift
66299done
66300
66301ac_configure_extra_args=
66302
66303if $ac_cs_silent; then
66304  exec 6>/dev/null
66305  ac_configure_extra_args="$ac_configure_extra_args --silent"
66306fi
66307
66308_ACEOF
66309cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66310if \$ac_cs_recheck; then
66311  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66312  shift
66313  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66314  CONFIG_SHELL='$SHELL'
66315  export CONFIG_SHELL
66316  exec "\$@"
66317fi
66318
66319_ACEOF
66320cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66321exec 5>>config.log
66322{
66323  echo
66324  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66325## Running $as_me. ##
66326_ASBOX
66327  $as_echo "$ac_log"
66328} >&5
66329
66330_ACEOF
66331cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66332_ACEOF
66333
66334cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66335
66336# Handling of arguments.
66337for ac_config_target in $ac_config_targets
66338do
66339  case $ac_config_target in
66340    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66341    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66342    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66343    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66344    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66345
66346  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66347  esac
66348done
66349
66350
66351# If the user did not use the arguments to specify the items to instantiate,
66352# then the envvar interface is used.  Set only those that are not.
66353# We use the long form for the default assignment because of an extremely
66354# bizarre bug on SunOS 4.1.3.
66355if $ac_need_defaults; then
66356  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66357fi
66358
66359# Have a temporary directory for convenience.  Make it in the build tree
66360# simply because there is no reason against having it here, and in addition,
66361# creating and moving files from /tmp can sometimes cause problems.
66362# Hook for its removal unless debugging.
66363# Note that there is a small window in which the directory will not be cleaned:
66364# after its creation but before its name has been assigned to `$tmp'.
66365$debug ||
66366{
66367  tmp= ac_tmp=
66368  trap 'exit_status=$?
66369  : "${ac_tmp:=$tmp}"
66370  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66371' 0
66372  trap 'as_fn_exit 1' 1 2 13 15
66373}
66374# Create a (secure) tmp directory for tmp files.
66375
66376{
66377  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66378  test -d "$tmp"
66379}  ||
66380{
66381  tmp=./conf$$-$RANDOM
66382  (umask 077 && mkdir "$tmp")
66383} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66384ac_tmp=$tmp
66385
66386# Set up the scripts for CONFIG_FILES section.
66387# No need to generate them if there are no CONFIG_FILES.
66388# This happens for instance with `./config.status config.h'.
66389if test -n "$CONFIG_FILES"; then
66390
66391
66392ac_cr=`echo X | tr X '\015'`
66393# On cygwin, bash can eat \r inside `` if the user requested igncr.
66394# But we know of no other shell where ac_cr would be empty at this
66395# point, so we can use a bashism as a fallback.
66396if test "x$ac_cr" = x; then
66397  eval ac_cr=\$\'\\r\'
66398fi
66399ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66400if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66401  ac_cs_awk_cr='\\r'
66402else
66403  ac_cs_awk_cr=$ac_cr
66404fi
66405
66406echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66407_ACEOF
66408
66409
66410{
66411  echo "cat >conf$$subs.awk <<_ACEOF" &&
66412  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66413  echo "_ACEOF"
66414} >conf$$subs.sh ||
66415  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66416ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66417ac_delim='%!_!# '
66418for ac_last_try in false false false false false :; do
66419  . ./conf$$subs.sh ||
66420    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66421
66422  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66423  if test $ac_delim_n = $ac_delim_num; then
66424    break
66425  elif $ac_last_try; then
66426    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66427  else
66428    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66429  fi
66430done
66431rm -f conf$$subs.sh
66432
66433cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66434cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66435_ACEOF
66436sed -n '
66437h
66438s/^/S["/; s/!.*/"]=/
66439p
66440g
66441s/^[^!]*!//
66442:repl
66443t repl
66444s/'"$ac_delim"'$//
66445t delim
66446:nl
66447h
66448s/\(.\{148\}\)..*/\1/
66449t more1
66450s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66451p
66452n
66453b repl
66454:more1
66455s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66456p
66457g
66458s/.\{148\}//
66459t nl
66460:delim
66461h
66462s/\(.\{148\}\)..*/\1/
66463t more2
66464s/["\\]/\\&/g; s/^/"/; s/$/"/
66465p
66466b
66467:more2
66468s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66469p
66470g
66471s/.\{148\}//
66472t delim
66473' <conf$$subs.awk | sed '
66474/^[^""]/{
66475  N
66476  s/\n//
66477}
66478' >>$CONFIG_STATUS || ac_write_fail=1
66479rm -f conf$$subs.awk
66480cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66481_ACAWK
66482cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66483  for (key in S) S_is_set[key] = 1
66484  FS = ""
66485
66486}
66487{
66488  line = $ 0
66489  nfields = split(line, field, "@")
66490  substed = 0
66491  len = length(field[1])
66492  for (i = 2; i < nfields; i++) {
66493    key = field[i]
66494    keylen = length(key)
66495    if (S_is_set[key]) {
66496      value = S[key]
66497      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66498      len += length(value) + length(field[++i])
66499      substed = 1
66500    } else
66501      len += 1 + keylen
66502  }
66503
66504  print line
66505}
66506
66507_ACAWK
66508_ACEOF
66509cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66510if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66511  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66512else
66513  cat
66514fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66515  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66516_ACEOF
66517
66518# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66519# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66520# trailing colons and then remove the whole line if VPATH becomes empty
66521# (actually we leave an empty line to preserve line numbers).
66522if test "x$srcdir" = x.; then
66523  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66524h
66525s///
66526s/^/:/
66527s/[	 ]*$/:/
66528s/:\$(srcdir):/:/g
66529s/:\${srcdir}:/:/g
66530s/:@srcdir@:/:/g
66531s/^:*//
66532s/:*$//
66533x
66534s/\(=[	 ]*\).*/\1/
66535G
66536s/\n//
66537s/^[^=]*=[	 ]*$//
66538}'
66539fi
66540
66541cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66542fi # test -n "$CONFIG_FILES"
66543
66544
66545eval set X "  :F $CONFIG_FILES      "
66546shift
66547for ac_tag
66548do
66549  case $ac_tag in
66550  :[FHLC]) ac_mode=$ac_tag; continue;;
66551  esac
66552  case $ac_mode$ac_tag in
66553  :[FHL]*:*);;
66554  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66555  :[FH]-) ac_tag=-:-;;
66556  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66557  esac
66558  ac_save_IFS=$IFS
66559  IFS=:
66560  set x $ac_tag
66561  IFS=$ac_save_IFS
66562  shift
66563  ac_file=$1
66564  shift
66565
66566  case $ac_mode in
66567  :L) ac_source=$1;;
66568  :[FH])
66569    ac_file_inputs=
66570    for ac_f
66571    do
66572      case $ac_f in
66573      -) ac_f="$ac_tmp/stdin";;
66574      *) # Look for the file first in the build tree, then in the source tree
66575	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66576	 # because $ac_f cannot contain `:'.
66577	 test -f "$ac_f" ||
66578	   case $ac_f in
66579	   [\\/$]*) false;;
66580	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66581	   esac ||
66582	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66583      esac
66584      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66585      as_fn_append ac_file_inputs " '$ac_f'"
66586    done
66587
66588    # Let's still pretend it is `configure' which instantiates (i.e., don't
66589    # use $as_me), people would be surprised to read:
66590    #    /* config.h.  Generated by config.status.  */
66591    configure_input='Generated from '`
66592	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66593	`' by configure.'
66594    if test x"$ac_file" != x-; then
66595      configure_input="$ac_file.  $configure_input"
66596      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66597$as_echo "$as_me: creating $ac_file" >&6;}
66598    fi
66599    # Neutralize special characters interpreted by sed in replacement strings.
66600    case $configure_input in #(
66601    *\&* | *\|* | *\\* )
66602       ac_sed_conf_input=`$as_echo "$configure_input" |
66603       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66604    *) ac_sed_conf_input=$configure_input;;
66605    esac
66606
66607    case $ac_tag in
66608    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66609      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66610    esac
66611    ;;
66612  esac
66613
66614  ac_dir=`$as_dirname -- "$ac_file" ||
66615$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66616	 X"$ac_file" : 'X\(//\)[^/]' \| \
66617	 X"$ac_file" : 'X\(//\)$' \| \
66618	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66619$as_echo X"$ac_file" |
66620    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66621	    s//\1/
66622	    q
66623	  }
66624	  /^X\(\/\/\)[^/].*/{
66625	    s//\1/
66626	    q
66627	  }
66628	  /^X\(\/\/\)$/{
66629	    s//\1/
66630	    q
66631	  }
66632	  /^X\(\/\).*/{
66633	    s//\1/
66634	    q
66635	  }
66636	  s/.*/./; q'`
66637  as_dir="$ac_dir"; as_fn_mkdir_p
66638  ac_builddir=.
66639
66640case "$ac_dir" in
66641.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66642*)
66643  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66644  # A ".." for each directory in $ac_dir_suffix.
66645  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66646  case $ac_top_builddir_sub in
66647  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66648  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66649  esac ;;
66650esac
66651ac_abs_top_builddir=$ac_pwd
66652ac_abs_builddir=$ac_pwd$ac_dir_suffix
66653# for backward compatibility:
66654ac_top_builddir=$ac_top_build_prefix
66655
66656case $srcdir in
66657  .)  # We are building in place.
66658    ac_srcdir=.
66659    ac_top_srcdir=$ac_top_builddir_sub
66660    ac_abs_top_srcdir=$ac_pwd ;;
66661  [\\/]* | ?:[\\/]* )  # Absolute name.
66662    ac_srcdir=$srcdir$ac_dir_suffix;
66663    ac_top_srcdir=$srcdir
66664    ac_abs_top_srcdir=$srcdir ;;
66665  *) # Relative name.
66666    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66667    ac_top_srcdir=$ac_top_build_prefix$srcdir
66668    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66669esac
66670ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66671
66672
66673  case $ac_mode in
66674  :F)
66675  #
66676  # CONFIG_FILE
66677  #
66678
66679_ACEOF
66680
66681cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66682# If the template does not know about datarootdir, expand it.
66683# FIXME: This hack should be removed a few years after 2.60.
66684ac_datarootdir_hack=; ac_datarootdir_seen=
66685ac_sed_dataroot='
66686/datarootdir/ {
66687  p
66688  q
66689}
66690/@datadir@/p
66691/@docdir@/p
66692/@infodir@/p
66693/@localedir@/p
66694/@mandir@/p'
66695case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66696*datarootdir*) ac_datarootdir_seen=yes;;
66697*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66698  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66699$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66700_ACEOF
66701cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66702  ac_datarootdir_hack='
66703  s&@datadir@&$datadir&g
66704  s&@docdir@&$docdir&g
66705  s&@infodir@&$infodir&g
66706  s&@localedir@&$localedir&g
66707  s&@mandir@&$mandir&g
66708  s&\\\${datarootdir}&$datarootdir&g' ;;
66709esac
66710_ACEOF
66711
66712# Neutralize VPATH when `$srcdir' = `.'.
66713# Shell code in configure.ac might set extrasub.
66714# FIXME: do we really want to maintain this feature?
66715cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66716ac_sed_extra="$ac_vpsub
66717$extrasub
66718_ACEOF
66719cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66720:t
66721/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66722s|@configure_input@|$ac_sed_conf_input|;t t
66723s&@top_builddir@&$ac_top_builddir_sub&;t t
66724s&@top_build_prefix@&$ac_top_build_prefix&;t t
66725s&@srcdir@&$ac_srcdir&;t t
66726s&@abs_srcdir@&$ac_abs_srcdir&;t t
66727s&@top_srcdir@&$ac_top_srcdir&;t t
66728s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66729s&@builddir@&$ac_builddir&;t t
66730s&@abs_builddir@&$ac_abs_builddir&;t t
66731s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66732$ac_datarootdir_hack
66733"
66734eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66735  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66736
66737test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66738  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66739  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66740      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66741  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66742which seems to be undefined.  Please make sure it is defined" >&5
66743$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66744which seems to be undefined.  Please make sure it is defined" >&2;}
66745
66746  rm -f "$ac_tmp/stdin"
66747  case $ac_file in
66748  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66749  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66750  esac \
66751  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66752 ;;
66753
66754
66755
66756  esac
66757
66758done # for ac_tag
66759
66760
66761as_fn_exit 0
66762_ACEOF
66763ac_clean_files=$ac_clean_files_save
66764
66765test $ac_write_fail = 0 ||
66766  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66767
66768
66769# configure is writing to config.log, and then calls config.status.
66770# config.status does its own redirection, appending to config.log.
66771# Unfortunately, on DOS this fails, as config.log is still kept open
66772# by configure, so config.status won't be able to write to it; its
66773# output is simply discarded.  So we exec the FD to /dev/null,
66774# effectively closing config.log, so it can be properly (re)opened and
66775# appended to by config.status.  When coming back to configure, we
66776# need to make the FD available again.
66777if test "$no_create" != yes; then
66778  ac_cs_success=:
66779  ac_config_status_args=
66780  test "$silent" = yes &&
66781    ac_config_status_args="$ac_config_status_args --quiet"
66782  exec 5>/dev/null
66783  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66784  exec 5>>config.log
66785  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66786  # would make configure fail if this is the last instruction.
66787  $ac_cs_success || as_fn_exit 1
66788fi
66789if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66790  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66791$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66792fi
66793
66794
66795# After AC_OUTPUT, we need to do final work
66796
66797
66798  # Try to move config.log (generated by autoconf) to the configure-support directory.
66799  if test -e ./config.log; then
66800    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66801  fi
66802
66803  # Rotate our log file (configure.log)
66804  if test -e "$OUTPUT_ROOT/configure.log.old"; then
66805    $RM -f "$OUTPUT_ROOT/configure.log.old"
66806  fi
66807  if test -e "$OUTPUT_ROOT/configure.log"; then
66808    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66809  fi
66810
66811  # Move configure.log from current directory to the build output root
66812  if test -e ./configure.log; then
66813    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66814  fi
66815
66816  # Make the compare script executable
66817  $CHMOD +x $OUTPUT_ROOT/compare.sh
66818
66819
66820# Finally output some useful information to the user
66821
66822  # Finally output some useful information to the user
66823
66824  printf "\n"
66825  printf "====================================================\n"
66826  if test "x$no_create" != "xyes"; then
66827    if test "x$IS_RECONFIGURE" != "xyes"; then
66828      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66829    else
66830      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66831    fi
66832  else
66833    if test "x$IS_RECONFIGURE" != "xyes"; then
66834      printf "A configuration has been successfully checked but not created\n"
66835    else
66836      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66837    fi
66838  fi
66839  if test "x$CONFIGURE_COMMAND_LINE" != x; then
66840    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66841  else
66842    printf "using default settings.\n"
66843  fi
66844
66845  printf "\n"
66846  printf "Configuration summary:\n"
66847  printf "* Debug level:    $DEBUG_LEVEL\n"
66848  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66849  printf "* JDK variant:    $JDK_VARIANT\n"
66850  printf "* JVM variants:   $JVM_VARIANTS\n"
66851  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66852  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66853
66854  printf "\n"
66855  printf "Tools summary:\n"
66856  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66857    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66858  fi
66859  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66860  if test "x$TOOLCHAIN_VERSION" != "x"; then
66861    print_version=" $TOOLCHAIN_VERSION"
66862  fi
66863  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66864  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66865  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66866
66867  printf "\n"
66868  printf "Build performance summary:\n"
66869  printf "* Cores to use:   $JOBS\n"
66870  printf "* Memory limit:   $MEMORY_SIZE MB\n"
66871  if test "x$CCACHE_STATUS" != "x"; then
66872    printf "* ccache status:  $CCACHE_STATUS\n"
66873  fi
66874  printf "\n"
66875
66876  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66877    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66878    printf "will result in longer build times.\n"
66879    printf "\n"
66880  fi
66881
66882  if test "x$FOUND_ALT_VARIABLES" != "x"; then
66883    printf "WARNING: You have old-style ALT_ environment variables set.\n"
66884    printf "These are not respected, and will be ignored. It is recommended\n"
66885    printf "that you clean your environment. The following variables are set:\n"
66886    printf "$FOUND_ALT_VARIABLES\n"
66887    printf "\n"
66888  fi
66889
66890  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66891    printf "WARNING: Your build output directory is not on a local disk.\n"
66892    printf "This will severely degrade build performance!\n"
66893    printf "It is recommended that you create an output directory on a local disk,\n"
66894    printf "and run the configure script again from that directory.\n"
66895    printf "\n"
66896  fi
66897
66898  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66899    printf "WARNING: The result of this configuration has overridden an older\n"
66900    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66901    printf "proper build. Failure to do so might result in strange build problems.\n"
66902    printf "\n"
66903  fi
66904
66905  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66906    printf "WARNING: The result of this configuration was not saved.\n"
66907    printf "You should run without '--no-create | -n' to create the configuration.\n"
66908    printf "\n"
66909  fi
66910
66911
66912
66913  # Locate config.log.
66914  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66915    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66916  elif test -e "./config.log"; then
66917    CONFIG_LOG_PATH="."
66918  fi
66919
66920  if test -e "$CONFIG_LOG_PATH/config.log"; then
66921    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66922    if test $? -eq 0; then
66923      printf "The following warnings were produced. Repeated here for convenience:\n"
66924      # We must quote sed expression (using []) to stop m4 from eating the [].
66925      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66926      printf "\n"
66927    fi
66928  fi
66929
66930