generated-configure.sh revision 2079:65f446a2bdd7
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=1462793660
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  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
23770    INCLUDE_SA=false
23771  fi
23772
23773
23774  # Compress jars
23775  COMPRESS_JARS=false
23776
23777
23778
23779  # Setup default copyright year. Mostly overridden when building close to a new year.
23780
23781# Check whether --with-copyright-year was given.
23782if test "${with_copyright_year+set}" = set; then :
23783  withval=$with_copyright_year;
23784fi
23785
23786  if test "x$with_copyright_year" = xyes; then
23787    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23788  elif test "x$with_copyright_year" != x; then
23789    COPYRIGHT_YEAR="$with_copyright_year"
23790  else
23791    COPYRIGHT_YEAR=`date +'%Y'`
23792  fi
23793
23794
23795
23796  # Check whether --enable-keep-packaged-modules was given.
23797if test "${enable_keep_packaged_modules+set}" = set; then :
23798  enableval=$enable_keep_packaged_modules;
23799fi
23800
23801
23802  if test "x$enable_keep_packaged_modules" = "xyes"; then
23803    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23804$as_echo_n "checking if packaged modules are kept... " >&6; }
23805    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23806$as_echo "yes" >&6; }
23807    JLINK_KEEP_PACKAGED_MODULES=true
23808  elif test "x$enable_keep_packaged_modules" = "xno"; then
23809    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23810$as_echo_n "checking if packaged modules are kept... " >&6; }
23811    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23812$as_echo "no" >&6; }
23813    JLINK_KEEP_PACKAGED_MODULES=false
23814  elif test "x$enable_keep_packaged_modules" = "x"; then
23815    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
23816$as_echo "yes (default)" >&6; }
23817    JLINK_KEEP_PACKAGED_MODULES=true
23818  else
23819    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
23820  fi
23821
23822
23823
23824
23825  # Warn user that old version arguments are deprecated.
23826
23827
23828# Check whether --with-milestone was given.
23829if test "${with_milestone+set}" = set; then :
23830  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23831$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23832fi
23833
23834
23835
23836
23837# Check whether --with-update-version was given.
23838if test "${with_update_version+set}" = set; then :
23839  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23840$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23841fi
23842
23843
23844
23845
23846# Check whether --with-user-release-suffix was given.
23847if test "${with_user_release_suffix+set}" = set; then :
23848  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
23849$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23850fi
23851
23852
23853
23854
23855# Check whether --with-build-number was given.
23856if test "${with_build_number+set}" = set; then :
23857  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23858$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23859fi
23860
23861
23862
23863  # Source the version numbers file
23864  . $AUTOCONF_DIR/version-numbers
23865
23866  # Some non-version number information is set in that file
23867
23868
23869
23870
23871
23872
23873
23874
23875
23876  # Override version from arguments
23877
23878  # If --with-version-string is set, process it first. It is possible to
23879  # override parts with more specific flags, since these are processed later.
23880
23881# Check whether --with-version-string was given.
23882if test "${with_version_string+set}" = set; then :
23883  withval=$with_version_string;
23884fi
23885
23886  if test "x$with_version_string" = xyes; then
23887    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23888  elif test "x$with_version_string" != x; then
23889    # Additional [] needed to keep m4 from mangling shell constructs.
23890    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23891      VERSION_MAJOR=${BASH_REMATCH[1]}
23892      VERSION_MINOR=${BASH_REMATCH[3]}
23893      VERSION_SECURITY=${BASH_REMATCH[5]}
23894      VERSION_PATCH=${BASH_REMATCH[7]}
23895      VERSION_PRE=${BASH_REMATCH[9]}
23896      version_plus_separator=${BASH_REMATCH[11]}
23897      VERSION_BUILD=${BASH_REMATCH[12]}
23898      VERSION_OPT=${BASH_REMATCH[14]}
23899      # Unspecified numerical fields are interpreted as 0.
23900      if test "x$VERSION_MINOR" = x; then
23901        VERSION_MINOR=0
23902      fi
23903      if test "x$VERSION_SECURITY" = x; then
23904        VERSION_SECURITY=0
23905      fi
23906      if test "x$VERSION_PATCH" = x; then
23907        VERSION_PATCH=0
23908      fi
23909      if test "x$version_plus_separator" != x \
23910          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23911        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23912      fi
23913      # Stop the version part process from setting default values.
23914      # We still allow them to explicitely override though.
23915      NO_DEFAULT_VERSION_PARTS=true
23916    else
23917      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23918    fi
23919  fi
23920
23921
23922# Check whether --with-version-pre was given.
23923if test "${with_version_pre+set}" = set; then :
23924  withval=$with_version_pre; with_version_pre_present=true
23925else
23926  with_version_pre_present=false
23927fi
23928
23929
23930  if test "x$with_version_pre_present" = xtrue; then
23931    if test "x$with_version_pre" = xyes; then
23932      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23933    elif test "x$with_version_pre" = xno; then
23934      # Interpret --without-* as empty string instead of the literal "no"
23935      VERSION_PRE=
23936    else
23937      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23938       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23939      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23940        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23941$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23942      fi
23943    fi
23944  else
23945    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23946      # Default is to use "internal" as pre
23947      VERSION_PRE="internal"
23948    fi
23949  fi
23950
23951
23952# Check whether --with-version-opt was given.
23953if test "${with_version_opt+set}" = set; then :
23954  withval=$with_version_opt; with_version_opt_present=true
23955else
23956  with_version_opt_present=false
23957fi
23958
23959
23960  if test "x$with_version_opt_present" = xtrue; then
23961    if test "x$with_version_opt" = xyes; then
23962      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23963    elif test "x$with_version_opt" = xno; then
23964      # Interpret --without-* as empty string instead of the literal "no"
23965      VERSION_OPT=
23966    else
23967      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23968       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23969      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23970        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23971$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23972      fi
23973    fi
23974  else
23975    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23976      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23977      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23978      # Outer [ ] to quote m4.
23979       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23980      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
23981    fi
23982  fi
23983
23984
23985# Check whether --with-version-build was given.
23986if test "${with_version_build+set}" = set; then :
23987  withval=$with_version_build; with_version_build_present=true
23988else
23989  with_version_build_present=false
23990fi
23991
23992
23993  if test "x$with_version_build_present" = xtrue; then
23994    if test "x$with_version_build" = xyes; then
23995      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23996    elif test "x$with_version_build" = xno; then
23997      # Interpret --without-* as empty string instead of the literal "no"
23998      VERSION_BUILD=
23999    elif test "x$with_version_build" = x; then
24000      VERSION_BUILD=
24001    else
24002
24003  # Additional [] needed to keep m4 from mangling shell constructs.
24004  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24005    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24006  fi
24007  # Extract the version number without leading zeros.
24008  cleaned_value=${BASH_REMATCH[1]}
24009  if test "x$cleaned_value" = x; then
24010    # Special case for zero
24011    cleaned_value=${BASH_REMATCH[2]}
24012  fi
24013
24014  if test $cleaned_value -gt 255; then
24015    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24016  fi
24017  if test "x$cleaned_value" != "x$with_version_build"; then
24018    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24019$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24020  fi
24021  VERSION_BUILD=$cleaned_value
24022
24023    fi
24024  else
24025    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24026      # Default is to not have a build number.
24027      VERSION_BUILD=""
24028      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24029      VERSION_BUILD=0
24030    fi
24031  fi
24032
24033
24034# Check whether --with-version-major was given.
24035if test "${with_version_major+set}" = set; then :
24036  withval=$with_version_major; with_version_major_present=true
24037else
24038  with_version_major_present=false
24039fi
24040
24041
24042  if test "x$with_version_major_present" = xtrue; then
24043    if test "x$with_version_major" = xyes; then
24044      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24045    else
24046
24047  # Additional [] needed to keep m4 from mangling shell constructs.
24048  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24049    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24050  fi
24051  # Extract the version number without leading zeros.
24052  cleaned_value=${BASH_REMATCH[1]}
24053  if test "x$cleaned_value" = x; then
24054    # Special case for zero
24055    cleaned_value=${BASH_REMATCH[2]}
24056  fi
24057
24058  if test $cleaned_value -gt 255; then
24059    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24060  fi
24061  if test "x$cleaned_value" != "x$with_version_major"; then
24062    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24063$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24064  fi
24065  VERSION_MAJOR=$cleaned_value
24066
24067    fi
24068  else
24069    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24070      # Default is to get value from version-numbers
24071      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24072    fi
24073  fi
24074
24075
24076# Check whether --with-version-minor was given.
24077if test "${with_version_minor+set}" = set; then :
24078  withval=$with_version_minor; with_version_minor_present=true
24079else
24080  with_version_minor_present=false
24081fi
24082
24083
24084  if test "x$with_version_minor_present" = xtrue; then
24085    if test "x$with_version_minor" = xyes; then
24086      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24087    elif test "x$with_version_minor" = xno; then
24088      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24089      VERSION_MINOR=0
24090    elif test "x$with_version_minor" = x; then
24091      VERSION_MINOR=0
24092    else
24093
24094  # Additional [] needed to keep m4 from mangling shell constructs.
24095  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24096    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24097  fi
24098  # Extract the version number without leading zeros.
24099  cleaned_value=${BASH_REMATCH[1]}
24100  if test "x$cleaned_value" = x; then
24101    # Special case for zero
24102    cleaned_value=${BASH_REMATCH[2]}
24103  fi
24104
24105  if test $cleaned_value -gt 255; then
24106    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24107  fi
24108  if test "x$cleaned_value" != "x$with_version_minor"; then
24109    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24110$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24111  fi
24112  VERSION_MINOR=$cleaned_value
24113
24114    fi
24115  else
24116    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24117      # Default is 0, if unspecified
24118      VERSION_MINOR=0
24119    fi
24120  fi
24121
24122
24123# Check whether --with-version-security was given.
24124if test "${with_version_security+set}" = set; then :
24125  withval=$with_version_security; with_version_security_present=true
24126else
24127  with_version_security_present=false
24128fi
24129
24130
24131  if test "x$with_version_security_present" = xtrue; then
24132    if test "x$with_version_security" = xyes; then
24133      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24134    elif test "x$with_version_security" = xno; then
24135      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24136      VERSION_SECURITY=0
24137    elif test "x$with_version_security" = x; then
24138      VERSION_SECURITY=0
24139    else
24140
24141  # Additional [] needed to keep m4 from mangling shell constructs.
24142  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24143    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24144  fi
24145  # Extract the version number without leading zeros.
24146  cleaned_value=${BASH_REMATCH[1]}
24147  if test "x$cleaned_value" = x; then
24148    # Special case for zero
24149    cleaned_value=${BASH_REMATCH[2]}
24150  fi
24151
24152  if test $cleaned_value -gt 255; then
24153    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24154  fi
24155  if test "x$cleaned_value" != "x$with_version_security"; then
24156    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24157$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24158  fi
24159  VERSION_SECURITY=$cleaned_value
24160
24161    fi
24162  else
24163    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24164      # Default is 0, if unspecified
24165      VERSION_SECURITY=0
24166    fi
24167  fi
24168
24169
24170# Check whether --with-version-patch was given.
24171if test "${with_version_patch+set}" = set; then :
24172  withval=$with_version_patch; with_version_patch_present=true
24173else
24174  with_version_patch_present=false
24175fi
24176
24177
24178  if test "x$with_version_patch_present" = xtrue; then
24179    if test "x$with_version_patch" = xyes; then
24180      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24181    elif test "x$with_version_patch" = xno; then
24182      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24183      VERSION_PATCH=0
24184    elif test "x$with_version_patch" = x; then
24185      VERSION_PATCH=0
24186    else
24187
24188  # Additional [] needed to keep m4 from mangling shell constructs.
24189  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24190    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24191  fi
24192  # Extract the version number without leading zeros.
24193  cleaned_value=${BASH_REMATCH[1]}
24194  if test "x$cleaned_value" = x; then
24195    # Special case for zero
24196    cleaned_value=${BASH_REMATCH[2]}
24197  fi
24198
24199  if test $cleaned_value -gt 255; then
24200    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24201  fi
24202  if test "x$cleaned_value" != "x$with_version_patch"; then
24203    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24204$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24205  fi
24206  VERSION_PATCH=$cleaned_value
24207
24208    fi
24209  else
24210    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24211      # Default is 0, if unspecified
24212      VERSION_PATCH=0
24213    fi
24214  fi
24215
24216  # Calculate derived version properties
24217
24218  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24219  if test "x$VERSION_PRE" = x; then
24220    VERSION_IS_GA=true
24221  else
24222    VERSION_IS_GA=false
24223  fi
24224
24225  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24226  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24227
24228  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24229  # Strip trailing zeroes from stripped_version_number
24230  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24231  VERSION_NUMBER=$stripped_version_number
24232
24233  # The complete version string, with additional build information
24234  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24235    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24236  else
24237    # If either build or opt is set, we need a + separator
24238    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24239  fi
24240
24241  # The short version string, just VERSION_NUMBER and PRE, if present.
24242  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24243
24244  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24245$as_echo_n "checking for version string... " >&6; }
24246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24247$as_echo "$VERSION_STRING" >&6; }
24248
24249
24250
24251
24252
24253
24254
24255
24256
24257
24258
24259
24260
24261
24262
24263###############################################################################
24264#
24265# Setup BootJDK, used to bootstrap the build.
24266#
24267###############################################################################
24268
24269
24270  BOOT_JDK_FOUND=no
24271
24272# Check whether --with-boot-jdk was given.
24273if test "${with_boot_jdk+set}" = set; then :
24274  withval=$with_boot_jdk;
24275fi
24276
24277
24278  # We look for the Boot JDK through various means, going from more certain to
24279  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24280  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24281  # must check if this is indeed valid; otherwise we'll continue looking.
24282
24283  # Test: Is bootjdk explicitely set by command line arguments?
24284
24285  if test "x$BOOT_JDK_FOUND" = xno; then
24286    # Now execute the test
24287
24288  if test "x$with_boot_jdk" != x; then
24289    BOOT_JDK=$with_boot_jdk
24290    BOOT_JDK_FOUND=maybe
24291    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24292$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24293  fi
24294
24295
24296    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24297    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24298      # Do we have a bin/java?
24299      if test ! -x "$BOOT_JDK/bin/java"; then
24300        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24301$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24302        BOOT_JDK_FOUND=no
24303      else
24304        # Do we have a bin/javac?
24305        if test ! -x "$BOOT_JDK/bin/javac"; then
24306          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24307$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24308          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24309$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24310          BOOT_JDK_FOUND=no
24311        else
24312          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24313          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24314
24315          # Extra M4 quote needed to protect [] in grep expression.
24316          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24317          if test "x$FOUND_CORRECT_VERSION" = x; then
24318            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24319$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24320            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24321$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24322            BOOT_JDK_FOUND=no
24323          else
24324            # We're done! :-)
24325            BOOT_JDK_FOUND=yes
24326
24327  # Only process if variable expands to non-empty
24328
24329  if test "x$BOOT_JDK" != x; then
24330    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24331
24332  # Input might be given as Windows format, start by converting to
24333  # unix format.
24334  path="$BOOT_JDK"
24335  new_path=`$CYGPATH -u "$path"`
24336
24337  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24338  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24339  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24340  # "foo.exe" is OK but "foo" is an error.
24341  #
24342  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24343  # It is also a way to make sure we got the proper file name for the real test later on.
24344  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24345  if test "x$test_shortpath" = x; then
24346    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24347$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24348    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24349  fi
24350
24351  # Call helper function which possibly converts this using DOS-style short mode.
24352  # If so, the updated path is stored in $new_path.
24353
24354  input_path="$new_path"
24355  # Check if we need to convert this using DOS-style short mode. If the path
24356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24357  # take no chances and rewrite it.
24358  # Note: m4 eats our [], so we need to use [ and ] instead.
24359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24360  if test "x$has_forbidden_chars" != x; then
24361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24362    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24363    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24364    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24365      # Going to short mode and back again did indeed matter. Since short mode is
24366      # case insensitive, let's make it lowercase to improve readability.
24367      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24368      # Now convert it back to Unix-style (cygpath)
24369      input_path=`$CYGPATH -u "$shortmode_path"`
24370      new_path="$input_path"
24371    fi
24372  fi
24373
24374  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24375  if test "x$test_cygdrive_prefix" = x; then
24376    # As a simple fix, exclude /usr/bin since it's not a real path.
24377    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24378      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24379      # a path prefixed by /cygdrive for fixpath to work.
24380      new_path="$CYGWIN_ROOT_PATH$input_path"
24381    fi
24382  fi
24383
24384
24385  if test "x$path" != "x$new_path"; then
24386    BOOT_JDK="$new_path"
24387    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24388$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24389  fi
24390
24391    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24392
24393  path="$BOOT_JDK"
24394  has_colon=`$ECHO $path | $GREP ^.:`
24395  new_path="$path"
24396  if test "x$has_colon" = x; then
24397    # Not in mixed or Windows style, start by that.
24398    new_path=`cmd //c echo $path`
24399  fi
24400
24401
24402  input_path="$new_path"
24403  # Check if we need to convert this using DOS-style short mode. If the path
24404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24405  # take no chances and rewrite it.
24406  # Note: m4 eats our [], so we need to use [ and ] instead.
24407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24408  if test "x$has_forbidden_chars" != x; then
24409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24410    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24411  fi
24412
24413
24414  windows_path="$new_path"
24415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24416    unix_path=`$CYGPATH -u "$windows_path"`
24417    new_path="$unix_path"
24418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24420    new_path="$unix_path"
24421  fi
24422
24423  if test "x$path" != "x$new_path"; then
24424    BOOT_JDK="$new_path"
24425    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24426$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24427  fi
24428
24429  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24430  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24431
24432    else
24433      # We're on a unix platform. Hooray! :)
24434      path="$BOOT_JDK"
24435      has_space=`$ECHO "$path" | $GREP " "`
24436      if test "x$has_space" != x; then
24437        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24438$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24439        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24440      fi
24441
24442      # Use eval to expand a potential ~
24443      eval path="$path"
24444      if test ! -f "$path" && test ! -d "$path"; then
24445        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24446      fi
24447
24448      if test -d "$path"; then
24449        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24450      else
24451        dir="`$DIRNAME "$path"`"
24452        base="`$BASENAME "$path"`"
24453        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24454      fi
24455    fi
24456  fi
24457
24458            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24459$as_echo_n "checking for Boot JDK... " >&6; }
24460            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24461$as_echo "$BOOT_JDK" >&6; }
24462            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24463$as_echo_n "checking Boot JDK version... " >&6; }
24464            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24465            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24466$as_echo "$BOOT_JDK_VERSION" >&6; }
24467          fi # end check jdk version
24468        fi # end check javac
24469      fi # end check java
24470    fi # end check boot jdk found
24471  fi
24472
24473  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24474    # Having specified an argument which is incorrect will produce an instant failure;
24475    # we should not go on looking
24476    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24477  fi
24478
24479  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24480
24481  if test "x$BOOT_JDK_FOUND" = xno; then
24482    # Now execute the test
24483
24484  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24485    # First check at user selected default
24486
24487  if test "x$BOOT_JDK_FOUND" = xno; then
24488    # Now execute the test
24489
24490  if test -x /usr/libexec/java_home; then
24491    BOOT_JDK=`/usr/libexec/java_home `
24492    BOOT_JDK_FOUND=maybe
24493    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24494$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24495  fi
24496
24497
24498    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24499    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24500      # Do we have a bin/java?
24501      if test ! -x "$BOOT_JDK/bin/java"; then
24502        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24503$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24504        BOOT_JDK_FOUND=no
24505      else
24506        # Do we have a bin/javac?
24507        if test ! -x "$BOOT_JDK/bin/javac"; then
24508          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24509$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24510          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24511$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24512          BOOT_JDK_FOUND=no
24513        else
24514          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24515          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24516
24517          # Extra M4 quote needed to protect [] in grep expression.
24518          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24519          if test "x$FOUND_CORRECT_VERSION" = x; then
24520            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24521$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24522            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24523$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24524            BOOT_JDK_FOUND=no
24525          else
24526            # We're done! :-)
24527            BOOT_JDK_FOUND=yes
24528
24529  # Only process if variable expands to non-empty
24530
24531  if test "x$BOOT_JDK" != x; then
24532    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24533
24534  # Input might be given as Windows format, start by converting to
24535  # unix format.
24536  path="$BOOT_JDK"
24537  new_path=`$CYGPATH -u "$path"`
24538
24539  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24540  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24541  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24542  # "foo.exe" is OK but "foo" is an error.
24543  #
24544  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24545  # It is also a way to make sure we got the proper file name for the real test later on.
24546  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24547  if test "x$test_shortpath" = x; then
24548    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24549$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24550    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24551  fi
24552
24553  # Call helper function which possibly converts this using DOS-style short mode.
24554  # If so, the updated path is stored in $new_path.
24555
24556  input_path="$new_path"
24557  # Check if we need to convert this using DOS-style short mode. If the path
24558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24559  # take no chances and rewrite it.
24560  # Note: m4 eats our [], so we need to use [ and ] instead.
24561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24562  if test "x$has_forbidden_chars" != x; then
24563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24567      # Going to short mode and back again did indeed matter. Since short mode is
24568      # case insensitive, let's make it lowercase to improve readability.
24569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24570      # Now convert it back to Unix-style (cygpath)
24571      input_path=`$CYGPATH -u "$shortmode_path"`
24572      new_path="$input_path"
24573    fi
24574  fi
24575
24576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24577  if test "x$test_cygdrive_prefix" = x; then
24578    # As a simple fix, exclude /usr/bin since it's not a real path.
24579    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24581      # a path prefixed by /cygdrive for fixpath to work.
24582      new_path="$CYGWIN_ROOT_PATH$input_path"
24583    fi
24584  fi
24585
24586
24587  if test "x$path" != "x$new_path"; then
24588    BOOT_JDK="$new_path"
24589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24590$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24591  fi
24592
24593    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24594
24595  path="$BOOT_JDK"
24596  has_colon=`$ECHO $path | $GREP ^.:`
24597  new_path="$path"
24598  if test "x$has_colon" = x; then
24599    # Not in mixed or Windows style, start by that.
24600    new_path=`cmd //c echo $path`
24601  fi
24602
24603
24604  input_path="$new_path"
24605  # Check if we need to convert this using DOS-style short mode. If the path
24606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24607  # take no chances and rewrite it.
24608  # Note: m4 eats our [], so we need to use [ and ] instead.
24609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24610  if test "x$has_forbidden_chars" != x; then
24611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24612    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24613  fi
24614
24615
24616  windows_path="$new_path"
24617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24618    unix_path=`$CYGPATH -u "$windows_path"`
24619    new_path="$unix_path"
24620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24622    new_path="$unix_path"
24623  fi
24624
24625  if test "x$path" != "x$new_path"; then
24626    BOOT_JDK="$new_path"
24627    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24628$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24629  fi
24630
24631  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24632  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24633
24634    else
24635      # We're on a unix platform. Hooray! :)
24636      path="$BOOT_JDK"
24637      has_space=`$ECHO "$path" | $GREP " "`
24638      if test "x$has_space" != x; then
24639        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24640$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24641        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24642      fi
24643
24644      # Use eval to expand a potential ~
24645      eval path="$path"
24646      if test ! -f "$path" && test ! -d "$path"; then
24647        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24648      fi
24649
24650      if test -d "$path"; then
24651        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24652      else
24653        dir="`$DIRNAME "$path"`"
24654        base="`$BASENAME "$path"`"
24655        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24656      fi
24657    fi
24658  fi
24659
24660            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24661$as_echo_n "checking for Boot JDK... " >&6; }
24662            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24663$as_echo "$BOOT_JDK" >&6; }
24664            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24665$as_echo_n "checking Boot JDK version... " >&6; }
24666            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24667            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24668$as_echo "$BOOT_JDK_VERSION" >&6; }
24669          fi # end check jdk version
24670        fi # end check javac
24671      fi # end check java
24672    fi # end check boot jdk found
24673  fi
24674
24675    # If that did not work out (e.g. too old), try explicit versions instead
24676
24677  if test "x$BOOT_JDK_FOUND" = xno; then
24678    # Now execute the test
24679
24680  if test -x /usr/libexec/java_home; then
24681    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24682    BOOT_JDK_FOUND=maybe
24683    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24684$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24685  fi
24686
24687
24688    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24689    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24690      # Do we have a bin/java?
24691      if test ! -x "$BOOT_JDK/bin/java"; then
24692        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24693$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24694        BOOT_JDK_FOUND=no
24695      else
24696        # Do we have a bin/javac?
24697        if test ! -x "$BOOT_JDK/bin/javac"; then
24698          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24699$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24700          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24701$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24702          BOOT_JDK_FOUND=no
24703        else
24704          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24705          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24706
24707          # Extra M4 quote needed to protect [] in grep expression.
24708          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24709          if test "x$FOUND_CORRECT_VERSION" = x; then
24710            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24711$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24712            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24713$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24714            BOOT_JDK_FOUND=no
24715          else
24716            # We're done! :-)
24717            BOOT_JDK_FOUND=yes
24718
24719  # Only process if variable expands to non-empty
24720
24721  if test "x$BOOT_JDK" != x; then
24722    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24723
24724  # Input might be given as Windows format, start by converting to
24725  # unix format.
24726  path="$BOOT_JDK"
24727  new_path=`$CYGPATH -u "$path"`
24728
24729  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24730  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24731  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24732  # "foo.exe" is OK but "foo" is an error.
24733  #
24734  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24735  # It is also a way to make sure we got the proper file name for the real test later on.
24736  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24737  if test "x$test_shortpath" = x; then
24738    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24739$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24740    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24741  fi
24742
24743  # Call helper function which possibly converts this using DOS-style short mode.
24744  # If so, the updated path is stored in $new_path.
24745
24746  input_path="$new_path"
24747  # Check if we need to convert this using DOS-style short mode. If the path
24748  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24749  # take no chances and rewrite it.
24750  # Note: m4 eats our [], so we need to use [ and ] instead.
24751  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24752  if test "x$has_forbidden_chars" != x; then
24753    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24754    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24755    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24756    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24757      # Going to short mode and back again did indeed matter. Since short mode is
24758      # case insensitive, let's make it lowercase to improve readability.
24759      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24760      # Now convert it back to Unix-style (cygpath)
24761      input_path=`$CYGPATH -u "$shortmode_path"`
24762      new_path="$input_path"
24763    fi
24764  fi
24765
24766  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24767  if test "x$test_cygdrive_prefix" = x; then
24768    # As a simple fix, exclude /usr/bin since it's not a real path.
24769    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24770      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24771      # a path prefixed by /cygdrive for fixpath to work.
24772      new_path="$CYGWIN_ROOT_PATH$input_path"
24773    fi
24774  fi
24775
24776
24777  if test "x$path" != "x$new_path"; then
24778    BOOT_JDK="$new_path"
24779    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24780$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24781  fi
24782
24783    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24784
24785  path="$BOOT_JDK"
24786  has_colon=`$ECHO $path | $GREP ^.:`
24787  new_path="$path"
24788  if test "x$has_colon" = x; then
24789    # Not in mixed or Windows style, start by that.
24790    new_path=`cmd //c echo $path`
24791  fi
24792
24793
24794  input_path="$new_path"
24795  # Check if we need to convert this using DOS-style short mode. If the path
24796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24797  # take no chances and rewrite it.
24798  # Note: m4 eats our [], so we need to use [ and ] instead.
24799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24800  if test "x$has_forbidden_chars" != x; then
24801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24802    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24803  fi
24804
24805
24806  windows_path="$new_path"
24807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24808    unix_path=`$CYGPATH -u "$windows_path"`
24809    new_path="$unix_path"
24810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24812    new_path="$unix_path"
24813  fi
24814
24815  if test "x$path" != "x$new_path"; then
24816    BOOT_JDK="$new_path"
24817    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24818$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24819  fi
24820
24821  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24822  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24823
24824    else
24825      # We're on a unix platform. Hooray! :)
24826      path="$BOOT_JDK"
24827      has_space=`$ECHO "$path" | $GREP " "`
24828      if test "x$has_space" != x; then
24829        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24830$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24831        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24832      fi
24833
24834      # Use eval to expand a potential ~
24835      eval path="$path"
24836      if test ! -f "$path" && test ! -d "$path"; then
24837        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24838      fi
24839
24840      if test -d "$path"; then
24841        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24842      else
24843        dir="`$DIRNAME "$path"`"
24844        base="`$BASENAME "$path"`"
24845        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24846      fi
24847    fi
24848  fi
24849
24850            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24851$as_echo_n "checking for Boot JDK... " >&6; }
24852            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24853$as_echo "$BOOT_JDK" >&6; }
24854            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24855$as_echo_n "checking Boot JDK version... " >&6; }
24856            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24857            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24858$as_echo "$BOOT_JDK_VERSION" >&6; }
24859          fi # end check jdk version
24860        fi # end check javac
24861      fi # end check java
24862    fi # end check boot jdk found
24863  fi
24864
24865
24866  if test "x$BOOT_JDK_FOUND" = xno; then
24867    # Now execute the test
24868
24869  if test -x /usr/libexec/java_home; then
24870    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24871    BOOT_JDK_FOUND=maybe
24872    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24873$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24874  fi
24875
24876
24877    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24878    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24879      # Do we have a bin/java?
24880      if test ! -x "$BOOT_JDK/bin/java"; then
24881        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24882$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24883        BOOT_JDK_FOUND=no
24884      else
24885        # Do we have a bin/javac?
24886        if test ! -x "$BOOT_JDK/bin/javac"; then
24887          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24888$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24889          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24890$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24891          BOOT_JDK_FOUND=no
24892        else
24893          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24894          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24895
24896          # Extra M4 quote needed to protect [] in grep expression.
24897          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24898          if test "x$FOUND_CORRECT_VERSION" = x; then
24899            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24900$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24901            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24902$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24903            BOOT_JDK_FOUND=no
24904          else
24905            # We're done! :-)
24906            BOOT_JDK_FOUND=yes
24907
24908  # Only process if variable expands to non-empty
24909
24910  if test "x$BOOT_JDK" != x; then
24911    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24912
24913  # Input might be given as Windows format, start by converting to
24914  # unix format.
24915  path="$BOOT_JDK"
24916  new_path=`$CYGPATH -u "$path"`
24917
24918  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24919  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24920  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24921  # "foo.exe" is OK but "foo" is an error.
24922  #
24923  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24924  # It is also a way to make sure we got the proper file name for the real test later on.
24925  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24926  if test "x$test_shortpath" = x; then
24927    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24928$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24929    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24930  fi
24931
24932  # Call helper function which possibly converts this using DOS-style short mode.
24933  # If so, the updated path is stored in $new_path.
24934
24935  input_path="$new_path"
24936  # Check if we need to convert this using DOS-style short mode. If the path
24937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24938  # take no chances and rewrite it.
24939  # Note: m4 eats our [], so we need to use [ and ] instead.
24940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24941  if test "x$has_forbidden_chars" != x; then
24942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24943    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24944    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24945    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24946      # Going to short mode and back again did indeed matter. Since short mode is
24947      # case insensitive, let's make it lowercase to improve readability.
24948      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24949      # Now convert it back to Unix-style (cygpath)
24950      input_path=`$CYGPATH -u "$shortmode_path"`
24951      new_path="$input_path"
24952    fi
24953  fi
24954
24955  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24956  if test "x$test_cygdrive_prefix" = x; then
24957    # As a simple fix, exclude /usr/bin since it's not a real path.
24958    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24959      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24960      # a path prefixed by /cygdrive for fixpath to work.
24961      new_path="$CYGWIN_ROOT_PATH$input_path"
24962    fi
24963  fi
24964
24965
24966  if test "x$path" != "x$new_path"; then
24967    BOOT_JDK="$new_path"
24968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24969$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24970  fi
24971
24972    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24973
24974  path="$BOOT_JDK"
24975  has_colon=`$ECHO $path | $GREP ^.:`
24976  new_path="$path"
24977  if test "x$has_colon" = x; then
24978    # Not in mixed or Windows style, start by that.
24979    new_path=`cmd //c echo $path`
24980  fi
24981
24982
24983  input_path="$new_path"
24984  # Check if we need to convert this using DOS-style short mode. If the path
24985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24986  # take no chances and rewrite it.
24987  # Note: m4 eats our [], so we need to use [ and ] instead.
24988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24989  if test "x$has_forbidden_chars" != x; then
24990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24992  fi
24993
24994
24995  windows_path="$new_path"
24996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24997    unix_path=`$CYGPATH -u "$windows_path"`
24998    new_path="$unix_path"
24999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25001    new_path="$unix_path"
25002  fi
25003
25004  if test "x$path" != "x$new_path"; then
25005    BOOT_JDK="$new_path"
25006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25007$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25008  fi
25009
25010  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25011  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25012
25013    else
25014      # We're on a unix platform. Hooray! :)
25015      path="$BOOT_JDK"
25016      has_space=`$ECHO "$path" | $GREP " "`
25017      if test "x$has_space" != x; then
25018        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25019$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25020        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25021      fi
25022
25023      # Use eval to expand a potential ~
25024      eval path="$path"
25025      if test ! -f "$path" && test ! -d "$path"; then
25026        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25027      fi
25028
25029      if test -d "$path"; then
25030        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25031      else
25032        dir="`$DIRNAME "$path"`"
25033        base="`$BASENAME "$path"`"
25034        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25035      fi
25036    fi
25037  fi
25038
25039            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25040$as_echo_n "checking for Boot JDK... " >&6; }
25041            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25042$as_echo "$BOOT_JDK" >&6; }
25043            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25044$as_echo_n "checking Boot JDK version... " >&6; }
25045            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25046            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25047$as_echo "$BOOT_JDK_VERSION" >&6; }
25048          fi # end check jdk version
25049        fi # end check javac
25050      fi # end check java
25051    fi # end check boot jdk found
25052  fi
25053
25054
25055  if test "x$BOOT_JDK_FOUND" = xno; then
25056    # Now execute the test
25057
25058  if test -x /usr/libexec/java_home; then
25059    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25060    BOOT_JDK_FOUND=maybe
25061    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25062$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25063  fi
25064
25065
25066    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25067    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25068      # Do we have a bin/java?
25069      if test ! -x "$BOOT_JDK/bin/java"; then
25070        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25071$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25072        BOOT_JDK_FOUND=no
25073      else
25074        # Do we have a bin/javac?
25075        if test ! -x "$BOOT_JDK/bin/javac"; then
25076          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25077$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25078          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25079$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25080          BOOT_JDK_FOUND=no
25081        else
25082          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25083          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25084
25085          # Extra M4 quote needed to protect [] in grep expression.
25086          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25087          if test "x$FOUND_CORRECT_VERSION" = x; then
25088            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25089$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25090            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25091$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25092            BOOT_JDK_FOUND=no
25093          else
25094            # We're done! :-)
25095            BOOT_JDK_FOUND=yes
25096
25097  # Only process if variable expands to non-empty
25098
25099  if test "x$BOOT_JDK" != x; then
25100    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25101
25102  # Input might be given as Windows format, start by converting to
25103  # unix format.
25104  path="$BOOT_JDK"
25105  new_path=`$CYGPATH -u "$path"`
25106
25107  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25108  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25109  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25110  # "foo.exe" is OK but "foo" is an error.
25111  #
25112  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25113  # It is also a way to make sure we got the proper file name for the real test later on.
25114  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25115  if test "x$test_shortpath" = x; then
25116    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25117$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25118    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25119  fi
25120
25121  # Call helper function which possibly converts this using DOS-style short mode.
25122  # If so, the updated path is stored in $new_path.
25123
25124  input_path="$new_path"
25125  # Check if we need to convert this using DOS-style short mode. If the path
25126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25127  # take no chances and rewrite it.
25128  # Note: m4 eats our [], so we need to use [ and ] instead.
25129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25130  if test "x$has_forbidden_chars" != x; then
25131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25132    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25133    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25134    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25135      # Going to short mode and back again did indeed matter. Since short mode is
25136      # case insensitive, let's make it lowercase to improve readability.
25137      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25138      # Now convert it back to Unix-style (cygpath)
25139      input_path=`$CYGPATH -u "$shortmode_path"`
25140      new_path="$input_path"
25141    fi
25142  fi
25143
25144  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25145  if test "x$test_cygdrive_prefix" = x; then
25146    # As a simple fix, exclude /usr/bin since it's not a real path.
25147    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25148      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25149      # a path prefixed by /cygdrive for fixpath to work.
25150      new_path="$CYGWIN_ROOT_PATH$input_path"
25151    fi
25152  fi
25153
25154
25155  if test "x$path" != "x$new_path"; then
25156    BOOT_JDK="$new_path"
25157    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25158$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25159  fi
25160
25161    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25162
25163  path="$BOOT_JDK"
25164  has_colon=`$ECHO $path | $GREP ^.:`
25165  new_path="$path"
25166  if test "x$has_colon" = x; then
25167    # Not in mixed or Windows style, start by that.
25168    new_path=`cmd //c echo $path`
25169  fi
25170
25171
25172  input_path="$new_path"
25173  # Check if we need to convert this using DOS-style short mode. If the path
25174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25175  # take no chances and rewrite it.
25176  # Note: m4 eats our [], so we need to use [ and ] instead.
25177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25178  if test "x$has_forbidden_chars" != x; then
25179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25180    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25181  fi
25182
25183
25184  windows_path="$new_path"
25185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25186    unix_path=`$CYGPATH -u "$windows_path"`
25187    new_path="$unix_path"
25188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25190    new_path="$unix_path"
25191  fi
25192
25193  if test "x$path" != "x$new_path"; then
25194    BOOT_JDK="$new_path"
25195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25196$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25197  fi
25198
25199  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25200  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25201
25202    else
25203      # We're on a unix platform. Hooray! :)
25204      path="$BOOT_JDK"
25205      has_space=`$ECHO "$path" | $GREP " "`
25206      if test "x$has_space" != x; then
25207        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25208$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25209        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25210      fi
25211
25212      # Use eval to expand a potential ~
25213      eval path="$path"
25214      if test ! -f "$path" && test ! -d "$path"; then
25215        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25216      fi
25217
25218      if test -d "$path"; then
25219        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25220      else
25221        dir="`$DIRNAME "$path"`"
25222        base="`$BASENAME "$path"`"
25223        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25224      fi
25225    fi
25226  fi
25227
25228            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25229$as_echo_n "checking for Boot JDK... " >&6; }
25230            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25231$as_echo "$BOOT_JDK" >&6; }
25232            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25233$as_echo_n "checking Boot JDK version... " >&6; }
25234            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25235            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25236$as_echo "$BOOT_JDK_VERSION" >&6; }
25237          fi # end check jdk version
25238        fi # end check javac
25239      fi # end check java
25240    fi # end check boot jdk found
25241  fi
25242
25243  fi
25244
25245
25246    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25247    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25248      # Do we have a bin/java?
25249      if test ! -x "$BOOT_JDK/bin/java"; then
25250        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25251$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25252        BOOT_JDK_FOUND=no
25253      else
25254        # Do we have a bin/javac?
25255        if test ! -x "$BOOT_JDK/bin/javac"; then
25256          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25257$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25258          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25259$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25260          BOOT_JDK_FOUND=no
25261        else
25262          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25263          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25264
25265          # Extra M4 quote needed to protect [] in grep expression.
25266          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25267          if test "x$FOUND_CORRECT_VERSION" = x; then
25268            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25269$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25270            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25271$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25272            BOOT_JDK_FOUND=no
25273          else
25274            # We're done! :-)
25275            BOOT_JDK_FOUND=yes
25276
25277  # Only process if variable expands to non-empty
25278
25279  if test "x$BOOT_JDK" != x; then
25280    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25281
25282  # Input might be given as Windows format, start by converting to
25283  # unix format.
25284  path="$BOOT_JDK"
25285  new_path=`$CYGPATH -u "$path"`
25286
25287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25290  # "foo.exe" is OK but "foo" is an error.
25291  #
25292  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25293  # It is also a way to make sure we got the proper file name for the real test later on.
25294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25295  if test "x$test_shortpath" = x; then
25296    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25297$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25298    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25299  fi
25300
25301  # Call helper function which possibly converts this using DOS-style short mode.
25302  # If so, the updated path is stored in $new_path.
25303
25304  input_path="$new_path"
25305  # Check if we need to convert this using DOS-style short mode. If the path
25306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25307  # take no chances and rewrite it.
25308  # Note: m4 eats our [], so we need to use [ and ] instead.
25309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25310  if test "x$has_forbidden_chars" != x; then
25311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25315      # Going to short mode and back again did indeed matter. Since short mode is
25316      # case insensitive, let's make it lowercase to improve readability.
25317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25318      # Now convert it back to Unix-style (cygpath)
25319      input_path=`$CYGPATH -u "$shortmode_path"`
25320      new_path="$input_path"
25321    fi
25322  fi
25323
25324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25325  if test "x$test_cygdrive_prefix" = x; then
25326    # As a simple fix, exclude /usr/bin since it's not a real path.
25327    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25329      # a path prefixed by /cygdrive for fixpath to work.
25330      new_path="$CYGWIN_ROOT_PATH$input_path"
25331    fi
25332  fi
25333
25334
25335  if test "x$path" != "x$new_path"; then
25336    BOOT_JDK="$new_path"
25337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25338$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25339  fi
25340
25341    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25342
25343  path="$BOOT_JDK"
25344  has_colon=`$ECHO $path | $GREP ^.:`
25345  new_path="$path"
25346  if test "x$has_colon" = x; then
25347    # Not in mixed or Windows style, start by that.
25348    new_path=`cmd //c echo $path`
25349  fi
25350
25351
25352  input_path="$new_path"
25353  # Check if we need to convert this using DOS-style short mode. If the path
25354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25355  # take no chances and rewrite it.
25356  # Note: m4 eats our [], so we need to use [ and ] instead.
25357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25358  if test "x$has_forbidden_chars" != x; then
25359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25361  fi
25362
25363
25364  windows_path="$new_path"
25365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25366    unix_path=`$CYGPATH -u "$windows_path"`
25367    new_path="$unix_path"
25368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25370    new_path="$unix_path"
25371  fi
25372
25373  if test "x$path" != "x$new_path"; then
25374    BOOT_JDK="$new_path"
25375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25376$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25377  fi
25378
25379  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25380  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25381
25382    else
25383      # We're on a unix platform. Hooray! :)
25384      path="$BOOT_JDK"
25385      has_space=`$ECHO "$path" | $GREP " "`
25386      if test "x$has_space" != x; then
25387        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25388$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25389        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25390      fi
25391
25392      # Use eval to expand a potential ~
25393      eval path="$path"
25394      if test ! -f "$path" && test ! -d "$path"; then
25395        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25396      fi
25397
25398      if test -d "$path"; then
25399        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25400      else
25401        dir="`$DIRNAME "$path"`"
25402        base="`$BASENAME "$path"`"
25403        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25404      fi
25405    fi
25406  fi
25407
25408            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25409$as_echo_n "checking for Boot JDK... " >&6; }
25410            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25411$as_echo "$BOOT_JDK" >&6; }
25412            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25413$as_echo_n "checking Boot JDK version... " >&6; }
25414            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25415            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25416$as_echo "$BOOT_JDK_VERSION" >&6; }
25417          fi # end check jdk version
25418        fi # end check javac
25419      fi # end check java
25420    fi # end check boot jdk found
25421  fi
25422
25423
25424  # Test: Is $JAVA_HOME set?
25425
25426  if test "x$BOOT_JDK_FOUND" = xno; then
25427    # Now execute the test
25428
25429  if test "x$JAVA_HOME" != x; then
25430    JAVA_HOME_PROCESSED="$JAVA_HOME"
25431
25432  # Only process if variable expands to non-empty
25433
25434  if test "x$JAVA_HOME_PROCESSED" != x; then
25435    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25436
25437  # Input might be given as Windows format, start by converting to
25438  # unix format.
25439  path="$JAVA_HOME_PROCESSED"
25440  new_path=`$CYGPATH -u "$path"`
25441
25442  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25443  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25444  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25445  # "foo.exe" is OK but "foo" is an error.
25446  #
25447  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25448  # It is also a way to make sure we got the proper file name for the real test later on.
25449  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25450  if test "x$test_shortpath" = x; then
25451    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25452$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25453    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25454  fi
25455
25456  # Call helper function which possibly converts this using DOS-style short mode.
25457  # If so, the updated path is stored in $new_path.
25458
25459  input_path="$new_path"
25460  # Check if we need to convert this using DOS-style short mode. If the path
25461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25462  # take no chances and rewrite it.
25463  # Note: m4 eats our [], so we need to use [ and ] instead.
25464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25465  if test "x$has_forbidden_chars" != x; then
25466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25467    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25468    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25469    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25470      # Going to short mode and back again did indeed matter. Since short mode is
25471      # case insensitive, let's make it lowercase to improve readability.
25472      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25473      # Now convert it back to Unix-style (cygpath)
25474      input_path=`$CYGPATH -u "$shortmode_path"`
25475      new_path="$input_path"
25476    fi
25477  fi
25478
25479  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25480  if test "x$test_cygdrive_prefix" = x; then
25481    # As a simple fix, exclude /usr/bin since it's not a real path.
25482    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25483      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25484      # a path prefixed by /cygdrive for fixpath to work.
25485      new_path="$CYGWIN_ROOT_PATH$input_path"
25486    fi
25487  fi
25488
25489
25490  if test "x$path" != "x$new_path"; then
25491    JAVA_HOME_PROCESSED="$new_path"
25492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25493$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25494  fi
25495
25496    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25497
25498  path="$JAVA_HOME_PROCESSED"
25499  has_colon=`$ECHO $path | $GREP ^.:`
25500  new_path="$path"
25501  if test "x$has_colon" = x; then
25502    # Not in mixed or Windows style, start by that.
25503    new_path=`cmd //c echo $path`
25504  fi
25505
25506
25507  input_path="$new_path"
25508  # Check if we need to convert this using DOS-style short mode. If the path
25509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25510  # take no chances and rewrite it.
25511  # Note: m4 eats our [], so we need to use [ and ] instead.
25512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25513  if test "x$has_forbidden_chars" != x; then
25514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25516  fi
25517
25518
25519  windows_path="$new_path"
25520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25521    unix_path=`$CYGPATH -u "$windows_path"`
25522    new_path="$unix_path"
25523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25525    new_path="$unix_path"
25526  fi
25527
25528  if test "x$path" != "x$new_path"; then
25529    JAVA_HOME_PROCESSED="$new_path"
25530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25531$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25532  fi
25533
25534  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25535  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25536
25537    else
25538      # We're on a unix platform. Hooray! :)
25539      path="$JAVA_HOME_PROCESSED"
25540      has_space=`$ECHO "$path" | $GREP " "`
25541      if test "x$has_space" != x; then
25542        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25543$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25544        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25545      fi
25546
25547      # Use eval to expand a potential ~
25548      eval path="$path"
25549      if test ! -f "$path" && test ! -d "$path"; then
25550        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
25551      fi
25552
25553      if test -d "$path"; then
25554        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
25555      else
25556        dir="`$DIRNAME "$path"`"
25557        base="`$BASENAME "$path"`"
25558        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
25559      fi
25560    fi
25561  fi
25562
25563    if test ! -d "$JAVA_HOME_PROCESSED"; then
25564      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
25565$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
25566    else
25567      # Aha, the user has set a JAVA_HOME
25568      # let us use that as the Boot JDK.
25569      BOOT_JDK="$JAVA_HOME_PROCESSED"
25570      BOOT_JDK_FOUND=maybe
25571      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
25572$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
25573    fi
25574  fi
25575
25576
25577    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25578    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25579      # Do we have a bin/java?
25580      if test ! -x "$BOOT_JDK/bin/java"; then
25581        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25582$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25583        BOOT_JDK_FOUND=no
25584      else
25585        # Do we have a bin/javac?
25586        if test ! -x "$BOOT_JDK/bin/javac"; then
25587          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25589          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25590$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25591          BOOT_JDK_FOUND=no
25592        else
25593          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25594          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25595
25596          # Extra M4 quote needed to protect [] in grep expression.
25597          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25598          if test "x$FOUND_CORRECT_VERSION" = x; then
25599            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25600$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25601            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25602$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25603            BOOT_JDK_FOUND=no
25604          else
25605            # We're done! :-)
25606            BOOT_JDK_FOUND=yes
25607
25608  # Only process if variable expands to non-empty
25609
25610  if test "x$BOOT_JDK" != x; then
25611    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25612
25613  # Input might be given as Windows format, start by converting to
25614  # unix format.
25615  path="$BOOT_JDK"
25616  new_path=`$CYGPATH -u "$path"`
25617
25618  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25619  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25620  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25621  # "foo.exe" is OK but "foo" is an error.
25622  #
25623  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25624  # It is also a way to make sure we got the proper file name for the real test later on.
25625  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25626  if test "x$test_shortpath" = x; then
25627    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25628$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25629    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25630  fi
25631
25632  # Call helper function which possibly converts this using DOS-style short mode.
25633  # If so, the updated path is stored in $new_path.
25634
25635  input_path="$new_path"
25636  # Check if we need to convert this using DOS-style short mode. If the path
25637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25638  # take no chances and rewrite it.
25639  # Note: m4 eats our [], so we need to use [ and ] instead.
25640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25641  if test "x$has_forbidden_chars" != x; then
25642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25643    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25644    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25645    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25646      # Going to short mode and back again did indeed matter. Since short mode is
25647      # case insensitive, let's make it lowercase to improve readability.
25648      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25649      # Now convert it back to Unix-style (cygpath)
25650      input_path=`$CYGPATH -u "$shortmode_path"`
25651      new_path="$input_path"
25652    fi
25653  fi
25654
25655  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25656  if test "x$test_cygdrive_prefix" = x; then
25657    # As a simple fix, exclude /usr/bin since it's not a real path.
25658    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25659      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25660      # a path prefixed by /cygdrive for fixpath to work.
25661      new_path="$CYGWIN_ROOT_PATH$input_path"
25662    fi
25663  fi
25664
25665
25666  if test "x$path" != "x$new_path"; then
25667    BOOT_JDK="$new_path"
25668    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25669$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25670  fi
25671
25672    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25673
25674  path="$BOOT_JDK"
25675  has_colon=`$ECHO $path | $GREP ^.:`
25676  new_path="$path"
25677  if test "x$has_colon" = x; then
25678    # Not in mixed or Windows style, start by that.
25679    new_path=`cmd //c echo $path`
25680  fi
25681
25682
25683  input_path="$new_path"
25684  # Check if we need to convert this using DOS-style short mode. If the path
25685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25686  # take no chances and rewrite it.
25687  # Note: m4 eats our [], so we need to use [ and ] instead.
25688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25689  if test "x$has_forbidden_chars" != x; then
25690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25691    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25692  fi
25693
25694
25695  windows_path="$new_path"
25696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25697    unix_path=`$CYGPATH -u "$windows_path"`
25698    new_path="$unix_path"
25699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25701    new_path="$unix_path"
25702  fi
25703
25704  if test "x$path" != "x$new_path"; then
25705    BOOT_JDK="$new_path"
25706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25707$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25708  fi
25709
25710  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25711  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25712
25713    else
25714      # We're on a unix platform. Hooray! :)
25715      path="$BOOT_JDK"
25716      has_space=`$ECHO "$path" | $GREP " "`
25717      if test "x$has_space" != x; then
25718        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25719$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25720        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25721      fi
25722
25723      # Use eval to expand a potential ~
25724      eval path="$path"
25725      if test ! -f "$path" && test ! -d "$path"; then
25726        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25727      fi
25728
25729      if test -d "$path"; then
25730        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25731      else
25732        dir="`$DIRNAME "$path"`"
25733        base="`$BASENAME "$path"`"
25734        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25735      fi
25736    fi
25737  fi
25738
25739            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25740$as_echo_n "checking for Boot JDK... " >&6; }
25741            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25742$as_echo "$BOOT_JDK" >&6; }
25743            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25744$as_echo_n "checking Boot JDK version... " >&6; }
25745            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25746            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25747$as_echo "$BOOT_JDK_VERSION" >&6; }
25748          fi # end check jdk version
25749        fi # end check javac
25750      fi # end check java
25751    fi # end check boot jdk found
25752  fi
25753
25754
25755  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25756
25757  if test "x$BOOT_JDK_FOUND" = xno; then
25758    # Now execute the test
25759
25760  # Extract the first word of "javac", so it can be a program name with args.
25761set dummy javac; ac_word=$2
25762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25763$as_echo_n "checking for $ac_word... " >&6; }
25764if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25765  $as_echo_n "(cached) " >&6
25766else
25767  case $JAVAC_CHECK in
25768  [\\/]* | ?:[\\/]*)
25769  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25770  ;;
25771  *)
25772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25773for as_dir in $PATH
25774do
25775  IFS=$as_save_IFS
25776  test -z "$as_dir" && as_dir=.
25777    for ac_exec_ext in '' $ac_executable_extensions; do
25778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25779    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25781    break 2
25782  fi
25783done
25784  done
25785IFS=$as_save_IFS
25786
25787  ;;
25788esac
25789fi
25790JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25791if test -n "$JAVAC_CHECK"; then
25792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25793$as_echo "$JAVAC_CHECK" >&6; }
25794else
25795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25796$as_echo "no" >&6; }
25797fi
25798
25799
25800  # Extract the first word of "java", so it can be a program name with args.
25801set dummy java; ac_word=$2
25802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25803$as_echo_n "checking for $ac_word... " >&6; }
25804if ${ac_cv_path_JAVA_CHECK+:} false; then :
25805  $as_echo_n "(cached) " >&6
25806else
25807  case $JAVA_CHECK in
25808  [\\/]* | ?:[\\/]*)
25809  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25810  ;;
25811  *)
25812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25813for as_dir in $PATH
25814do
25815  IFS=$as_save_IFS
25816  test -z "$as_dir" && as_dir=.
25817    for ac_exec_ext in '' $ac_executable_extensions; do
25818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25819    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25821    break 2
25822  fi
25823done
25824  done
25825IFS=$as_save_IFS
25826
25827  ;;
25828esac
25829fi
25830JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25831if test -n "$JAVA_CHECK"; then
25832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25833$as_echo "$JAVA_CHECK" >&6; }
25834else
25835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25836$as_echo "no" >&6; }
25837fi
25838
25839
25840  BINARY="$JAVAC_CHECK"
25841  if test "x$JAVAC_CHECK" = x; then
25842    BINARY="$JAVA_CHECK"
25843  fi
25844  if test "x$BINARY" != x; then
25845    # So there is a java(c) binary, it might be part of a JDK.
25846    # Lets find the JDK/JRE directory by following symbolic links.
25847    # Linux/GNU systems often have links from /usr/bin/java to
25848    # /etc/alternatives/java to the real JDK binary.
25849
25850  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25851    # Follow a chain of symbolic links. Use readlink
25852    # where it exists, else fall back to horribly
25853    # complicated shell code.
25854    if test "x$READLINK_TESTED" != yes; then
25855      # On MacOSX there is a readlink tool with a different
25856      # purpose than the GNU readlink tool. Check the found readlink.
25857      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25858      if test "x$ISGNU" = x; then
25859        # A readlink that we do not know how to use.
25860        # Are there other non-GNU readlinks out there?
25861        READLINK_TESTED=yes
25862        READLINK=
25863      fi
25864    fi
25865
25866    if test "x$READLINK" != x; then
25867      BINARY=`$READLINK -f $BINARY`
25868    else
25869      # Save the current directory for restoring afterwards
25870      STARTDIR=$PWD
25871      COUNTER=0
25872      sym_link_dir=`$DIRNAME $BINARY`
25873      sym_link_file=`$BASENAME $BINARY`
25874      cd $sym_link_dir
25875      # Use -P flag to resolve symlinks in directories.
25876      cd `$THEPWDCMD -P`
25877      sym_link_dir=`$THEPWDCMD -P`
25878      # Resolve file symlinks
25879      while test $COUNTER -lt 20; do
25880        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25881        if test "x$ISLINK" == x; then
25882          # This is not a symbolic link! We are done!
25883          break
25884        fi
25885        # Again resolve directory symlinks since the target of the just found
25886        # link could be in a different directory
25887        cd `$DIRNAME $ISLINK`
25888        sym_link_dir=`$THEPWDCMD -P`
25889        sym_link_file=`$BASENAME $ISLINK`
25890        let COUNTER=COUNTER+1
25891      done
25892      cd $STARTDIR
25893      BINARY=$sym_link_dir/$sym_link_file
25894    fi
25895  fi
25896
25897    BOOT_JDK=`dirname "$BINARY"`
25898    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25899    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25900      # Looks like we found ourselves an JDK
25901      BOOT_JDK_FOUND=maybe
25902      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25903$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25904    fi
25905  fi
25906
25907
25908    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25909    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25910      # Do we have a bin/java?
25911      if test ! -x "$BOOT_JDK/bin/java"; then
25912        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25913$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25914        BOOT_JDK_FOUND=no
25915      else
25916        # Do we have a bin/javac?
25917        if test ! -x "$BOOT_JDK/bin/javac"; then
25918          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25919$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25920          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25921$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25922          BOOT_JDK_FOUND=no
25923        else
25924          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25925          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25926
25927          # Extra M4 quote needed to protect [] in grep expression.
25928          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25929          if test "x$FOUND_CORRECT_VERSION" = x; then
25930            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25931$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25932            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25933$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25934            BOOT_JDK_FOUND=no
25935          else
25936            # We're done! :-)
25937            BOOT_JDK_FOUND=yes
25938
25939  # Only process if variable expands to non-empty
25940
25941  if test "x$BOOT_JDK" != x; then
25942    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25943
25944  # Input might be given as Windows format, start by converting to
25945  # unix format.
25946  path="$BOOT_JDK"
25947  new_path=`$CYGPATH -u "$path"`
25948
25949  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25950  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25951  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25952  # "foo.exe" is OK but "foo" is an error.
25953  #
25954  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25955  # It is also a way to make sure we got the proper file name for the real test later on.
25956  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25957  if test "x$test_shortpath" = x; then
25958    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25959$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25960    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25961  fi
25962
25963  # Call helper function which possibly converts this using DOS-style short mode.
25964  # If so, the updated path is stored in $new_path.
25965
25966  input_path="$new_path"
25967  # Check if we need to convert this using DOS-style short mode. If the path
25968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25969  # take no chances and rewrite it.
25970  # Note: m4 eats our [], so we need to use [ and ] instead.
25971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25972  if test "x$has_forbidden_chars" != x; then
25973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25974    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25975    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25976    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25977      # Going to short mode and back again did indeed matter. Since short mode is
25978      # case insensitive, let's make it lowercase to improve readability.
25979      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25980      # Now convert it back to Unix-style (cygpath)
25981      input_path=`$CYGPATH -u "$shortmode_path"`
25982      new_path="$input_path"
25983    fi
25984  fi
25985
25986  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25987  if test "x$test_cygdrive_prefix" = x; then
25988    # As a simple fix, exclude /usr/bin since it's not a real path.
25989    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25990      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25991      # a path prefixed by /cygdrive for fixpath to work.
25992      new_path="$CYGWIN_ROOT_PATH$input_path"
25993    fi
25994  fi
25995
25996
25997  if test "x$path" != "x$new_path"; then
25998    BOOT_JDK="$new_path"
25999    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26000$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26001  fi
26002
26003    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26004
26005  path="$BOOT_JDK"
26006  has_colon=`$ECHO $path | $GREP ^.:`
26007  new_path="$path"
26008  if test "x$has_colon" = x; then
26009    # Not in mixed or Windows style, start by that.
26010    new_path=`cmd //c echo $path`
26011  fi
26012
26013
26014  input_path="$new_path"
26015  # Check if we need to convert this using DOS-style short mode. If the path
26016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26017  # take no chances and rewrite it.
26018  # Note: m4 eats our [], so we need to use [ and ] instead.
26019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26020  if test "x$has_forbidden_chars" != x; then
26021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26022    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26023  fi
26024
26025
26026  windows_path="$new_path"
26027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26028    unix_path=`$CYGPATH -u "$windows_path"`
26029    new_path="$unix_path"
26030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26032    new_path="$unix_path"
26033  fi
26034
26035  if test "x$path" != "x$new_path"; then
26036    BOOT_JDK="$new_path"
26037    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26038$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26039  fi
26040
26041  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26042  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26043
26044    else
26045      # We're on a unix platform. Hooray! :)
26046      path="$BOOT_JDK"
26047      has_space=`$ECHO "$path" | $GREP " "`
26048      if test "x$has_space" != x; then
26049        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26050$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26051        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26052      fi
26053
26054      # Use eval to expand a potential ~
26055      eval path="$path"
26056      if test ! -f "$path" && test ! -d "$path"; then
26057        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26058      fi
26059
26060      if test -d "$path"; then
26061        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26062      else
26063        dir="`$DIRNAME "$path"`"
26064        base="`$BASENAME "$path"`"
26065        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26066      fi
26067    fi
26068  fi
26069
26070            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26071$as_echo_n "checking for Boot JDK... " >&6; }
26072            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26073$as_echo "$BOOT_JDK" >&6; }
26074            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26075$as_echo_n "checking Boot JDK version... " >&6; }
26076            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26077            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26078$as_echo "$BOOT_JDK_VERSION" >&6; }
26079          fi # end check jdk version
26080        fi # end check javac
26081      fi # end check java
26082    fi # end check boot jdk found
26083  fi
26084
26085
26086  # Test: Is there a JDK installed in default, well-known locations?
26087
26088  if test "x$BOOT_JDK_FOUND" = xno; then
26089    # Now execute the test
26090
26091  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26092
26093  if test "x$BOOT_JDK_FOUND" = xno; then
26094    # Now execute the test
26095
26096  if test "x$ProgramW6432" != x; then
26097    VIRTUAL_DIR="$ProgramW6432/Java"
26098
26099  windows_path="$VIRTUAL_DIR"
26100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26101    unix_path=`$CYGPATH -u "$windows_path"`
26102    VIRTUAL_DIR="$unix_path"
26103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26105    VIRTUAL_DIR="$unix_path"
26106  fi
26107
26108
26109  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26110  BOOT_JDK_SUFFIX=""
26111  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26112  if test "x$ALL_JDKS_FOUND" != x; then
26113    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26114
26115  if test "x$BOOT_JDK_FOUND" = xno; then
26116    # Now execute the test
26117
26118        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26119        if test -d "$BOOT_JDK"; then
26120          BOOT_JDK_FOUND=maybe
26121          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26122$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26123        fi
26124
26125
26126    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26127    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26128      # Do we have a bin/java?
26129      if test ! -x "$BOOT_JDK/bin/java"; then
26130        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26131$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26132        BOOT_JDK_FOUND=no
26133      else
26134        # Do we have a bin/javac?
26135        if test ! -x "$BOOT_JDK/bin/javac"; then
26136          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26137$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26138          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26139$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26140          BOOT_JDK_FOUND=no
26141        else
26142          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26143          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26144
26145          # Extra M4 quote needed to protect [] in grep expression.
26146          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26147          if test "x$FOUND_CORRECT_VERSION" = x; then
26148            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26149$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26150            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26151$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26152            BOOT_JDK_FOUND=no
26153          else
26154            # We're done! :-)
26155            BOOT_JDK_FOUND=yes
26156
26157  # Only process if variable expands to non-empty
26158
26159  if test "x$BOOT_JDK" != x; then
26160    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26161
26162  # Input might be given as Windows format, start by converting to
26163  # unix format.
26164  path="$BOOT_JDK"
26165  new_path=`$CYGPATH -u "$path"`
26166
26167  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26168  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26169  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26170  # "foo.exe" is OK but "foo" is an error.
26171  #
26172  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26173  # It is also a way to make sure we got the proper file name for the real test later on.
26174  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26175  if test "x$test_shortpath" = x; then
26176    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26177$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26178    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26179  fi
26180
26181  # Call helper function which possibly converts this using DOS-style short mode.
26182  # If so, the updated path is stored in $new_path.
26183
26184  input_path="$new_path"
26185  # Check if we need to convert this using DOS-style short mode. If the path
26186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26187  # take no chances and rewrite it.
26188  # Note: m4 eats our [], so we need to use [ and ] instead.
26189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26190  if test "x$has_forbidden_chars" != x; then
26191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26192    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26193    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26194    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26195      # Going to short mode and back again did indeed matter. Since short mode is
26196      # case insensitive, let's make it lowercase to improve readability.
26197      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26198      # Now convert it back to Unix-style (cygpath)
26199      input_path=`$CYGPATH -u "$shortmode_path"`
26200      new_path="$input_path"
26201    fi
26202  fi
26203
26204  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26205  if test "x$test_cygdrive_prefix" = x; then
26206    # As a simple fix, exclude /usr/bin since it's not a real path.
26207    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26208      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26209      # a path prefixed by /cygdrive for fixpath to work.
26210      new_path="$CYGWIN_ROOT_PATH$input_path"
26211    fi
26212  fi
26213
26214
26215  if test "x$path" != "x$new_path"; then
26216    BOOT_JDK="$new_path"
26217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26218$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26219  fi
26220
26221    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26222
26223  path="$BOOT_JDK"
26224  has_colon=`$ECHO $path | $GREP ^.:`
26225  new_path="$path"
26226  if test "x$has_colon" = x; then
26227    # Not in mixed or Windows style, start by that.
26228    new_path=`cmd //c echo $path`
26229  fi
26230
26231
26232  input_path="$new_path"
26233  # Check if we need to convert this using DOS-style short mode. If the path
26234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26235  # take no chances and rewrite it.
26236  # Note: m4 eats our [], so we need to use [ and ] instead.
26237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26238  if test "x$has_forbidden_chars" != x; then
26239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26240    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26241  fi
26242
26243
26244  windows_path="$new_path"
26245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26246    unix_path=`$CYGPATH -u "$windows_path"`
26247    new_path="$unix_path"
26248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26250    new_path="$unix_path"
26251  fi
26252
26253  if test "x$path" != "x$new_path"; then
26254    BOOT_JDK="$new_path"
26255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26256$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26257  fi
26258
26259  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26260  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26261
26262    else
26263      # We're on a unix platform. Hooray! :)
26264      path="$BOOT_JDK"
26265      has_space=`$ECHO "$path" | $GREP " "`
26266      if test "x$has_space" != x; then
26267        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26268$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26269        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26270      fi
26271
26272      # Use eval to expand a potential ~
26273      eval path="$path"
26274      if test ! -f "$path" && test ! -d "$path"; then
26275        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26276      fi
26277
26278      if test -d "$path"; then
26279        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26280      else
26281        dir="`$DIRNAME "$path"`"
26282        base="`$BASENAME "$path"`"
26283        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26284      fi
26285    fi
26286  fi
26287
26288            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26289$as_echo_n "checking for Boot JDK... " >&6; }
26290            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26291$as_echo "$BOOT_JDK" >&6; }
26292            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26293$as_echo_n "checking Boot JDK version... " >&6; }
26294            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26295            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26296$as_echo "$BOOT_JDK_VERSION" >&6; }
26297          fi # end check jdk version
26298        fi # end check javac
26299      fi # end check java
26300    fi # end check boot jdk found
26301  fi
26302
26303    done
26304  fi
26305
26306  fi
26307
26308
26309    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26310    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26311      # Do we have a bin/java?
26312      if test ! -x "$BOOT_JDK/bin/java"; then
26313        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26314$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26315        BOOT_JDK_FOUND=no
26316      else
26317        # Do we have a bin/javac?
26318        if test ! -x "$BOOT_JDK/bin/javac"; then
26319          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26320$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26321          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26322$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26323          BOOT_JDK_FOUND=no
26324        else
26325          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26326          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26327
26328          # Extra M4 quote needed to protect [] in grep expression.
26329          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26330          if test "x$FOUND_CORRECT_VERSION" = x; then
26331            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26332$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26333            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26334$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26335            BOOT_JDK_FOUND=no
26336          else
26337            # We're done! :-)
26338            BOOT_JDK_FOUND=yes
26339
26340  # Only process if variable expands to non-empty
26341
26342  if test "x$BOOT_JDK" != x; then
26343    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26344
26345  # Input might be given as Windows format, start by converting to
26346  # unix format.
26347  path="$BOOT_JDK"
26348  new_path=`$CYGPATH -u "$path"`
26349
26350  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26351  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26352  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26353  # "foo.exe" is OK but "foo" is an error.
26354  #
26355  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26356  # It is also a way to make sure we got the proper file name for the real test later on.
26357  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26358  if test "x$test_shortpath" = x; then
26359    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26360$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26361    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26362  fi
26363
26364  # Call helper function which possibly converts this using DOS-style short mode.
26365  # If so, the updated path is stored in $new_path.
26366
26367  input_path="$new_path"
26368  # Check if we need to convert this using DOS-style short mode. If the path
26369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26370  # take no chances and rewrite it.
26371  # Note: m4 eats our [], so we need to use [ and ] instead.
26372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26373  if test "x$has_forbidden_chars" != x; then
26374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26378      # Going to short mode and back again did indeed matter. Since short mode is
26379      # case insensitive, let's make it lowercase to improve readability.
26380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26381      # Now convert it back to Unix-style (cygpath)
26382      input_path=`$CYGPATH -u "$shortmode_path"`
26383      new_path="$input_path"
26384    fi
26385  fi
26386
26387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26388  if test "x$test_cygdrive_prefix" = x; then
26389    # As a simple fix, exclude /usr/bin since it's not a real path.
26390    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26392      # a path prefixed by /cygdrive for fixpath to work.
26393      new_path="$CYGWIN_ROOT_PATH$input_path"
26394    fi
26395  fi
26396
26397
26398  if test "x$path" != "x$new_path"; then
26399    BOOT_JDK="$new_path"
26400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26401$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26402  fi
26403
26404    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26405
26406  path="$BOOT_JDK"
26407  has_colon=`$ECHO $path | $GREP ^.:`
26408  new_path="$path"
26409  if test "x$has_colon" = x; then
26410    # Not in mixed or Windows style, start by that.
26411    new_path=`cmd //c echo $path`
26412  fi
26413
26414
26415  input_path="$new_path"
26416  # Check if we need to convert this using DOS-style short mode. If the path
26417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26418  # take no chances and rewrite it.
26419  # Note: m4 eats our [], so we need to use [ and ] instead.
26420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26421  if test "x$has_forbidden_chars" != x; then
26422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26424  fi
26425
26426
26427  windows_path="$new_path"
26428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26429    unix_path=`$CYGPATH -u "$windows_path"`
26430    new_path="$unix_path"
26431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26433    new_path="$unix_path"
26434  fi
26435
26436  if test "x$path" != "x$new_path"; then
26437    BOOT_JDK="$new_path"
26438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26439$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26440  fi
26441
26442  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26443  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26444
26445    else
26446      # We're on a unix platform. Hooray! :)
26447      path="$BOOT_JDK"
26448      has_space=`$ECHO "$path" | $GREP " "`
26449      if test "x$has_space" != x; then
26450        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26451$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26452        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26453      fi
26454
26455      # Use eval to expand a potential ~
26456      eval path="$path"
26457      if test ! -f "$path" && test ! -d "$path"; then
26458        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26459      fi
26460
26461      if test -d "$path"; then
26462        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26463      else
26464        dir="`$DIRNAME "$path"`"
26465        base="`$BASENAME "$path"`"
26466        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26467      fi
26468    fi
26469  fi
26470
26471            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26472$as_echo_n "checking for Boot JDK... " >&6; }
26473            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26474$as_echo "$BOOT_JDK" >&6; }
26475            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26476$as_echo_n "checking Boot JDK version... " >&6; }
26477            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26478            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26479$as_echo "$BOOT_JDK_VERSION" >&6; }
26480          fi # end check jdk version
26481        fi # end check javac
26482      fi # end check java
26483    fi # end check boot jdk found
26484  fi
26485
26486
26487  if test "x$BOOT_JDK_FOUND" = xno; then
26488    # Now execute the test
26489
26490  if test "x$PROGRAMW6432" != x; then
26491    VIRTUAL_DIR="$PROGRAMW6432/Java"
26492
26493  windows_path="$VIRTUAL_DIR"
26494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26495    unix_path=`$CYGPATH -u "$windows_path"`
26496    VIRTUAL_DIR="$unix_path"
26497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26499    VIRTUAL_DIR="$unix_path"
26500  fi
26501
26502
26503  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26504  BOOT_JDK_SUFFIX=""
26505  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26506  if test "x$ALL_JDKS_FOUND" != x; then
26507    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26508
26509  if test "x$BOOT_JDK_FOUND" = xno; then
26510    # Now execute the test
26511
26512        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26513        if test -d "$BOOT_JDK"; then
26514          BOOT_JDK_FOUND=maybe
26515          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26516$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26517        fi
26518
26519
26520    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26521    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26522      # Do we have a bin/java?
26523      if test ! -x "$BOOT_JDK/bin/java"; then
26524        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26525$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26526        BOOT_JDK_FOUND=no
26527      else
26528        # Do we have a bin/javac?
26529        if test ! -x "$BOOT_JDK/bin/javac"; then
26530          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26531$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26532          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26533$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26534          BOOT_JDK_FOUND=no
26535        else
26536          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26537          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26538
26539          # Extra M4 quote needed to protect [] in grep expression.
26540          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26541          if test "x$FOUND_CORRECT_VERSION" = x; then
26542            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26543$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26544            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26545$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26546            BOOT_JDK_FOUND=no
26547          else
26548            # We're done! :-)
26549            BOOT_JDK_FOUND=yes
26550
26551  # Only process if variable expands to non-empty
26552
26553  if test "x$BOOT_JDK" != x; then
26554    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26555
26556  # Input might be given as Windows format, start by converting to
26557  # unix format.
26558  path="$BOOT_JDK"
26559  new_path=`$CYGPATH -u "$path"`
26560
26561  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26562  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26563  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26564  # "foo.exe" is OK but "foo" is an error.
26565  #
26566  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26567  # It is also a way to make sure we got the proper file name for the real test later on.
26568  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26569  if test "x$test_shortpath" = x; then
26570    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26571$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26572    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26573  fi
26574
26575  # Call helper function which possibly converts this using DOS-style short mode.
26576  # If so, the updated path is stored in $new_path.
26577
26578  input_path="$new_path"
26579  # Check if we need to convert this using DOS-style short mode. If the path
26580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26581  # take no chances and rewrite it.
26582  # Note: m4 eats our [], so we need to use [ and ] instead.
26583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26584  if test "x$has_forbidden_chars" != x; then
26585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26586    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26587    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26588    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26589      # Going to short mode and back again did indeed matter. Since short mode is
26590      # case insensitive, let's make it lowercase to improve readability.
26591      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26592      # Now convert it back to Unix-style (cygpath)
26593      input_path=`$CYGPATH -u "$shortmode_path"`
26594      new_path="$input_path"
26595    fi
26596  fi
26597
26598  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26599  if test "x$test_cygdrive_prefix" = x; then
26600    # As a simple fix, exclude /usr/bin since it's not a real path.
26601    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26602      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26603      # a path prefixed by /cygdrive for fixpath to work.
26604      new_path="$CYGWIN_ROOT_PATH$input_path"
26605    fi
26606  fi
26607
26608
26609  if test "x$path" != "x$new_path"; then
26610    BOOT_JDK="$new_path"
26611    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26612$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26613  fi
26614
26615    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26616
26617  path="$BOOT_JDK"
26618  has_colon=`$ECHO $path | $GREP ^.:`
26619  new_path="$path"
26620  if test "x$has_colon" = x; then
26621    # Not in mixed or Windows style, start by that.
26622    new_path=`cmd //c echo $path`
26623  fi
26624
26625
26626  input_path="$new_path"
26627  # Check if we need to convert this using DOS-style short mode. If the path
26628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26629  # take no chances and rewrite it.
26630  # Note: m4 eats our [], so we need to use [ and ] instead.
26631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26632  if test "x$has_forbidden_chars" != x; then
26633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26634    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26635  fi
26636
26637
26638  windows_path="$new_path"
26639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26640    unix_path=`$CYGPATH -u "$windows_path"`
26641    new_path="$unix_path"
26642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26644    new_path="$unix_path"
26645  fi
26646
26647  if test "x$path" != "x$new_path"; then
26648    BOOT_JDK="$new_path"
26649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26650$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26651  fi
26652
26653  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26654  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26655
26656    else
26657      # We're on a unix platform. Hooray! :)
26658      path="$BOOT_JDK"
26659      has_space=`$ECHO "$path" | $GREP " "`
26660      if test "x$has_space" != x; then
26661        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26662$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26663        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26664      fi
26665
26666      # Use eval to expand a potential ~
26667      eval path="$path"
26668      if test ! -f "$path" && test ! -d "$path"; then
26669        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26670      fi
26671
26672      if test -d "$path"; then
26673        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26674      else
26675        dir="`$DIRNAME "$path"`"
26676        base="`$BASENAME "$path"`"
26677        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26678      fi
26679    fi
26680  fi
26681
26682            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26683$as_echo_n "checking for Boot JDK... " >&6; }
26684            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26685$as_echo "$BOOT_JDK" >&6; }
26686            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26687$as_echo_n "checking Boot JDK version... " >&6; }
26688            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26689            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26690$as_echo "$BOOT_JDK_VERSION" >&6; }
26691          fi # end check jdk version
26692        fi # end check javac
26693      fi # end check java
26694    fi # end check boot jdk found
26695  fi
26696
26697    done
26698  fi
26699
26700  fi
26701
26702
26703    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26704    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26705      # Do we have a bin/java?
26706      if test ! -x "$BOOT_JDK/bin/java"; then
26707        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26708$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26709        BOOT_JDK_FOUND=no
26710      else
26711        # Do we have a bin/javac?
26712        if test ! -x "$BOOT_JDK/bin/javac"; then
26713          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26714$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26715          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26716$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26717          BOOT_JDK_FOUND=no
26718        else
26719          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26720          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26721
26722          # Extra M4 quote needed to protect [] in grep expression.
26723          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26724          if test "x$FOUND_CORRECT_VERSION" = x; then
26725            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26726$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26727            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26728$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26729            BOOT_JDK_FOUND=no
26730          else
26731            # We're done! :-)
26732            BOOT_JDK_FOUND=yes
26733
26734  # Only process if variable expands to non-empty
26735
26736  if test "x$BOOT_JDK" != x; then
26737    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26738
26739  # Input might be given as Windows format, start by converting to
26740  # unix format.
26741  path="$BOOT_JDK"
26742  new_path=`$CYGPATH -u "$path"`
26743
26744  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26745  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26746  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26747  # "foo.exe" is OK but "foo" is an error.
26748  #
26749  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26750  # It is also a way to make sure we got the proper file name for the real test later on.
26751  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26752  if test "x$test_shortpath" = x; then
26753    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26754$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26755    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26756  fi
26757
26758  # Call helper function which possibly converts this using DOS-style short mode.
26759  # If so, the updated path is stored in $new_path.
26760
26761  input_path="$new_path"
26762  # Check if we need to convert this using DOS-style short mode. If the path
26763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26764  # take no chances and rewrite it.
26765  # Note: m4 eats our [], so we need to use [ and ] instead.
26766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26767  if test "x$has_forbidden_chars" != x; then
26768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26769    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26770    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26771    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26772      # Going to short mode and back again did indeed matter. Since short mode is
26773      # case insensitive, let's make it lowercase to improve readability.
26774      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26775      # Now convert it back to Unix-style (cygpath)
26776      input_path=`$CYGPATH -u "$shortmode_path"`
26777      new_path="$input_path"
26778    fi
26779  fi
26780
26781  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26782  if test "x$test_cygdrive_prefix" = x; then
26783    # As a simple fix, exclude /usr/bin since it's not a real path.
26784    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26785      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26786      # a path prefixed by /cygdrive for fixpath to work.
26787      new_path="$CYGWIN_ROOT_PATH$input_path"
26788    fi
26789  fi
26790
26791
26792  if test "x$path" != "x$new_path"; then
26793    BOOT_JDK="$new_path"
26794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26795$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26796  fi
26797
26798    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26799
26800  path="$BOOT_JDK"
26801  has_colon=`$ECHO $path | $GREP ^.:`
26802  new_path="$path"
26803  if test "x$has_colon" = x; then
26804    # Not in mixed or Windows style, start by that.
26805    new_path=`cmd //c echo $path`
26806  fi
26807
26808
26809  input_path="$new_path"
26810  # Check if we need to convert this using DOS-style short mode. If the path
26811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26812  # take no chances and rewrite it.
26813  # Note: m4 eats our [], so we need to use [ and ] instead.
26814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26815  if test "x$has_forbidden_chars" != x; then
26816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26817    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26818  fi
26819
26820
26821  windows_path="$new_path"
26822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26823    unix_path=`$CYGPATH -u "$windows_path"`
26824    new_path="$unix_path"
26825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26827    new_path="$unix_path"
26828  fi
26829
26830  if test "x$path" != "x$new_path"; then
26831    BOOT_JDK="$new_path"
26832    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26833$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26834  fi
26835
26836  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26837  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26838
26839    else
26840      # We're on a unix platform. Hooray! :)
26841      path="$BOOT_JDK"
26842      has_space=`$ECHO "$path" | $GREP " "`
26843      if test "x$has_space" != x; then
26844        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26845$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26846        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26847      fi
26848
26849      # Use eval to expand a potential ~
26850      eval path="$path"
26851      if test ! -f "$path" && test ! -d "$path"; then
26852        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26853      fi
26854
26855      if test -d "$path"; then
26856        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26857      else
26858        dir="`$DIRNAME "$path"`"
26859        base="`$BASENAME "$path"`"
26860        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26861      fi
26862    fi
26863  fi
26864
26865            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26866$as_echo_n "checking for Boot JDK... " >&6; }
26867            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26868$as_echo "$BOOT_JDK" >&6; }
26869            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26870$as_echo_n "checking Boot JDK version... " >&6; }
26871            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26872            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26873$as_echo "$BOOT_JDK_VERSION" >&6; }
26874          fi # end check jdk version
26875        fi # end check javac
26876      fi # end check java
26877    fi # end check boot jdk found
26878  fi
26879
26880
26881  if test "x$BOOT_JDK_FOUND" = xno; then
26882    # Now execute the test
26883
26884  if test "x$PROGRAMFILES" != x; then
26885    VIRTUAL_DIR="$PROGRAMFILES/Java"
26886
26887  windows_path="$VIRTUAL_DIR"
26888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26889    unix_path=`$CYGPATH -u "$windows_path"`
26890    VIRTUAL_DIR="$unix_path"
26891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26893    VIRTUAL_DIR="$unix_path"
26894  fi
26895
26896
26897  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26898  BOOT_JDK_SUFFIX=""
26899  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26900  if test "x$ALL_JDKS_FOUND" != x; then
26901    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26902
26903  if test "x$BOOT_JDK_FOUND" = xno; then
26904    # Now execute the test
26905
26906        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26907        if test -d "$BOOT_JDK"; then
26908          BOOT_JDK_FOUND=maybe
26909          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26910$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26911        fi
26912
26913
26914    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26915    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26916      # Do we have a bin/java?
26917      if test ! -x "$BOOT_JDK/bin/java"; then
26918        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26919$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26920        BOOT_JDK_FOUND=no
26921      else
26922        # Do we have a bin/javac?
26923        if test ! -x "$BOOT_JDK/bin/javac"; then
26924          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26925$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26926          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26927$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26928          BOOT_JDK_FOUND=no
26929        else
26930          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26931          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26932
26933          # Extra M4 quote needed to protect [] in grep expression.
26934          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26935          if test "x$FOUND_CORRECT_VERSION" = x; then
26936            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26937$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26938            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26939$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26940            BOOT_JDK_FOUND=no
26941          else
26942            # We're done! :-)
26943            BOOT_JDK_FOUND=yes
26944
26945  # Only process if variable expands to non-empty
26946
26947  if test "x$BOOT_JDK" != x; then
26948    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26949
26950  # Input might be given as Windows format, start by converting to
26951  # unix format.
26952  path="$BOOT_JDK"
26953  new_path=`$CYGPATH -u "$path"`
26954
26955  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26956  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26957  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26958  # "foo.exe" is OK but "foo" is an error.
26959  #
26960  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26961  # It is also a way to make sure we got the proper file name for the real test later on.
26962  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26963  if test "x$test_shortpath" = x; then
26964    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26965$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26966    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26967  fi
26968
26969  # Call helper function which possibly converts this using DOS-style short mode.
26970  # If so, the updated path is stored in $new_path.
26971
26972  input_path="$new_path"
26973  # Check if we need to convert this using DOS-style short mode. If the path
26974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26975  # take no chances and rewrite it.
26976  # Note: m4 eats our [], so we need to use [ and ] instead.
26977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26978  if test "x$has_forbidden_chars" != x; then
26979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26980    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26981    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26982    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26983      # Going to short mode and back again did indeed matter. Since short mode is
26984      # case insensitive, let's make it lowercase to improve readability.
26985      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26986      # Now convert it back to Unix-style (cygpath)
26987      input_path=`$CYGPATH -u "$shortmode_path"`
26988      new_path="$input_path"
26989    fi
26990  fi
26991
26992  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26993  if test "x$test_cygdrive_prefix" = x; then
26994    # As a simple fix, exclude /usr/bin since it's not a real path.
26995    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26996      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26997      # a path prefixed by /cygdrive for fixpath to work.
26998      new_path="$CYGWIN_ROOT_PATH$input_path"
26999    fi
27000  fi
27001
27002
27003  if test "x$path" != "x$new_path"; then
27004    BOOT_JDK="$new_path"
27005    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27006$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27007  fi
27008
27009    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27010
27011  path="$BOOT_JDK"
27012  has_colon=`$ECHO $path | $GREP ^.:`
27013  new_path="$path"
27014  if test "x$has_colon" = x; then
27015    # Not in mixed or Windows style, start by that.
27016    new_path=`cmd //c echo $path`
27017  fi
27018
27019
27020  input_path="$new_path"
27021  # Check if we need to convert this using DOS-style short mode. If the path
27022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27023  # take no chances and rewrite it.
27024  # Note: m4 eats our [], so we need to use [ and ] instead.
27025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27026  if test "x$has_forbidden_chars" != x; then
27027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27028    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27029  fi
27030
27031
27032  windows_path="$new_path"
27033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27034    unix_path=`$CYGPATH -u "$windows_path"`
27035    new_path="$unix_path"
27036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27038    new_path="$unix_path"
27039  fi
27040
27041  if test "x$path" != "x$new_path"; then
27042    BOOT_JDK="$new_path"
27043    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27044$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27045  fi
27046
27047  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27048  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27049
27050    else
27051      # We're on a unix platform. Hooray! :)
27052      path="$BOOT_JDK"
27053      has_space=`$ECHO "$path" | $GREP " "`
27054      if test "x$has_space" != x; then
27055        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27056$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27057        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27058      fi
27059
27060      # Use eval to expand a potential ~
27061      eval path="$path"
27062      if test ! -f "$path" && test ! -d "$path"; then
27063        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27064      fi
27065
27066      if test -d "$path"; then
27067        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27068      else
27069        dir="`$DIRNAME "$path"`"
27070        base="`$BASENAME "$path"`"
27071        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27072      fi
27073    fi
27074  fi
27075
27076            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27077$as_echo_n "checking for Boot JDK... " >&6; }
27078            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27079$as_echo "$BOOT_JDK" >&6; }
27080            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27081$as_echo_n "checking Boot JDK version... " >&6; }
27082            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27083            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27084$as_echo "$BOOT_JDK_VERSION" >&6; }
27085          fi # end check jdk version
27086        fi # end check javac
27087      fi # end check java
27088    fi # end check boot jdk found
27089  fi
27090
27091    done
27092  fi
27093
27094  fi
27095
27096
27097    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27098    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27099      # Do we have a bin/java?
27100      if test ! -x "$BOOT_JDK/bin/java"; then
27101        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27102$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27103        BOOT_JDK_FOUND=no
27104      else
27105        # Do we have a bin/javac?
27106        if test ! -x "$BOOT_JDK/bin/javac"; then
27107          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27108$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27109          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27110$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27111          BOOT_JDK_FOUND=no
27112        else
27113          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27114          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27115
27116          # Extra M4 quote needed to protect [] in grep expression.
27117          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27118          if test "x$FOUND_CORRECT_VERSION" = x; then
27119            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27120$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27121            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27122$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27123            BOOT_JDK_FOUND=no
27124          else
27125            # We're done! :-)
27126            BOOT_JDK_FOUND=yes
27127
27128  # Only process if variable expands to non-empty
27129
27130  if test "x$BOOT_JDK" != x; then
27131    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27132
27133  # Input might be given as Windows format, start by converting to
27134  # unix format.
27135  path="$BOOT_JDK"
27136  new_path=`$CYGPATH -u "$path"`
27137
27138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27141  # "foo.exe" is OK but "foo" is an error.
27142  #
27143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27144  # It is also a way to make sure we got the proper file name for the real test later on.
27145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27146  if test "x$test_shortpath" = x; then
27147    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27148$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27149    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27150  fi
27151
27152  # Call helper function which possibly converts this using DOS-style short mode.
27153  # If so, the updated path is stored in $new_path.
27154
27155  input_path="$new_path"
27156  # Check if we need to convert this using DOS-style short mode. If the path
27157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27158  # take no chances and rewrite it.
27159  # Note: m4 eats our [], so we need to use [ and ] instead.
27160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27161  if test "x$has_forbidden_chars" != x; then
27162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27166      # Going to short mode and back again did indeed matter. Since short mode is
27167      # case insensitive, let's make it lowercase to improve readability.
27168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27169      # Now convert it back to Unix-style (cygpath)
27170      input_path=`$CYGPATH -u "$shortmode_path"`
27171      new_path="$input_path"
27172    fi
27173  fi
27174
27175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27176  if test "x$test_cygdrive_prefix" = x; then
27177    # As a simple fix, exclude /usr/bin since it's not a real path.
27178    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27180      # a path prefixed by /cygdrive for fixpath to work.
27181      new_path="$CYGWIN_ROOT_PATH$input_path"
27182    fi
27183  fi
27184
27185
27186  if test "x$path" != "x$new_path"; then
27187    BOOT_JDK="$new_path"
27188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27189$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27190  fi
27191
27192    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27193
27194  path="$BOOT_JDK"
27195  has_colon=`$ECHO $path | $GREP ^.:`
27196  new_path="$path"
27197  if test "x$has_colon" = x; then
27198    # Not in mixed or Windows style, start by that.
27199    new_path=`cmd //c echo $path`
27200  fi
27201
27202
27203  input_path="$new_path"
27204  # Check if we need to convert this using DOS-style short mode. If the path
27205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27206  # take no chances and rewrite it.
27207  # Note: m4 eats our [], so we need to use [ and ] instead.
27208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27209  if test "x$has_forbidden_chars" != x; then
27210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27212  fi
27213
27214
27215  windows_path="$new_path"
27216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27217    unix_path=`$CYGPATH -u "$windows_path"`
27218    new_path="$unix_path"
27219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27221    new_path="$unix_path"
27222  fi
27223
27224  if test "x$path" != "x$new_path"; then
27225    BOOT_JDK="$new_path"
27226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27227$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27228  fi
27229
27230  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27231  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27232
27233    else
27234      # We're on a unix platform. Hooray! :)
27235      path="$BOOT_JDK"
27236      has_space=`$ECHO "$path" | $GREP " "`
27237      if test "x$has_space" != x; then
27238        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27239$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27240        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27241      fi
27242
27243      # Use eval to expand a potential ~
27244      eval path="$path"
27245      if test ! -f "$path" && test ! -d "$path"; then
27246        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27247      fi
27248
27249      if test -d "$path"; then
27250        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27251      else
27252        dir="`$DIRNAME "$path"`"
27253        base="`$BASENAME "$path"`"
27254        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27255      fi
27256    fi
27257  fi
27258
27259            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27260$as_echo_n "checking for Boot JDK... " >&6; }
27261            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27262$as_echo "$BOOT_JDK" >&6; }
27263            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27264$as_echo_n "checking Boot JDK version... " >&6; }
27265            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27266            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27267$as_echo "$BOOT_JDK_VERSION" >&6; }
27268          fi # end check jdk version
27269        fi # end check javac
27270      fi # end check java
27271    fi # end check boot jdk found
27272  fi
27273
27274
27275  if test "x$BOOT_JDK_FOUND" = xno; then
27276    # Now execute the test
27277
27278  if test "x$ProgramFiles" != x; then
27279    VIRTUAL_DIR="$ProgramFiles/Java"
27280
27281  windows_path="$VIRTUAL_DIR"
27282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27283    unix_path=`$CYGPATH -u "$windows_path"`
27284    VIRTUAL_DIR="$unix_path"
27285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27287    VIRTUAL_DIR="$unix_path"
27288  fi
27289
27290
27291  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27292  BOOT_JDK_SUFFIX=""
27293  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27294  if test "x$ALL_JDKS_FOUND" != x; then
27295    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27296
27297  if test "x$BOOT_JDK_FOUND" = xno; then
27298    # Now execute the test
27299
27300        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27301        if test -d "$BOOT_JDK"; then
27302          BOOT_JDK_FOUND=maybe
27303          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27304$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27305        fi
27306
27307
27308    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27309    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27310      # Do we have a bin/java?
27311      if test ! -x "$BOOT_JDK/bin/java"; then
27312        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27313$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27314        BOOT_JDK_FOUND=no
27315      else
27316        # Do we have a bin/javac?
27317        if test ! -x "$BOOT_JDK/bin/javac"; then
27318          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27319$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27320          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27321$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27322          BOOT_JDK_FOUND=no
27323        else
27324          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27325          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27326
27327          # Extra M4 quote needed to protect [] in grep expression.
27328          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27329          if test "x$FOUND_CORRECT_VERSION" = x; then
27330            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27332            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27333$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27334            BOOT_JDK_FOUND=no
27335          else
27336            # We're done! :-)
27337            BOOT_JDK_FOUND=yes
27338
27339  # Only process if variable expands to non-empty
27340
27341  if test "x$BOOT_JDK" != x; then
27342    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27343
27344  # Input might be given as Windows format, start by converting to
27345  # unix format.
27346  path="$BOOT_JDK"
27347  new_path=`$CYGPATH -u "$path"`
27348
27349  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27350  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27351  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27352  # "foo.exe" is OK but "foo" is an error.
27353  #
27354  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27355  # It is also a way to make sure we got the proper file name for the real test later on.
27356  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27357  if test "x$test_shortpath" = x; then
27358    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27359$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27360    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27361  fi
27362
27363  # Call helper function which possibly converts this using DOS-style short mode.
27364  # If so, the updated path is stored in $new_path.
27365
27366  input_path="$new_path"
27367  # Check if we need to convert this using DOS-style short mode. If the path
27368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27369  # take no chances and rewrite it.
27370  # Note: m4 eats our [], so we need to use [ and ] instead.
27371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27372  if test "x$has_forbidden_chars" != x; then
27373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27374    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27375    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27376    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27377      # Going to short mode and back again did indeed matter. Since short mode is
27378      # case insensitive, let's make it lowercase to improve readability.
27379      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27380      # Now convert it back to Unix-style (cygpath)
27381      input_path=`$CYGPATH -u "$shortmode_path"`
27382      new_path="$input_path"
27383    fi
27384  fi
27385
27386  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27387  if test "x$test_cygdrive_prefix" = x; then
27388    # As a simple fix, exclude /usr/bin since it's not a real path.
27389    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27390      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27391      # a path prefixed by /cygdrive for fixpath to work.
27392      new_path="$CYGWIN_ROOT_PATH$input_path"
27393    fi
27394  fi
27395
27396
27397  if test "x$path" != "x$new_path"; then
27398    BOOT_JDK="$new_path"
27399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27400$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27401  fi
27402
27403    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27404
27405  path="$BOOT_JDK"
27406  has_colon=`$ECHO $path | $GREP ^.:`
27407  new_path="$path"
27408  if test "x$has_colon" = x; then
27409    # Not in mixed or Windows style, start by that.
27410    new_path=`cmd //c echo $path`
27411  fi
27412
27413
27414  input_path="$new_path"
27415  # Check if we need to convert this using DOS-style short mode. If the path
27416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27417  # take no chances and rewrite it.
27418  # Note: m4 eats our [], so we need to use [ and ] instead.
27419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27420  if test "x$has_forbidden_chars" != x; then
27421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27422    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27423  fi
27424
27425
27426  windows_path="$new_path"
27427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27428    unix_path=`$CYGPATH -u "$windows_path"`
27429    new_path="$unix_path"
27430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27432    new_path="$unix_path"
27433  fi
27434
27435  if test "x$path" != "x$new_path"; then
27436    BOOT_JDK="$new_path"
27437    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27438$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27439  fi
27440
27441  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27442  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27443
27444    else
27445      # We're on a unix platform. Hooray! :)
27446      path="$BOOT_JDK"
27447      has_space=`$ECHO "$path" | $GREP " "`
27448      if test "x$has_space" != x; then
27449        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27450$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27451        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27452      fi
27453
27454      # Use eval to expand a potential ~
27455      eval path="$path"
27456      if test ! -f "$path" && test ! -d "$path"; then
27457        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27458      fi
27459
27460      if test -d "$path"; then
27461        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27462      else
27463        dir="`$DIRNAME "$path"`"
27464        base="`$BASENAME "$path"`"
27465        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27466      fi
27467    fi
27468  fi
27469
27470            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27471$as_echo_n "checking for Boot JDK... " >&6; }
27472            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27473$as_echo "$BOOT_JDK" >&6; }
27474            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27475$as_echo_n "checking Boot JDK version... " >&6; }
27476            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27477            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27478$as_echo "$BOOT_JDK_VERSION" >&6; }
27479          fi # end check jdk version
27480        fi # end check javac
27481      fi # end check java
27482    fi # end check boot jdk found
27483  fi
27484
27485    done
27486  fi
27487
27488  fi
27489
27490
27491    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27492    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27493      # Do we have a bin/java?
27494      if test ! -x "$BOOT_JDK/bin/java"; then
27495        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27496$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27497        BOOT_JDK_FOUND=no
27498      else
27499        # Do we have a bin/javac?
27500        if test ! -x "$BOOT_JDK/bin/javac"; then
27501          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27502$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27503          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27504$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27505          BOOT_JDK_FOUND=no
27506        else
27507          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27508          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27509
27510          # Extra M4 quote needed to protect [] in grep expression.
27511          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27512          if test "x$FOUND_CORRECT_VERSION" = x; then
27513            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27514$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27515            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27516$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27517            BOOT_JDK_FOUND=no
27518          else
27519            # We're done! :-)
27520            BOOT_JDK_FOUND=yes
27521
27522  # Only process if variable expands to non-empty
27523
27524  if test "x$BOOT_JDK" != x; then
27525    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27526
27527  # Input might be given as Windows format, start by converting to
27528  # unix format.
27529  path="$BOOT_JDK"
27530  new_path=`$CYGPATH -u "$path"`
27531
27532  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27533  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27534  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27535  # "foo.exe" is OK but "foo" is an error.
27536  #
27537  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27538  # It is also a way to make sure we got the proper file name for the real test later on.
27539  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27540  if test "x$test_shortpath" = x; then
27541    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27542$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27543    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27544  fi
27545
27546  # Call helper function which possibly converts this using DOS-style short mode.
27547  # If so, the updated path is stored in $new_path.
27548
27549  input_path="$new_path"
27550  # Check if we need to convert this using DOS-style short mode. If the path
27551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27552  # take no chances and rewrite it.
27553  # Note: m4 eats our [], so we need to use [ and ] instead.
27554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27555  if test "x$has_forbidden_chars" != x; then
27556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27557    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27558    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27559    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27560      # Going to short mode and back again did indeed matter. Since short mode is
27561      # case insensitive, let's make it lowercase to improve readability.
27562      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27563      # Now convert it back to Unix-style (cygpath)
27564      input_path=`$CYGPATH -u "$shortmode_path"`
27565      new_path="$input_path"
27566    fi
27567  fi
27568
27569  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27570  if test "x$test_cygdrive_prefix" = x; then
27571    # As a simple fix, exclude /usr/bin since it's not a real path.
27572    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27573      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27574      # a path prefixed by /cygdrive for fixpath to work.
27575      new_path="$CYGWIN_ROOT_PATH$input_path"
27576    fi
27577  fi
27578
27579
27580  if test "x$path" != "x$new_path"; then
27581    BOOT_JDK="$new_path"
27582    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27583$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27584  fi
27585
27586    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27587
27588  path="$BOOT_JDK"
27589  has_colon=`$ECHO $path | $GREP ^.:`
27590  new_path="$path"
27591  if test "x$has_colon" = x; then
27592    # Not in mixed or Windows style, start by that.
27593    new_path=`cmd //c echo $path`
27594  fi
27595
27596
27597  input_path="$new_path"
27598  # Check if we need to convert this using DOS-style short mode. If the path
27599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27600  # take no chances and rewrite it.
27601  # Note: m4 eats our [], so we need to use [ and ] instead.
27602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27603  if test "x$has_forbidden_chars" != x; then
27604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27605    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27606  fi
27607
27608
27609  windows_path="$new_path"
27610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27611    unix_path=`$CYGPATH -u "$windows_path"`
27612    new_path="$unix_path"
27613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27615    new_path="$unix_path"
27616  fi
27617
27618  if test "x$path" != "x$new_path"; then
27619    BOOT_JDK="$new_path"
27620    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27621$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27622  fi
27623
27624  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27625  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27626
27627    else
27628      # We're on a unix platform. Hooray! :)
27629      path="$BOOT_JDK"
27630      has_space=`$ECHO "$path" | $GREP " "`
27631      if test "x$has_space" != x; then
27632        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27633$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27634        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27635      fi
27636
27637      # Use eval to expand a potential ~
27638      eval path="$path"
27639      if test ! -f "$path" && test ! -d "$path"; then
27640        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27641      fi
27642
27643      if test -d "$path"; then
27644        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27645      else
27646        dir="`$DIRNAME "$path"`"
27647        base="`$BASENAME "$path"`"
27648        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27649      fi
27650    fi
27651  fi
27652
27653            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27654$as_echo_n "checking for Boot JDK... " >&6; }
27655            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27656$as_echo "$BOOT_JDK" >&6; }
27657            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27658$as_echo_n "checking Boot JDK version... " >&6; }
27659            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27660            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27661$as_echo "$BOOT_JDK_VERSION" >&6; }
27662          fi # end check jdk version
27663        fi # end check javac
27664      fi # end check java
27665    fi # end check boot jdk found
27666  fi
27667
27668
27669  if test "x$BOOT_JDK_FOUND" = xno; then
27670    # Now execute the test
27671
27672  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27673  BOOT_JDK_SUFFIX=""
27674  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27675  if test "x$ALL_JDKS_FOUND" != x; then
27676    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27677
27678  if test "x$BOOT_JDK_FOUND" = xno; then
27679    # Now execute the test
27680
27681        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27682        if test -d "$BOOT_JDK"; then
27683          BOOT_JDK_FOUND=maybe
27684          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27685$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27686        fi
27687
27688
27689    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27690    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27691      # Do we have a bin/java?
27692      if test ! -x "$BOOT_JDK/bin/java"; then
27693        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27694$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27695        BOOT_JDK_FOUND=no
27696      else
27697        # Do we have a bin/javac?
27698        if test ! -x "$BOOT_JDK/bin/javac"; then
27699          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27700$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27701          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27702$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27703          BOOT_JDK_FOUND=no
27704        else
27705          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27706          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27707
27708          # Extra M4 quote needed to protect [] in grep expression.
27709          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27710          if test "x$FOUND_CORRECT_VERSION" = x; then
27711            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27712$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27713            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27714$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27715            BOOT_JDK_FOUND=no
27716          else
27717            # We're done! :-)
27718            BOOT_JDK_FOUND=yes
27719
27720  # Only process if variable expands to non-empty
27721
27722  if test "x$BOOT_JDK" != x; then
27723    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27724
27725  # Input might be given as Windows format, start by converting to
27726  # unix format.
27727  path="$BOOT_JDK"
27728  new_path=`$CYGPATH -u "$path"`
27729
27730  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27731  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27732  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27733  # "foo.exe" is OK but "foo" is an error.
27734  #
27735  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27736  # It is also a way to make sure we got the proper file name for the real test later on.
27737  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27738  if test "x$test_shortpath" = x; then
27739    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27740$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27741    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27742  fi
27743
27744  # Call helper function which possibly converts this using DOS-style short mode.
27745  # If so, the updated path is stored in $new_path.
27746
27747  input_path="$new_path"
27748  # Check if we need to convert this using DOS-style short mode. If the path
27749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27750  # take no chances and rewrite it.
27751  # Note: m4 eats our [], so we need to use [ and ] instead.
27752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27753  if test "x$has_forbidden_chars" != x; then
27754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27758      # Going to short mode and back again did indeed matter. Since short mode is
27759      # case insensitive, let's make it lowercase to improve readability.
27760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27761      # Now convert it back to Unix-style (cygpath)
27762      input_path=`$CYGPATH -u "$shortmode_path"`
27763      new_path="$input_path"
27764    fi
27765  fi
27766
27767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27768  if test "x$test_cygdrive_prefix" = x; then
27769    # As a simple fix, exclude /usr/bin since it's not a real path.
27770    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27772      # a path prefixed by /cygdrive for fixpath to work.
27773      new_path="$CYGWIN_ROOT_PATH$input_path"
27774    fi
27775  fi
27776
27777
27778  if test "x$path" != "x$new_path"; then
27779    BOOT_JDK="$new_path"
27780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27781$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27782  fi
27783
27784    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27785
27786  path="$BOOT_JDK"
27787  has_colon=`$ECHO $path | $GREP ^.:`
27788  new_path="$path"
27789  if test "x$has_colon" = x; then
27790    # Not in mixed or Windows style, start by that.
27791    new_path=`cmd //c echo $path`
27792  fi
27793
27794
27795  input_path="$new_path"
27796  # Check if we need to convert this using DOS-style short mode. If the path
27797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27798  # take no chances and rewrite it.
27799  # Note: m4 eats our [], so we need to use [ and ] instead.
27800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27801  if test "x$has_forbidden_chars" != x; then
27802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27803    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27804  fi
27805
27806
27807  windows_path="$new_path"
27808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27809    unix_path=`$CYGPATH -u "$windows_path"`
27810    new_path="$unix_path"
27811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27813    new_path="$unix_path"
27814  fi
27815
27816  if test "x$path" != "x$new_path"; then
27817    BOOT_JDK="$new_path"
27818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27819$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27820  fi
27821
27822  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27823  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27824
27825    else
27826      # We're on a unix platform. Hooray! :)
27827      path="$BOOT_JDK"
27828      has_space=`$ECHO "$path" | $GREP " "`
27829      if test "x$has_space" != x; then
27830        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27831$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27832        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27833      fi
27834
27835      # Use eval to expand a potential ~
27836      eval path="$path"
27837      if test ! -f "$path" && test ! -d "$path"; then
27838        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27839      fi
27840
27841      if test -d "$path"; then
27842        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27843      else
27844        dir="`$DIRNAME "$path"`"
27845        base="`$BASENAME "$path"`"
27846        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27847      fi
27848    fi
27849  fi
27850
27851            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27852$as_echo_n "checking for Boot JDK... " >&6; }
27853            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27854$as_echo "$BOOT_JDK" >&6; }
27855            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27856$as_echo_n "checking Boot JDK version... " >&6; }
27857            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27858            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27859$as_echo "$BOOT_JDK_VERSION" >&6; }
27860          fi # end check jdk version
27861        fi # end check javac
27862      fi # end check java
27863    fi # end check boot jdk found
27864  fi
27865
27866    done
27867  fi
27868
27869
27870    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27871    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27872      # Do we have a bin/java?
27873      if test ! -x "$BOOT_JDK/bin/java"; then
27874        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27875$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27876        BOOT_JDK_FOUND=no
27877      else
27878        # Do we have a bin/javac?
27879        if test ! -x "$BOOT_JDK/bin/javac"; then
27880          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27882          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27883$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27884          BOOT_JDK_FOUND=no
27885        else
27886          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27887          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27888
27889          # Extra M4 quote needed to protect [] in grep expression.
27890          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27891          if test "x$FOUND_CORRECT_VERSION" = x; then
27892            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27893$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27894            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27895$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27896            BOOT_JDK_FOUND=no
27897          else
27898            # We're done! :-)
27899            BOOT_JDK_FOUND=yes
27900
27901  # Only process if variable expands to non-empty
27902
27903  if test "x$BOOT_JDK" != x; then
27904    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27905
27906  # Input might be given as Windows format, start by converting to
27907  # unix format.
27908  path="$BOOT_JDK"
27909  new_path=`$CYGPATH -u "$path"`
27910
27911  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27912  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27913  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27914  # "foo.exe" is OK but "foo" is an error.
27915  #
27916  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27917  # It is also a way to make sure we got the proper file name for the real test later on.
27918  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27919  if test "x$test_shortpath" = x; then
27920    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27921$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27922    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27923  fi
27924
27925  # Call helper function which possibly converts this using DOS-style short mode.
27926  # If so, the updated path is stored in $new_path.
27927
27928  input_path="$new_path"
27929  # Check if we need to convert this using DOS-style short mode. If the path
27930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27931  # take no chances and rewrite it.
27932  # Note: m4 eats our [], so we need to use [ and ] instead.
27933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27934  if test "x$has_forbidden_chars" != x; then
27935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27936    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27937    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27938    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27939      # Going to short mode and back again did indeed matter. Since short mode is
27940      # case insensitive, let's make it lowercase to improve readability.
27941      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27942      # Now convert it back to Unix-style (cygpath)
27943      input_path=`$CYGPATH -u "$shortmode_path"`
27944      new_path="$input_path"
27945    fi
27946  fi
27947
27948  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27949  if test "x$test_cygdrive_prefix" = x; then
27950    # As a simple fix, exclude /usr/bin since it's not a real path.
27951    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27952      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27953      # a path prefixed by /cygdrive for fixpath to work.
27954      new_path="$CYGWIN_ROOT_PATH$input_path"
27955    fi
27956  fi
27957
27958
27959  if test "x$path" != "x$new_path"; then
27960    BOOT_JDK="$new_path"
27961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27962$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27963  fi
27964
27965    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27966
27967  path="$BOOT_JDK"
27968  has_colon=`$ECHO $path | $GREP ^.:`
27969  new_path="$path"
27970  if test "x$has_colon" = x; then
27971    # Not in mixed or Windows style, start by that.
27972    new_path=`cmd //c echo $path`
27973  fi
27974
27975
27976  input_path="$new_path"
27977  # Check if we need to convert this using DOS-style short mode. If the path
27978  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27979  # take no chances and rewrite it.
27980  # Note: m4 eats our [], so we need to use [ and ] instead.
27981  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27982  if test "x$has_forbidden_chars" != x; then
27983    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27984    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27985  fi
27986
27987
27988  windows_path="$new_path"
27989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27990    unix_path=`$CYGPATH -u "$windows_path"`
27991    new_path="$unix_path"
27992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27994    new_path="$unix_path"
27995  fi
27996
27997  if test "x$path" != "x$new_path"; then
27998    BOOT_JDK="$new_path"
27999    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28000$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28001  fi
28002
28003  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28004  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28005
28006    else
28007      # We're on a unix platform. Hooray! :)
28008      path="$BOOT_JDK"
28009      has_space=`$ECHO "$path" | $GREP " "`
28010      if test "x$has_space" != x; then
28011        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28012$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28013        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28014      fi
28015
28016      # Use eval to expand a potential ~
28017      eval path="$path"
28018      if test ! -f "$path" && test ! -d "$path"; then
28019        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28020      fi
28021
28022      if test -d "$path"; then
28023        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28024      else
28025        dir="`$DIRNAME "$path"`"
28026        base="`$BASENAME "$path"`"
28027        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28028      fi
28029    fi
28030  fi
28031
28032            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28033$as_echo_n "checking for Boot JDK... " >&6; }
28034            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28035$as_echo "$BOOT_JDK" >&6; }
28036            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28037$as_echo_n "checking Boot JDK version... " >&6; }
28038            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28039            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28040$as_echo "$BOOT_JDK_VERSION" >&6; }
28041          fi # end check jdk version
28042        fi # end check javac
28043      fi # end check java
28044    fi # end check boot jdk found
28045  fi
28046
28047  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28048
28049  if test "x$BOOT_JDK_FOUND" = xno; then
28050    # Now execute the test
28051
28052  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28053  BOOT_JDK_SUFFIX="/Contents/Home"
28054  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28055  if test "x$ALL_JDKS_FOUND" != x; then
28056    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28057
28058  if test "x$BOOT_JDK_FOUND" = xno; then
28059    # Now execute the test
28060
28061        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28062        if test -d "$BOOT_JDK"; then
28063          BOOT_JDK_FOUND=maybe
28064          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28065$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28066        fi
28067
28068
28069    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28070    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28071      # Do we have a bin/java?
28072      if test ! -x "$BOOT_JDK/bin/java"; then
28073        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28074$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28075        BOOT_JDK_FOUND=no
28076      else
28077        # Do we have a bin/javac?
28078        if test ! -x "$BOOT_JDK/bin/javac"; then
28079          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28080$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28081          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28082$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28083          BOOT_JDK_FOUND=no
28084        else
28085          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28086          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28087
28088          # Extra M4 quote needed to protect [] in grep expression.
28089          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28090          if test "x$FOUND_CORRECT_VERSION" = x; then
28091            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28093            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28094$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28095            BOOT_JDK_FOUND=no
28096          else
28097            # We're done! :-)
28098            BOOT_JDK_FOUND=yes
28099
28100  # Only process if variable expands to non-empty
28101
28102  if test "x$BOOT_JDK" != x; then
28103    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28104
28105  # Input might be given as Windows format, start by converting to
28106  # unix format.
28107  path="$BOOT_JDK"
28108  new_path=`$CYGPATH -u "$path"`
28109
28110  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28111  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28112  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28113  # "foo.exe" is OK but "foo" is an error.
28114  #
28115  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28116  # It is also a way to make sure we got the proper file name for the real test later on.
28117  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28118  if test "x$test_shortpath" = x; then
28119    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28120$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28121    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28122  fi
28123
28124  # Call helper function which possibly converts this using DOS-style short mode.
28125  # If so, the updated path is stored in $new_path.
28126
28127  input_path="$new_path"
28128  # Check if we need to convert this using DOS-style short mode. If the path
28129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28130  # take no chances and rewrite it.
28131  # Note: m4 eats our [], so we need to use [ and ] instead.
28132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28133  if test "x$has_forbidden_chars" != x; then
28134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28138      # Going to short mode and back again did indeed matter. Since short mode is
28139      # case insensitive, let's make it lowercase to improve readability.
28140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28141      # Now convert it back to Unix-style (cygpath)
28142      input_path=`$CYGPATH -u "$shortmode_path"`
28143      new_path="$input_path"
28144    fi
28145  fi
28146
28147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28148  if test "x$test_cygdrive_prefix" = x; then
28149    # As a simple fix, exclude /usr/bin since it's not a real path.
28150    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28152      # a path prefixed by /cygdrive for fixpath to work.
28153      new_path="$CYGWIN_ROOT_PATH$input_path"
28154    fi
28155  fi
28156
28157
28158  if test "x$path" != "x$new_path"; then
28159    BOOT_JDK="$new_path"
28160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28161$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28162  fi
28163
28164    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28165
28166  path="$BOOT_JDK"
28167  has_colon=`$ECHO $path | $GREP ^.:`
28168  new_path="$path"
28169  if test "x$has_colon" = x; then
28170    # Not in mixed or Windows style, start by that.
28171    new_path=`cmd //c echo $path`
28172  fi
28173
28174
28175  input_path="$new_path"
28176  # Check if we need to convert this using DOS-style short mode. If the path
28177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28178  # take no chances and rewrite it.
28179  # Note: m4 eats our [], so we need to use [ and ] instead.
28180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28181  if test "x$has_forbidden_chars" != x; then
28182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28183    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28184  fi
28185
28186
28187  windows_path="$new_path"
28188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28189    unix_path=`$CYGPATH -u "$windows_path"`
28190    new_path="$unix_path"
28191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28193    new_path="$unix_path"
28194  fi
28195
28196  if test "x$path" != "x$new_path"; then
28197    BOOT_JDK="$new_path"
28198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28199$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28200  fi
28201
28202  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28203  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28204
28205    else
28206      # We're on a unix platform. Hooray! :)
28207      path="$BOOT_JDK"
28208      has_space=`$ECHO "$path" | $GREP " "`
28209      if test "x$has_space" != x; then
28210        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28211$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28212        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28213      fi
28214
28215      # Use eval to expand a potential ~
28216      eval path="$path"
28217      if test ! -f "$path" && test ! -d "$path"; then
28218        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28219      fi
28220
28221      if test -d "$path"; then
28222        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28223      else
28224        dir="`$DIRNAME "$path"`"
28225        base="`$BASENAME "$path"`"
28226        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28227      fi
28228    fi
28229  fi
28230
28231            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28232$as_echo_n "checking for Boot JDK... " >&6; }
28233            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28234$as_echo "$BOOT_JDK" >&6; }
28235            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28236$as_echo_n "checking Boot JDK version... " >&6; }
28237            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28238            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28239$as_echo "$BOOT_JDK_VERSION" >&6; }
28240          fi # end check jdk version
28241        fi # end check javac
28242      fi # end check java
28243    fi # end check boot jdk found
28244  fi
28245
28246    done
28247  fi
28248
28249
28250    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28251    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28252      # Do we have a bin/java?
28253      if test ! -x "$BOOT_JDK/bin/java"; then
28254        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28255$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28256        BOOT_JDK_FOUND=no
28257      else
28258        # Do we have a bin/javac?
28259        if test ! -x "$BOOT_JDK/bin/javac"; then
28260          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28261$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28262          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28263$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28264          BOOT_JDK_FOUND=no
28265        else
28266          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28267          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28268
28269          # Extra M4 quote needed to protect [] in grep expression.
28270          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28271          if test "x$FOUND_CORRECT_VERSION" = x; then
28272            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28273$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28274            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28275$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28276            BOOT_JDK_FOUND=no
28277          else
28278            # We're done! :-)
28279            BOOT_JDK_FOUND=yes
28280
28281  # Only process if variable expands to non-empty
28282
28283  if test "x$BOOT_JDK" != x; then
28284    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28285
28286  # Input might be given as Windows format, start by converting to
28287  # unix format.
28288  path="$BOOT_JDK"
28289  new_path=`$CYGPATH -u "$path"`
28290
28291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28294  # "foo.exe" is OK but "foo" is an error.
28295  #
28296  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28297  # It is also a way to make sure we got the proper file name for the real test later on.
28298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28299  if test "x$test_shortpath" = x; then
28300    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28301$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28302    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28303  fi
28304
28305  # Call helper function which possibly converts this using DOS-style short mode.
28306  # If so, the updated path is stored in $new_path.
28307
28308  input_path="$new_path"
28309  # Check if we need to convert this using DOS-style short mode. If the path
28310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28311  # take no chances and rewrite it.
28312  # Note: m4 eats our [], so we need to use [ and ] instead.
28313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28314  if test "x$has_forbidden_chars" != x; then
28315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28319      # Going to short mode and back again did indeed matter. Since short mode is
28320      # case insensitive, let's make it lowercase to improve readability.
28321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28322      # Now convert it back to Unix-style (cygpath)
28323      input_path=`$CYGPATH -u "$shortmode_path"`
28324      new_path="$input_path"
28325    fi
28326  fi
28327
28328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28329  if test "x$test_cygdrive_prefix" = x; then
28330    # As a simple fix, exclude /usr/bin since it's not a real path.
28331    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28333      # a path prefixed by /cygdrive for fixpath to work.
28334      new_path="$CYGWIN_ROOT_PATH$input_path"
28335    fi
28336  fi
28337
28338
28339  if test "x$path" != "x$new_path"; then
28340    BOOT_JDK="$new_path"
28341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28342$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28343  fi
28344
28345    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28346
28347  path="$BOOT_JDK"
28348  has_colon=`$ECHO $path | $GREP ^.:`
28349  new_path="$path"
28350  if test "x$has_colon" = x; then
28351    # Not in mixed or Windows style, start by that.
28352    new_path=`cmd //c echo $path`
28353  fi
28354
28355
28356  input_path="$new_path"
28357  # Check if we need to convert this using DOS-style short mode. If the path
28358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28359  # take no chances and rewrite it.
28360  # Note: m4 eats our [], so we need to use [ and ] instead.
28361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28362  if test "x$has_forbidden_chars" != x; then
28363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28364    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28365  fi
28366
28367
28368  windows_path="$new_path"
28369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28370    unix_path=`$CYGPATH -u "$windows_path"`
28371    new_path="$unix_path"
28372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28374    new_path="$unix_path"
28375  fi
28376
28377  if test "x$path" != "x$new_path"; then
28378    BOOT_JDK="$new_path"
28379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28380$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28381  fi
28382
28383  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28384  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28385
28386    else
28387      # We're on a unix platform. Hooray! :)
28388      path="$BOOT_JDK"
28389      has_space=`$ECHO "$path" | $GREP " "`
28390      if test "x$has_space" != x; then
28391        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28392$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28393        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28394      fi
28395
28396      # Use eval to expand a potential ~
28397      eval path="$path"
28398      if test ! -f "$path" && test ! -d "$path"; then
28399        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28400      fi
28401
28402      if test -d "$path"; then
28403        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28404      else
28405        dir="`$DIRNAME "$path"`"
28406        base="`$BASENAME "$path"`"
28407        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28408      fi
28409    fi
28410  fi
28411
28412            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28413$as_echo_n "checking for Boot JDK... " >&6; }
28414            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28415$as_echo "$BOOT_JDK" >&6; }
28416            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28417$as_echo_n "checking Boot JDK version... " >&6; }
28418            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28419            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28420$as_echo "$BOOT_JDK_VERSION" >&6; }
28421          fi # end check jdk version
28422        fi # end check javac
28423      fi # end check java
28424    fi # end check boot jdk found
28425  fi
28426
28427
28428  if test "x$BOOT_JDK_FOUND" = xno; then
28429    # Now execute the test
28430
28431  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28432  BOOT_JDK_SUFFIX="/Contents/Home"
28433  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28434  if test "x$ALL_JDKS_FOUND" != x; then
28435    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28436
28437  if test "x$BOOT_JDK_FOUND" = xno; then
28438    # Now execute the test
28439
28440        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28441        if test -d "$BOOT_JDK"; then
28442          BOOT_JDK_FOUND=maybe
28443          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28444$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28445        fi
28446
28447
28448    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28449    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28450      # Do we have a bin/java?
28451      if test ! -x "$BOOT_JDK/bin/java"; then
28452        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28453$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28454        BOOT_JDK_FOUND=no
28455      else
28456        # Do we have a bin/javac?
28457        if test ! -x "$BOOT_JDK/bin/javac"; then
28458          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28459$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28460          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28461$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28462          BOOT_JDK_FOUND=no
28463        else
28464          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28465          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28466
28467          # Extra M4 quote needed to protect [] in grep expression.
28468          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28469          if test "x$FOUND_CORRECT_VERSION" = x; then
28470            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28471$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28472            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28473$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28474            BOOT_JDK_FOUND=no
28475          else
28476            # We're done! :-)
28477            BOOT_JDK_FOUND=yes
28478
28479  # Only process if variable expands to non-empty
28480
28481  if test "x$BOOT_JDK" != x; then
28482    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28483
28484  # Input might be given as Windows format, start by converting to
28485  # unix format.
28486  path="$BOOT_JDK"
28487  new_path=`$CYGPATH -u "$path"`
28488
28489  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28490  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28491  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28492  # "foo.exe" is OK but "foo" is an error.
28493  #
28494  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28495  # It is also a way to make sure we got the proper file name for the real test later on.
28496  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28497  if test "x$test_shortpath" = x; then
28498    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28499$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28500    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28501  fi
28502
28503  # Call helper function which possibly converts this using DOS-style short mode.
28504  # If so, the updated path is stored in $new_path.
28505
28506  input_path="$new_path"
28507  # Check if we need to convert this using DOS-style short mode. If the path
28508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28509  # take no chances and rewrite it.
28510  # Note: m4 eats our [], so we need to use [ and ] instead.
28511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28512  if test "x$has_forbidden_chars" != x; then
28513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28514    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28515    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28516    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28517      # Going to short mode and back again did indeed matter. Since short mode is
28518      # case insensitive, let's make it lowercase to improve readability.
28519      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28520      # Now convert it back to Unix-style (cygpath)
28521      input_path=`$CYGPATH -u "$shortmode_path"`
28522      new_path="$input_path"
28523    fi
28524  fi
28525
28526  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28527  if test "x$test_cygdrive_prefix" = x; then
28528    # As a simple fix, exclude /usr/bin since it's not a real path.
28529    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28530      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28531      # a path prefixed by /cygdrive for fixpath to work.
28532      new_path="$CYGWIN_ROOT_PATH$input_path"
28533    fi
28534  fi
28535
28536
28537  if test "x$path" != "x$new_path"; then
28538    BOOT_JDK="$new_path"
28539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28540$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28541  fi
28542
28543    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28544
28545  path="$BOOT_JDK"
28546  has_colon=`$ECHO $path | $GREP ^.:`
28547  new_path="$path"
28548  if test "x$has_colon" = x; then
28549    # Not in mixed or Windows style, start by that.
28550    new_path=`cmd //c echo $path`
28551  fi
28552
28553
28554  input_path="$new_path"
28555  # Check if we need to convert this using DOS-style short mode. If the path
28556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28557  # take no chances and rewrite it.
28558  # Note: m4 eats our [], so we need to use [ and ] instead.
28559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28560  if test "x$has_forbidden_chars" != x; then
28561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28562    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28563  fi
28564
28565
28566  windows_path="$new_path"
28567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28568    unix_path=`$CYGPATH -u "$windows_path"`
28569    new_path="$unix_path"
28570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28572    new_path="$unix_path"
28573  fi
28574
28575  if test "x$path" != "x$new_path"; then
28576    BOOT_JDK="$new_path"
28577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28578$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28579  fi
28580
28581  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28582  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28583
28584    else
28585      # We're on a unix platform. Hooray! :)
28586      path="$BOOT_JDK"
28587      has_space=`$ECHO "$path" | $GREP " "`
28588      if test "x$has_space" != x; then
28589        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28590$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28591        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28592      fi
28593
28594      # Use eval to expand a potential ~
28595      eval path="$path"
28596      if test ! -f "$path" && test ! -d "$path"; then
28597        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28598      fi
28599
28600      if test -d "$path"; then
28601        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28602      else
28603        dir="`$DIRNAME "$path"`"
28604        base="`$BASENAME "$path"`"
28605        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28606      fi
28607    fi
28608  fi
28609
28610            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28611$as_echo_n "checking for Boot JDK... " >&6; }
28612            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28613$as_echo "$BOOT_JDK" >&6; }
28614            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28615$as_echo_n "checking Boot JDK version... " >&6; }
28616            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28617            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28618$as_echo "$BOOT_JDK_VERSION" >&6; }
28619          fi # end check jdk version
28620        fi # end check javac
28621      fi # end check java
28622    fi # end check boot jdk found
28623  fi
28624
28625    done
28626  fi
28627
28628
28629    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28630    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28631      # Do we have a bin/java?
28632      if test ! -x "$BOOT_JDK/bin/java"; then
28633        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28634$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28635        BOOT_JDK_FOUND=no
28636      else
28637        # Do we have a bin/javac?
28638        if test ! -x "$BOOT_JDK/bin/javac"; then
28639          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28640$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28641          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28642$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28643          BOOT_JDK_FOUND=no
28644        else
28645          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28646          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28647
28648          # Extra M4 quote needed to protect [] in grep expression.
28649          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28650          if test "x$FOUND_CORRECT_VERSION" = x; then
28651            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28652$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28653            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28654$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28655            BOOT_JDK_FOUND=no
28656          else
28657            # We're done! :-)
28658            BOOT_JDK_FOUND=yes
28659
28660  # Only process if variable expands to non-empty
28661
28662  if test "x$BOOT_JDK" != x; then
28663    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28664
28665  # Input might be given as Windows format, start by converting to
28666  # unix format.
28667  path="$BOOT_JDK"
28668  new_path=`$CYGPATH -u "$path"`
28669
28670  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28671  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28672  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28673  # "foo.exe" is OK but "foo" is an error.
28674  #
28675  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28676  # It is also a way to make sure we got the proper file name for the real test later on.
28677  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28678  if test "x$test_shortpath" = x; then
28679    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28680$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28681    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28682  fi
28683
28684  # Call helper function which possibly converts this using DOS-style short mode.
28685  # If so, the updated path is stored in $new_path.
28686
28687  input_path="$new_path"
28688  # Check if we need to convert this using DOS-style short mode. If the path
28689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28690  # take no chances and rewrite it.
28691  # Note: m4 eats our [], so we need to use [ and ] instead.
28692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28693  if test "x$has_forbidden_chars" != x; then
28694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28695    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28696    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28697    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28698      # Going to short mode and back again did indeed matter. Since short mode is
28699      # case insensitive, let's make it lowercase to improve readability.
28700      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28701      # Now convert it back to Unix-style (cygpath)
28702      input_path=`$CYGPATH -u "$shortmode_path"`
28703      new_path="$input_path"
28704    fi
28705  fi
28706
28707  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28708  if test "x$test_cygdrive_prefix" = x; then
28709    # As a simple fix, exclude /usr/bin since it's not a real path.
28710    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28711      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28712      # a path prefixed by /cygdrive for fixpath to work.
28713      new_path="$CYGWIN_ROOT_PATH$input_path"
28714    fi
28715  fi
28716
28717
28718  if test "x$path" != "x$new_path"; then
28719    BOOT_JDK="$new_path"
28720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28721$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28722  fi
28723
28724    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28725
28726  path="$BOOT_JDK"
28727  has_colon=`$ECHO $path | $GREP ^.:`
28728  new_path="$path"
28729  if test "x$has_colon" = x; then
28730    # Not in mixed or Windows style, start by that.
28731    new_path=`cmd //c echo $path`
28732  fi
28733
28734
28735  input_path="$new_path"
28736  # Check if we need to convert this using DOS-style short mode. If the path
28737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28738  # take no chances and rewrite it.
28739  # Note: m4 eats our [], so we need to use [ and ] instead.
28740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28741  if test "x$has_forbidden_chars" != x; then
28742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28743    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28744  fi
28745
28746
28747  windows_path="$new_path"
28748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28749    unix_path=`$CYGPATH -u "$windows_path"`
28750    new_path="$unix_path"
28751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28753    new_path="$unix_path"
28754  fi
28755
28756  if test "x$path" != "x$new_path"; then
28757    BOOT_JDK="$new_path"
28758    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28759$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28760  fi
28761
28762  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28763  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28764
28765    else
28766      # We're on a unix platform. Hooray! :)
28767      path="$BOOT_JDK"
28768      has_space=`$ECHO "$path" | $GREP " "`
28769      if test "x$has_space" != x; then
28770        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28771$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28772        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28773      fi
28774
28775      # Use eval to expand a potential ~
28776      eval path="$path"
28777      if test ! -f "$path" && test ! -d "$path"; then
28778        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28779      fi
28780
28781      if test -d "$path"; then
28782        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28783      else
28784        dir="`$DIRNAME "$path"`"
28785        base="`$BASENAME "$path"`"
28786        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28787      fi
28788    fi
28789  fi
28790
28791            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28792$as_echo_n "checking for Boot JDK... " >&6; }
28793            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28794$as_echo "$BOOT_JDK" >&6; }
28795            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28796$as_echo_n "checking Boot JDK version... " >&6; }
28797            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28798            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28799$as_echo "$BOOT_JDK_VERSION" >&6; }
28800          fi # end check jdk version
28801        fi # end check javac
28802      fi # end check java
28803    fi # end check boot jdk found
28804  fi
28805
28806  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28807
28808  if test "x$BOOT_JDK_FOUND" = xno; then
28809    # Now execute the test
28810
28811  BOOT_JDK_PREFIX="/usr/lib/jvm"
28812  BOOT_JDK_SUFFIX=""
28813  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28814  if test "x$ALL_JDKS_FOUND" != x; then
28815    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28816
28817  if test "x$BOOT_JDK_FOUND" = xno; then
28818    # Now execute the test
28819
28820        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28821        if test -d "$BOOT_JDK"; then
28822          BOOT_JDK_FOUND=maybe
28823          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28824$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28825        fi
28826
28827
28828    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28829    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28830      # Do we have a bin/java?
28831      if test ! -x "$BOOT_JDK/bin/java"; then
28832        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28833$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28834        BOOT_JDK_FOUND=no
28835      else
28836        # Do we have a bin/javac?
28837        if test ! -x "$BOOT_JDK/bin/javac"; then
28838          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28839$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28840          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28841$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28842          BOOT_JDK_FOUND=no
28843        else
28844          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28845          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28846
28847          # Extra M4 quote needed to protect [] in grep expression.
28848          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28849          if test "x$FOUND_CORRECT_VERSION" = x; then
28850            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28851$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28852            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28853$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28854            BOOT_JDK_FOUND=no
28855          else
28856            # We're done! :-)
28857            BOOT_JDK_FOUND=yes
28858
28859  # Only process if variable expands to non-empty
28860
28861  if test "x$BOOT_JDK" != x; then
28862    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28863
28864  # Input might be given as Windows format, start by converting to
28865  # unix format.
28866  path="$BOOT_JDK"
28867  new_path=`$CYGPATH -u "$path"`
28868
28869  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28870  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28871  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28872  # "foo.exe" is OK but "foo" is an error.
28873  #
28874  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28875  # It is also a way to make sure we got the proper file name for the real test later on.
28876  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28877  if test "x$test_shortpath" = x; then
28878    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28879$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28880    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28881  fi
28882
28883  # Call helper function which possibly converts this using DOS-style short mode.
28884  # If so, the updated path is stored in $new_path.
28885
28886  input_path="$new_path"
28887  # Check if we need to convert this using DOS-style short mode. If the path
28888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28889  # take no chances and rewrite it.
28890  # Note: m4 eats our [], so we need to use [ and ] instead.
28891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28892  if test "x$has_forbidden_chars" != x; then
28893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28894    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28895    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28896    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28897      # Going to short mode and back again did indeed matter. Since short mode is
28898      # case insensitive, let's make it lowercase to improve readability.
28899      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28900      # Now convert it back to Unix-style (cygpath)
28901      input_path=`$CYGPATH -u "$shortmode_path"`
28902      new_path="$input_path"
28903    fi
28904  fi
28905
28906  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28907  if test "x$test_cygdrive_prefix" = x; then
28908    # As a simple fix, exclude /usr/bin since it's not a real path.
28909    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28910      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28911      # a path prefixed by /cygdrive for fixpath to work.
28912      new_path="$CYGWIN_ROOT_PATH$input_path"
28913    fi
28914  fi
28915
28916
28917  if test "x$path" != "x$new_path"; then
28918    BOOT_JDK="$new_path"
28919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28920$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28921  fi
28922
28923    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28924
28925  path="$BOOT_JDK"
28926  has_colon=`$ECHO $path | $GREP ^.:`
28927  new_path="$path"
28928  if test "x$has_colon" = x; then
28929    # Not in mixed or Windows style, start by that.
28930    new_path=`cmd //c echo $path`
28931  fi
28932
28933
28934  input_path="$new_path"
28935  # Check if we need to convert this using DOS-style short mode. If the path
28936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28937  # take no chances and rewrite it.
28938  # Note: m4 eats our [], so we need to use [ and ] instead.
28939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28940  if test "x$has_forbidden_chars" != x; then
28941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28943  fi
28944
28945
28946  windows_path="$new_path"
28947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28948    unix_path=`$CYGPATH -u "$windows_path"`
28949    new_path="$unix_path"
28950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28952    new_path="$unix_path"
28953  fi
28954
28955  if test "x$path" != "x$new_path"; then
28956    BOOT_JDK="$new_path"
28957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28958$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28959  fi
28960
28961  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28962  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28963
28964    else
28965      # We're on a unix platform. Hooray! :)
28966      path="$BOOT_JDK"
28967      has_space=`$ECHO "$path" | $GREP " "`
28968      if test "x$has_space" != x; then
28969        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28970$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28971        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28972      fi
28973
28974      # Use eval to expand a potential ~
28975      eval path="$path"
28976      if test ! -f "$path" && test ! -d "$path"; then
28977        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28978      fi
28979
28980      if test -d "$path"; then
28981        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28982      else
28983        dir="`$DIRNAME "$path"`"
28984        base="`$BASENAME "$path"`"
28985        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28986      fi
28987    fi
28988  fi
28989
28990            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28991$as_echo_n "checking for Boot JDK... " >&6; }
28992            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28993$as_echo "$BOOT_JDK" >&6; }
28994            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28995$as_echo_n "checking Boot JDK version... " >&6; }
28996            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28997            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28998$as_echo "$BOOT_JDK_VERSION" >&6; }
28999          fi # end check jdk version
29000        fi # end check javac
29001      fi # end check java
29002    fi # end check boot jdk found
29003  fi
29004
29005    done
29006  fi
29007
29008
29009    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29010    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29011      # Do we have a bin/java?
29012      if test ! -x "$BOOT_JDK/bin/java"; then
29013        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29014$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29015        BOOT_JDK_FOUND=no
29016      else
29017        # Do we have a bin/javac?
29018        if test ! -x "$BOOT_JDK/bin/javac"; then
29019          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29020$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29021          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29022$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29023          BOOT_JDK_FOUND=no
29024        else
29025          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29026          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29027
29028          # Extra M4 quote needed to protect [] in grep expression.
29029          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29030          if test "x$FOUND_CORRECT_VERSION" = x; then
29031            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29032$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29033            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29034$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29035            BOOT_JDK_FOUND=no
29036          else
29037            # We're done! :-)
29038            BOOT_JDK_FOUND=yes
29039
29040  # Only process if variable expands to non-empty
29041
29042  if test "x$BOOT_JDK" != x; then
29043    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29044
29045  # Input might be given as Windows format, start by converting to
29046  # unix format.
29047  path="$BOOT_JDK"
29048  new_path=`$CYGPATH -u "$path"`
29049
29050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29053  # "foo.exe" is OK but "foo" is an error.
29054  #
29055  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29056  # It is also a way to make sure we got the proper file name for the real test later on.
29057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29058  if test "x$test_shortpath" = x; then
29059    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29060$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29061    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29062  fi
29063
29064  # Call helper function which possibly converts this using DOS-style short mode.
29065  # If so, the updated path is stored in $new_path.
29066
29067  input_path="$new_path"
29068  # Check if we need to convert this using DOS-style short mode. If the path
29069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29070  # take no chances and rewrite it.
29071  # Note: m4 eats our [], so we need to use [ and ] instead.
29072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29073  if test "x$has_forbidden_chars" != x; then
29074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29078      # Going to short mode and back again did indeed matter. Since short mode is
29079      # case insensitive, let's make it lowercase to improve readability.
29080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29081      # Now convert it back to Unix-style (cygpath)
29082      input_path=`$CYGPATH -u "$shortmode_path"`
29083      new_path="$input_path"
29084    fi
29085  fi
29086
29087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29088  if test "x$test_cygdrive_prefix" = x; then
29089    # As a simple fix, exclude /usr/bin since it's not a real path.
29090    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29092      # a path prefixed by /cygdrive for fixpath to work.
29093      new_path="$CYGWIN_ROOT_PATH$input_path"
29094    fi
29095  fi
29096
29097
29098  if test "x$path" != "x$new_path"; then
29099    BOOT_JDK="$new_path"
29100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29101$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29102  fi
29103
29104    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29105
29106  path="$BOOT_JDK"
29107  has_colon=`$ECHO $path | $GREP ^.:`
29108  new_path="$path"
29109  if test "x$has_colon" = x; then
29110    # Not in mixed or Windows style, start by that.
29111    new_path=`cmd //c echo $path`
29112  fi
29113
29114
29115  input_path="$new_path"
29116  # Check if we need to convert this using DOS-style short mode. If the path
29117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29118  # take no chances and rewrite it.
29119  # Note: m4 eats our [], so we need to use [ and ] instead.
29120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29121  if test "x$has_forbidden_chars" != x; then
29122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29124  fi
29125
29126
29127  windows_path="$new_path"
29128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29129    unix_path=`$CYGPATH -u "$windows_path"`
29130    new_path="$unix_path"
29131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29133    new_path="$unix_path"
29134  fi
29135
29136  if test "x$path" != "x$new_path"; then
29137    BOOT_JDK="$new_path"
29138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29139$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29140  fi
29141
29142  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29143  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29144
29145    else
29146      # We're on a unix platform. Hooray! :)
29147      path="$BOOT_JDK"
29148      has_space=`$ECHO "$path" | $GREP " "`
29149      if test "x$has_space" != x; then
29150        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29151$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29152        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29153      fi
29154
29155      # Use eval to expand a potential ~
29156      eval path="$path"
29157      if test ! -f "$path" && test ! -d "$path"; then
29158        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29159      fi
29160
29161      if test -d "$path"; then
29162        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29163      else
29164        dir="`$DIRNAME "$path"`"
29165        base="`$BASENAME "$path"`"
29166        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29167      fi
29168    fi
29169  fi
29170
29171            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29172$as_echo_n "checking for Boot JDK... " >&6; }
29173            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29174$as_echo "$BOOT_JDK" >&6; }
29175            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29176$as_echo_n "checking Boot JDK version... " >&6; }
29177            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29178            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29179$as_echo "$BOOT_JDK_VERSION" >&6; }
29180          fi # end check jdk version
29181        fi # end check javac
29182      fi # end check java
29183    fi # end check boot jdk found
29184  fi
29185
29186  fi
29187
29188
29189    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29190    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29191      # Do we have a bin/java?
29192      if test ! -x "$BOOT_JDK/bin/java"; then
29193        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29194$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29195        BOOT_JDK_FOUND=no
29196      else
29197        # Do we have a bin/javac?
29198        if test ! -x "$BOOT_JDK/bin/javac"; then
29199          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29201          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29202$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29203          BOOT_JDK_FOUND=no
29204        else
29205          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29206          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29207
29208          # Extra M4 quote needed to protect [] in grep expression.
29209          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29210          if test "x$FOUND_CORRECT_VERSION" = x; then
29211            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29212$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29213            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29214$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29215            BOOT_JDK_FOUND=no
29216          else
29217            # We're done! :-)
29218            BOOT_JDK_FOUND=yes
29219
29220  # Only process if variable expands to non-empty
29221
29222  if test "x$BOOT_JDK" != x; then
29223    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29224
29225  # Input might be given as Windows format, start by converting to
29226  # unix format.
29227  path="$BOOT_JDK"
29228  new_path=`$CYGPATH -u "$path"`
29229
29230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29233  # "foo.exe" is OK but "foo" is an error.
29234  #
29235  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29236  # It is also a way to make sure we got the proper file name for the real test later on.
29237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29238  if test "x$test_shortpath" = x; then
29239    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29240$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29241    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29242  fi
29243
29244  # Call helper function which possibly converts this using DOS-style short mode.
29245  # If so, the updated path is stored in $new_path.
29246
29247  input_path="$new_path"
29248  # Check if we need to convert this using DOS-style short mode. If the path
29249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29250  # take no chances and rewrite it.
29251  # Note: m4 eats our [], so we need to use [ and ] instead.
29252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29253  if test "x$has_forbidden_chars" != x; then
29254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29255    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29256    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29257    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29258      # Going to short mode and back again did indeed matter. Since short mode is
29259      # case insensitive, let's make it lowercase to improve readability.
29260      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29261      # Now convert it back to Unix-style (cygpath)
29262      input_path=`$CYGPATH -u "$shortmode_path"`
29263      new_path="$input_path"
29264    fi
29265  fi
29266
29267  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29268  if test "x$test_cygdrive_prefix" = x; then
29269    # As a simple fix, exclude /usr/bin since it's not a real path.
29270    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29271      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29272      # a path prefixed by /cygdrive for fixpath to work.
29273      new_path="$CYGWIN_ROOT_PATH$input_path"
29274    fi
29275  fi
29276
29277
29278  if test "x$path" != "x$new_path"; then
29279    BOOT_JDK="$new_path"
29280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29281$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29282  fi
29283
29284    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29285
29286  path="$BOOT_JDK"
29287  has_colon=`$ECHO $path | $GREP ^.:`
29288  new_path="$path"
29289  if test "x$has_colon" = x; then
29290    # Not in mixed or Windows style, start by that.
29291    new_path=`cmd //c echo $path`
29292  fi
29293
29294
29295  input_path="$new_path"
29296  # Check if we need to convert this using DOS-style short mode. If the path
29297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29298  # take no chances and rewrite it.
29299  # Note: m4 eats our [], so we need to use [ and ] instead.
29300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29301  if test "x$has_forbidden_chars" != x; then
29302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29304  fi
29305
29306
29307  windows_path="$new_path"
29308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29309    unix_path=`$CYGPATH -u "$windows_path"`
29310    new_path="$unix_path"
29311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29313    new_path="$unix_path"
29314  fi
29315
29316  if test "x$path" != "x$new_path"; then
29317    BOOT_JDK="$new_path"
29318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29319$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29320  fi
29321
29322  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29323  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29324
29325    else
29326      # We're on a unix platform. Hooray! :)
29327      path="$BOOT_JDK"
29328      has_space=`$ECHO "$path" | $GREP " "`
29329      if test "x$has_space" != x; then
29330        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29331$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29332        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29333      fi
29334
29335      # Use eval to expand a potential ~
29336      eval path="$path"
29337      if test ! -f "$path" && test ! -d "$path"; then
29338        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29339      fi
29340
29341      if test -d "$path"; then
29342        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29343      else
29344        dir="`$DIRNAME "$path"`"
29345        base="`$BASENAME "$path"`"
29346        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29347      fi
29348    fi
29349  fi
29350
29351            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29352$as_echo_n "checking for Boot JDK... " >&6; }
29353            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29354$as_echo "$BOOT_JDK" >&6; }
29355            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29356$as_echo_n "checking Boot JDK version... " >&6; }
29357            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29358            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29359$as_echo "$BOOT_JDK_VERSION" >&6; }
29360          fi # end check jdk version
29361        fi # end check javac
29362      fi # end check java
29363    fi # end check boot jdk found
29364  fi
29365
29366
29367  # If we haven't found anything yet, we've truly lost. Give up.
29368  if test "x$BOOT_JDK_FOUND" = xno; then
29369
29370  # Print a helpful message on how to acquire the necessary build dependency.
29371  # openjdk is the help tag: freetype, cups, alsa etc
29372  MISSING_DEPENDENCY=openjdk
29373
29374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29375    cygwin_help $MISSING_DEPENDENCY
29376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29377    msys_help $MISSING_DEPENDENCY
29378  else
29379    PKGHANDLER_COMMAND=
29380
29381    case $PKGHANDLER in
29382      apt-get)
29383        apt_help     $MISSING_DEPENDENCY ;;
29384      yum)
29385        yum_help     $MISSING_DEPENDENCY ;;
29386      port)
29387        port_help    $MISSING_DEPENDENCY ;;
29388      pkgutil)
29389        pkgutil_help $MISSING_DEPENDENCY ;;
29390      pkgadd)
29391        pkgadd_help  $MISSING_DEPENDENCY ;;
29392    esac
29393
29394    if test "x$PKGHANDLER_COMMAND" != x; then
29395      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29396    fi
29397  fi
29398
29399    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29400$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29401    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29402$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29403    as_fn_error $? "Cannot continue" "$LINENO" 5
29404  fi
29405
29406
29407
29408  # Setup tools from the Boot JDK.
29409
29410  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29411
29412  # Publish this variable in the help.
29413
29414
29415  if [ -z "${JAVA+x}" ]; then
29416    # The variable is not set by user, try to locate tool using the code snippet
29417
29418      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29419$as_echo_n "checking for java in Boot JDK... " >&6; }
29420      JAVA=$BOOT_JDK/bin/java
29421      if test ! -x $JAVA; then
29422        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29423$as_echo "not found" >&6; }
29424        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29425$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29426        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29427      fi
29428      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29429$as_echo "ok" >&6; }
29430
29431
29432  else
29433    # The variable is set, but is it from the command line or the environment?
29434
29435    # Try to remove the string !JAVA! from our list.
29436    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29437    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29438      # If it failed, the variable was not from the command line. Ignore it,
29439      # but warn the user (except for BASH, which is always set by the calling BASH).
29440      if test "xJAVA" != xBASH; then
29441        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29442$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29443      fi
29444      # Try to locate tool using the code snippet
29445
29446      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29447$as_echo_n "checking for java in Boot JDK... " >&6; }
29448      JAVA=$BOOT_JDK/bin/java
29449      if test ! -x $JAVA; then
29450        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29451$as_echo "not found" >&6; }
29452        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29453$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29454        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29455      fi
29456      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29457$as_echo "ok" >&6; }
29458
29459
29460    else
29461      # If it succeeded, then it was overridden by the user. We will use it
29462      # for the tool.
29463
29464      # First remove it from the list of overridden variables, so we can test
29465      # for unknown variables in the end.
29466      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29467
29468      # Check if we try to supply an empty value
29469      if test "x$JAVA" = x; then
29470        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29471$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29472        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29473$as_echo_n "checking for JAVA... " >&6; }
29474        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29475$as_echo "disabled" >&6; }
29476      else
29477        # Check if the provided tool contains a complete path.
29478        tool_specified="$JAVA"
29479        tool_basename="${tool_specified##*/}"
29480        if test "x$tool_basename" = "x$tool_specified"; then
29481          # A command without a complete path is provided, search $PATH.
29482          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29483$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29484          # Extract the first word of "$tool_basename", so it can be a program name with args.
29485set dummy $tool_basename; ac_word=$2
29486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29487$as_echo_n "checking for $ac_word... " >&6; }
29488if ${ac_cv_path_JAVA+:} false; then :
29489  $as_echo_n "(cached) " >&6
29490else
29491  case $JAVA in
29492  [\\/]* | ?:[\\/]*)
29493  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29494  ;;
29495  *)
29496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29497for as_dir in $PATH
29498do
29499  IFS=$as_save_IFS
29500  test -z "$as_dir" && as_dir=.
29501    for ac_exec_ext in '' $ac_executable_extensions; do
29502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29503    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29505    break 2
29506  fi
29507done
29508  done
29509IFS=$as_save_IFS
29510
29511  ;;
29512esac
29513fi
29514JAVA=$ac_cv_path_JAVA
29515if test -n "$JAVA"; then
29516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
29517$as_echo "$JAVA" >&6; }
29518else
29519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29520$as_echo "no" >&6; }
29521fi
29522
29523
29524          if test "x$JAVA" = x; then
29525            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29526          fi
29527        else
29528          # Otherwise we believe it is a complete path. Use it as it is.
29529          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
29530$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
29531          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29532$as_echo_n "checking for JAVA... " >&6; }
29533          if test ! -x "$tool_specified"; then
29534            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29535$as_echo "not found" >&6; }
29536            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
29537          fi
29538          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29539$as_echo "$tool_specified" >&6; }
29540        fi
29541      fi
29542    fi
29543
29544  fi
29545
29546
29547
29548  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29549
29550  # Publish this variable in the help.
29551
29552
29553  if [ -z "${JAVAC+x}" ]; then
29554    # The variable is not set by user, try to locate tool using the code snippet
29555
29556      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29557$as_echo_n "checking for javac in Boot JDK... " >&6; }
29558      JAVAC=$BOOT_JDK/bin/javac
29559      if test ! -x $JAVAC; then
29560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29561$as_echo "not found" >&6; }
29562        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29563$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29564        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29565      fi
29566      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29567$as_echo "ok" >&6; }
29568
29569
29570  else
29571    # The variable is set, but is it from the command line or the environment?
29572
29573    # Try to remove the string !JAVAC! from our list.
29574    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
29575    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29576      # If it failed, the variable was not from the command line. Ignore it,
29577      # but warn the user (except for BASH, which is always set by the calling BASH).
29578      if test "xJAVAC" != xBASH; then
29579        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29580$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29581      fi
29582      # Try to locate tool using the code snippet
29583
29584      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29585$as_echo_n "checking for javac in Boot JDK... " >&6; }
29586      JAVAC=$BOOT_JDK/bin/javac
29587      if test ! -x $JAVAC; then
29588        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29589$as_echo "not found" >&6; }
29590        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29591$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29592        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29593      fi
29594      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29595$as_echo "ok" >&6; }
29596
29597
29598    else
29599      # If it succeeded, then it was overridden by the user. We will use it
29600      # for the tool.
29601
29602      # First remove it from the list of overridden variables, so we can test
29603      # for unknown variables in the end.
29604      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29605
29606      # Check if we try to supply an empty value
29607      if test "x$JAVAC" = x; then
29608        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29609$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29610        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29611$as_echo_n "checking for JAVAC... " >&6; }
29612        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29613$as_echo "disabled" >&6; }
29614      else
29615        # Check if the provided tool contains a complete path.
29616        tool_specified="$JAVAC"
29617        tool_basename="${tool_specified##*/}"
29618        if test "x$tool_basename" = "x$tool_specified"; then
29619          # A command without a complete path is provided, search $PATH.
29620          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29621$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29622          # Extract the first word of "$tool_basename", so it can be a program name with args.
29623set dummy $tool_basename; ac_word=$2
29624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29625$as_echo_n "checking for $ac_word... " >&6; }
29626if ${ac_cv_path_JAVAC+:} false; then :
29627  $as_echo_n "(cached) " >&6
29628else
29629  case $JAVAC in
29630  [\\/]* | ?:[\\/]*)
29631  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29632  ;;
29633  *)
29634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29635for as_dir in $PATH
29636do
29637  IFS=$as_save_IFS
29638  test -z "$as_dir" && as_dir=.
29639    for ac_exec_ext in '' $ac_executable_extensions; do
29640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29641    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29643    break 2
29644  fi
29645done
29646  done
29647IFS=$as_save_IFS
29648
29649  ;;
29650esac
29651fi
29652JAVAC=$ac_cv_path_JAVAC
29653if test -n "$JAVAC"; then
29654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29655$as_echo "$JAVAC" >&6; }
29656else
29657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29658$as_echo "no" >&6; }
29659fi
29660
29661
29662          if test "x$JAVAC" = x; then
29663            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29664          fi
29665        else
29666          # Otherwise we believe it is a complete path. Use it as it is.
29667          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29668$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29669          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29670$as_echo_n "checking for JAVAC... " >&6; }
29671          if test ! -x "$tool_specified"; then
29672            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29673$as_echo "not found" >&6; }
29674            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29675          fi
29676          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29677$as_echo "$tool_specified" >&6; }
29678        fi
29679      fi
29680    fi
29681
29682  fi
29683
29684
29685
29686  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29687
29688  # Publish this variable in the help.
29689
29690
29691  if [ -z "${JAVAH+x}" ]; then
29692    # The variable is not set by user, try to locate tool using the code snippet
29693
29694      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29695$as_echo_n "checking for javah in Boot JDK... " >&6; }
29696      JAVAH=$BOOT_JDK/bin/javah
29697      if test ! -x $JAVAH; then
29698        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29699$as_echo "not found" >&6; }
29700        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29701$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29702        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29703      fi
29704      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29705$as_echo "ok" >&6; }
29706
29707
29708  else
29709    # The variable is set, but is it from the command line or the environment?
29710
29711    # Try to remove the string !JAVAH! from our list.
29712    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29713    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29714      # If it failed, the variable was not from the command line. Ignore it,
29715      # but warn the user (except for BASH, which is always set by the calling BASH).
29716      if test "xJAVAH" != xBASH; then
29717        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29718$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29719      fi
29720      # Try to locate tool using the code snippet
29721
29722      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29723$as_echo_n "checking for javah in Boot JDK... " >&6; }
29724      JAVAH=$BOOT_JDK/bin/javah
29725      if test ! -x $JAVAH; then
29726        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29727$as_echo "not found" >&6; }
29728        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29729$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29730        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29731      fi
29732      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29733$as_echo "ok" >&6; }
29734
29735
29736    else
29737      # If it succeeded, then it was overridden by the user. We will use it
29738      # for the tool.
29739
29740      # First remove it from the list of overridden variables, so we can test
29741      # for unknown variables in the end.
29742      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29743
29744      # Check if we try to supply an empty value
29745      if test "x$JAVAH" = x; then
29746        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29747$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29748        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29749$as_echo_n "checking for JAVAH... " >&6; }
29750        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29751$as_echo "disabled" >&6; }
29752      else
29753        # Check if the provided tool contains a complete path.
29754        tool_specified="$JAVAH"
29755        tool_basename="${tool_specified##*/}"
29756        if test "x$tool_basename" = "x$tool_specified"; then
29757          # A command without a complete path is provided, search $PATH.
29758          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29759$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29760          # Extract the first word of "$tool_basename", so it can be a program name with args.
29761set dummy $tool_basename; ac_word=$2
29762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29763$as_echo_n "checking for $ac_word... " >&6; }
29764if ${ac_cv_path_JAVAH+:} false; then :
29765  $as_echo_n "(cached) " >&6
29766else
29767  case $JAVAH in
29768  [\\/]* | ?:[\\/]*)
29769  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29770  ;;
29771  *)
29772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29773for as_dir in $PATH
29774do
29775  IFS=$as_save_IFS
29776  test -z "$as_dir" && as_dir=.
29777    for ac_exec_ext in '' $ac_executable_extensions; do
29778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29779    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29781    break 2
29782  fi
29783done
29784  done
29785IFS=$as_save_IFS
29786
29787  ;;
29788esac
29789fi
29790JAVAH=$ac_cv_path_JAVAH
29791if test -n "$JAVAH"; then
29792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29793$as_echo "$JAVAH" >&6; }
29794else
29795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29796$as_echo "no" >&6; }
29797fi
29798
29799
29800          if test "x$JAVAH" = x; then
29801            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29802          fi
29803        else
29804          # Otherwise we believe it is a complete path. Use it as it is.
29805          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29806$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29807          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29808$as_echo_n "checking for JAVAH... " >&6; }
29809          if test ! -x "$tool_specified"; then
29810            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29811$as_echo "not found" >&6; }
29812            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29813          fi
29814          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29815$as_echo "$tool_specified" >&6; }
29816        fi
29817      fi
29818    fi
29819
29820  fi
29821
29822
29823
29824  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29825
29826  # Publish this variable in the help.
29827
29828
29829  if [ -z "${JAR+x}" ]; then
29830    # The variable is not set by user, try to locate tool using the code snippet
29831
29832      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29833$as_echo_n "checking for jar in Boot JDK... " >&6; }
29834      JAR=$BOOT_JDK/bin/jar
29835      if test ! -x $JAR; then
29836        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29837$as_echo "not found" >&6; }
29838        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29839$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29840        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29841      fi
29842      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29843$as_echo "ok" >&6; }
29844
29845
29846  else
29847    # The variable is set, but is it from the command line or the environment?
29848
29849    # Try to remove the string !JAR! from our list.
29850    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29851    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29852      # If it failed, the variable was not from the command line. Ignore it,
29853      # but warn the user (except for BASH, which is always set by the calling BASH).
29854      if test "xJAR" != xBASH; then
29855        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29856$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29857      fi
29858      # Try to locate tool using the code snippet
29859
29860      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29861$as_echo_n "checking for jar in Boot JDK... " >&6; }
29862      JAR=$BOOT_JDK/bin/jar
29863      if test ! -x $JAR; then
29864        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29865$as_echo "not found" >&6; }
29866        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29867$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29868        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29869      fi
29870      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29871$as_echo "ok" >&6; }
29872
29873
29874    else
29875      # If it succeeded, then it was overridden by the user. We will use it
29876      # for the tool.
29877
29878      # First remove it from the list of overridden variables, so we can test
29879      # for unknown variables in the end.
29880      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29881
29882      # Check if we try to supply an empty value
29883      if test "x$JAR" = x; then
29884        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29885$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29886        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29887$as_echo_n "checking for JAR... " >&6; }
29888        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29889$as_echo "disabled" >&6; }
29890      else
29891        # Check if the provided tool contains a complete path.
29892        tool_specified="$JAR"
29893        tool_basename="${tool_specified##*/}"
29894        if test "x$tool_basename" = "x$tool_specified"; then
29895          # A command without a complete path is provided, search $PATH.
29896          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29897$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29898          # Extract the first word of "$tool_basename", so it can be a program name with args.
29899set dummy $tool_basename; ac_word=$2
29900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29901$as_echo_n "checking for $ac_word... " >&6; }
29902if ${ac_cv_path_JAR+:} false; then :
29903  $as_echo_n "(cached) " >&6
29904else
29905  case $JAR in
29906  [\\/]* | ?:[\\/]*)
29907  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29908  ;;
29909  *)
29910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29911for as_dir in $PATH
29912do
29913  IFS=$as_save_IFS
29914  test -z "$as_dir" && as_dir=.
29915    for ac_exec_ext in '' $ac_executable_extensions; do
29916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29917    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29919    break 2
29920  fi
29921done
29922  done
29923IFS=$as_save_IFS
29924
29925  ;;
29926esac
29927fi
29928JAR=$ac_cv_path_JAR
29929if test -n "$JAR"; then
29930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29931$as_echo "$JAR" >&6; }
29932else
29933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29934$as_echo "no" >&6; }
29935fi
29936
29937
29938          if test "x$JAR" = x; then
29939            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29940          fi
29941        else
29942          # Otherwise we believe it is a complete path. Use it as it is.
29943          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29944$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29945          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29946$as_echo_n "checking for JAR... " >&6; }
29947          if test ! -x "$tool_specified"; then
29948            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29949$as_echo "not found" >&6; }
29950            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29951          fi
29952          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29953$as_echo "$tool_specified" >&6; }
29954        fi
29955      fi
29956    fi
29957
29958  fi
29959
29960
29961
29962  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29963
29964  # Publish this variable in the help.
29965
29966
29967  if [ -z "${JARSIGNER+x}" ]; then
29968    # The variable is not set by user, try to locate tool using the code snippet
29969
29970      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29971$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29972      JARSIGNER=$BOOT_JDK/bin/jarsigner
29973      if test ! -x $JARSIGNER; then
29974        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29975$as_echo "not found" >&6; }
29976        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29977$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29978        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29979      fi
29980      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29981$as_echo "ok" >&6; }
29982
29983
29984  else
29985    # The variable is set, but is it from the command line or the environment?
29986
29987    # Try to remove the string !JARSIGNER! from our list.
29988    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29989    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29990      # If it failed, the variable was not from the command line. Ignore it,
29991      # but warn the user (except for BASH, which is always set by the calling BASH).
29992      if test "xJARSIGNER" != xBASH; then
29993        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29994$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29995      fi
29996      # Try to locate tool using the code snippet
29997
29998      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29999$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30000      JARSIGNER=$BOOT_JDK/bin/jarsigner
30001      if test ! -x $JARSIGNER; then
30002        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30003$as_echo "not found" >&6; }
30004        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30005$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30006        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30007      fi
30008      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30009$as_echo "ok" >&6; }
30010
30011
30012    else
30013      # If it succeeded, then it was overridden by the user. We will use it
30014      # for the tool.
30015
30016      # First remove it from the list of overridden variables, so we can test
30017      # for unknown variables in the end.
30018      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30019
30020      # Check if we try to supply an empty value
30021      if test "x$JARSIGNER" = x; then
30022        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30023$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30024        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30025$as_echo_n "checking for JARSIGNER... " >&6; }
30026        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30027$as_echo "disabled" >&6; }
30028      else
30029        # Check if the provided tool contains a complete path.
30030        tool_specified="$JARSIGNER"
30031        tool_basename="${tool_specified##*/}"
30032        if test "x$tool_basename" = "x$tool_specified"; then
30033          # A command without a complete path is provided, search $PATH.
30034          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30035$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30036          # Extract the first word of "$tool_basename", so it can be a program name with args.
30037set dummy $tool_basename; ac_word=$2
30038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30039$as_echo_n "checking for $ac_word... " >&6; }
30040if ${ac_cv_path_JARSIGNER+:} false; then :
30041  $as_echo_n "(cached) " >&6
30042else
30043  case $JARSIGNER in
30044  [\\/]* | ?:[\\/]*)
30045  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30046  ;;
30047  *)
30048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30049for as_dir in $PATH
30050do
30051  IFS=$as_save_IFS
30052  test -z "$as_dir" && as_dir=.
30053    for ac_exec_ext in '' $ac_executable_extensions; do
30054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30055    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30057    break 2
30058  fi
30059done
30060  done
30061IFS=$as_save_IFS
30062
30063  ;;
30064esac
30065fi
30066JARSIGNER=$ac_cv_path_JARSIGNER
30067if test -n "$JARSIGNER"; then
30068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30069$as_echo "$JARSIGNER" >&6; }
30070else
30071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30072$as_echo "no" >&6; }
30073fi
30074
30075
30076          if test "x$JARSIGNER" = x; then
30077            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30078          fi
30079        else
30080          # Otherwise we believe it is a complete path. Use it as it is.
30081          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30082$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30083          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30084$as_echo_n "checking for JARSIGNER... " >&6; }
30085          if test ! -x "$tool_specified"; then
30086            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30087$as_echo "not found" >&6; }
30088            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30089          fi
30090          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30091$as_echo "$tool_specified" >&6; }
30092        fi
30093      fi
30094    fi
30095
30096  fi
30097
30098
30099
30100  # Finally, set some other options...
30101
30102  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30103  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30104
30105
30106
30107  $ECHO "Check if jvm arg is ok: -Xpatch:foo=bar" >&5
30108  $ECHO "Command: $JAVA -Xpatch:foo=bar -version" >&5
30109  OUTPUT=`$JAVA -Xpatch:foo=bar -version 2>&1`
30110  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
30111  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
30112  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30113    dummy="$dummy -Xpatch:foo=bar"
30114    JVM_ARG_OK=true
30115  else
30116    $ECHO "Arg failed:" >&5
30117    $ECHO "$OUTPUT" >&5
30118    JVM_ARG_OK=false
30119  fi
30120
30121  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30122$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30123  if test "x$JVM_ARG_OK" = "xtrue"; then
30124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30125$as_echo "yes" >&6; }
30126    BOOT_JDK_MODULAR="true"
30127  else
30128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30129$as_echo "no" >&6; }
30130    BOOT_JDK_MODULAR="false"
30131  fi
30132
30133
30134
30135
30136  # Check if the boot jdk is 32 or 64 bit
30137  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30138    BOOT_JDK_BITS="64"
30139  else
30140    BOOT_JDK_BITS="32"
30141  fi
30142  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30143$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30145$as_echo "$BOOT_JDK_BITS" >&6; }
30146
30147
30148
30149
30150# Check whether --with-build-jdk was given.
30151if test "${with_build_jdk+set}" = set; then :
30152  withval=$with_build_jdk;
30153fi
30154
30155
30156  CREATE_BUILDJDK_FOR_HOST=false
30157  BUILD_JDK_FOUND="no"
30158  if test "x$with_build_jdk" != "x"; then
30159
30160  if test "x$BUILD_JDK_FOUND" = xno; then
30161    # Execute the test
30162
30163       if test "x$with_build_jdk" != x; then
30164         BUILD_JDK=$with_build_jdk
30165         BUILD_JDK_FOUND=maybe
30166         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30167$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30168       fi
30169
30170    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30171    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30172      # Do we have a bin/java?
30173      if test ! -x "$BUILD_JDK/bin/java"; then
30174        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30175$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30176        BUILD_JDK_FOUND=no
30177      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30178        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30179$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30180        BUILD_JDK_FOUND=no
30181      elif test ! -x "$BUILD_JDK/bin/javac"; then
30182        # Do we have a bin/javac?
30183        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30184$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30185        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30186$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30187        BUILD_JDK_FOUND=no
30188      else
30189        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30190        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | head -n 1`
30191
30192        # Extra M4 quote needed to protect [] in grep expression.
30193        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30194        if test "x$FOUND_CORRECT_VERSION" = x; then
30195          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30196$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30197          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30198$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30199          BUILD_JDK_FOUND=no
30200        else
30201          # We're done!
30202          BUILD_JDK_FOUND=yes
30203
30204  # Only process if variable expands to non-empty
30205
30206  if test "x$BUILD_JDK" != x; then
30207    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30208
30209  # Input might be given as Windows format, start by converting to
30210  # unix format.
30211  path="$BUILD_JDK"
30212  new_path=`$CYGPATH -u "$path"`
30213
30214  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30215  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30216  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30217  # "foo.exe" is OK but "foo" is an error.
30218  #
30219  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30220  # It is also a way to make sure we got the proper file name for the real test later on.
30221  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30222  if test "x$test_shortpath" = x; then
30223    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30224$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30225    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30226  fi
30227
30228  # Call helper function which possibly converts this using DOS-style short mode.
30229  # If so, the updated path is stored in $new_path.
30230
30231  input_path="$new_path"
30232  # Check if we need to convert this using DOS-style short mode. If the path
30233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30234  # take no chances and rewrite it.
30235  # Note: m4 eats our [], so we need to use [ and ] instead.
30236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30237  if test "x$has_forbidden_chars" != x; then
30238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30239    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30240    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30241    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30242      # Going to short mode and back again did indeed matter. Since short mode is
30243      # case insensitive, let's make it lowercase to improve readability.
30244      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30245      # Now convert it back to Unix-style (cygpath)
30246      input_path=`$CYGPATH -u "$shortmode_path"`
30247      new_path="$input_path"
30248    fi
30249  fi
30250
30251  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30252  if test "x$test_cygdrive_prefix" = x; then
30253    # As a simple fix, exclude /usr/bin since it's not a real path.
30254    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30255      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30256      # a path prefixed by /cygdrive for fixpath to work.
30257      new_path="$CYGWIN_ROOT_PATH$input_path"
30258    fi
30259  fi
30260
30261
30262  if test "x$path" != "x$new_path"; then
30263    BUILD_JDK="$new_path"
30264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30265$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30266  fi
30267
30268    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30269
30270  path="$BUILD_JDK"
30271  has_colon=`$ECHO $path | $GREP ^.:`
30272  new_path="$path"
30273  if test "x$has_colon" = x; then
30274    # Not in mixed or Windows style, start by that.
30275    new_path=`cmd //c echo $path`
30276  fi
30277
30278
30279  input_path="$new_path"
30280  # Check if we need to convert this using DOS-style short mode. If the path
30281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30282  # take no chances and rewrite it.
30283  # Note: m4 eats our [], so we need to use [ and ] instead.
30284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30285  if test "x$has_forbidden_chars" != x; then
30286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30287    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30288  fi
30289
30290
30291  windows_path="$new_path"
30292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30293    unix_path=`$CYGPATH -u "$windows_path"`
30294    new_path="$unix_path"
30295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30297    new_path="$unix_path"
30298  fi
30299
30300  if test "x$path" != "x$new_path"; then
30301    BUILD_JDK="$new_path"
30302    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30303$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30304  fi
30305
30306  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30307  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30308
30309    else
30310      # We're on a unix platform. Hooray! :)
30311      path="$BUILD_JDK"
30312      has_space=`$ECHO "$path" | $GREP " "`
30313      if test "x$has_space" != x; then
30314        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30315$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30316        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30317      fi
30318
30319      # Use eval to expand a potential ~
30320      eval path="$path"
30321      if test ! -f "$path" && test ! -d "$path"; then
30322        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30323      fi
30324
30325      if test -d "$path"; then
30326        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30327      else
30328        dir="`$DIRNAME "$path"`"
30329        base="`$BASENAME "$path"`"
30330        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30331      fi
30332    fi
30333  fi
30334
30335          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30336$as_echo_n "checking for Build JDK... " >&6; }
30337          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30338$as_echo "$BUILD_JDK" >&6; }
30339          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30340$as_echo_n "checking Build JDK version... " >&6; }
30341          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30342          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30343$as_echo "$BUILD_JDK_VERSION" >&6; }
30344        fi # end check jdk version
30345      fi # end check java
30346    fi # end check build jdk found
30347  fi
30348
30349  else
30350    if test "x$COMPILE_TYPE" = "xcross"; then
30351      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30352      BUILD_JDK_FOUND=yes
30353      CREATE_BUILDJDK=true
30354      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30355$as_echo_n "checking for Build JDK... " >&6; }
30356      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30357$as_echo "yes, will build it for the host platform" >&6; }
30358    else
30359      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30360      BUILD_JDK_FOUND=yes
30361      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30362$as_echo_n "checking for Build JDK... " >&6; }
30363      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30364$as_echo "yes, will use output dir" >&6; }
30365    fi
30366  fi
30367
30368  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30369    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30370$as_echo_n "checking for Build JDK... " >&6; }
30371    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30372$as_echo "no" >&6; }
30373    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30374  fi
30375
30376
30377
30378
30379
30380###############################################################################
30381#
30382# Configure the sources to use. We can add or override individual directories.
30383#
30384###############################################################################
30385
30386
30387  # Where are the sources.
30388  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30389  CORBA_TOPDIR="$SRC_ROOT/corba"
30390  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30391  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30392  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30393  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30394  JDK_TOPDIR="$SRC_ROOT/jdk"
30395
30396
30397
30398
30399
30400
30401
30402
30403
30404  # This feature is no longer supported.
30405
30406
30407
30408# Check whether --with-add-source-root was given.
30409if test "${with_add_source_root+set}" = set; then :
30410  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
30411$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30412fi
30413
30414
30415
30416
30417# Check whether --with-override-source-root was given.
30418if test "${with_override_source_root+set}" = set; then :
30419  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
30420$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30421fi
30422
30423
30424
30425
30426# Check whether --with-adds-and-overrides was given.
30427if test "${with_adds_and_overrides+set}" = set; then :
30428  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
30429$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30430fi
30431
30432
30433
30434
30435# Check whether --with-override-langtools was given.
30436if test "${with_override_langtools+set}" = set; then :
30437  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30438$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30439fi
30440
30441
30442
30443
30444# Check whether --with-override-corba was given.
30445if test "${with_override_corba+set}" = set; then :
30446  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30447$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30448fi
30449
30450
30451
30452
30453# Check whether --with-override-jaxp was given.
30454if test "${with_override_jaxp+set}" = set; then :
30455  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30456$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30457fi
30458
30459
30460
30461
30462# Check whether --with-override-jaxws was given.
30463if test "${with_override_jaxws+set}" = set; then :
30464  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30465$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30466fi
30467
30468
30469
30470
30471# Check whether --with-override-hotspot was given.
30472if test "${with_override_hotspot+set}" = set; then :
30473  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30474$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30475fi
30476
30477
30478
30479
30480# Check whether --with-override-nashorn was given.
30481if test "${with_override_nashorn+set}" = set; then :
30482  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30483$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30484fi
30485
30486
30487
30488
30489# Check whether --with-override-jdk was given.
30490if test "${with_override_jdk+set}" = set; then :
30491  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30492$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30493fi
30494
30495
30496
30497
30498  BUILD_OUTPUT="$OUTPUT_ROOT"
30499
30500
30501  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
30502  BUILD_HOTSPOT=true
30503
30504
30505
30506# Check whether --with-import-hotspot was given.
30507if test "${with_import_hotspot+set}" = set; then :
30508  withval=$with_import_hotspot;
30509fi
30510
30511  if test "x$with_import_hotspot" != x; then
30512    CURDIR="$PWD"
30513    cd "$with_import_hotspot"
30514    HOTSPOT_DIST="`pwd`"
30515    cd "$CURDIR"
30516    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
30517      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
30518    fi
30519    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
30520$as_echo_n "checking if hotspot should be imported... " >&6; }
30521    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
30522$as_echo "yes from $HOTSPOT_DIST" >&6; }
30523    BUILD_HOTSPOT=false
30524  fi
30525
30526  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
30527
30528
30529
30530
30531# Check whether --with-import-modules was given.
30532if test "${with_import_modules+set}" = set; then :
30533  withval=$with_import_modules;
30534fi
30535
30536
30537  if test "x$with_import_modules" != x \
30538      && test "x$with_import_modules" != "xno"; then
30539    if test -d "$with_import_modules"; then
30540      IMPORT_MODULES_TOPDIR="$with_import_modules"
30541
30542  # Only process if variable expands to non-empty
30543
30544  if test "x$IMPORT_MODULES_TOPDIR" != x; then
30545    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30546
30547  # Input might be given as Windows format, start by converting to
30548  # unix format.
30549  path="$IMPORT_MODULES_TOPDIR"
30550  new_path=`$CYGPATH -u "$path"`
30551
30552  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30553  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30554  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30555  # "foo.exe" is OK but "foo" is an error.
30556  #
30557  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30558  # It is also a way to make sure we got the proper file name for the real test later on.
30559  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30560  if test "x$test_shortpath" = x; then
30561    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30562$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30563    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
30564  fi
30565
30566  # Call helper function which possibly converts this using DOS-style short mode.
30567  # If so, the updated path is stored in $new_path.
30568
30569  input_path="$new_path"
30570  # Check if we need to convert this using DOS-style short mode. If the path
30571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30572  # take no chances and rewrite it.
30573  # Note: m4 eats our [], so we need to use [ and ] instead.
30574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30575  if test "x$has_forbidden_chars" != x; then
30576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30577    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30578    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30579    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30580      # Going to short mode and back again did indeed matter. Since short mode is
30581      # case insensitive, let's make it lowercase to improve readability.
30582      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30583      # Now convert it back to Unix-style (cygpath)
30584      input_path=`$CYGPATH -u "$shortmode_path"`
30585      new_path="$input_path"
30586    fi
30587  fi
30588
30589  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30590  if test "x$test_cygdrive_prefix" = x; then
30591    # As a simple fix, exclude /usr/bin since it's not a real path.
30592    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30593      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30594      # a path prefixed by /cygdrive for fixpath to work.
30595      new_path="$CYGWIN_ROOT_PATH$input_path"
30596    fi
30597  fi
30598
30599
30600  if test "x$path" != "x$new_path"; then
30601    IMPORT_MODULES_TOPDIR="$new_path"
30602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30603$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30604  fi
30605
30606    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30607
30608  path="$IMPORT_MODULES_TOPDIR"
30609  has_colon=`$ECHO $path | $GREP ^.:`
30610  new_path="$path"
30611  if test "x$has_colon" = x; then
30612    # Not in mixed or Windows style, start by that.
30613    new_path=`cmd //c echo $path`
30614  fi
30615
30616
30617  input_path="$new_path"
30618  # Check if we need to convert this using DOS-style short mode. If the path
30619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30620  # take no chances and rewrite it.
30621  # Note: m4 eats our [], so we need to use [ and ] instead.
30622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30623  if test "x$has_forbidden_chars" != x; then
30624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30625    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30626  fi
30627
30628
30629  windows_path="$new_path"
30630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30631    unix_path=`$CYGPATH -u "$windows_path"`
30632    new_path="$unix_path"
30633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30635    new_path="$unix_path"
30636  fi
30637
30638  if test "x$path" != "x$new_path"; then
30639    IMPORT_MODULES_TOPDIR="$new_path"
30640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30641$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30642  fi
30643
30644  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30645  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30646
30647    else
30648      # We're on a unix platform. Hooray! :)
30649      path="$IMPORT_MODULES_TOPDIR"
30650      has_space=`$ECHO "$path" | $GREP " "`
30651      if test "x$has_space" != x; then
30652        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30653$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30654        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30655      fi
30656
30657      # Use eval to expand a potential ~
30658      eval path="$path"
30659      if test ! -f "$path" && test ! -d "$path"; then
30660        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
30661      fi
30662
30663      if test -d "$path"; then
30664        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
30665      else
30666        dir="`$DIRNAME "$path"`"
30667        base="`$BASENAME "$path"`"
30668        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
30669      fi
30670    fi
30671  fi
30672
30673    elif test -e "$with_import_modules"; then
30674      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
30675      $RM -rf "$IMPORT_MODULES_TOPDIR"
30676      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
30677      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
30678        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30679      fi
30680    else
30681      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30682    fi
30683  fi
30684
30685  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
30686    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
30687  fi
30688  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
30689    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
30690  fi
30691  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
30692    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
30693  fi
30694  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
30695    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
30696  fi
30697  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
30698    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
30699  fi
30700  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
30701    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
30702  fi
30703
30704
30705
30706
30707
30708
30709
30710
30711
30712###############################################################################
30713#
30714# Setup the toolchain (compilers etc), i.e. tools used to compile and process
30715# native code.
30716#
30717###############################################################################
30718
30719# See if we are doing a complete static build or not
30720
30721  # Check whether --enable-static-build was given.
30722if test "${enable_static_build+set}" = set; then :
30723  enableval=$enable_static_build;
30724fi
30725
30726  STATIC_BUILD=false
30727  if test "x$enable_static_build" = "xyes"; then
30728    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30729$as_echo_n "checking if static build is enabled... " >&6; }
30730    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30731$as_echo "yes" >&6; }
30732    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
30733      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
30734    fi
30735    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
30736    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
30737    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
30738    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30739    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30740    STATIC_BUILD=true
30741  elif test "x$enable_static_build" = "xno"; then
30742    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30743$as_echo_n "checking if static build is enabled... " >&6; }
30744    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30745$as_echo "no" >&6; }
30746  elif test "x$enable_static_build" != "x"; then
30747    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
30748  fi
30749
30750
30751
30752
30753# First determine the toolchain type (compiler family)
30754
30755
30756# Check whether --with-toolchain-type was given.
30757if test "${with_toolchain_type+set}" = set; then :
30758  withval=$with_toolchain_type;
30759fi
30760
30761
30762  # Use indirect variable referencing
30763  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
30764  VALID_TOOLCHAINS=${!toolchain_var_name}
30765
30766  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30767    if test -n "$XCODEBUILD"; then
30768      # On Mac OS X, default toolchain to clang after Xcode 5
30769      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
30770      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
30771      if test $? -ne 0; then
30772        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
30773      fi
30774      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
30775          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
30776          $CUT -f 1 -d .`
30777      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
30778$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
30779      if test $XCODE_MAJOR_VERSION -ge 5; then
30780          DEFAULT_TOOLCHAIN="clang"
30781      else
30782          DEFAULT_TOOLCHAIN="gcc"
30783      fi
30784    else
30785      # If Xcode is not installed, but the command line tools are
30786      # then we can't run xcodebuild. On these systems we should
30787      # default to clang
30788      DEFAULT_TOOLCHAIN="clang"
30789    fi
30790  else
30791    # First toolchain type in the list is the default
30792    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
30793  fi
30794
30795  if test "x$with_toolchain_type" = xlist; then
30796    # List all toolchains
30797    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
30798$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
30799    for toolchain in $VALID_TOOLCHAINS; do
30800      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
30801      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30802      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
30803    done
30804
30805    exit 0
30806  elif test "x$with_toolchain_type" != x; then
30807    # User override; check that it is valid
30808    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
30809      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
30810$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
30811      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
30812$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
30813      as_fn_error $? "Cannot continue." "$LINENO" 5
30814    fi
30815    TOOLCHAIN_TYPE=$with_toolchain_type
30816  else
30817    # No flag given, use default
30818    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
30819  fi
30820
30821
30822  TOOLCHAIN_CC_BINARY_clang="clang"
30823  TOOLCHAIN_CC_BINARY_gcc="gcc"
30824  TOOLCHAIN_CC_BINARY_microsoft="cl"
30825  TOOLCHAIN_CC_BINARY_solstudio="cc"
30826  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
30827
30828  TOOLCHAIN_CXX_BINARY_clang="clang++"
30829  TOOLCHAIN_CXX_BINARY_gcc="g++"
30830  TOOLCHAIN_CXX_BINARY_microsoft="cl"
30831  TOOLCHAIN_CXX_BINARY_solstudio="CC"
30832  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
30833
30834  # Use indirect variable referencing
30835  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
30836  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30837  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
30838  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
30839  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
30840  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
30841  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
30842  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
30843
30844
30845  # Define filename patterns
30846  if test "x$OPENJDK_TARGET_OS" = xwindows; then
30847    LIBRARY_PREFIX=
30848    SHARED_LIBRARY_SUFFIX='.dll'
30849    STATIC_LIBRARY_SUFFIX='.lib'
30850    SHARED_LIBRARY='$1.dll'
30851    STATIC_LIBRARY='$1.lib'
30852    OBJ_SUFFIX='.obj'
30853    EXE_SUFFIX='.exe'
30854  else
30855    LIBRARY_PREFIX=lib
30856    SHARED_LIBRARY_SUFFIX='.so'
30857    STATIC_LIBRARY_SUFFIX='.a'
30858    SHARED_LIBRARY='lib$1.so'
30859    STATIC_LIBRARY='lib$1.a'
30860    OBJ_SUFFIX='.o'
30861    EXE_SUFFIX=''
30862    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30863      # For full static builds, we're overloading the SHARED_LIBRARY
30864      # variables in order to limit the amount of changes required.
30865      # It would be better to remove SHARED and just use LIBRARY and
30866      # LIBRARY_SUFFIX for libraries that can be built either
30867      # shared or static and use STATIC_* for libraries that are
30868      # always built statically.
30869      if test "x$STATIC_BUILD" = xtrue; then
30870        SHARED_LIBRARY='lib$1.a'
30871        SHARED_LIBRARY_SUFFIX='.a'
30872      else
30873        SHARED_LIBRARY='lib$1.dylib'
30874        SHARED_LIBRARY_SUFFIX='.dylib'
30875      fi
30876    fi
30877  fi
30878
30879
30880
30881
30882
30883
30884
30885
30886
30887
30888  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
30889    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
30890$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
30891  else
30892    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
30893$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
30894  fi
30895
30896
30897# User supplied flags should be used when configure detects compilers
30898
30899  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
30900    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
30901$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
30902  fi
30903
30904  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
30905    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
30906$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
30907  fi
30908
30909  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
30910    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
30911$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
30912  fi
30913
30914
30915# Check whether --with-extra-cflags was given.
30916if test "${with_extra_cflags+set}" = set; then :
30917  withval=$with_extra_cflags;
30918fi
30919
30920
30921
30922# Check whether --with-extra-cxxflags was given.
30923if test "${with_extra_cxxflags+set}" = set; then :
30924  withval=$with_extra_cxxflags;
30925fi
30926
30927
30928
30929# Check whether --with-extra-ldflags was given.
30930if test "${with_extra_ldflags+set}" = set; then :
30931  withval=$with_extra_ldflags;
30932fi
30933
30934
30935  EXTRA_CFLAGS="$with_extra_cflags"
30936  EXTRA_CXXFLAGS="$with_extra_cxxflags"
30937  EXTRA_LDFLAGS="$with_extra_ldflags"
30938
30939  # Hotspot needs these set in their legacy form
30940  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
30941  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
30942  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
30943
30944
30945
30946
30947
30948
30949
30950
30951
30952  # The global CFLAGS and LDLAGS variables are used by configure tests and
30953  # should include the extra parameters
30954  CFLAGS="$EXTRA_CFLAGS"
30955  CXXFLAGS="$EXTRA_CXXFLAGS"
30956  LDFLAGS="$EXTRA_LDFLAGS"
30957  CPPFLAGS=""
30958
30959# The sysroot cflags are needed for configure to be able to run the compilers
30960
30961  if test "x$SYSROOT" != "x"; then
30962    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30963      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30964        # Solaris Studio does not have a concept of sysroot. Instead we must
30965        # make sure the default include and lib dirs are appended to each
30966        # compile and link command line. Must also add -I-xbuiltin to enable
30967        # inlining of system functions and intrinsics.
30968        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
30969        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
30970            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
30971            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
30972      fi
30973    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
30974      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
30975      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
30976    elif test "x$TOOLCHAIN_TYPE" = xclang; then
30977      SYSROOT_CFLAGS="-isysroot $SYSROOT"
30978      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
30979    fi
30980    # Propagate the sysroot args to hotspot
30981    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
30982    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
30983    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
30984    # The global CFLAGS and LDFLAGS variables need these for configure to function
30985    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
30986    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
30987    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
30988    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
30989  fi
30990
30991  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30992    # We also need -iframework<path>/System/Library/Frameworks
30993    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30994    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30995    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
30996    # set this here so it doesn't have to be peppered throughout the forest
30997    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30998    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30999  fi
31000
31001
31002
31003
31004
31005# Then detect the actual binaries needed
31006
31007  # FIXME: Is this needed?
31008  ac_ext=cpp
31009ac_cpp='$CXXCPP $CPPFLAGS'
31010ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31011ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31012ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31013
31014
31015  # Store the CFLAGS etc passed to the configure script.
31016  ORG_CFLAGS="$CFLAGS"
31017  ORG_CXXFLAGS="$CXXFLAGS"
31018
31019  # autoconf magic only relies on PATH, so update it if tools dir is specified
31020  OLD_PATH="$PATH"
31021
31022  # On Windows, we need to detect the visual studio installation first.
31023  # This will change the PATH, but we need to keep that new PATH even
31024  # after toolchain detection is done, since the compiler (on x86) uses
31025  # it for DLL resolution in runtime.
31026  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31027      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31028
31029  # Store path to cygwin link.exe to help excluding it when searching for
31030  # VS linker. This must be done before changing the PATH when looking for VS.
31031  # Extract the first word of "link", so it can be a program name with args.
31032set dummy link; ac_word=$2
31033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31034$as_echo_n "checking for $ac_word... " >&6; }
31035if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31036  $as_echo_n "(cached) " >&6
31037else
31038  case $CYGWIN_LINK in
31039  [\\/]* | ?:[\\/]*)
31040  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31041  ;;
31042  *)
31043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31044for as_dir in $PATH
31045do
31046  IFS=$as_save_IFS
31047  test -z "$as_dir" && as_dir=.
31048    for ac_exec_ext in '' $ac_executable_extensions; do
31049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31050    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31052    break 2
31053  fi
31054done
31055  done
31056IFS=$as_save_IFS
31057
31058  ;;
31059esac
31060fi
31061CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31062if test -n "$CYGWIN_LINK"; then
31063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31064$as_echo "$CYGWIN_LINK" >&6; }
31065else
31066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31067$as_echo "no" >&6; }
31068fi
31069
31070
31071  if test "x$CYGWIN_LINK" != x; then
31072    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31073$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31074    "$CYGWIN_LINK" --version > /dev/null
31075    if test $? -eq 0 ; then
31076      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31077$as_echo "yes" >&6; }
31078    else
31079      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31080$as_echo "no" >&6; }
31081      # This might be the VS linker. Don't exclude it later on.
31082      CYGWIN_LINK=""
31083    fi
31084  fi
31085
31086  # First-hand choice is to locate and run the vsvars bat file.
31087
31088
31089# Check whether --with-toolchain-version was given.
31090if test "${with_toolchain_version+set}" = set; then :
31091  withval=$with_toolchain_version;
31092fi
31093
31094
31095  if test "x$with_toolchain_version" = xlist; then
31096    # List all toolchains
31097    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31098$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31099    for version in $VALID_VS_VERSIONS; do
31100      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31101      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31102    done
31103
31104    exit 0
31105  elif test "x$DEVKIT_VS_VERSION" != x; then
31106    VS_VERSION=$DEVKIT_VS_VERSION
31107    TOOLCHAIN_VERSION=$VS_VERSION
31108    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31109    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31110    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31111    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31112    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31113    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31114
31115    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31116    # can still be exported as INCLUDE for compiler invocations without
31117    # SYSROOT_CFLAGS
31118    OLDIFS="$IFS"
31119    IFS=";"
31120    for i in $DEVKIT_VS_INCLUDE; do
31121      ipath=$i
31122
31123  unix_path="$ipath"
31124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31125    windows_path=`$CYGPATH -m "$unix_path"`
31126    ipath="$windows_path"
31127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31128    windows_path=`cmd //c echo $unix_path`
31129    ipath="$windows_path"
31130  fi
31131
31132      VS_INCLUDE="$VS_INCLUDE;$ipath"
31133    done
31134    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31135    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31136    for i in $DEVKIT_VS_LIB; do
31137      libpath=$i
31138
31139  unix_path="$libpath"
31140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31141    windows_path=`$CYGPATH -m "$unix_path"`
31142    libpath="$windows_path"
31143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31144    windows_path=`cmd //c echo $unix_path`
31145    libpath="$windows_path"
31146  fi
31147
31148      VS_LIB="$VS_LIB;$libpath"
31149    done
31150    IFS="$OLDIFS"
31151
31152    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31153$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31154
31155  elif test "x$with_toolchain_version" != x; then
31156    # User override; check that it is valid
31157    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31158      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31159$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31160      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31161$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31162      as_fn_error $? "Cannot continue." "$LINENO" 5
31163    fi
31164    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31165  else
31166    # No flag given, use default
31167    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31168  fi
31169
31170  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31171
31172  VS_VERSION="$VS_VERSION"
31173  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31174  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31175  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31176  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31177
31178  # When using --with-tools-dir, assume it points to the correct and default
31179  # version of Visual Studio or that --with-toolchain-version was also set.
31180  if test "x$with_tools_dir" != x; then
31181
31182  if test "x$VS_ENV_CMD" = x; then
31183    VS_VERSION="${VS_VERSION}"
31184    VS_BASE="$with_tools_dir/../.."
31185    METHOD="--with-tools-dir"
31186
31187    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31188      VCVARSFILE="vc/bin/vcvars32.bat"
31189    else
31190      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31191    fi
31192
31193
31194  windows_path="$VS_BASE"
31195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31196    unix_path=`$CYGPATH -u "$windows_path"`
31197    VS_BASE="$unix_path"
31198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31200    VS_BASE="$unix_path"
31201  fi
31202
31203    if test -d "$VS_BASE"; then
31204      if test -f "$VS_BASE/$VCVARSFILE"; then
31205        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31206$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31207        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31208        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31209        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31210        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31211      else
31212        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31213$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31214        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31215$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31216      fi
31217    fi
31218  fi
31219
31220
31221  if test "x$VS_ENV_CMD" = x; then
31222    VS_VERSION="${VS_VERSION}"
31223    VS_BASE="$with_tools_dir/../../.."
31224    METHOD="--with-tools-dir"
31225
31226    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31227      VCVARSFILE="vc/bin/vcvars32.bat"
31228    else
31229      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31230    fi
31231
31232
31233  windows_path="$VS_BASE"
31234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31235    unix_path=`$CYGPATH -u "$windows_path"`
31236    VS_BASE="$unix_path"
31237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31239    VS_BASE="$unix_path"
31240  fi
31241
31242    if test -d "$VS_BASE"; then
31243      if test -f "$VS_BASE/$VCVARSFILE"; then
31244        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31245$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31246        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31247        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31248        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31249        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31250      else
31251        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31252$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31253        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31254$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31255      fi
31256    fi
31257  fi
31258
31259    if test "x$VS_ENV_CMD" = x; then
31260      # Having specified an argument which is incorrect will produce an instant failure;
31261      # we should not go on looking
31262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31263$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31264      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31265$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31266      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31267$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31268      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31269    fi
31270  fi
31271
31272  VS_ENV_CMD=""
31273  VS_ENV_ARGS=""
31274
31275  if test "x$VS_COMNTOOLS" != x; then
31276
31277  if test "x$VS_ENV_CMD" = x; then
31278    VS_VERSION="${VS_VERSION}"
31279    VS_BASE="$VS_COMNTOOLS/../.."
31280    METHOD="$VS_COMNTOOLS_VAR variable"
31281
31282    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31283      VCVARSFILE="vc/bin/vcvars32.bat"
31284    else
31285      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31286    fi
31287
31288
31289  windows_path="$VS_BASE"
31290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31291    unix_path=`$CYGPATH -u "$windows_path"`
31292    VS_BASE="$unix_path"
31293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31295    VS_BASE="$unix_path"
31296  fi
31297
31298    if test -d "$VS_BASE"; then
31299      if test -f "$VS_BASE/$VCVARSFILE"; then
31300        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31301$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31302        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31303        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31304        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31305        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31306      else
31307        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31308$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31309        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31310$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31311      fi
31312    fi
31313  fi
31314
31315  fi
31316  if test "x$PROGRAMFILES" != x; then
31317
31318  if test "x$VS_ENV_CMD" = x; then
31319    VS_VERSION="${VS_VERSION}"
31320    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31321    METHOD="well-known name"
31322
31323    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31324      VCVARSFILE="vc/bin/vcvars32.bat"
31325    else
31326      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31327    fi
31328
31329
31330  windows_path="$VS_BASE"
31331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31332    unix_path=`$CYGPATH -u "$windows_path"`
31333    VS_BASE="$unix_path"
31334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31336    VS_BASE="$unix_path"
31337  fi
31338
31339    if test -d "$VS_BASE"; then
31340      if test -f "$VS_BASE/$VCVARSFILE"; then
31341        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31342$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31343        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31344        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31345        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31346        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31347      else
31348        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31349$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31350        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31351$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31352      fi
31353    fi
31354  fi
31355
31356  fi
31357  # Work around the insanely named ProgramFiles(x86) env variable
31358  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31359  if test "x$PROGRAMFILES_X86" != x; then
31360
31361  if test "x$VS_ENV_CMD" = x; then
31362    VS_VERSION="${VS_VERSION}"
31363    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31364    METHOD="well-known name"
31365
31366    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31367      VCVARSFILE="vc/bin/vcvars32.bat"
31368    else
31369      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31370    fi
31371
31372
31373  windows_path="$VS_BASE"
31374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31375    unix_path=`$CYGPATH -u "$windows_path"`
31376    VS_BASE="$unix_path"
31377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31379    VS_BASE="$unix_path"
31380  fi
31381
31382    if test -d "$VS_BASE"; then
31383      if test -f "$VS_BASE/$VCVARSFILE"; then
31384        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31385$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31386        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31387        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31388        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31389        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31390      else
31391        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31392$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31393        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31394$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31395      fi
31396    fi
31397  fi
31398
31399  fi
31400
31401  if test "x$VS_ENV_CMD" = x; then
31402    VS_VERSION="${VS_VERSION}"
31403    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31404    METHOD="well-known name"
31405
31406    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31407      VCVARSFILE="vc/bin/vcvars32.bat"
31408    else
31409      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31410    fi
31411
31412
31413  windows_path="$VS_BASE"
31414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31415    unix_path=`$CYGPATH -u "$windows_path"`
31416    VS_BASE="$unix_path"
31417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31419    VS_BASE="$unix_path"
31420  fi
31421
31422    if test -d "$VS_BASE"; then
31423      if test -f "$VS_BASE/$VCVARSFILE"; then
31424        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31425$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31426        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31427        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31428        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31429        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31430      else
31431        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31432$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31433        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31434$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31435      fi
31436    fi
31437  fi
31438
31439
31440  if test "x$VS_ENV_CMD" = x; then
31441    VS_VERSION="${VS_VERSION}"
31442    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31443    METHOD="well-known name"
31444
31445    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31446      VCVARSFILE="vc/bin/vcvars32.bat"
31447    else
31448      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31449    fi
31450
31451
31452  windows_path="$VS_BASE"
31453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31454    unix_path=`$CYGPATH -u "$windows_path"`
31455    VS_BASE="$unix_path"
31456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31458    VS_BASE="$unix_path"
31459  fi
31460
31461    if test -d "$VS_BASE"; then
31462      if test -f "$VS_BASE/$VCVARSFILE"; then
31463        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31464$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31465        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31466        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31467        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31468        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31469      else
31470        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31471$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31472        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31473$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31474      fi
31475    fi
31476  fi
31477
31478
31479  if test "x$SDK_INSTALL_DIR" != x; then
31480    if test "x$ProgramW6432" != x; then
31481
31482  if test "x$VS_ENV_CMD" = x; then
31483    VS_VERSION="${VS_VERSION}"
31484    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31485    METHOD="well-known name"
31486
31487  windows_path="$WIN_SDK_BASE"
31488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31489    unix_path=`$CYGPATH -u "$windows_path"`
31490    WIN_SDK_BASE="$unix_path"
31491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31493    WIN_SDK_BASE="$unix_path"
31494  fi
31495
31496    if test -d "$WIN_SDK_BASE"; then
31497      # There have been cases of partial or broken SDK installations. A missing
31498      # lib dir is not going to work.
31499      if test ! -d "$WIN_SDK_BASE/lib"; then
31500        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31501$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31502        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31503$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31504      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31505        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31506$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31507        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31508        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31509          VS_ENV_ARGS="/x86"
31510        else
31511          VS_ENV_ARGS="/x64"
31512        fi
31513        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31514        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31515        # TODO: improve detection for other versions of SDK
31516        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31517      else
31518        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31519$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31520        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31521$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31522      fi
31523    fi
31524  fi
31525
31526    fi
31527    if test "x$PROGRAMW6432" != x; then
31528
31529  if test "x$VS_ENV_CMD" = x; then
31530    VS_VERSION="${VS_VERSION}"
31531    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
31532    METHOD="well-known name"
31533
31534  windows_path="$WIN_SDK_BASE"
31535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31536    unix_path=`$CYGPATH -u "$windows_path"`
31537    WIN_SDK_BASE="$unix_path"
31538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31540    WIN_SDK_BASE="$unix_path"
31541  fi
31542
31543    if test -d "$WIN_SDK_BASE"; then
31544      # There have been cases of partial or broken SDK installations. A missing
31545      # lib dir is not going to work.
31546      if test ! -d "$WIN_SDK_BASE/lib"; then
31547        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31548$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31549        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31550$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31551      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31552        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31553$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31554        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31555        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31556          VS_ENV_ARGS="/x86"
31557        else
31558          VS_ENV_ARGS="/x64"
31559        fi
31560        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31561        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31562        # TODO: improve detection for other versions of SDK
31563        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31564      else
31565        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31566$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31567        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31568$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31569      fi
31570    fi
31571  fi
31572
31573    fi
31574    if test "x$PROGRAMFILES" != x; then
31575
31576  if test "x$VS_ENV_CMD" = x; then
31577    VS_VERSION="${VS_VERSION}"
31578    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
31579    METHOD="well-known name"
31580
31581  windows_path="$WIN_SDK_BASE"
31582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31583    unix_path=`$CYGPATH -u "$windows_path"`
31584    WIN_SDK_BASE="$unix_path"
31585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31587    WIN_SDK_BASE="$unix_path"
31588  fi
31589
31590    if test -d "$WIN_SDK_BASE"; then
31591      # There have been cases of partial or broken SDK installations. A missing
31592      # lib dir is not going to work.
31593      if test ! -d "$WIN_SDK_BASE/lib"; then
31594        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31595$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31596        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31597$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31598      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31599        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31600$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31601        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31602        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31603          VS_ENV_ARGS="/x86"
31604        else
31605          VS_ENV_ARGS="/x64"
31606        fi
31607        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31608        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31609        # TODO: improve detection for other versions of SDK
31610        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31611      else
31612        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31613$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31614        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31615$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31616      fi
31617    fi
31618  fi
31619
31620    fi
31621
31622  if test "x$VS_ENV_CMD" = x; then
31623    VS_VERSION="${VS_VERSION}"
31624    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
31625    METHOD="well-known name"
31626
31627  windows_path="$WIN_SDK_BASE"
31628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31629    unix_path=`$CYGPATH -u "$windows_path"`
31630    WIN_SDK_BASE="$unix_path"
31631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31633    WIN_SDK_BASE="$unix_path"
31634  fi
31635
31636    if test -d "$WIN_SDK_BASE"; then
31637      # There have been cases of partial or broken SDK installations. A missing
31638      # lib dir is not going to work.
31639      if test ! -d "$WIN_SDK_BASE/lib"; then
31640        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31641$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31642        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31643$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31644      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31645        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31646$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31647        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31648        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31649          VS_ENV_ARGS="/x86"
31650        else
31651          VS_ENV_ARGS="/x64"
31652        fi
31653        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31654        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31655        # TODO: improve detection for other versions of SDK
31656        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31657      else
31658        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31659$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31660        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31661$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31662      fi
31663    fi
31664  fi
31665
31666
31667  if test "x$VS_ENV_CMD" = x; then
31668    VS_VERSION="${VS_VERSION}"
31669    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
31670    METHOD="well-known name"
31671
31672  windows_path="$WIN_SDK_BASE"
31673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31674    unix_path=`$CYGPATH -u "$windows_path"`
31675    WIN_SDK_BASE="$unix_path"
31676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31678    WIN_SDK_BASE="$unix_path"
31679  fi
31680
31681    if test -d "$WIN_SDK_BASE"; then
31682      # There have been cases of partial or broken SDK installations. A missing
31683      # lib dir is not going to work.
31684      if test ! -d "$WIN_SDK_BASE/lib"; then
31685        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31686$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31687        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31688$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31689      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31690        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31691$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31692        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31693        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31694          VS_ENV_ARGS="/x86"
31695        else
31696          VS_ENV_ARGS="/x64"
31697        fi
31698        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31699        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31700        # TODO: improve detection for other versions of SDK
31701        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31702      else
31703        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31704$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31705        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31706$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31707      fi
31708    fi
31709  fi
31710
31711  fi
31712
31713    if test "x$VS_ENV_CMD" != x; then
31714      TOOLCHAIN_VERSION=$VS_VERSION
31715      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31716      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31717      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31718      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31719      # The rest of the variables are already evaled while probing
31720      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
31721$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
31722      break
31723    fi
31724  done
31725
31726
31727  # If we have a devkit, skip all of the below.
31728  if test "x$DEVKIT_VS_VERSION" = x; then
31729    if test "x$VS_ENV_CMD" != x; then
31730      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
31731
31732  # Only process if variable expands to non-empty
31733
31734  if test "x$VS_ENV_CMD" != x; then
31735    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31736
31737  # First separate the path from the arguments. This will split at the first
31738  # space.
31739  complete="$VS_ENV_CMD"
31740  path="${complete%% *}"
31741  tmp="$complete EOL"
31742  arguments="${tmp#* }"
31743
31744  # Input might be given as Windows format, start by converting to
31745  # unix format.
31746  new_path=`$CYGPATH -u "$path"`
31747
31748  # Now try to locate executable using which
31749  new_path=`$WHICH "$new_path" 2> /dev/null`
31750  # bat and cmd files are not always considered executable in cygwin causing which
31751  # to not find them
31752  if test "x$new_path" = x \
31753      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31754      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31755    new_path=`$CYGPATH -u "$path"`
31756  fi
31757  if test "x$new_path" = x; then
31758    # Oops. Which didn't find the executable.
31759    # The splitting of arguments from the executable at a space might have been incorrect,
31760    # since paths with space are more likely in Windows. Give it another try with the whole
31761    # argument.
31762    path="$complete"
31763    arguments="EOL"
31764    new_path=`$CYGPATH -u "$path"`
31765    new_path=`$WHICH "$new_path" 2> /dev/null`
31766    # bat and cmd files are not always considered executable in cygwin causing which
31767    # to not find them
31768    if test "x$new_path" = x \
31769        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31770        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31771      new_path=`$CYGPATH -u "$path"`
31772    fi
31773    if test "x$new_path" = x; then
31774      # It's still not found. Now this is an unrecoverable error.
31775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31776$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31777      has_space=`$ECHO "$complete" | $GREP " "`
31778      if test "x$has_space" != x; then
31779        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31780$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31781      fi
31782      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31783    fi
31784  fi
31785
31786  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31787  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31788  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31789  # "foo.exe" is OK but "foo" is an error.
31790  #
31791  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31792  # It is also a way to make sure we got the proper file name for the real test later on.
31793  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31794  if test "x$test_shortpath" = x; then
31795    # Short path failed, file does not exist as specified.
31796    # Try adding .exe or .cmd
31797    if test -f "${new_path}.exe"; then
31798      input_to_shortpath="${new_path}.exe"
31799    elif test -f "${new_path}.cmd"; then
31800      input_to_shortpath="${new_path}.cmd"
31801    else
31802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
31803$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
31804      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31805$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31806      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31807    fi
31808  else
31809    input_to_shortpath="$new_path"
31810  fi
31811
31812  # Call helper function which possibly converts this using DOS-style short mode.
31813  # If so, the updated path is stored in $new_path.
31814  new_path="$input_to_shortpath"
31815
31816  input_path="$input_to_shortpath"
31817  # Check if we need to convert this using DOS-style short mode. If the path
31818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31819  # take no chances and rewrite it.
31820  # Note: m4 eats our [], so we need to use [ and ] instead.
31821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31822  if test "x$has_forbidden_chars" != x; then
31823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31824    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31825    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31826    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31827      # Going to short mode and back again did indeed matter. Since short mode is
31828      # case insensitive, let's make it lowercase to improve readability.
31829      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31830      # Now convert it back to Unix-style (cygpath)
31831      input_path=`$CYGPATH -u "$shortmode_path"`
31832      new_path="$input_path"
31833    fi
31834  fi
31835
31836  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31837  if test "x$test_cygdrive_prefix" = x; then
31838    # As a simple fix, exclude /usr/bin since it's not a real path.
31839    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31840      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31841      # a path prefixed by /cygdrive for fixpath to work.
31842      new_path="$CYGWIN_ROOT_PATH$input_path"
31843    fi
31844  fi
31845
31846  # remove trailing .exe if any
31847  new_path="${new_path/%.exe/}"
31848
31849    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31850
31851  # First separate the path from the arguments. This will split at the first
31852  # space.
31853  complete="$VS_ENV_CMD"
31854  path="${complete%% *}"
31855  tmp="$complete EOL"
31856  arguments="${tmp#* }"
31857
31858  # Input might be given as Windows format, start by converting to
31859  # unix format.
31860  new_path="$path"
31861
31862  windows_path="$new_path"
31863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31864    unix_path=`$CYGPATH -u "$windows_path"`
31865    new_path="$unix_path"
31866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31868    new_path="$unix_path"
31869  fi
31870
31871
31872  # Now try to locate executable using which
31873  new_path=`$WHICH "$new_path" 2> /dev/null`
31874
31875  if test "x$new_path" = x; then
31876    # Oops. Which didn't find the executable.
31877    # The splitting of arguments from the executable at a space might have been incorrect,
31878    # since paths with space are more likely in Windows. Give it another try with the whole
31879    # argument.
31880    path="$complete"
31881    arguments="EOL"
31882    new_path="$path"
31883
31884  windows_path="$new_path"
31885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31886    unix_path=`$CYGPATH -u "$windows_path"`
31887    new_path="$unix_path"
31888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31890    new_path="$unix_path"
31891  fi
31892
31893
31894    new_path=`$WHICH "$new_path" 2> /dev/null`
31895    # bat and cmd files are not always considered executable in MSYS causing which
31896    # to not find them
31897    if test "x$new_path" = x \
31898        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31899        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31900      new_path="$path"
31901
31902  windows_path="$new_path"
31903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31904    unix_path=`$CYGPATH -u "$windows_path"`
31905    new_path="$unix_path"
31906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31908    new_path="$unix_path"
31909  fi
31910
31911    fi
31912
31913    if test "x$new_path" = x; then
31914      # It's still not found. Now this is an unrecoverable error.
31915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31916$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31917      has_space=`$ECHO "$complete" | $GREP " "`
31918      if test "x$has_space" != x; then
31919        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31920$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31921      fi
31922      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31923    fi
31924  fi
31925
31926  # Now new_path has a complete unix path to the binary
31927  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31928    # Keep paths in /bin as-is, but remove trailing .exe if any
31929    new_path="${new_path/%.exe/}"
31930    # Do not save /bin paths to all_fixpath_prefixes!
31931  else
31932    # Not in mixed or Windows style, start by that.
31933    new_path=`cmd //c echo $new_path`
31934
31935  input_path="$new_path"
31936  # Check if we need to convert this using DOS-style short mode. If the path
31937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31938  # take no chances and rewrite it.
31939  # Note: m4 eats our [], so we need to use [ and ] instead.
31940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31941  if test "x$has_forbidden_chars" != x; then
31942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31943    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31944  fi
31945
31946    # Output is in $new_path
31947
31948  windows_path="$new_path"
31949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31950    unix_path=`$CYGPATH -u "$windows_path"`
31951    new_path="$unix_path"
31952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31954    new_path="$unix_path"
31955  fi
31956
31957    # remove trailing .exe if any
31958    new_path="${new_path/%.exe/}"
31959
31960    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31961    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31962  fi
31963
31964    else
31965      # We're on a unix platform. Hooray! :)
31966      # First separate the path from the arguments. This will split at the first
31967      # space.
31968      complete="$VS_ENV_CMD"
31969      path="${complete%% *}"
31970      tmp="$complete EOL"
31971      arguments="${tmp#* }"
31972
31973      # Cannot rely on the command "which" here since it doesn't always work.
31974      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31975      if test -z "$is_absolute_path"; then
31976        # Path to executable is not absolute. Find it.
31977        IFS_save="$IFS"
31978        IFS=:
31979        for p in $PATH; do
31980          if test -f "$p/$path" && test -x "$p/$path"; then
31981            new_path="$p/$path"
31982            break
31983          fi
31984        done
31985        IFS="$IFS_save"
31986      else
31987        # This is an absolute path, we can use it without further modifications.
31988        new_path="$path"
31989      fi
31990
31991      if test "x$new_path" = x; then
31992        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31993$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31994        has_space=`$ECHO "$complete" | $GREP " "`
31995        if test "x$has_space" != x; then
31996          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31997$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31998        fi
31999        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32000      fi
32001    fi
32002
32003    # Now join together the path and the arguments once again
32004    if test "x$arguments" != xEOL; then
32005      new_complete="$new_path ${arguments% *}"
32006    else
32007      new_complete="$new_path"
32008    fi
32009
32010    if test "x$complete" != "x$new_complete"; then
32011      VS_ENV_CMD="$new_complete"
32012      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32013$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32014    fi
32015  fi
32016
32017
32018      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32019      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32020$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32021
32022      # We need to create a couple of temporary files.
32023      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32024      $MKDIR -p $VS_ENV_TMP_DIR
32025
32026      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32027      # Instead create a shell script which will set the relevant variables when run.
32028      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32029
32030  unix_path="$WINPATH_VS_ENV_CMD"
32031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32032    windows_path=`$CYGPATH -m "$unix_path"`
32033    WINPATH_VS_ENV_CMD="$windows_path"
32034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32035    windows_path=`cmd //c echo $unix_path`
32036    WINPATH_VS_ENV_CMD="$windows_path"
32037  fi
32038
32039      WINPATH_BASH="$BASH"
32040
32041  unix_path="$WINPATH_BASH"
32042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32043    windows_path=`$CYGPATH -m "$unix_path"`
32044    WINPATH_BASH="$windows_path"
32045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32046    windows_path=`cmd //c echo $unix_path`
32047    WINPATH_BASH="$windows_path"
32048  fi
32049
32050
32051      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32052      # script (executable by bash) that will setup the important variables.
32053      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32054      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32055      # This will end up something like:
32056      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32057      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32058      # These will end up something like:
32059      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32060      # The trailing space for everyone except PATH is no typo, but is needed due
32061      # to trailing \ in the Windows paths. These will be stripped later.
32062      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32063          >> $EXTRACT_VC_ENV_BAT_FILE
32064      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32065          >> $EXTRACT_VC_ENV_BAT_FILE
32066      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32067          >> $EXTRACT_VC_ENV_BAT_FILE
32068      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32069          >> $EXTRACT_VC_ENV_BAT_FILE
32070      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32071          >> $EXTRACT_VC_ENV_BAT_FILE
32072      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32073          >> $EXTRACT_VC_ENV_BAT_FILE
32074
32075      # Now execute the newly created bat file.
32076      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32077      # Change directory so we don't need to mess with Windows paths in redirects.
32078      cd $VS_ENV_TMP_DIR
32079      cmd /c extract-vs-env.bat | $CAT
32080      cd $CURDIR
32081
32082      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32083        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32084$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32085        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32086$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32087        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32088$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32089        as_fn_error $? "Cannot continue" "$LINENO" 5
32090      fi
32091
32092      # Now set all paths and other env variables. This will allow the rest of
32093      # the configure script to find and run the compiler in the proper way.
32094      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32095$as_echo "$as_me: Setting extracted environment variables" >&6;}
32096      . $VS_ENV_TMP_DIR/set-vs-env.sh
32097      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32098      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32099    else
32100      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32101      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32102$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32103    fi
32104  fi
32105
32106  # At this point, we should have correct variables in the environment, or we can't continue.
32107  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32108$as_echo_n "checking for Visual Studio variables... " >&6; }
32109
32110  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32111      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32112    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32113      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32114$as_echo "present but broken" >&6; }
32115      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32116    else
32117      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32118$as_echo "ok" >&6; }
32119      # Remove any trailing "\" ";" and " " from the variables.
32120      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32121      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32122      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32123      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32124      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32125      # Remove any paths containing # (typically F#) as that messes up make. This
32126      # is needed if visual studio was installed with F# support.
32127      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32128
32129
32130
32131
32132
32133      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32134      OLDIFS="$IFS"
32135      IFS=";"
32136      for i in $VS_INCLUDE; do
32137        ipath=$i
32138        # Only process non-empty elements
32139        if test "x$ipath" != x; then
32140          IFS="$OLDIFS"
32141          # Check that directory exists before calling fixup_path
32142          testpath=$ipath
32143
32144  windows_path="$testpath"
32145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32146    unix_path=`$CYGPATH -u "$windows_path"`
32147    testpath="$unix_path"
32148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32150    testpath="$unix_path"
32151  fi
32152
32153          if test -d "$testpath"; then
32154
32155  # Only process if variable expands to non-empty
32156
32157  if test "x$ipath" != x; then
32158    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32159
32160  # Input might be given as Windows format, start by converting to
32161  # unix format.
32162  path="$ipath"
32163  new_path=`$CYGPATH -u "$path"`
32164
32165  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32166  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32167  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32168  # "foo.exe" is OK but "foo" is an error.
32169  #
32170  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32171  # It is also a way to make sure we got the proper file name for the real test later on.
32172  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32173  if test "x$test_shortpath" = x; then
32174    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32175$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32176    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32177  fi
32178
32179  # Call helper function which possibly converts this using DOS-style short mode.
32180  # If so, the updated path is stored in $new_path.
32181
32182  input_path="$new_path"
32183  # Check if we need to convert this using DOS-style short mode. If the path
32184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32185  # take no chances and rewrite it.
32186  # Note: m4 eats our [], so we need to use [ and ] instead.
32187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32188  if test "x$has_forbidden_chars" != x; then
32189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32190    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32191    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32192    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32193      # Going to short mode and back again did indeed matter. Since short mode is
32194      # case insensitive, let's make it lowercase to improve readability.
32195      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32196      # Now convert it back to Unix-style (cygpath)
32197      input_path=`$CYGPATH -u "$shortmode_path"`
32198      new_path="$input_path"
32199    fi
32200  fi
32201
32202  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32203  if test "x$test_cygdrive_prefix" = x; then
32204    # As a simple fix, exclude /usr/bin since it's not a real path.
32205    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32206      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32207      # a path prefixed by /cygdrive for fixpath to work.
32208      new_path="$CYGWIN_ROOT_PATH$input_path"
32209    fi
32210  fi
32211
32212
32213  if test "x$path" != "x$new_path"; then
32214    ipath="$new_path"
32215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32216$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32217  fi
32218
32219    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32220
32221  path="$ipath"
32222  has_colon=`$ECHO $path | $GREP ^.:`
32223  new_path="$path"
32224  if test "x$has_colon" = x; then
32225    # Not in mixed or Windows style, start by that.
32226    new_path=`cmd //c echo $path`
32227  fi
32228
32229
32230  input_path="$new_path"
32231  # Check if we need to convert this using DOS-style short mode. If the path
32232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32233  # take no chances and rewrite it.
32234  # Note: m4 eats our [], so we need to use [ and ] instead.
32235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32236  if test "x$has_forbidden_chars" != x; then
32237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32238    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32239  fi
32240
32241
32242  windows_path="$new_path"
32243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32244    unix_path=`$CYGPATH -u "$windows_path"`
32245    new_path="$unix_path"
32246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32248    new_path="$unix_path"
32249  fi
32250
32251  if test "x$path" != "x$new_path"; then
32252    ipath="$new_path"
32253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32254$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32255  fi
32256
32257  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32258  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32259
32260    else
32261      # We're on a unix platform. Hooray! :)
32262      path="$ipath"
32263      has_space=`$ECHO "$path" | $GREP " "`
32264      if test "x$has_space" != x; then
32265        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32266$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32267        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32268      fi
32269
32270      # Use eval to expand a potential ~
32271      eval path="$path"
32272      if test ! -f "$path" && test ! -d "$path"; then
32273        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32274      fi
32275
32276      if test -d "$path"; then
32277        ipath="`cd "$path"; $THEPWDCMD -L`"
32278      else
32279        dir="`$DIRNAME "$path"`"
32280        base="`$BASENAME "$path"`"
32281        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32282      fi
32283    fi
32284  fi
32285
32286            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32287          fi
32288          IFS=";"
32289        fi
32290      done
32291      # Convert VS_LIB into SYSROOT_LDFLAGS
32292      for i in $VS_LIB; do
32293        libpath=$i
32294        # Only process non-empty elements
32295        if test "x$libpath" != x; then
32296          IFS="$OLDIFS"
32297          # Check that directory exists before calling fixup_path
32298          testpath=$libpath
32299
32300  windows_path="$testpath"
32301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32302    unix_path=`$CYGPATH -u "$windows_path"`
32303    testpath="$unix_path"
32304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32306    testpath="$unix_path"
32307  fi
32308
32309          if test -d "$testpath"; then
32310
32311  # Only process if variable expands to non-empty
32312
32313  if test "x$libpath" != x; then
32314    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32315
32316  # Input might be given as Windows format, start by converting to
32317  # unix format.
32318  path="$libpath"
32319  new_path=`$CYGPATH -u "$path"`
32320
32321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32324  # "foo.exe" is OK but "foo" is an error.
32325  #
32326  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32327  # It is also a way to make sure we got the proper file name for the real test later on.
32328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32329  if test "x$test_shortpath" = x; then
32330    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32331$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32332    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32333  fi
32334
32335  # Call helper function which possibly converts this using DOS-style short mode.
32336  # If so, the updated path is stored in $new_path.
32337
32338  input_path="$new_path"
32339  # Check if we need to convert this using DOS-style short mode. If the path
32340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32341  # take no chances and rewrite it.
32342  # Note: m4 eats our [], so we need to use [ and ] instead.
32343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32344  if test "x$has_forbidden_chars" != x; then
32345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32346    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32347    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32348    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32349      # Going to short mode and back again did indeed matter. Since short mode is
32350      # case insensitive, let's make it lowercase to improve readability.
32351      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32352      # Now convert it back to Unix-style (cygpath)
32353      input_path=`$CYGPATH -u "$shortmode_path"`
32354      new_path="$input_path"
32355    fi
32356  fi
32357
32358  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32359  if test "x$test_cygdrive_prefix" = x; then
32360    # As a simple fix, exclude /usr/bin since it's not a real path.
32361    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32362      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32363      # a path prefixed by /cygdrive for fixpath to work.
32364      new_path="$CYGWIN_ROOT_PATH$input_path"
32365    fi
32366  fi
32367
32368
32369  if test "x$path" != "x$new_path"; then
32370    libpath="$new_path"
32371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32372$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32373  fi
32374
32375    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32376
32377  path="$libpath"
32378  has_colon=`$ECHO $path | $GREP ^.:`
32379  new_path="$path"
32380  if test "x$has_colon" = x; then
32381    # Not in mixed or Windows style, start by that.
32382    new_path=`cmd //c echo $path`
32383  fi
32384
32385
32386  input_path="$new_path"
32387  # Check if we need to convert this using DOS-style short mode. If the path
32388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32389  # take no chances and rewrite it.
32390  # Note: m4 eats our [], so we need to use [ and ] instead.
32391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32392  if test "x$has_forbidden_chars" != x; then
32393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32395  fi
32396
32397
32398  windows_path="$new_path"
32399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32400    unix_path=`$CYGPATH -u "$windows_path"`
32401    new_path="$unix_path"
32402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32404    new_path="$unix_path"
32405  fi
32406
32407  if test "x$path" != "x$new_path"; then
32408    libpath="$new_path"
32409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32410$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32411  fi
32412
32413  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32414  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32415
32416    else
32417      # We're on a unix platform. Hooray! :)
32418      path="$libpath"
32419      has_space=`$ECHO "$path" | $GREP " "`
32420      if test "x$has_space" != x; then
32421        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32422$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32423        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32424      fi
32425
32426      # Use eval to expand a potential ~
32427      eval path="$path"
32428      if test ! -f "$path" && test ! -d "$path"; then
32429        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32430      fi
32431
32432      if test -d "$path"; then
32433        libpath="`cd "$path"; $THEPWDCMD -L`"
32434      else
32435        dir="`$DIRNAME "$path"`"
32436        base="`$BASENAME "$path"`"
32437        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32438      fi
32439    fi
32440  fi
32441
32442            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32443          fi
32444          IFS=";"
32445        fi
32446      done
32447      IFS="$OLDIFS"
32448    fi
32449  else
32450    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32451$as_echo "not found" >&6; }
32452
32453    if test "x$VS_ENV_CMD" = x; then
32454      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32455$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32456      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32457$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32458    else
32459      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32460$as_echo "$as_me: Running the extraction script failed." >&6;}
32461    fi
32462    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32463$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32464    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32465$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32466    as_fn_error $? "Cannot continue" "$LINENO" 5
32467  fi
32468
32469    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32470    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32471    PATH="$VS_PATH"
32472    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32473    export INCLUDE="$VS_INCLUDE"
32474    export LIB="$VS_LIB"
32475  else
32476    if test "x$XCODE_VERSION_OUTPUT" != x; then
32477      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32478      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32479      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32480    else
32481      # Currently we do not define this for other toolchains. This might change as the need arise.
32482      TOOLCHAIN_VERSION=
32483    fi
32484  fi
32485
32486
32487  # For solaris we really need solaris tools, and not the GNU equivalent.
32488  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
32489  # so add that to path before starting to probe.
32490  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
32491  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
32492    PATH="/usr/ccs/bin:$PATH"
32493  fi
32494
32495  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32496  # override all other locations.
32497  if test "x$TOOLCHAIN_PATH" != x; then
32498    PATH=$TOOLCHAIN_PATH:$PATH
32499  fi
32500
32501
32502  #
32503  # Setup the compilers (CC and CXX)
32504  #
32505
32506  COMPILER_NAME=C
32507  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32508
32509  if test "x$CC" != x; then
32510    # User has supplied compiler name already, always let that override.
32511    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
32512$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
32513    if test "x`basename $CC`" = "x$CC"; then
32514      # A command without a complete path is provided, search $PATH.
32515
32516      for ac_prog in $CC
32517do
32518  # Extract the first word of "$ac_prog", so it can be a program name with args.
32519set dummy $ac_prog; ac_word=$2
32520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32521$as_echo_n "checking for $ac_word... " >&6; }
32522if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32523  $as_echo_n "(cached) " >&6
32524else
32525  case $POTENTIAL_CC in
32526  [\\/]* | ?:[\\/]*)
32527  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32528  ;;
32529  *)
32530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32531for as_dir in $PATH
32532do
32533  IFS=$as_save_IFS
32534  test -z "$as_dir" && as_dir=.
32535    for ac_exec_ext in '' $ac_executable_extensions; do
32536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32537    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32539    break 2
32540  fi
32541done
32542  done
32543IFS=$as_save_IFS
32544
32545  ;;
32546esac
32547fi
32548POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32549if test -n "$POTENTIAL_CC"; then
32550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32551$as_echo "$POTENTIAL_CC" >&6; }
32552else
32553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32554$as_echo "no" >&6; }
32555fi
32556
32557
32558  test -n "$POTENTIAL_CC" && break
32559done
32560
32561      if test "x$POTENTIAL_CC" != x; then
32562        CC=$POTENTIAL_CC
32563      else
32564        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
32565      fi
32566    else
32567      # Otherwise it might already be a complete path
32568      if test ! -x "$CC"; then
32569        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
32570      fi
32571    fi
32572  else
32573    # No user supplied value. Locate compiler ourselves.
32574
32575    # If we are cross compiling, assume cross compilation tools follows the
32576    # cross compilation standard where they are prefixed with the autoconf
32577    # standard name for the target. For example the binary
32578    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32579    # If we are not cross compiling, then the default compiler name will be
32580    # used.
32581
32582    CC=
32583    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32584    # before checking the rest of the PATH.
32585    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32586    # step, this should not be necessary.
32587    if test -n "$TOOLCHAIN_PATH"; then
32588      PATH_save="$PATH"
32589      PATH="$TOOLCHAIN_PATH"
32590      for ac_prog in $SEARCH_LIST
32591do
32592  # Extract the first word of "$ac_prog", so it can be a program name with args.
32593set dummy $ac_prog; ac_word=$2
32594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32595$as_echo_n "checking for $ac_word... " >&6; }
32596if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
32597  $as_echo_n "(cached) " >&6
32598else
32599  case $TOOLCHAIN_PATH_CC in
32600  [\\/]* | ?:[\\/]*)
32601  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
32602  ;;
32603  *)
32604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32605for as_dir in $PATH
32606do
32607  IFS=$as_save_IFS
32608  test -z "$as_dir" && as_dir=.
32609    for ac_exec_ext in '' $ac_executable_extensions; do
32610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32611    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
32612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32613    break 2
32614  fi
32615done
32616  done
32617IFS=$as_save_IFS
32618
32619  ;;
32620esac
32621fi
32622TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
32623if test -n "$TOOLCHAIN_PATH_CC"; then
32624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
32625$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
32626else
32627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32628$as_echo "no" >&6; }
32629fi
32630
32631
32632  test -n "$TOOLCHAIN_PATH_CC" && break
32633done
32634
32635      CC=$TOOLCHAIN_PATH_CC
32636      PATH="$PATH_save"
32637    fi
32638
32639    # AC_PATH_PROGS can't be run multiple times with the same variable,
32640    # so create a new name for this run.
32641    if test "x$CC" = x; then
32642      for ac_prog in $SEARCH_LIST
32643do
32644  # Extract the first word of "$ac_prog", so it can be a program name with args.
32645set dummy $ac_prog; ac_word=$2
32646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32647$as_echo_n "checking for $ac_word... " >&6; }
32648if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32649  $as_echo_n "(cached) " >&6
32650else
32651  case $POTENTIAL_CC in
32652  [\\/]* | ?:[\\/]*)
32653  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32654  ;;
32655  *)
32656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32657for as_dir in $PATH
32658do
32659  IFS=$as_save_IFS
32660  test -z "$as_dir" && as_dir=.
32661    for ac_exec_ext in '' $ac_executable_extensions; do
32662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32663    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32665    break 2
32666  fi
32667done
32668  done
32669IFS=$as_save_IFS
32670
32671  ;;
32672esac
32673fi
32674POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32675if test -n "$POTENTIAL_CC"; then
32676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32677$as_echo "$POTENTIAL_CC" >&6; }
32678else
32679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32680$as_echo "no" >&6; }
32681fi
32682
32683
32684  test -n "$POTENTIAL_CC" && break
32685done
32686
32687      CC=$POTENTIAL_CC
32688    fi
32689
32690    if test "x$CC" = x; then
32691
32692  # Print a helpful message on how to acquire the necessary build dependency.
32693  # devkit is the help tag: freetype, cups, alsa etc
32694  MISSING_DEPENDENCY=devkit
32695
32696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32697    cygwin_help $MISSING_DEPENDENCY
32698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32699    msys_help $MISSING_DEPENDENCY
32700  else
32701    PKGHANDLER_COMMAND=
32702
32703    case $PKGHANDLER in
32704      apt-get)
32705        apt_help     $MISSING_DEPENDENCY ;;
32706      yum)
32707        yum_help     $MISSING_DEPENDENCY ;;
32708      port)
32709        port_help    $MISSING_DEPENDENCY ;;
32710      pkgutil)
32711        pkgutil_help $MISSING_DEPENDENCY ;;
32712      pkgadd)
32713        pkgadd_help  $MISSING_DEPENDENCY ;;
32714    esac
32715
32716    if test "x$PKGHANDLER_COMMAND" != x; then
32717      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32718    fi
32719  fi
32720
32721      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
32722    fi
32723  fi
32724
32725  # Now we have a compiler binary in CC. Make sure it's okay.
32726
32727  # Only process if variable expands to non-empty
32728
32729  if test "x$CC" != x; then
32730    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32731
32732  # First separate the path from the arguments. This will split at the first
32733  # space.
32734  complete="$CC"
32735  path="${complete%% *}"
32736  tmp="$complete EOL"
32737  arguments="${tmp#* }"
32738
32739  # Input might be given as Windows format, start by converting to
32740  # unix format.
32741  new_path=`$CYGPATH -u "$path"`
32742
32743  # Now try to locate executable using which
32744  new_path=`$WHICH "$new_path" 2> /dev/null`
32745  # bat and cmd files are not always considered executable in cygwin causing which
32746  # to not find them
32747  if test "x$new_path" = x \
32748      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32749      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32750    new_path=`$CYGPATH -u "$path"`
32751  fi
32752  if test "x$new_path" = x; then
32753    # Oops. Which didn't find the executable.
32754    # The splitting of arguments from the executable at a space might have been incorrect,
32755    # since paths with space are more likely in Windows. Give it another try with the whole
32756    # argument.
32757    path="$complete"
32758    arguments="EOL"
32759    new_path=`$CYGPATH -u "$path"`
32760    new_path=`$WHICH "$new_path" 2> /dev/null`
32761    # bat and cmd files are not always considered executable in cygwin causing which
32762    # to not find them
32763    if test "x$new_path" = x \
32764        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32765        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32766      new_path=`$CYGPATH -u "$path"`
32767    fi
32768    if test "x$new_path" = x; then
32769      # It's still not found. Now this is an unrecoverable error.
32770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32771$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32772      has_space=`$ECHO "$complete" | $GREP " "`
32773      if test "x$has_space" != x; then
32774        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32775$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32776      fi
32777      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32778    fi
32779  fi
32780
32781  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32782  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32783  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32784  # "foo.exe" is OK but "foo" is an error.
32785  #
32786  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32787  # It is also a way to make sure we got the proper file name for the real test later on.
32788  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32789  if test "x$test_shortpath" = x; then
32790    # Short path failed, file does not exist as specified.
32791    # Try adding .exe or .cmd
32792    if test -f "${new_path}.exe"; then
32793      input_to_shortpath="${new_path}.exe"
32794    elif test -f "${new_path}.cmd"; then
32795      input_to_shortpath="${new_path}.cmd"
32796    else
32797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
32798$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
32799      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32800$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32801      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32802    fi
32803  else
32804    input_to_shortpath="$new_path"
32805  fi
32806
32807  # Call helper function which possibly converts this using DOS-style short mode.
32808  # If so, the updated path is stored in $new_path.
32809  new_path="$input_to_shortpath"
32810
32811  input_path="$input_to_shortpath"
32812  # Check if we need to convert this using DOS-style short mode. If the path
32813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32814  # take no chances and rewrite it.
32815  # Note: m4 eats our [], so we need to use [ and ] instead.
32816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32817  if test "x$has_forbidden_chars" != x; then
32818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32819    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32820    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32821    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32822      # Going to short mode and back again did indeed matter. Since short mode is
32823      # case insensitive, let's make it lowercase to improve readability.
32824      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32825      # Now convert it back to Unix-style (cygpath)
32826      input_path=`$CYGPATH -u "$shortmode_path"`
32827      new_path="$input_path"
32828    fi
32829  fi
32830
32831  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32832  if test "x$test_cygdrive_prefix" = x; then
32833    # As a simple fix, exclude /usr/bin since it's not a real path.
32834    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32835      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32836      # a path prefixed by /cygdrive for fixpath to work.
32837      new_path="$CYGWIN_ROOT_PATH$input_path"
32838    fi
32839  fi
32840
32841  # remove trailing .exe if any
32842  new_path="${new_path/%.exe/}"
32843
32844    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32845
32846  # First separate the path from the arguments. This will split at the first
32847  # space.
32848  complete="$CC"
32849  path="${complete%% *}"
32850  tmp="$complete EOL"
32851  arguments="${tmp#* }"
32852
32853  # Input might be given as Windows format, start by converting to
32854  # unix format.
32855  new_path="$path"
32856
32857  windows_path="$new_path"
32858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32859    unix_path=`$CYGPATH -u "$windows_path"`
32860    new_path="$unix_path"
32861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32863    new_path="$unix_path"
32864  fi
32865
32866
32867  # Now try to locate executable using which
32868  new_path=`$WHICH "$new_path" 2> /dev/null`
32869
32870  if test "x$new_path" = x; then
32871    # Oops. Which didn't find the executable.
32872    # The splitting of arguments from the executable at a space might have been incorrect,
32873    # since paths with space are more likely in Windows. Give it another try with the whole
32874    # argument.
32875    path="$complete"
32876    arguments="EOL"
32877    new_path="$path"
32878
32879  windows_path="$new_path"
32880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32881    unix_path=`$CYGPATH -u "$windows_path"`
32882    new_path="$unix_path"
32883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32885    new_path="$unix_path"
32886  fi
32887
32888
32889    new_path=`$WHICH "$new_path" 2> /dev/null`
32890    # bat and cmd files are not always considered executable in MSYS causing which
32891    # to not find them
32892    if test "x$new_path" = x \
32893        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32894        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32895      new_path="$path"
32896
32897  windows_path="$new_path"
32898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32899    unix_path=`$CYGPATH -u "$windows_path"`
32900    new_path="$unix_path"
32901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32903    new_path="$unix_path"
32904  fi
32905
32906    fi
32907
32908    if test "x$new_path" = x; then
32909      # It's still not found. Now this is an unrecoverable error.
32910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32911$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32912      has_space=`$ECHO "$complete" | $GREP " "`
32913      if test "x$has_space" != x; then
32914        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32915$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32916      fi
32917      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32918    fi
32919  fi
32920
32921  # Now new_path has a complete unix path to the binary
32922  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32923    # Keep paths in /bin as-is, but remove trailing .exe if any
32924    new_path="${new_path/%.exe/}"
32925    # Do not save /bin paths to all_fixpath_prefixes!
32926  else
32927    # Not in mixed or Windows style, start by that.
32928    new_path=`cmd //c echo $new_path`
32929
32930  input_path="$new_path"
32931  # Check if we need to convert this using DOS-style short mode. If the path
32932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32933  # take no chances and rewrite it.
32934  # Note: m4 eats our [], so we need to use [ and ] instead.
32935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32936  if test "x$has_forbidden_chars" != x; then
32937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32938    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32939  fi
32940
32941    # Output is in $new_path
32942
32943  windows_path="$new_path"
32944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32945    unix_path=`$CYGPATH -u "$windows_path"`
32946    new_path="$unix_path"
32947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32949    new_path="$unix_path"
32950  fi
32951
32952    # remove trailing .exe if any
32953    new_path="${new_path/%.exe/}"
32954
32955    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32956    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32957  fi
32958
32959    else
32960      # We're on a unix platform. Hooray! :)
32961      # First separate the path from the arguments. This will split at the first
32962      # space.
32963      complete="$CC"
32964      path="${complete%% *}"
32965      tmp="$complete EOL"
32966      arguments="${tmp#* }"
32967
32968      # Cannot rely on the command "which" here since it doesn't always work.
32969      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32970      if test -z "$is_absolute_path"; then
32971        # Path to executable is not absolute. Find it.
32972        IFS_save="$IFS"
32973        IFS=:
32974        for p in $PATH; do
32975          if test -f "$p/$path" && test -x "$p/$path"; then
32976            new_path="$p/$path"
32977            break
32978          fi
32979        done
32980        IFS="$IFS_save"
32981      else
32982        # This is an absolute path, we can use it without further modifications.
32983        new_path="$path"
32984      fi
32985
32986      if test "x$new_path" = x; then
32987        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32988$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32989        has_space=`$ECHO "$complete" | $GREP " "`
32990        if test "x$has_space" != x; then
32991          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32992$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32993        fi
32994        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32995      fi
32996    fi
32997
32998    # Now join together the path and the arguments once again
32999    if test "x$arguments" != xEOL; then
33000      new_complete="$new_path ${arguments% *}"
33001    else
33002      new_complete="$new_path"
33003    fi
33004
33005    if test "x$complete" != "x$new_complete"; then
33006      CC="$new_complete"
33007      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33008$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33009    fi
33010  fi
33011
33012  TEST_COMPILER="$CC"
33013
33014  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33015$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33016  SYMLINK_ORIGINAL="$TEST_COMPILER"
33017
33018  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33019    # Follow a chain of symbolic links. Use readlink
33020    # where it exists, else fall back to horribly
33021    # complicated shell code.
33022    if test "x$READLINK_TESTED" != yes; then
33023      # On MacOSX there is a readlink tool with a different
33024      # purpose than the GNU readlink tool. Check the found readlink.
33025      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33026      if test "x$ISGNU" = x; then
33027        # A readlink that we do not know how to use.
33028        # Are there other non-GNU readlinks out there?
33029        READLINK_TESTED=yes
33030        READLINK=
33031      fi
33032    fi
33033
33034    if test "x$READLINK" != x; then
33035      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33036    else
33037      # Save the current directory for restoring afterwards
33038      STARTDIR=$PWD
33039      COUNTER=0
33040      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33041      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33042      cd $sym_link_dir
33043      # Use -P flag to resolve symlinks in directories.
33044      cd `$THEPWDCMD -P`
33045      sym_link_dir=`$THEPWDCMD -P`
33046      # Resolve file symlinks
33047      while test $COUNTER -lt 20; do
33048        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33049        if test "x$ISLINK" == x; then
33050          # This is not a symbolic link! We are done!
33051          break
33052        fi
33053        # Again resolve directory symlinks since the target of the just found
33054        # link could be in a different directory
33055        cd `$DIRNAME $ISLINK`
33056        sym_link_dir=`$THEPWDCMD -P`
33057        sym_link_file=`$BASENAME $ISLINK`
33058        let COUNTER=COUNTER+1
33059      done
33060      cd $STARTDIR
33061      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33062    fi
33063  fi
33064
33065  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33066    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33067$as_echo "no symlink" >&6; }
33068  else
33069    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33070$as_echo "$SYMLINK_ORIGINAL" >&6; }
33071
33072    # We can't handle ccache by gcc wrappers, since we need to know if we're
33073    # using ccache. Instead ccache usage must be controlled by a configure option.
33074    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33075    if test "x$COMPILER_BASENAME" = "xccache"; then
33076      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33077$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33078      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33079    fi
33080  fi
33081
33082
33083  COMPILER=$CC
33084  COMPILER_NAME=$COMPILER_NAME
33085
33086  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33087    # cc -V output typically looks like
33088    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33089    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33090    # Check that this is likely to be the Solaris Studio cc.
33091    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33092    if test $? -ne 0; then
33093      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33094      { $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
33095$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33096      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33097$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33098      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33099$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33100      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33101    fi
33102    # Remove usage instructions (if present), and
33103    # collapse compiler output into a single line
33104    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33105        $SED -e 's/ *[Uu]sage:.*//'`
33106    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33107        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33108  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33109    # xlc -qversion output typically looks like
33110    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33111    #     Version: 11.01.0000.0015
33112    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33113    # Check that this is likely to be the IBM XL C compiler.
33114    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33115    if test $? -ne 0; then
33116      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33117      { $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
33118$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33119      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33120$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33121      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33122$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33123      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33124    fi
33125    # Collapse compiler output into a single line
33126    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33127    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33128        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33129  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33130    # There is no specific version flag, but all output starts with a version string.
33131    # First line typically looks something like:
33132    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33133    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33134    # Check that this is likely to be Microsoft CL.EXE.
33135    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33136    if test $? -ne 0; then
33137      { $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
33138$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33139      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33140$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33141      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33142    fi
33143    # Collapse compiler output into a single line
33144    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33145    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33146        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33147  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33148    # gcc --version output typically looks like
33149    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33150    #     Copyright (C) 2013 Free Software Foundation, Inc.
33151    #     This is free software; see the source for copying conditions.  There is NO
33152    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33153    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33154    # Check that this is likely to be GCC.
33155    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33156    if test $? -ne 0; then
33157      { $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
33158$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33159      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33160$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33161      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33162    fi
33163    # Remove Copyright and legalese from version string, and
33164    # collapse into a single line
33165    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33166        $SED -e 's/ *Copyright .*//'`
33167    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33168        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33169  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33170    # clang --version output typically looks like
33171    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33172    #    clang version 3.3 (tags/RELEASE_33/final)
33173    # or
33174    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33175    #    Target: x86_64-pc-linux-gnu
33176    #    Thread model: posix
33177    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33178    # Check that this is likely to be clang
33179    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33180    if test $? -ne 0; then
33181      { $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
33182$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33183      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33184$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33185      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33186    fi
33187    # Collapse compiler output into a single line
33188    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33189    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33190        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33191  else
33192      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33193  fi
33194  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33195  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33196  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33197  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33198
33199  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33200$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33201
33202
33203  # Now that we have resolved CC ourself, let autoconf have its go at it
33204  ac_ext=c
33205ac_cpp='$CPP $CPPFLAGS'
33206ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33207ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33208ac_compiler_gnu=$ac_cv_c_compiler_gnu
33209if test -n "$ac_tool_prefix"; then
33210  for ac_prog in $CC
33211  do
33212    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33213set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33215$as_echo_n "checking for $ac_word... " >&6; }
33216if ${ac_cv_prog_CC+:} false; then :
33217  $as_echo_n "(cached) " >&6
33218else
33219  if test -n "$CC"; then
33220  ac_cv_prog_CC="$CC" # Let the user override the test.
33221else
33222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33223for as_dir in $PATH
33224do
33225  IFS=$as_save_IFS
33226  test -z "$as_dir" && as_dir=.
33227    for ac_exec_ext in '' $ac_executable_extensions; do
33228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33229    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33231    break 2
33232  fi
33233done
33234  done
33235IFS=$as_save_IFS
33236
33237fi
33238fi
33239CC=$ac_cv_prog_CC
33240if test -n "$CC"; then
33241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33242$as_echo "$CC" >&6; }
33243else
33244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33245$as_echo "no" >&6; }
33246fi
33247
33248
33249    test -n "$CC" && break
33250  done
33251fi
33252if test -z "$CC"; then
33253  ac_ct_CC=$CC
33254  for ac_prog in $CC
33255do
33256  # Extract the first word of "$ac_prog", so it can be a program name with args.
33257set dummy $ac_prog; ac_word=$2
33258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33259$as_echo_n "checking for $ac_word... " >&6; }
33260if ${ac_cv_prog_ac_ct_CC+:} false; then :
33261  $as_echo_n "(cached) " >&6
33262else
33263  if test -n "$ac_ct_CC"; then
33264  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33265else
33266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33267for as_dir in $PATH
33268do
33269  IFS=$as_save_IFS
33270  test -z "$as_dir" && as_dir=.
33271    for ac_exec_ext in '' $ac_executable_extensions; do
33272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33273    ac_cv_prog_ac_ct_CC="$ac_prog"
33274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33275    break 2
33276  fi
33277done
33278  done
33279IFS=$as_save_IFS
33280
33281fi
33282fi
33283ac_ct_CC=$ac_cv_prog_ac_ct_CC
33284if test -n "$ac_ct_CC"; then
33285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33286$as_echo "$ac_ct_CC" >&6; }
33287else
33288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33289$as_echo "no" >&6; }
33290fi
33291
33292
33293  test -n "$ac_ct_CC" && break
33294done
33295
33296  if test "x$ac_ct_CC" = x; then
33297    CC=""
33298  else
33299    case $cross_compiling:$ac_tool_warned in
33300yes:)
33301{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33302$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33303ac_tool_warned=yes ;;
33304esac
33305    CC=$ac_ct_CC
33306  fi
33307fi
33308
33309
33310test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33311$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33312as_fn_error $? "no acceptable C compiler found in \$PATH
33313See \`config.log' for more details" "$LINENO" 5; }
33314
33315# Provide some information about the compiler.
33316$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33317set X $ac_compile
33318ac_compiler=$2
33319for ac_option in --version -v -V -qversion; do
33320  { { ac_try="$ac_compiler $ac_option >&5"
33321case "(($ac_try" in
33322  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33323  *) ac_try_echo=$ac_try;;
33324esac
33325eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33326$as_echo "$ac_try_echo"; } >&5
33327  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33328  ac_status=$?
33329  if test -s conftest.err; then
33330    sed '10a\
33331... rest of stderr output deleted ...
33332         10q' conftest.err >conftest.er1
33333    cat conftest.er1 >&5
33334  fi
33335  rm -f conftest.er1 conftest.err
33336  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33337  test $ac_status = 0; }
33338done
33339
33340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33341/* end confdefs.h.  */
33342
33343int
33344main ()
33345{
33346
33347  ;
33348  return 0;
33349}
33350_ACEOF
33351ac_clean_files_save=$ac_clean_files
33352ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33353# Try to create an executable without -o first, disregard a.out.
33354# It will help us diagnose broken compilers, and finding out an intuition
33355# of exeext.
33356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33357$as_echo_n "checking whether the C compiler works... " >&6; }
33358ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33359
33360# The possible output files:
33361ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33362
33363ac_rmfiles=
33364for ac_file in $ac_files
33365do
33366  case $ac_file in
33367    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33368    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33369  esac
33370done
33371rm -f $ac_rmfiles
33372
33373if { { ac_try="$ac_link_default"
33374case "(($ac_try" in
33375  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33376  *) ac_try_echo=$ac_try;;
33377esac
33378eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33379$as_echo "$ac_try_echo"; } >&5
33380  (eval "$ac_link_default") 2>&5
33381  ac_status=$?
33382  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33383  test $ac_status = 0; }; then :
33384  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33385# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33386# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33387# so that the user can short-circuit this test for compilers unknown to
33388# Autoconf.
33389for ac_file in $ac_files ''
33390do
33391  test -f "$ac_file" || continue
33392  case $ac_file in
33393    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33394	;;
33395    [ab].out )
33396	# We found the default executable, but exeext='' is most
33397	# certainly right.
33398	break;;
33399    *.* )
33400	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33401	then :; else
33402	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33403	fi
33404	# We set ac_cv_exeext here because the later test for it is not
33405	# safe: cross compilers may not add the suffix if given an `-o'
33406	# argument, so we may need to know it at that point already.
33407	# Even if this section looks crufty: it has the advantage of
33408	# actually working.
33409	break;;
33410    * )
33411	break;;
33412  esac
33413done
33414test "$ac_cv_exeext" = no && ac_cv_exeext=
33415
33416else
33417  ac_file=''
33418fi
33419if test -z "$ac_file"; then :
33420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33421$as_echo "no" >&6; }
33422$as_echo "$as_me: failed program was:" >&5
33423sed 's/^/| /' conftest.$ac_ext >&5
33424
33425{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33426$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33427as_fn_error 77 "C compiler cannot create executables
33428See \`config.log' for more details" "$LINENO" 5; }
33429else
33430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33431$as_echo "yes" >&6; }
33432fi
33433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33434$as_echo_n "checking for C compiler default output file name... " >&6; }
33435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33436$as_echo "$ac_file" >&6; }
33437ac_exeext=$ac_cv_exeext
33438
33439rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33440ac_clean_files=$ac_clean_files_save
33441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33442$as_echo_n "checking for suffix of executables... " >&6; }
33443if { { ac_try="$ac_link"
33444case "(($ac_try" in
33445  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33446  *) ac_try_echo=$ac_try;;
33447esac
33448eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33449$as_echo "$ac_try_echo"; } >&5
33450  (eval "$ac_link") 2>&5
33451  ac_status=$?
33452  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33453  test $ac_status = 0; }; then :
33454  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33455# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33456# work properly (i.e., refer to `conftest.exe'), while it won't with
33457# `rm'.
33458for ac_file in conftest.exe conftest conftest.*; do
33459  test -f "$ac_file" || continue
33460  case $ac_file in
33461    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33462    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33463	  break;;
33464    * ) break;;
33465  esac
33466done
33467else
33468  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33469$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33470as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33471See \`config.log' for more details" "$LINENO" 5; }
33472fi
33473rm -f conftest conftest$ac_cv_exeext
33474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33475$as_echo "$ac_cv_exeext" >&6; }
33476
33477rm -f conftest.$ac_ext
33478EXEEXT=$ac_cv_exeext
33479ac_exeext=$EXEEXT
33480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33481/* end confdefs.h.  */
33482#include <stdio.h>
33483int
33484main ()
33485{
33486FILE *f = fopen ("conftest.out", "w");
33487 return ferror (f) || fclose (f) != 0;
33488
33489  ;
33490  return 0;
33491}
33492_ACEOF
33493ac_clean_files="$ac_clean_files conftest.out"
33494# Check that the compiler produces executables we can run.  If not, either
33495# the compiler is broken, or we cross compile.
33496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33497$as_echo_n "checking whether we are cross compiling... " >&6; }
33498if test "$cross_compiling" != yes; then
33499  { { ac_try="$ac_link"
33500case "(($ac_try" in
33501  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33502  *) ac_try_echo=$ac_try;;
33503esac
33504eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33505$as_echo "$ac_try_echo"; } >&5
33506  (eval "$ac_link") 2>&5
33507  ac_status=$?
33508  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33509  test $ac_status = 0; }
33510  if { ac_try='./conftest$ac_cv_exeext'
33511  { { case "(($ac_try" in
33512  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33513  *) ac_try_echo=$ac_try;;
33514esac
33515eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33516$as_echo "$ac_try_echo"; } >&5
33517  (eval "$ac_try") 2>&5
33518  ac_status=$?
33519  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33520  test $ac_status = 0; }; }; then
33521    cross_compiling=no
33522  else
33523    if test "$cross_compiling" = maybe; then
33524	cross_compiling=yes
33525    else
33526	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33527$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33528as_fn_error $? "cannot run C compiled programs.
33529If you meant to cross compile, use \`--host'.
33530See \`config.log' for more details" "$LINENO" 5; }
33531    fi
33532  fi
33533fi
33534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
33535$as_echo "$cross_compiling" >&6; }
33536
33537rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
33538ac_clean_files=$ac_clean_files_save
33539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
33540$as_echo_n "checking for suffix of object files... " >&6; }
33541if ${ac_cv_objext+:} false; then :
33542  $as_echo_n "(cached) " >&6
33543else
33544  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33545/* end confdefs.h.  */
33546
33547int
33548main ()
33549{
33550
33551  ;
33552  return 0;
33553}
33554_ACEOF
33555rm -f conftest.o conftest.obj
33556if { { ac_try="$ac_compile"
33557case "(($ac_try" in
33558  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33559  *) ac_try_echo=$ac_try;;
33560esac
33561eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33562$as_echo "$ac_try_echo"; } >&5
33563  (eval "$ac_compile") 2>&5
33564  ac_status=$?
33565  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33566  test $ac_status = 0; }; then :
33567  for ac_file in conftest.o conftest.obj conftest.*; do
33568  test -f "$ac_file" || continue;
33569  case $ac_file in
33570    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
33571    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
33572       break;;
33573  esac
33574done
33575else
33576  $as_echo "$as_me: failed program was:" >&5
33577sed 's/^/| /' conftest.$ac_ext >&5
33578
33579{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33580$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33581as_fn_error $? "cannot compute suffix of object files: cannot compile
33582See \`config.log' for more details" "$LINENO" 5; }
33583fi
33584rm -f conftest.$ac_cv_objext conftest.$ac_ext
33585fi
33586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
33587$as_echo "$ac_cv_objext" >&6; }
33588OBJEXT=$ac_cv_objext
33589ac_objext=$OBJEXT
33590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
33591$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
33592if ${ac_cv_c_compiler_gnu+:} false; then :
33593  $as_echo_n "(cached) " >&6
33594else
33595  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33596/* end confdefs.h.  */
33597
33598int
33599main ()
33600{
33601#ifndef __GNUC__
33602       choke me
33603#endif
33604
33605  ;
33606  return 0;
33607}
33608_ACEOF
33609if ac_fn_c_try_compile "$LINENO"; then :
33610  ac_compiler_gnu=yes
33611else
33612  ac_compiler_gnu=no
33613fi
33614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33615ac_cv_c_compiler_gnu=$ac_compiler_gnu
33616
33617fi
33618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
33619$as_echo "$ac_cv_c_compiler_gnu" >&6; }
33620if test $ac_compiler_gnu = yes; then
33621  GCC=yes
33622else
33623  GCC=
33624fi
33625ac_test_CFLAGS=${CFLAGS+set}
33626ac_save_CFLAGS=$CFLAGS
33627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
33628$as_echo_n "checking whether $CC accepts -g... " >&6; }
33629if ${ac_cv_prog_cc_g+:} false; then :
33630  $as_echo_n "(cached) " >&6
33631else
33632  ac_save_c_werror_flag=$ac_c_werror_flag
33633   ac_c_werror_flag=yes
33634   ac_cv_prog_cc_g=no
33635   CFLAGS="-g"
33636   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33637/* end confdefs.h.  */
33638
33639int
33640main ()
33641{
33642
33643  ;
33644  return 0;
33645}
33646_ACEOF
33647if ac_fn_c_try_compile "$LINENO"; then :
33648  ac_cv_prog_cc_g=yes
33649else
33650  CFLAGS=""
33651      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33652/* end confdefs.h.  */
33653
33654int
33655main ()
33656{
33657
33658  ;
33659  return 0;
33660}
33661_ACEOF
33662if ac_fn_c_try_compile "$LINENO"; then :
33663
33664else
33665  ac_c_werror_flag=$ac_save_c_werror_flag
33666	 CFLAGS="-g"
33667	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33668/* end confdefs.h.  */
33669
33670int
33671main ()
33672{
33673
33674  ;
33675  return 0;
33676}
33677_ACEOF
33678if ac_fn_c_try_compile "$LINENO"; then :
33679  ac_cv_prog_cc_g=yes
33680fi
33681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33682fi
33683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33684fi
33685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33686   ac_c_werror_flag=$ac_save_c_werror_flag
33687fi
33688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
33689$as_echo "$ac_cv_prog_cc_g" >&6; }
33690if test "$ac_test_CFLAGS" = set; then
33691  CFLAGS=$ac_save_CFLAGS
33692elif test $ac_cv_prog_cc_g = yes; then
33693  if test "$GCC" = yes; then
33694    CFLAGS="-g -O2"
33695  else
33696    CFLAGS="-g"
33697  fi
33698else
33699  if test "$GCC" = yes; then
33700    CFLAGS="-O2"
33701  else
33702    CFLAGS=
33703  fi
33704fi
33705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
33706$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
33707if ${ac_cv_prog_cc_c89+:} false; then :
33708  $as_echo_n "(cached) " >&6
33709else
33710  ac_cv_prog_cc_c89=no
33711ac_save_CC=$CC
33712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33713/* end confdefs.h.  */
33714#include <stdarg.h>
33715#include <stdio.h>
33716struct stat;
33717/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
33718struct buf { int x; };
33719FILE * (*rcsopen) (struct buf *, struct stat *, int);
33720static char *e (p, i)
33721     char **p;
33722     int i;
33723{
33724  return p[i];
33725}
33726static char *f (char * (*g) (char **, int), char **p, ...)
33727{
33728  char *s;
33729  va_list v;
33730  va_start (v,p);
33731  s = g (p, va_arg (v,int));
33732  va_end (v);
33733  return s;
33734}
33735
33736/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
33737   function prototypes and stuff, but not '\xHH' hex character constants.
33738   These don't provoke an error unfortunately, instead are silently treated
33739   as 'x'.  The following induces an error, until -std is added to get
33740   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
33741   array size at least.  It's necessary to write '\x00'==0 to get something
33742   that's true only with -std.  */
33743int osf4_cc_array ['\x00' == 0 ? 1 : -1];
33744
33745/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
33746   inside strings and character constants.  */
33747#define FOO(x) 'x'
33748int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
33749
33750int test (int i, double x);
33751struct s1 {int (*f) (int a);};
33752struct s2 {int (*f) (double a);};
33753int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
33754int argc;
33755char **argv;
33756int
33757main ()
33758{
33759return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
33760  ;
33761  return 0;
33762}
33763_ACEOF
33764for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
33765	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
33766do
33767  CC="$ac_save_CC $ac_arg"
33768  if ac_fn_c_try_compile "$LINENO"; then :
33769  ac_cv_prog_cc_c89=$ac_arg
33770fi
33771rm -f core conftest.err conftest.$ac_objext
33772  test "x$ac_cv_prog_cc_c89" != "xno" && break
33773done
33774rm -f conftest.$ac_ext
33775CC=$ac_save_CC
33776
33777fi
33778# AC_CACHE_VAL
33779case "x$ac_cv_prog_cc_c89" in
33780  x)
33781    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
33782$as_echo "none needed" >&6; } ;;
33783  xno)
33784    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
33785$as_echo "unsupported" >&6; } ;;
33786  *)
33787    CC="$CC $ac_cv_prog_cc_c89"
33788    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
33789$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
33790esac
33791if test "x$ac_cv_prog_cc_c89" != xno; then :
33792
33793fi
33794
33795ac_ext=cpp
33796ac_cpp='$CXXCPP $CPPFLAGS'
33797ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33798ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33799ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33800
33801
33802
33803  COMPILER_NAME=C++
33804  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
33805
33806  if test "x$CXX" != x; then
33807    # User has supplied compiler name already, always let that override.
33808    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
33809$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
33810    if test "x`basename $CXX`" = "x$CXX"; then
33811      # A command without a complete path is provided, search $PATH.
33812
33813      for ac_prog in $CXX
33814do
33815  # Extract the first word of "$ac_prog", so it can be a program name with args.
33816set dummy $ac_prog; ac_word=$2
33817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33818$as_echo_n "checking for $ac_word... " >&6; }
33819if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33820  $as_echo_n "(cached) " >&6
33821else
33822  case $POTENTIAL_CXX in
33823  [\\/]* | ?:[\\/]*)
33824  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33825  ;;
33826  *)
33827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33828for as_dir in $PATH
33829do
33830  IFS=$as_save_IFS
33831  test -z "$as_dir" && as_dir=.
33832    for ac_exec_ext in '' $ac_executable_extensions; do
33833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33834    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33836    break 2
33837  fi
33838done
33839  done
33840IFS=$as_save_IFS
33841
33842  ;;
33843esac
33844fi
33845POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33846if test -n "$POTENTIAL_CXX"; then
33847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33848$as_echo "$POTENTIAL_CXX" >&6; }
33849else
33850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33851$as_echo "no" >&6; }
33852fi
33853
33854
33855  test -n "$POTENTIAL_CXX" && break
33856done
33857
33858      if test "x$POTENTIAL_CXX" != x; then
33859        CXX=$POTENTIAL_CXX
33860      else
33861        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33862      fi
33863    else
33864      # Otherwise it might already be a complete path
33865      if test ! -x "$CXX"; then
33866        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33867      fi
33868    fi
33869  else
33870    # No user supplied value. Locate compiler ourselves.
33871
33872    # If we are cross compiling, assume cross compilation tools follows the
33873    # cross compilation standard where they are prefixed with the autoconf
33874    # standard name for the target. For example the binary
33875    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33876    # If we are not cross compiling, then the default compiler name will be
33877    # used.
33878
33879    CXX=
33880    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33881    # before checking the rest of the PATH.
33882    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33883    # step, this should not be necessary.
33884    if test -n "$TOOLCHAIN_PATH"; then
33885      PATH_save="$PATH"
33886      PATH="$TOOLCHAIN_PATH"
33887      for ac_prog in $SEARCH_LIST
33888do
33889  # Extract the first word of "$ac_prog", so it can be a program name with args.
33890set dummy $ac_prog; ac_word=$2
33891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33892$as_echo_n "checking for $ac_word... " >&6; }
33893if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33894  $as_echo_n "(cached) " >&6
33895else
33896  case $TOOLCHAIN_PATH_CXX in
33897  [\\/]* | ?:[\\/]*)
33898  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33899  ;;
33900  *)
33901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33902for as_dir in $PATH
33903do
33904  IFS=$as_save_IFS
33905  test -z "$as_dir" && as_dir=.
33906    for ac_exec_ext in '' $ac_executable_extensions; do
33907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33908    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33910    break 2
33911  fi
33912done
33913  done
33914IFS=$as_save_IFS
33915
33916  ;;
33917esac
33918fi
33919TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33920if test -n "$TOOLCHAIN_PATH_CXX"; then
33921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33922$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33923else
33924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33925$as_echo "no" >&6; }
33926fi
33927
33928
33929  test -n "$TOOLCHAIN_PATH_CXX" && break
33930done
33931
33932      CXX=$TOOLCHAIN_PATH_CXX
33933      PATH="$PATH_save"
33934    fi
33935
33936    # AC_PATH_PROGS can't be run multiple times with the same variable,
33937    # so create a new name for this run.
33938    if test "x$CXX" = x; then
33939      for ac_prog in $SEARCH_LIST
33940do
33941  # Extract the first word of "$ac_prog", so it can be a program name with args.
33942set dummy $ac_prog; ac_word=$2
33943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33944$as_echo_n "checking for $ac_word... " >&6; }
33945if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33946  $as_echo_n "(cached) " >&6
33947else
33948  case $POTENTIAL_CXX in
33949  [\\/]* | ?:[\\/]*)
33950  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33951  ;;
33952  *)
33953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33954for as_dir in $PATH
33955do
33956  IFS=$as_save_IFS
33957  test -z "$as_dir" && as_dir=.
33958    for ac_exec_ext in '' $ac_executable_extensions; do
33959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33960    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33962    break 2
33963  fi
33964done
33965  done
33966IFS=$as_save_IFS
33967
33968  ;;
33969esac
33970fi
33971POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33972if test -n "$POTENTIAL_CXX"; then
33973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33974$as_echo "$POTENTIAL_CXX" >&6; }
33975else
33976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33977$as_echo "no" >&6; }
33978fi
33979
33980
33981  test -n "$POTENTIAL_CXX" && break
33982done
33983
33984      CXX=$POTENTIAL_CXX
33985    fi
33986
33987    if test "x$CXX" = x; then
33988
33989  # Print a helpful message on how to acquire the necessary build dependency.
33990  # devkit is the help tag: freetype, cups, alsa etc
33991  MISSING_DEPENDENCY=devkit
33992
33993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33994    cygwin_help $MISSING_DEPENDENCY
33995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33996    msys_help $MISSING_DEPENDENCY
33997  else
33998    PKGHANDLER_COMMAND=
33999
34000    case $PKGHANDLER in
34001      apt-get)
34002        apt_help     $MISSING_DEPENDENCY ;;
34003      yum)
34004        yum_help     $MISSING_DEPENDENCY ;;
34005      port)
34006        port_help    $MISSING_DEPENDENCY ;;
34007      pkgutil)
34008        pkgutil_help $MISSING_DEPENDENCY ;;
34009      pkgadd)
34010        pkgadd_help  $MISSING_DEPENDENCY ;;
34011    esac
34012
34013    if test "x$PKGHANDLER_COMMAND" != x; then
34014      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34015    fi
34016  fi
34017
34018      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34019    fi
34020  fi
34021
34022  # Now we have a compiler binary in CXX. Make sure it's okay.
34023
34024  # Only process if variable expands to non-empty
34025
34026  if test "x$CXX" != x; then
34027    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34028
34029  # First separate the path from the arguments. This will split at the first
34030  # space.
34031  complete="$CXX"
34032  path="${complete%% *}"
34033  tmp="$complete EOL"
34034  arguments="${tmp#* }"
34035
34036  # Input might be given as Windows format, start by converting to
34037  # unix format.
34038  new_path=`$CYGPATH -u "$path"`
34039
34040  # Now try to locate executable using which
34041  new_path=`$WHICH "$new_path" 2> /dev/null`
34042  # bat and cmd files are not always considered executable in cygwin causing which
34043  # to not find them
34044  if test "x$new_path" = x \
34045      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34046      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34047    new_path=`$CYGPATH -u "$path"`
34048  fi
34049  if test "x$new_path" = x; then
34050    # Oops. Which didn't find the executable.
34051    # The splitting of arguments from the executable at a space might have been incorrect,
34052    # since paths with space are more likely in Windows. Give it another try with the whole
34053    # argument.
34054    path="$complete"
34055    arguments="EOL"
34056    new_path=`$CYGPATH -u "$path"`
34057    new_path=`$WHICH "$new_path" 2> /dev/null`
34058    # bat and cmd files are not always considered executable in cygwin causing which
34059    # to not find them
34060    if test "x$new_path" = x \
34061        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34062        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34063      new_path=`$CYGPATH -u "$path"`
34064    fi
34065    if test "x$new_path" = x; then
34066      # It's still not found. Now this is an unrecoverable error.
34067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34068$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34069      has_space=`$ECHO "$complete" | $GREP " "`
34070      if test "x$has_space" != x; then
34071        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34072$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34073      fi
34074      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34075    fi
34076  fi
34077
34078  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34079  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34080  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34081  # "foo.exe" is OK but "foo" is an error.
34082  #
34083  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34084  # It is also a way to make sure we got the proper file name for the real test later on.
34085  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34086  if test "x$test_shortpath" = x; then
34087    # Short path failed, file does not exist as specified.
34088    # Try adding .exe or .cmd
34089    if test -f "${new_path}.exe"; then
34090      input_to_shortpath="${new_path}.exe"
34091    elif test -f "${new_path}.cmd"; then
34092      input_to_shortpath="${new_path}.cmd"
34093    else
34094      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34095$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34096      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34097$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34098      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34099    fi
34100  else
34101    input_to_shortpath="$new_path"
34102  fi
34103
34104  # Call helper function which possibly converts this using DOS-style short mode.
34105  # If so, the updated path is stored in $new_path.
34106  new_path="$input_to_shortpath"
34107
34108  input_path="$input_to_shortpath"
34109  # Check if we need to convert this using DOS-style short mode. If the path
34110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34111  # take no chances and rewrite it.
34112  # Note: m4 eats our [], so we need to use [ and ] instead.
34113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34114  if test "x$has_forbidden_chars" != x; then
34115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34116    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34117    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34118    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34119      # Going to short mode and back again did indeed matter. Since short mode is
34120      # case insensitive, let's make it lowercase to improve readability.
34121      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34122      # Now convert it back to Unix-style (cygpath)
34123      input_path=`$CYGPATH -u "$shortmode_path"`
34124      new_path="$input_path"
34125    fi
34126  fi
34127
34128  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34129  if test "x$test_cygdrive_prefix" = x; then
34130    # As a simple fix, exclude /usr/bin since it's not a real path.
34131    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34132      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34133      # a path prefixed by /cygdrive for fixpath to work.
34134      new_path="$CYGWIN_ROOT_PATH$input_path"
34135    fi
34136  fi
34137
34138  # remove trailing .exe if any
34139  new_path="${new_path/%.exe/}"
34140
34141    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34142
34143  # First separate the path from the arguments. This will split at the first
34144  # space.
34145  complete="$CXX"
34146  path="${complete%% *}"
34147  tmp="$complete EOL"
34148  arguments="${tmp#* }"
34149
34150  # Input might be given as Windows format, start by converting to
34151  # unix format.
34152  new_path="$path"
34153
34154  windows_path="$new_path"
34155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34156    unix_path=`$CYGPATH -u "$windows_path"`
34157    new_path="$unix_path"
34158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34160    new_path="$unix_path"
34161  fi
34162
34163
34164  # Now try to locate executable using which
34165  new_path=`$WHICH "$new_path" 2> /dev/null`
34166
34167  if test "x$new_path" = x; then
34168    # Oops. Which didn't find the executable.
34169    # The splitting of arguments from the executable at a space might have been incorrect,
34170    # since paths with space are more likely in Windows. Give it another try with the whole
34171    # argument.
34172    path="$complete"
34173    arguments="EOL"
34174    new_path="$path"
34175
34176  windows_path="$new_path"
34177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34178    unix_path=`$CYGPATH -u "$windows_path"`
34179    new_path="$unix_path"
34180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34182    new_path="$unix_path"
34183  fi
34184
34185
34186    new_path=`$WHICH "$new_path" 2> /dev/null`
34187    # bat and cmd files are not always considered executable in MSYS causing which
34188    # to not find them
34189    if test "x$new_path" = x \
34190        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34191        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34192      new_path="$path"
34193
34194  windows_path="$new_path"
34195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34196    unix_path=`$CYGPATH -u "$windows_path"`
34197    new_path="$unix_path"
34198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34200    new_path="$unix_path"
34201  fi
34202
34203    fi
34204
34205    if test "x$new_path" = x; then
34206      # It's still not found. Now this is an unrecoverable error.
34207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34208$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34209      has_space=`$ECHO "$complete" | $GREP " "`
34210      if test "x$has_space" != x; then
34211        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34212$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34213      fi
34214      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34215    fi
34216  fi
34217
34218  # Now new_path has a complete unix path to the binary
34219  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34220    # Keep paths in /bin as-is, but remove trailing .exe if any
34221    new_path="${new_path/%.exe/}"
34222    # Do not save /bin paths to all_fixpath_prefixes!
34223  else
34224    # Not in mixed or Windows style, start by that.
34225    new_path=`cmd //c echo $new_path`
34226
34227  input_path="$new_path"
34228  # Check if we need to convert this using DOS-style short mode. If the path
34229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34230  # take no chances and rewrite it.
34231  # Note: m4 eats our [], so we need to use [ and ] instead.
34232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34233  if test "x$has_forbidden_chars" != x; then
34234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34236  fi
34237
34238    # Output is in $new_path
34239
34240  windows_path="$new_path"
34241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34242    unix_path=`$CYGPATH -u "$windows_path"`
34243    new_path="$unix_path"
34244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34246    new_path="$unix_path"
34247  fi
34248
34249    # remove trailing .exe if any
34250    new_path="${new_path/%.exe/}"
34251
34252    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34253    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34254  fi
34255
34256    else
34257      # We're on a unix platform. Hooray! :)
34258      # First separate the path from the arguments. This will split at the first
34259      # space.
34260      complete="$CXX"
34261      path="${complete%% *}"
34262      tmp="$complete EOL"
34263      arguments="${tmp#* }"
34264
34265      # Cannot rely on the command "which" here since it doesn't always work.
34266      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34267      if test -z "$is_absolute_path"; then
34268        # Path to executable is not absolute. Find it.
34269        IFS_save="$IFS"
34270        IFS=:
34271        for p in $PATH; do
34272          if test -f "$p/$path" && test -x "$p/$path"; then
34273            new_path="$p/$path"
34274            break
34275          fi
34276        done
34277        IFS="$IFS_save"
34278      else
34279        # This is an absolute path, we can use it without further modifications.
34280        new_path="$path"
34281      fi
34282
34283      if test "x$new_path" = x; then
34284        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34285$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34286        has_space=`$ECHO "$complete" | $GREP " "`
34287        if test "x$has_space" != x; then
34288          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34289$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34290        fi
34291        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34292      fi
34293    fi
34294
34295    # Now join together the path and the arguments once again
34296    if test "x$arguments" != xEOL; then
34297      new_complete="$new_path ${arguments% *}"
34298    else
34299      new_complete="$new_path"
34300    fi
34301
34302    if test "x$complete" != "x$new_complete"; then
34303      CXX="$new_complete"
34304      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34305$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34306    fi
34307  fi
34308
34309  TEST_COMPILER="$CXX"
34310
34311  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34312$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34313  SYMLINK_ORIGINAL="$TEST_COMPILER"
34314
34315  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34316    # Follow a chain of symbolic links. Use readlink
34317    # where it exists, else fall back to horribly
34318    # complicated shell code.
34319    if test "x$READLINK_TESTED" != yes; then
34320      # On MacOSX there is a readlink tool with a different
34321      # purpose than the GNU readlink tool. Check the found readlink.
34322      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34323      if test "x$ISGNU" = x; then
34324        # A readlink that we do not know how to use.
34325        # Are there other non-GNU readlinks out there?
34326        READLINK_TESTED=yes
34327        READLINK=
34328      fi
34329    fi
34330
34331    if test "x$READLINK" != x; then
34332      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34333    else
34334      # Save the current directory for restoring afterwards
34335      STARTDIR=$PWD
34336      COUNTER=0
34337      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34338      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34339      cd $sym_link_dir
34340      # Use -P flag to resolve symlinks in directories.
34341      cd `$THEPWDCMD -P`
34342      sym_link_dir=`$THEPWDCMD -P`
34343      # Resolve file symlinks
34344      while test $COUNTER -lt 20; do
34345        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34346        if test "x$ISLINK" == x; then
34347          # This is not a symbolic link! We are done!
34348          break
34349        fi
34350        # Again resolve directory symlinks since the target of the just found
34351        # link could be in a different directory
34352        cd `$DIRNAME $ISLINK`
34353        sym_link_dir=`$THEPWDCMD -P`
34354        sym_link_file=`$BASENAME $ISLINK`
34355        let COUNTER=COUNTER+1
34356      done
34357      cd $STARTDIR
34358      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34359    fi
34360  fi
34361
34362  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34363    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34364$as_echo "no symlink" >&6; }
34365  else
34366    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34367$as_echo "$SYMLINK_ORIGINAL" >&6; }
34368
34369    # We can't handle ccache by gcc wrappers, since we need to know if we're
34370    # using ccache. Instead ccache usage must be controlled by a configure option.
34371    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34372    if test "x$COMPILER_BASENAME" = "xccache"; then
34373      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34374$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34375      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34376    fi
34377  fi
34378
34379
34380  COMPILER=$CXX
34381  COMPILER_NAME=$COMPILER_NAME
34382
34383  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34384    # cc -V output typically looks like
34385    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34386    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34387    # Check that this is likely to be the Solaris Studio cc.
34388    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34389    if test $? -ne 0; then
34390      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34391      { $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
34392$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34393      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34394$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34395      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34396$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34397      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34398    fi
34399    # Remove usage instructions (if present), and
34400    # collapse compiler output into a single line
34401    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34402        $SED -e 's/ *[Uu]sage:.*//'`
34403    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34404        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34405  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34406    # xlc -qversion output typically looks like
34407    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34408    #     Version: 11.01.0000.0015
34409    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34410    # Check that this is likely to be the IBM XL C compiler.
34411    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34412    if test $? -ne 0; then
34413      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34414      { $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
34415$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34416      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34417$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34418      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34419$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34420      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34421    fi
34422    # Collapse compiler output into a single line
34423    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34424    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34425        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34426  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34427    # There is no specific version flag, but all output starts with a version string.
34428    # First line typically looks something like:
34429    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34430    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34431    # Check that this is likely to be Microsoft CL.EXE.
34432    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34433    if test $? -ne 0; then
34434      { $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
34435$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34436      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34437$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34438      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34439    fi
34440    # Collapse compiler output into a single line
34441    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34442    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34443        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34444  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34445    # gcc --version output typically looks like
34446    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34447    #     Copyright (C) 2013 Free Software Foundation, Inc.
34448    #     This is free software; see the source for copying conditions.  There is NO
34449    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34450    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34451    # Check that this is likely to be GCC.
34452    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34453    if test $? -ne 0; then
34454      { $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
34455$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34456      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34457$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34458      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34459    fi
34460    # Remove Copyright and legalese from version string, and
34461    # collapse into a single line
34462    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34463        $SED -e 's/ *Copyright .*//'`
34464    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34465        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34466  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34467    # clang --version output typically looks like
34468    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34469    #    clang version 3.3 (tags/RELEASE_33/final)
34470    # or
34471    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34472    #    Target: x86_64-pc-linux-gnu
34473    #    Thread model: posix
34474    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34475    # Check that this is likely to be clang
34476    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34477    if test $? -ne 0; then
34478      { $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
34479$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34480      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34481$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34482      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34483    fi
34484    # Collapse compiler output into a single line
34485    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34486    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34487        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34488  else
34489      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34490  fi
34491  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34492  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34493  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34494  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34495
34496  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34497$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34498
34499
34500  # Now that we have resolved CXX ourself, let autoconf have its go at it
34501  ac_ext=cpp
34502ac_cpp='$CXXCPP $CPPFLAGS'
34503ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34504ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34505ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34506if test -z "$CXX"; then
34507  if test -n "$CCC"; then
34508    CXX=$CCC
34509  else
34510    if test -n "$ac_tool_prefix"; then
34511  for ac_prog in $CXX
34512  do
34513    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34514set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34516$as_echo_n "checking for $ac_word... " >&6; }
34517if ${ac_cv_prog_CXX+:} false; then :
34518  $as_echo_n "(cached) " >&6
34519else
34520  if test -n "$CXX"; then
34521  ac_cv_prog_CXX="$CXX" # Let the user override the test.
34522else
34523as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34524for as_dir in $PATH
34525do
34526  IFS=$as_save_IFS
34527  test -z "$as_dir" && as_dir=.
34528    for ac_exec_ext in '' $ac_executable_extensions; do
34529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34530    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34532    break 2
34533  fi
34534done
34535  done
34536IFS=$as_save_IFS
34537
34538fi
34539fi
34540CXX=$ac_cv_prog_CXX
34541if test -n "$CXX"; then
34542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34543$as_echo "$CXX" >&6; }
34544else
34545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34546$as_echo "no" >&6; }
34547fi
34548
34549
34550    test -n "$CXX" && break
34551  done
34552fi
34553if test -z "$CXX"; then
34554  ac_ct_CXX=$CXX
34555  for ac_prog in $CXX
34556do
34557  # Extract the first word of "$ac_prog", so it can be a program name with args.
34558set dummy $ac_prog; ac_word=$2
34559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34560$as_echo_n "checking for $ac_word... " >&6; }
34561if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34562  $as_echo_n "(cached) " >&6
34563else
34564  if test -n "$ac_ct_CXX"; then
34565  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34566else
34567as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34568for as_dir in $PATH
34569do
34570  IFS=$as_save_IFS
34571  test -z "$as_dir" && as_dir=.
34572    for ac_exec_ext in '' $ac_executable_extensions; do
34573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34574    ac_cv_prog_ac_ct_CXX="$ac_prog"
34575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34576    break 2
34577  fi
34578done
34579  done
34580IFS=$as_save_IFS
34581
34582fi
34583fi
34584ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34585if test -n "$ac_ct_CXX"; then
34586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34587$as_echo "$ac_ct_CXX" >&6; }
34588else
34589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34590$as_echo "no" >&6; }
34591fi
34592
34593
34594  test -n "$ac_ct_CXX" && break
34595done
34596
34597  if test "x$ac_ct_CXX" = x; then
34598    CXX="g++"
34599  else
34600    case $cross_compiling:$ac_tool_warned in
34601yes:)
34602{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34603$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34604ac_tool_warned=yes ;;
34605esac
34606    CXX=$ac_ct_CXX
34607  fi
34608fi
34609
34610  fi
34611fi
34612# Provide some information about the compiler.
34613$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34614set X $ac_compile
34615ac_compiler=$2
34616for ac_option in --version -v -V -qversion; do
34617  { { ac_try="$ac_compiler $ac_option >&5"
34618case "(($ac_try" in
34619  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34620  *) ac_try_echo=$ac_try;;
34621esac
34622eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34623$as_echo "$ac_try_echo"; } >&5
34624  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34625  ac_status=$?
34626  if test -s conftest.err; then
34627    sed '10a\
34628... rest of stderr output deleted ...
34629         10q' conftest.err >conftest.er1
34630    cat conftest.er1 >&5
34631  fi
34632  rm -f conftest.er1 conftest.err
34633  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34634  test $ac_status = 0; }
34635done
34636
34637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34638$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34639if ${ac_cv_cxx_compiler_gnu+:} false; then :
34640  $as_echo_n "(cached) " >&6
34641else
34642  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34643/* end confdefs.h.  */
34644
34645int
34646main ()
34647{
34648#ifndef __GNUC__
34649       choke me
34650#endif
34651
34652  ;
34653  return 0;
34654}
34655_ACEOF
34656if ac_fn_cxx_try_compile "$LINENO"; then :
34657  ac_compiler_gnu=yes
34658else
34659  ac_compiler_gnu=no
34660fi
34661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34662ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34663
34664fi
34665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34666$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34667if test $ac_compiler_gnu = yes; then
34668  GXX=yes
34669else
34670  GXX=
34671fi
34672ac_test_CXXFLAGS=${CXXFLAGS+set}
34673ac_save_CXXFLAGS=$CXXFLAGS
34674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34675$as_echo_n "checking whether $CXX accepts -g... " >&6; }
34676if ${ac_cv_prog_cxx_g+:} false; then :
34677  $as_echo_n "(cached) " >&6
34678else
34679  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34680   ac_cxx_werror_flag=yes
34681   ac_cv_prog_cxx_g=no
34682   CXXFLAGS="-g"
34683   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34684/* end confdefs.h.  */
34685
34686int
34687main ()
34688{
34689
34690  ;
34691  return 0;
34692}
34693_ACEOF
34694if ac_fn_cxx_try_compile "$LINENO"; then :
34695  ac_cv_prog_cxx_g=yes
34696else
34697  CXXFLAGS=""
34698      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34699/* end confdefs.h.  */
34700
34701int
34702main ()
34703{
34704
34705  ;
34706  return 0;
34707}
34708_ACEOF
34709if ac_fn_cxx_try_compile "$LINENO"; then :
34710
34711else
34712  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34713	 CXXFLAGS="-g"
34714	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34715/* end confdefs.h.  */
34716
34717int
34718main ()
34719{
34720
34721  ;
34722  return 0;
34723}
34724_ACEOF
34725if ac_fn_cxx_try_compile "$LINENO"; then :
34726  ac_cv_prog_cxx_g=yes
34727fi
34728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34729fi
34730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34731fi
34732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34733   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34734fi
34735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34736$as_echo "$ac_cv_prog_cxx_g" >&6; }
34737if test "$ac_test_CXXFLAGS" = set; then
34738  CXXFLAGS=$ac_save_CXXFLAGS
34739elif test $ac_cv_prog_cxx_g = yes; then
34740  if test "$GXX" = yes; then
34741    CXXFLAGS="-g -O2"
34742  else
34743    CXXFLAGS="-g"
34744  fi
34745else
34746  if test "$GXX" = yes; then
34747    CXXFLAGS="-O2"
34748  else
34749    CXXFLAGS=
34750  fi
34751fi
34752ac_ext=cpp
34753ac_cpp='$CXXCPP $CPPFLAGS'
34754ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34755ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34756ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34757
34758
34759  # This is the compiler version number on the form X.Y[.Z]
34760
34761
34762
34763
34764  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
34765    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
34766$as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
34767    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
34768$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
34769  fi
34770
34771  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
34772  if  [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
34773    { $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
34774$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;}
34775  fi
34776
34777  if  [[  "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
34778    { $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
34779$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
34780  fi
34781
34782  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
34783
34784
34785  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
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
34826
34827
34828    # Execute function body
34829
34830  # Need to assign to a variable since m4 is blocked from modifying parts in [].
34831  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
34832
34833  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
34834    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
34835  fi
34836
34837  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
34838    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
34839  fi
34840
34841  # Version comparison method inspired by http://stackoverflow.com/a/24067243
34842  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
34843
34844  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
34845    :
34846
34847  else
34848    :
34849
34850          { $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
34851$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
34852
34853
34854  fi
34855
34856
34857
34858
34859
34860
34861
34862
34863
34864
34865
34866
34867  fi
34868
34869  #
34870  # Setup the preprocessor (CPP and CXXCPP)
34871  #
34872  ac_ext=c
34873ac_cpp='$CPP $CPPFLAGS'
34874ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34875ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34876ac_compiler_gnu=$ac_cv_c_compiler_gnu
34877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34878$as_echo_n "checking how to run the C preprocessor... " >&6; }
34879# On Suns, sometimes $CPP names a directory.
34880if test -n "$CPP" && test -d "$CPP"; then
34881  CPP=
34882fi
34883if test -z "$CPP"; then
34884  if ${ac_cv_prog_CPP+:} false; then :
34885  $as_echo_n "(cached) " >&6
34886else
34887      # Double quotes because CPP needs to be expanded
34888    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34889    do
34890      ac_preproc_ok=false
34891for ac_c_preproc_warn_flag in '' yes
34892do
34893  # Use a header file that comes with gcc, so configuring glibc
34894  # with a fresh cross-compiler works.
34895  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34896  # <limits.h> exists even on freestanding compilers.
34897  # On the NeXT, cc -E runs the code through the compiler's parser,
34898  # not just through cpp. "Syntax error" is here to catch this case.
34899  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34900/* end confdefs.h.  */
34901#ifdef __STDC__
34902# include <limits.h>
34903#else
34904# include <assert.h>
34905#endif
34906		     Syntax error
34907_ACEOF
34908if ac_fn_c_try_cpp "$LINENO"; then :
34909
34910else
34911  # Broken: fails on valid input.
34912continue
34913fi
34914rm -f conftest.err conftest.i conftest.$ac_ext
34915
34916  # OK, works on sane cases.  Now check whether nonexistent headers
34917  # can be detected and how.
34918  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34919/* end confdefs.h.  */
34920#include <ac_nonexistent.h>
34921_ACEOF
34922if ac_fn_c_try_cpp "$LINENO"; then :
34923  # Broken: success on invalid input.
34924continue
34925else
34926  # Passes both tests.
34927ac_preproc_ok=:
34928break
34929fi
34930rm -f conftest.err conftest.i conftest.$ac_ext
34931
34932done
34933# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34934rm -f conftest.i conftest.err conftest.$ac_ext
34935if $ac_preproc_ok; then :
34936  break
34937fi
34938
34939    done
34940    ac_cv_prog_CPP=$CPP
34941
34942fi
34943  CPP=$ac_cv_prog_CPP
34944else
34945  ac_cv_prog_CPP=$CPP
34946fi
34947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34948$as_echo "$CPP" >&6; }
34949ac_preproc_ok=false
34950for ac_c_preproc_warn_flag in '' yes
34951do
34952  # Use a header file that comes with gcc, so configuring glibc
34953  # with a fresh cross-compiler works.
34954  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34955  # <limits.h> exists even on freestanding compilers.
34956  # On the NeXT, cc -E runs the code through the compiler's parser,
34957  # not just through cpp. "Syntax error" is here to catch this case.
34958  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34959/* end confdefs.h.  */
34960#ifdef __STDC__
34961# include <limits.h>
34962#else
34963# include <assert.h>
34964#endif
34965		     Syntax error
34966_ACEOF
34967if ac_fn_c_try_cpp "$LINENO"; then :
34968
34969else
34970  # Broken: fails on valid input.
34971continue
34972fi
34973rm -f conftest.err conftest.i conftest.$ac_ext
34974
34975  # OK, works on sane cases.  Now check whether nonexistent headers
34976  # can be detected and how.
34977  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34978/* end confdefs.h.  */
34979#include <ac_nonexistent.h>
34980_ACEOF
34981if ac_fn_c_try_cpp "$LINENO"; then :
34982  # Broken: success on invalid input.
34983continue
34984else
34985  # Passes both tests.
34986ac_preproc_ok=:
34987break
34988fi
34989rm -f conftest.err conftest.i conftest.$ac_ext
34990
34991done
34992# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34993rm -f conftest.i conftest.err conftest.$ac_ext
34994if $ac_preproc_ok; then :
34995
34996else
34997  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34998$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34999as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35000See \`config.log' for more details" "$LINENO" 5; }
35001fi
35002
35003ac_ext=cpp
35004ac_cpp='$CXXCPP $CPPFLAGS'
35005ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35006ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35007ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35008
35009
35010  # Only process if variable expands to non-empty
35011
35012  if test "x$CPP" != x; then
35013    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35014
35015  # First separate the path from the arguments. This will split at the first
35016  # space.
35017  complete="$CPP"
35018  path="${complete%% *}"
35019  tmp="$complete EOL"
35020  arguments="${tmp#* }"
35021
35022  # Input might be given as Windows format, start by converting to
35023  # unix format.
35024  new_path=`$CYGPATH -u "$path"`
35025
35026  # Now try to locate executable using which
35027  new_path=`$WHICH "$new_path" 2> /dev/null`
35028  # bat and cmd files are not always considered executable in cygwin causing which
35029  # to not find them
35030  if test "x$new_path" = x \
35031      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35032      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35033    new_path=`$CYGPATH -u "$path"`
35034  fi
35035  if test "x$new_path" = x; then
35036    # Oops. Which didn't find the executable.
35037    # The splitting of arguments from the executable at a space might have been incorrect,
35038    # since paths with space are more likely in Windows. Give it another try with the whole
35039    # argument.
35040    path="$complete"
35041    arguments="EOL"
35042    new_path=`$CYGPATH -u "$path"`
35043    new_path=`$WHICH "$new_path" 2> /dev/null`
35044    # bat and cmd files are not always considered executable in cygwin causing which
35045    # to not find them
35046    if test "x$new_path" = x \
35047        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35048        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35049      new_path=`$CYGPATH -u "$path"`
35050    fi
35051    if test "x$new_path" = x; then
35052      # It's still not found. Now this is an unrecoverable error.
35053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35054$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35055      has_space=`$ECHO "$complete" | $GREP " "`
35056      if test "x$has_space" != x; then
35057        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35058$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35059      fi
35060      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35061    fi
35062  fi
35063
35064  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35065  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35066  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35067  # "foo.exe" is OK but "foo" is an error.
35068  #
35069  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35070  # It is also a way to make sure we got the proper file name for the real test later on.
35071  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35072  if test "x$test_shortpath" = x; then
35073    # Short path failed, file does not exist as specified.
35074    # Try adding .exe or .cmd
35075    if test -f "${new_path}.exe"; then
35076      input_to_shortpath="${new_path}.exe"
35077    elif test -f "${new_path}.cmd"; then
35078      input_to_shortpath="${new_path}.cmd"
35079    else
35080      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35081$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35082      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35083$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35084      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35085    fi
35086  else
35087    input_to_shortpath="$new_path"
35088  fi
35089
35090  # Call helper function which possibly converts this using DOS-style short mode.
35091  # If so, the updated path is stored in $new_path.
35092  new_path="$input_to_shortpath"
35093
35094  input_path="$input_to_shortpath"
35095  # Check if we need to convert this using DOS-style short mode. If the path
35096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35097  # take no chances and rewrite it.
35098  # Note: m4 eats our [], so we need to use [ and ] instead.
35099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35100  if test "x$has_forbidden_chars" != x; then
35101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35102    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35103    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35104    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35105      # Going to short mode and back again did indeed matter. Since short mode is
35106      # case insensitive, let's make it lowercase to improve readability.
35107      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35108      # Now convert it back to Unix-style (cygpath)
35109      input_path=`$CYGPATH -u "$shortmode_path"`
35110      new_path="$input_path"
35111    fi
35112  fi
35113
35114  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35115  if test "x$test_cygdrive_prefix" = x; then
35116    # As a simple fix, exclude /usr/bin since it's not a real path.
35117    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35118      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35119      # a path prefixed by /cygdrive for fixpath to work.
35120      new_path="$CYGWIN_ROOT_PATH$input_path"
35121    fi
35122  fi
35123
35124  # remove trailing .exe if any
35125  new_path="${new_path/%.exe/}"
35126
35127    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35128
35129  # First separate the path from the arguments. This will split at the first
35130  # space.
35131  complete="$CPP"
35132  path="${complete%% *}"
35133  tmp="$complete EOL"
35134  arguments="${tmp#* }"
35135
35136  # Input might be given as Windows format, start by converting to
35137  # unix format.
35138  new_path="$path"
35139
35140  windows_path="$new_path"
35141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35142    unix_path=`$CYGPATH -u "$windows_path"`
35143    new_path="$unix_path"
35144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35146    new_path="$unix_path"
35147  fi
35148
35149
35150  # Now try to locate executable using which
35151  new_path=`$WHICH "$new_path" 2> /dev/null`
35152
35153  if test "x$new_path" = x; then
35154    # Oops. Which didn't find the executable.
35155    # The splitting of arguments from the executable at a space might have been incorrect,
35156    # since paths with space are more likely in Windows. Give it another try with the whole
35157    # argument.
35158    path="$complete"
35159    arguments="EOL"
35160    new_path="$path"
35161
35162  windows_path="$new_path"
35163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35164    unix_path=`$CYGPATH -u "$windows_path"`
35165    new_path="$unix_path"
35166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35168    new_path="$unix_path"
35169  fi
35170
35171
35172    new_path=`$WHICH "$new_path" 2> /dev/null`
35173    # bat and cmd files are not always considered executable in MSYS causing which
35174    # to not find them
35175    if test "x$new_path" = x \
35176        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35177        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35178      new_path="$path"
35179
35180  windows_path="$new_path"
35181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35182    unix_path=`$CYGPATH -u "$windows_path"`
35183    new_path="$unix_path"
35184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35186    new_path="$unix_path"
35187  fi
35188
35189    fi
35190
35191    if test "x$new_path" = x; then
35192      # It's still not found. Now this is an unrecoverable error.
35193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35194$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35195      has_space=`$ECHO "$complete" | $GREP " "`
35196      if test "x$has_space" != x; then
35197        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35198$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35199      fi
35200      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35201    fi
35202  fi
35203
35204  # Now new_path has a complete unix path to the binary
35205  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35206    # Keep paths in /bin as-is, but remove trailing .exe if any
35207    new_path="${new_path/%.exe/}"
35208    # Do not save /bin paths to all_fixpath_prefixes!
35209  else
35210    # Not in mixed or Windows style, start by that.
35211    new_path=`cmd //c echo $new_path`
35212
35213  input_path="$new_path"
35214  # Check if we need to convert this using DOS-style short mode. If the path
35215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35216  # take no chances and rewrite it.
35217  # Note: m4 eats our [], so we need to use [ and ] instead.
35218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35219  if test "x$has_forbidden_chars" != x; then
35220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35221    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35222  fi
35223
35224    # Output is in $new_path
35225
35226  windows_path="$new_path"
35227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35228    unix_path=`$CYGPATH -u "$windows_path"`
35229    new_path="$unix_path"
35230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35232    new_path="$unix_path"
35233  fi
35234
35235    # remove trailing .exe if any
35236    new_path="${new_path/%.exe/}"
35237
35238    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35239    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35240  fi
35241
35242    else
35243      # We're on a unix platform. Hooray! :)
35244      # First separate the path from the arguments. This will split at the first
35245      # space.
35246      complete="$CPP"
35247      path="${complete%% *}"
35248      tmp="$complete EOL"
35249      arguments="${tmp#* }"
35250
35251      # Cannot rely on the command "which" here since it doesn't always work.
35252      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35253      if test -z "$is_absolute_path"; then
35254        # Path to executable is not absolute. Find it.
35255        IFS_save="$IFS"
35256        IFS=:
35257        for p in $PATH; do
35258          if test -f "$p/$path" && test -x "$p/$path"; then
35259            new_path="$p/$path"
35260            break
35261          fi
35262        done
35263        IFS="$IFS_save"
35264      else
35265        # This is an absolute path, we can use it without further modifications.
35266        new_path="$path"
35267      fi
35268
35269      if test "x$new_path" = x; then
35270        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35271$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35272        has_space=`$ECHO "$complete" | $GREP " "`
35273        if test "x$has_space" != x; then
35274          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35275$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35276        fi
35277        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35278      fi
35279    fi
35280
35281    # Now join together the path and the arguments once again
35282    if test "x$arguments" != xEOL; then
35283      new_complete="$new_path ${arguments% *}"
35284    else
35285      new_complete="$new_path"
35286    fi
35287
35288    if test "x$complete" != "x$new_complete"; then
35289      CPP="$new_complete"
35290      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35291$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35292    fi
35293  fi
35294
35295  ac_ext=cpp
35296ac_cpp='$CXXCPP $CPPFLAGS'
35297ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35298ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35299ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35301$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35302if test -z "$CXXCPP"; then
35303  if ${ac_cv_prog_CXXCPP+:} false; then :
35304  $as_echo_n "(cached) " >&6
35305else
35306      # Double quotes because CXXCPP needs to be expanded
35307    for CXXCPP in "$CXX -E" "/lib/cpp"
35308    do
35309      ac_preproc_ok=false
35310for ac_cxx_preproc_warn_flag in '' yes
35311do
35312  # Use a header file that comes with gcc, so configuring glibc
35313  # with a fresh cross-compiler works.
35314  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35315  # <limits.h> exists even on freestanding compilers.
35316  # On the NeXT, cc -E runs the code through the compiler's parser,
35317  # not just through cpp. "Syntax error" is here to catch this case.
35318  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35319/* end confdefs.h.  */
35320#ifdef __STDC__
35321# include <limits.h>
35322#else
35323# include <assert.h>
35324#endif
35325		     Syntax error
35326_ACEOF
35327if ac_fn_cxx_try_cpp "$LINENO"; then :
35328
35329else
35330  # Broken: fails on valid input.
35331continue
35332fi
35333rm -f conftest.err conftest.i conftest.$ac_ext
35334
35335  # OK, works on sane cases.  Now check whether nonexistent headers
35336  # can be detected and how.
35337  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35338/* end confdefs.h.  */
35339#include <ac_nonexistent.h>
35340_ACEOF
35341if ac_fn_cxx_try_cpp "$LINENO"; then :
35342  # Broken: success on invalid input.
35343continue
35344else
35345  # Passes both tests.
35346ac_preproc_ok=:
35347break
35348fi
35349rm -f conftest.err conftest.i conftest.$ac_ext
35350
35351done
35352# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35353rm -f conftest.i conftest.err conftest.$ac_ext
35354if $ac_preproc_ok; then :
35355  break
35356fi
35357
35358    done
35359    ac_cv_prog_CXXCPP=$CXXCPP
35360
35361fi
35362  CXXCPP=$ac_cv_prog_CXXCPP
35363else
35364  ac_cv_prog_CXXCPP=$CXXCPP
35365fi
35366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35367$as_echo "$CXXCPP" >&6; }
35368ac_preproc_ok=false
35369for ac_cxx_preproc_warn_flag in '' yes
35370do
35371  # Use a header file that comes with gcc, so configuring glibc
35372  # with a fresh cross-compiler works.
35373  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35374  # <limits.h> exists even on freestanding compilers.
35375  # On the NeXT, cc -E runs the code through the compiler's parser,
35376  # not just through cpp. "Syntax error" is here to catch this case.
35377  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35378/* end confdefs.h.  */
35379#ifdef __STDC__
35380# include <limits.h>
35381#else
35382# include <assert.h>
35383#endif
35384		     Syntax error
35385_ACEOF
35386if ac_fn_cxx_try_cpp "$LINENO"; then :
35387
35388else
35389  # Broken: fails on valid input.
35390continue
35391fi
35392rm -f conftest.err conftest.i conftest.$ac_ext
35393
35394  # OK, works on sane cases.  Now check whether nonexistent headers
35395  # can be detected and how.
35396  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35397/* end confdefs.h.  */
35398#include <ac_nonexistent.h>
35399_ACEOF
35400if ac_fn_cxx_try_cpp "$LINENO"; then :
35401  # Broken: success on invalid input.
35402continue
35403else
35404  # Passes both tests.
35405ac_preproc_ok=:
35406break
35407fi
35408rm -f conftest.err conftest.i conftest.$ac_ext
35409
35410done
35411# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35412rm -f conftest.i conftest.err conftest.$ac_ext
35413if $ac_preproc_ok; then :
35414
35415else
35416  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35417$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35418as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35419See \`config.log' for more details" "$LINENO" 5; }
35420fi
35421
35422ac_ext=cpp
35423ac_cpp='$CXXCPP $CPPFLAGS'
35424ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35425ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35426ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35427
35428
35429  # Only process if variable expands to non-empty
35430
35431  if test "x$CXXCPP" != x; then
35432    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35433
35434  # First separate the path from the arguments. This will split at the first
35435  # space.
35436  complete="$CXXCPP"
35437  path="${complete%% *}"
35438  tmp="$complete EOL"
35439  arguments="${tmp#* }"
35440
35441  # Input might be given as Windows format, start by converting to
35442  # unix format.
35443  new_path=`$CYGPATH -u "$path"`
35444
35445  # Now try to locate executable using which
35446  new_path=`$WHICH "$new_path" 2> /dev/null`
35447  # bat and cmd files are not always considered executable in cygwin causing which
35448  # to not find them
35449  if test "x$new_path" = x \
35450      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35451      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35452    new_path=`$CYGPATH -u "$path"`
35453  fi
35454  if test "x$new_path" = x; then
35455    # Oops. Which didn't find the executable.
35456    # The splitting of arguments from the executable at a space might have been incorrect,
35457    # since paths with space are more likely in Windows. Give it another try with the whole
35458    # argument.
35459    path="$complete"
35460    arguments="EOL"
35461    new_path=`$CYGPATH -u "$path"`
35462    new_path=`$WHICH "$new_path" 2> /dev/null`
35463    # bat and cmd files are not always considered executable in cygwin causing which
35464    # to not find them
35465    if test "x$new_path" = x \
35466        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35467        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35468      new_path=`$CYGPATH -u "$path"`
35469    fi
35470    if test "x$new_path" = x; then
35471      # It's still not found. Now this is an unrecoverable error.
35472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35473$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35474      has_space=`$ECHO "$complete" | $GREP " "`
35475      if test "x$has_space" != x; then
35476        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35477$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35478      fi
35479      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35480    fi
35481  fi
35482
35483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35486  # "foo.exe" is OK but "foo" is an error.
35487  #
35488  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35489  # It is also a way to make sure we got the proper file name for the real test later on.
35490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35491  if test "x$test_shortpath" = x; then
35492    # Short path failed, file does not exist as specified.
35493    # Try adding .exe or .cmd
35494    if test -f "${new_path}.exe"; then
35495      input_to_shortpath="${new_path}.exe"
35496    elif test -f "${new_path}.cmd"; then
35497      input_to_shortpath="${new_path}.cmd"
35498    else
35499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35500$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35501      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35502$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35503      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35504    fi
35505  else
35506    input_to_shortpath="$new_path"
35507  fi
35508
35509  # Call helper function which possibly converts this using DOS-style short mode.
35510  # If so, the updated path is stored in $new_path.
35511  new_path="$input_to_shortpath"
35512
35513  input_path="$input_to_shortpath"
35514  # Check if we need to convert this using DOS-style short mode. If the path
35515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35516  # take no chances and rewrite it.
35517  # Note: m4 eats our [], so we need to use [ and ] instead.
35518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35519  if test "x$has_forbidden_chars" != x; then
35520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35524      # Going to short mode and back again did indeed matter. Since short mode is
35525      # case insensitive, let's make it lowercase to improve readability.
35526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35527      # Now convert it back to Unix-style (cygpath)
35528      input_path=`$CYGPATH -u "$shortmode_path"`
35529      new_path="$input_path"
35530    fi
35531  fi
35532
35533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35534  if test "x$test_cygdrive_prefix" = x; then
35535    # As a simple fix, exclude /usr/bin since it's not a real path.
35536    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35538      # a path prefixed by /cygdrive for fixpath to work.
35539      new_path="$CYGWIN_ROOT_PATH$input_path"
35540    fi
35541  fi
35542
35543  # remove trailing .exe if any
35544  new_path="${new_path/%.exe/}"
35545
35546    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35547
35548  # First separate the path from the arguments. This will split at the first
35549  # space.
35550  complete="$CXXCPP"
35551  path="${complete%% *}"
35552  tmp="$complete EOL"
35553  arguments="${tmp#* }"
35554
35555  # Input might be given as Windows format, start by converting to
35556  # unix format.
35557  new_path="$path"
35558
35559  windows_path="$new_path"
35560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35561    unix_path=`$CYGPATH -u "$windows_path"`
35562    new_path="$unix_path"
35563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35565    new_path="$unix_path"
35566  fi
35567
35568
35569  # Now try to locate executable using which
35570  new_path=`$WHICH "$new_path" 2> /dev/null`
35571
35572  if test "x$new_path" = x; then
35573    # Oops. Which didn't find the executable.
35574    # The splitting of arguments from the executable at a space might have been incorrect,
35575    # since paths with space are more likely in Windows. Give it another try with the whole
35576    # argument.
35577    path="$complete"
35578    arguments="EOL"
35579    new_path="$path"
35580
35581  windows_path="$new_path"
35582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35583    unix_path=`$CYGPATH -u "$windows_path"`
35584    new_path="$unix_path"
35585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35587    new_path="$unix_path"
35588  fi
35589
35590
35591    new_path=`$WHICH "$new_path" 2> /dev/null`
35592    # bat and cmd files are not always considered executable in MSYS causing which
35593    # to not find them
35594    if test "x$new_path" = x \
35595        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35596        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35597      new_path="$path"
35598
35599  windows_path="$new_path"
35600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35601    unix_path=`$CYGPATH -u "$windows_path"`
35602    new_path="$unix_path"
35603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35605    new_path="$unix_path"
35606  fi
35607
35608    fi
35609
35610    if test "x$new_path" = x; then
35611      # It's still not found. Now this is an unrecoverable error.
35612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35613$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35614      has_space=`$ECHO "$complete" | $GREP " "`
35615      if test "x$has_space" != x; then
35616        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35617$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35618      fi
35619      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35620    fi
35621  fi
35622
35623  # Now new_path has a complete unix path to the binary
35624  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35625    # Keep paths in /bin as-is, but remove trailing .exe if any
35626    new_path="${new_path/%.exe/}"
35627    # Do not save /bin paths to all_fixpath_prefixes!
35628  else
35629    # Not in mixed or Windows style, start by that.
35630    new_path=`cmd //c echo $new_path`
35631
35632  input_path="$new_path"
35633  # Check if we need to convert this using DOS-style short mode. If the path
35634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35635  # take no chances and rewrite it.
35636  # Note: m4 eats our [], so we need to use [ and ] instead.
35637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35638  if test "x$has_forbidden_chars" != x; then
35639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35640    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35641  fi
35642
35643    # Output is in $new_path
35644
35645  windows_path="$new_path"
35646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35647    unix_path=`$CYGPATH -u "$windows_path"`
35648    new_path="$unix_path"
35649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35651    new_path="$unix_path"
35652  fi
35653
35654    # remove trailing .exe if any
35655    new_path="${new_path/%.exe/}"
35656
35657    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35658    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35659  fi
35660
35661    else
35662      # We're on a unix platform. Hooray! :)
35663      # First separate the path from the arguments. This will split at the first
35664      # space.
35665      complete="$CXXCPP"
35666      path="${complete%% *}"
35667      tmp="$complete EOL"
35668      arguments="${tmp#* }"
35669
35670      # Cannot rely on the command "which" here since it doesn't always work.
35671      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35672      if test -z "$is_absolute_path"; then
35673        # Path to executable is not absolute. Find it.
35674        IFS_save="$IFS"
35675        IFS=:
35676        for p in $PATH; do
35677          if test -f "$p/$path" && test -x "$p/$path"; then
35678            new_path="$p/$path"
35679            break
35680          fi
35681        done
35682        IFS="$IFS_save"
35683      else
35684        # This is an absolute path, we can use it without further modifications.
35685        new_path="$path"
35686      fi
35687
35688      if test "x$new_path" = x; then
35689        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35690$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35691        has_space=`$ECHO "$complete" | $GREP " "`
35692        if test "x$has_space" != x; then
35693          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35694$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35695        fi
35696        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35697      fi
35698    fi
35699
35700    # Now join together the path and the arguments once again
35701    if test "x$arguments" != xEOL; then
35702      new_complete="$new_path ${arguments% *}"
35703    else
35704      new_complete="$new_path"
35705    fi
35706
35707    if test "x$complete" != "x$new_complete"; then
35708      CXXCPP="$new_complete"
35709      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35710$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35711    fi
35712  fi
35713
35714
35715  #
35716  # Setup the linker (LD)
35717  #
35718  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35719    # In the Microsoft toolchain we have a separate LD command "link".
35720    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35721    # a cygwin program for something completely different.
35722    # Extract the first word of "link", so it can be a program name with args.
35723set dummy link; ac_word=$2
35724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35725$as_echo_n "checking for $ac_word... " >&6; }
35726if ${ac_cv_prog_LD+:} false; then :
35727  $as_echo_n "(cached) " >&6
35728else
35729  if test -n "$LD"; then
35730  ac_cv_prog_LD="$LD" # Let the user override the test.
35731else
35732  ac_prog_rejected=no
35733as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35734for as_dir in $PATH
35735do
35736  IFS=$as_save_IFS
35737  test -z "$as_dir" && as_dir=.
35738    for ac_exec_ext in '' $ac_executable_extensions; do
35739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35740    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35741       ac_prog_rejected=yes
35742       continue
35743     fi
35744    ac_cv_prog_LD="link"
35745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35746    break 2
35747  fi
35748done
35749  done
35750IFS=$as_save_IFS
35751
35752if test $ac_prog_rejected = yes; then
35753  # We found a bogon in the path, so make sure we never use it.
35754  set dummy $ac_cv_prog_LD
35755  shift
35756  if test $# != 0; then
35757    # We chose a different compiler from the bogus one.
35758    # However, it has the same basename, so the bogon will be chosen
35759    # first if we set LD to just the basename; use the full file name.
35760    shift
35761    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35762  fi
35763fi
35764fi
35765fi
35766LD=$ac_cv_prog_LD
35767if test -n "$LD"; then
35768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35769$as_echo "$LD" >&6; }
35770else
35771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35772$as_echo "no" >&6; }
35773fi
35774
35775
35776
35777  # Only process if variable expands to non-empty
35778
35779  if test "x$LD" != x; then
35780    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35781
35782  # First separate the path from the arguments. This will split at the first
35783  # space.
35784  complete="$LD"
35785  path="${complete%% *}"
35786  tmp="$complete EOL"
35787  arguments="${tmp#* }"
35788
35789  # Input might be given as Windows format, start by converting to
35790  # unix format.
35791  new_path=`$CYGPATH -u "$path"`
35792
35793  # Now try to locate executable using which
35794  new_path=`$WHICH "$new_path" 2> /dev/null`
35795  # bat and cmd files are not always considered executable in cygwin causing which
35796  # to not find them
35797  if test "x$new_path" = x \
35798      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35799      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35800    new_path=`$CYGPATH -u "$path"`
35801  fi
35802  if test "x$new_path" = x; then
35803    # Oops. Which didn't find the executable.
35804    # The splitting of arguments from the executable at a space might have been incorrect,
35805    # since paths with space are more likely in Windows. Give it another try with the whole
35806    # argument.
35807    path="$complete"
35808    arguments="EOL"
35809    new_path=`$CYGPATH -u "$path"`
35810    new_path=`$WHICH "$new_path" 2> /dev/null`
35811    # bat and cmd files are not always considered executable in cygwin causing which
35812    # to not find them
35813    if test "x$new_path" = x \
35814        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35815        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35816      new_path=`$CYGPATH -u "$path"`
35817    fi
35818    if test "x$new_path" = x; then
35819      # It's still not found. Now this is an unrecoverable error.
35820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35821$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35822      has_space=`$ECHO "$complete" | $GREP " "`
35823      if test "x$has_space" != x; then
35824        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35825$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35826      fi
35827      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35828    fi
35829  fi
35830
35831  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35832  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35833  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35834  # "foo.exe" is OK but "foo" is an error.
35835  #
35836  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35837  # It is also a way to make sure we got the proper file name for the real test later on.
35838  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35839  if test "x$test_shortpath" = x; then
35840    # Short path failed, file does not exist as specified.
35841    # Try adding .exe or .cmd
35842    if test -f "${new_path}.exe"; then
35843      input_to_shortpath="${new_path}.exe"
35844    elif test -f "${new_path}.cmd"; then
35845      input_to_shortpath="${new_path}.cmd"
35846    else
35847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35848$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35849      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35850$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35851      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35852    fi
35853  else
35854    input_to_shortpath="$new_path"
35855  fi
35856
35857  # Call helper function which possibly converts this using DOS-style short mode.
35858  # If so, the updated path is stored in $new_path.
35859  new_path="$input_to_shortpath"
35860
35861  input_path="$input_to_shortpath"
35862  # Check if we need to convert this using DOS-style short mode. If the path
35863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35864  # take no chances and rewrite it.
35865  # Note: m4 eats our [], so we need to use [ and ] instead.
35866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35867  if test "x$has_forbidden_chars" != x; then
35868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35869    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35870    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35871    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35872      # Going to short mode and back again did indeed matter. Since short mode is
35873      # case insensitive, let's make it lowercase to improve readability.
35874      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35875      # Now convert it back to Unix-style (cygpath)
35876      input_path=`$CYGPATH -u "$shortmode_path"`
35877      new_path="$input_path"
35878    fi
35879  fi
35880
35881  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35882  if test "x$test_cygdrive_prefix" = x; then
35883    # As a simple fix, exclude /usr/bin since it's not a real path.
35884    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35885      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35886      # a path prefixed by /cygdrive for fixpath to work.
35887      new_path="$CYGWIN_ROOT_PATH$input_path"
35888    fi
35889  fi
35890
35891  # remove trailing .exe if any
35892  new_path="${new_path/%.exe/}"
35893
35894    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35895
35896  # First separate the path from the arguments. This will split at the first
35897  # space.
35898  complete="$LD"
35899  path="${complete%% *}"
35900  tmp="$complete EOL"
35901  arguments="${tmp#* }"
35902
35903  # Input might be given as Windows format, start by converting to
35904  # unix format.
35905  new_path="$path"
35906
35907  windows_path="$new_path"
35908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35909    unix_path=`$CYGPATH -u "$windows_path"`
35910    new_path="$unix_path"
35911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35913    new_path="$unix_path"
35914  fi
35915
35916
35917  # Now try to locate executable using which
35918  new_path=`$WHICH "$new_path" 2> /dev/null`
35919
35920  if test "x$new_path" = x; then
35921    # Oops. Which didn't find the executable.
35922    # The splitting of arguments from the executable at a space might have been incorrect,
35923    # since paths with space are more likely in Windows. Give it another try with the whole
35924    # argument.
35925    path="$complete"
35926    arguments="EOL"
35927    new_path="$path"
35928
35929  windows_path="$new_path"
35930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35931    unix_path=`$CYGPATH -u "$windows_path"`
35932    new_path="$unix_path"
35933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35935    new_path="$unix_path"
35936  fi
35937
35938
35939    new_path=`$WHICH "$new_path" 2> /dev/null`
35940    # bat and cmd files are not always considered executable in MSYS causing which
35941    # to not find them
35942    if test "x$new_path" = x \
35943        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35944        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35945      new_path="$path"
35946
35947  windows_path="$new_path"
35948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35949    unix_path=`$CYGPATH -u "$windows_path"`
35950    new_path="$unix_path"
35951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35953    new_path="$unix_path"
35954  fi
35955
35956    fi
35957
35958    if test "x$new_path" = x; then
35959      # It's still not found. Now this is an unrecoverable error.
35960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35961$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35962      has_space=`$ECHO "$complete" | $GREP " "`
35963      if test "x$has_space" != x; then
35964        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35965$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35966      fi
35967      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35968    fi
35969  fi
35970
35971  # Now new_path has a complete unix path to the binary
35972  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35973    # Keep paths in /bin as-is, but remove trailing .exe if any
35974    new_path="${new_path/%.exe/}"
35975    # Do not save /bin paths to all_fixpath_prefixes!
35976  else
35977    # Not in mixed or Windows style, start by that.
35978    new_path=`cmd //c echo $new_path`
35979
35980  input_path="$new_path"
35981  # Check if we need to convert this using DOS-style short mode. If the path
35982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35983  # take no chances and rewrite it.
35984  # Note: m4 eats our [], so we need to use [ and ] instead.
35985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35986  if test "x$has_forbidden_chars" != x; then
35987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35988    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35989  fi
35990
35991    # Output is in $new_path
35992
35993  windows_path="$new_path"
35994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35995    unix_path=`$CYGPATH -u "$windows_path"`
35996    new_path="$unix_path"
35997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35999    new_path="$unix_path"
36000  fi
36001
36002    # remove trailing .exe if any
36003    new_path="${new_path/%.exe/}"
36004
36005    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36006    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36007  fi
36008
36009    else
36010      # We're on a unix platform. Hooray! :)
36011      # First separate the path from the arguments. This will split at the first
36012      # space.
36013      complete="$LD"
36014      path="${complete%% *}"
36015      tmp="$complete EOL"
36016      arguments="${tmp#* }"
36017
36018      # Cannot rely on the command "which" here since it doesn't always work.
36019      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36020      if test -z "$is_absolute_path"; then
36021        # Path to executable is not absolute. Find it.
36022        IFS_save="$IFS"
36023        IFS=:
36024        for p in $PATH; do
36025          if test -f "$p/$path" && test -x "$p/$path"; then
36026            new_path="$p/$path"
36027            break
36028          fi
36029        done
36030        IFS="$IFS_save"
36031      else
36032        # This is an absolute path, we can use it without further modifications.
36033        new_path="$path"
36034      fi
36035
36036      if test "x$new_path" = x; then
36037        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36038$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36039        has_space=`$ECHO "$complete" | $GREP " "`
36040        if test "x$has_space" != x; then
36041          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36042$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36043        fi
36044        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36045      fi
36046    fi
36047
36048    # Now join together the path and the arguments once again
36049    if test "x$arguments" != xEOL; then
36050      new_complete="$new_path ${arguments% *}"
36051    else
36052      new_complete="$new_path"
36053    fi
36054
36055    if test "x$complete" != "x$new_complete"; then
36056      LD="$new_complete"
36057      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36058$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36059    fi
36060  fi
36061
36062    # Verify that we indeed succeeded with this trick.
36063    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36064$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36065    "$LD" --version > /dev/null
36066    if test $? -eq 0 ; then
36067      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36068$as_echo "no" >&6; }
36069      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36070    else
36071      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36072$as_echo "yes" >&6; }
36073    fi
36074    LDCXX="$LD"
36075  else
36076    # All other toolchains use the compiler to link.
36077    LD="$CC"
36078    LDCXX="$CXX"
36079  fi
36080
36081  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36082
36083
36084  #
36085  # Setup the assembler (AS)
36086  #
36087  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36088    # FIXME: should this really be solaris, or solstudio?
36089
36090
36091  # Publish this variable in the help.
36092
36093
36094  if [ -z "${AS+x}" ]; then
36095    # The variable is not set by user, try to locate tool using the code snippet
36096    for ac_prog in as
36097do
36098  # Extract the first word of "$ac_prog", so it can be a program name with args.
36099set dummy $ac_prog; ac_word=$2
36100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36101$as_echo_n "checking for $ac_word... " >&6; }
36102if ${ac_cv_path_AS+:} false; then :
36103  $as_echo_n "(cached) " >&6
36104else
36105  case $AS in
36106  [\\/]* | ?:[\\/]*)
36107  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36108  ;;
36109  *)
36110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36111for as_dir in $PATH
36112do
36113  IFS=$as_save_IFS
36114  test -z "$as_dir" && as_dir=.
36115    for ac_exec_ext in '' $ac_executable_extensions; do
36116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36117    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36119    break 2
36120  fi
36121done
36122  done
36123IFS=$as_save_IFS
36124
36125  ;;
36126esac
36127fi
36128AS=$ac_cv_path_AS
36129if test -n "$AS"; then
36130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36131$as_echo "$AS" >&6; }
36132else
36133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36134$as_echo "no" >&6; }
36135fi
36136
36137
36138  test -n "$AS" && break
36139done
36140
36141  else
36142    # The variable is set, but is it from the command line or the environment?
36143
36144    # Try to remove the string !AS! from our list.
36145    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36146    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36147      # If it failed, the variable was not from the command line. Ignore it,
36148      # but warn the user (except for BASH, which is always set by the calling BASH).
36149      if test "xAS" != xBASH; then
36150        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36151$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36152      fi
36153      # Try to locate tool using the code snippet
36154      for ac_prog in as
36155do
36156  # Extract the first word of "$ac_prog", so it can be a program name with args.
36157set dummy $ac_prog; ac_word=$2
36158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36159$as_echo_n "checking for $ac_word... " >&6; }
36160if ${ac_cv_path_AS+:} false; then :
36161  $as_echo_n "(cached) " >&6
36162else
36163  case $AS in
36164  [\\/]* | ?:[\\/]*)
36165  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36166  ;;
36167  *)
36168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36169for as_dir in $PATH
36170do
36171  IFS=$as_save_IFS
36172  test -z "$as_dir" && as_dir=.
36173    for ac_exec_ext in '' $ac_executable_extensions; do
36174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36175    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36177    break 2
36178  fi
36179done
36180  done
36181IFS=$as_save_IFS
36182
36183  ;;
36184esac
36185fi
36186AS=$ac_cv_path_AS
36187if test -n "$AS"; then
36188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36189$as_echo "$AS" >&6; }
36190else
36191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36192$as_echo "no" >&6; }
36193fi
36194
36195
36196  test -n "$AS" && break
36197done
36198
36199    else
36200      # If it succeeded, then it was overridden by the user. We will use it
36201      # for the tool.
36202
36203      # First remove it from the list of overridden variables, so we can test
36204      # for unknown variables in the end.
36205      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36206
36207      # Check if we try to supply an empty value
36208      if test "x$AS" = x; then
36209        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36210$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36211        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36212$as_echo_n "checking for AS... " >&6; }
36213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36214$as_echo "disabled" >&6; }
36215      else
36216        # Check if the provided tool contains a complete path.
36217        tool_specified="$AS"
36218        tool_basename="${tool_specified##*/}"
36219        if test "x$tool_basename" = "x$tool_specified"; then
36220          # A command without a complete path is provided, search $PATH.
36221          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36222$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36223          # Extract the first word of "$tool_basename", so it can be a program name with args.
36224set dummy $tool_basename; ac_word=$2
36225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36226$as_echo_n "checking for $ac_word... " >&6; }
36227if ${ac_cv_path_AS+:} false; then :
36228  $as_echo_n "(cached) " >&6
36229else
36230  case $AS in
36231  [\\/]* | ?:[\\/]*)
36232  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36233  ;;
36234  *)
36235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36236for as_dir in $PATH
36237do
36238  IFS=$as_save_IFS
36239  test -z "$as_dir" && as_dir=.
36240    for ac_exec_ext in '' $ac_executable_extensions; do
36241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36242    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36244    break 2
36245  fi
36246done
36247  done
36248IFS=$as_save_IFS
36249
36250  ;;
36251esac
36252fi
36253AS=$ac_cv_path_AS
36254if test -n "$AS"; then
36255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36256$as_echo "$AS" >&6; }
36257else
36258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36259$as_echo "no" >&6; }
36260fi
36261
36262
36263          if test "x$AS" = x; then
36264            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36265          fi
36266        else
36267          # Otherwise we believe it is a complete path. Use it as it is.
36268          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36269$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36270          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36271$as_echo_n "checking for AS... " >&6; }
36272          if test ! -x "$tool_specified"; then
36273            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36274$as_echo "not found" >&6; }
36275            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36276          fi
36277          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36278$as_echo "$tool_specified" >&6; }
36279        fi
36280      fi
36281    fi
36282
36283  fi
36284
36285
36286
36287  # Only process if variable expands to non-empty
36288
36289  if test "x$AS" != x; then
36290    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36291
36292  # First separate the path from the arguments. This will split at the first
36293  # space.
36294  complete="$AS"
36295  path="${complete%% *}"
36296  tmp="$complete EOL"
36297  arguments="${tmp#* }"
36298
36299  # Input might be given as Windows format, start by converting to
36300  # unix format.
36301  new_path=`$CYGPATH -u "$path"`
36302
36303  # Now try to locate executable using which
36304  new_path=`$WHICH "$new_path" 2> /dev/null`
36305  # bat and cmd files are not always considered executable in cygwin causing which
36306  # to not find them
36307  if test "x$new_path" = x \
36308      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36309      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36310    new_path=`$CYGPATH -u "$path"`
36311  fi
36312  if test "x$new_path" = x; then
36313    # Oops. Which didn't find the executable.
36314    # The splitting of arguments from the executable at a space might have been incorrect,
36315    # since paths with space are more likely in Windows. Give it another try with the whole
36316    # argument.
36317    path="$complete"
36318    arguments="EOL"
36319    new_path=`$CYGPATH -u "$path"`
36320    new_path=`$WHICH "$new_path" 2> /dev/null`
36321    # bat and cmd files are not always considered executable in cygwin causing which
36322    # to not find them
36323    if test "x$new_path" = x \
36324        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36325        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36326      new_path=`$CYGPATH -u "$path"`
36327    fi
36328    if test "x$new_path" = x; then
36329      # It's still not found. Now this is an unrecoverable error.
36330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36331$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36332      has_space=`$ECHO "$complete" | $GREP " "`
36333      if test "x$has_space" != x; then
36334        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36335$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36336      fi
36337      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36338    fi
36339  fi
36340
36341  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36342  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36343  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36344  # "foo.exe" is OK but "foo" is an error.
36345  #
36346  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36347  # It is also a way to make sure we got the proper file name for the real test later on.
36348  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36349  if test "x$test_shortpath" = x; then
36350    # Short path failed, file does not exist as specified.
36351    # Try adding .exe or .cmd
36352    if test -f "${new_path}.exe"; then
36353      input_to_shortpath="${new_path}.exe"
36354    elif test -f "${new_path}.cmd"; then
36355      input_to_shortpath="${new_path}.cmd"
36356    else
36357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36358$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36359      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36360$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36361      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36362    fi
36363  else
36364    input_to_shortpath="$new_path"
36365  fi
36366
36367  # Call helper function which possibly converts this using DOS-style short mode.
36368  # If so, the updated path is stored in $new_path.
36369  new_path="$input_to_shortpath"
36370
36371  input_path="$input_to_shortpath"
36372  # Check if we need to convert this using DOS-style short mode. If the path
36373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36374  # take no chances and rewrite it.
36375  # Note: m4 eats our [], so we need to use [ and ] instead.
36376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36377  if test "x$has_forbidden_chars" != x; then
36378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36379    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36380    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36381    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36382      # Going to short mode and back again did indeed matter. Since short mode is
36383      # case insensitive, let's make it lowercase to improve readability.
36384      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36385      # Now convert it back to Unix-style (cygpath)
36386      input_path=`$CYGPATH -u "$shortmode_path"`
36387      new_path="$input_path"
36388    fi
36389  fi
36390
36391  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36392  if test "x$test_cygdrive_prefix" = x; then
36393    # As a simple fix, exclude /usr/bin since it's not a real path.
36394    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36395      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36396      # a path prefixed by /cygdrive for fixpath to work.
36397      new_path="$CYGWIN_ROOT_PATH$input_path"
36398    fi
36399  fi
36400
36401  # remove trailing .exe if any
36402  new_path="${new_path/%.exe/}"
36403
36404    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36405
36406  # First separate the path from the arguments. This will split at the first
36407  # space.
36408  complete="$AS"
36409  path="${complete%% *}"
36410  tmp="$complete EOL"
36411  arguments="${tmp#* }"
36412
36413  # Input might be given as Windows format, start by converting to
36414  # unix format.
36415  new_path="$path"
36416
36417  windows_path="$new_path"
36418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36419    unix_path=`$CYGPATH -u "$windows_path"`
36420    new_path="$unix_path"
36421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36423    new_path="$unix_path"
36424  fi
36425
36426
36427  # Now try to locate executable using which
36428  new_path=`$WHICH "$new_path" 2> /dev/null`
36429
36430  if test "x$new_path" = x; then
36431    # Oops. Which didn't find the executable.
36432    # The splitting of arguments from the executable at a space might have been incorrect,
36433    # since paths with space are more likely in Windows. Give it another try with the whole
36434    # argument.
36435    path="$complete"
36436    arguments="EOL"
36437    new_path="$path"
36438
36439  windows_path="$new_path"
36440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36441    unix_path=`$CYGPATH -u "$windows_path"`
36442    new_path="$unix_path"
36443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36445    new_path="$unix_path"
36446  fi
36447
36448
36449    new_path=`$WHICH "$new_path" 2> /dev/null`
36450    # bat and cmd files are not always considered executable in MSYS causing which
36451    # to not find them
36452    if test "x$new_path" = x \
36453        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36454        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36455      new_path="$path"
36456
36457  windows_path="$new_path"
36458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36459    unix_path=`$CYGPATH -u "$windows_path"`
36460    new_path="$unix_path"
36461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36463    new_path="$unix_path"
36464  fi
36465
36466    fi
36467
36468    if test "x$new_path" = x; then
36469      # It's still not found. Now this is an unrecoverable error.
36470      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36471$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36472      has_space=`$ECHO "$complete" | $GREP " "`
36473      if test "x$has_space" != x; then
36474        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36475$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36476      fi
36477      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36478    fi
36479  fi
36480
36481  # Now new_path has a complete unix path to the binary
36482  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36483    # Keep paths in /bin as-is, but remove trailing .exe if any
36484    new_path="${new_path/%.exe/}"
36485    # Do not save /bin paths to all_fixpath_prefixes!
36486  else
36487    # Not in mixed or Windows style, start by that.
36488    new_path=`cmd //c echo $new_path`
36489
36490  input_path="$new_path"
36491  # Check if we need to convert this using DOS-style short mode. If the path
36492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36493  # take no chances and rewrite it.
36494  # Note: m4 eats our [], so we need to use [ and ] instead.
36495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36496  if test "x$has_forbidden_chars" != x; then
36497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36498    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36499  fi
36500
36501    # Output is in $new_path
36502
36503  windows_path="$new_path"
36504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36505    unix_path=`$CYGPATH -u "$windows_path"`
36506    new_path="$unix_path"
36507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36509    new_path="$unix_path"
36510  fi
36511
36512    # remove trailing .exe if any
36513    new_path="${new_path/%.exe/}"
36514
36515    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36516    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36517  fi
36518
36519    else
36520      # We're on a unix platform. Hooray! :)
36521      # First separate the path from the arguments. This will split at the first
36522      # space.
36523      complete="$AS"
36524      path="${complete%% *}"
36525      tmp="$complete EOL"
36526      arguments="${tmp#* }"
36527
36528      # Cannot rely on the command "which" here since it doesn't always work.
36529      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36530      if test -z "$is_absolute_path"; then
36531        # Path to executable is not absolute. Find it.
36532        IFS_save="$IFS"
36533        IFS=:
36534        for p in $PATH; do
36535          if test -f "$p/$path" && test -x "$p/$path"; then
36536            new_path="$p/$path"
36537            break
36538          fi
36539        done
36540        IFS="$IFS_save"
36541      else
36542        # This is an absolute path, we can use it without further modifications.
36543        new_path="$path"
36544      fi
36545
36546      if test "x$new_path" = x; then
36547        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36548$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36549        has_space=`$ECHO "$complete" | $GREP " "`
36550        if test "x$has_space" != x; then
36551          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36552$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36553        fi
36554        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36555      fi
36556    fi
36557
36558    # Now join together the path and the arguments once again
36559    if test "x$arguments" != xEOL; then
36560      new_complete="$new_path ${arguments% *}"
36561    else
36562      new_complete="$new_path"
36563    fi
36564
36565    if test "x$complete" != "x$new_complete"; then
36566      AS="$new_complete"
36567      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36568$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36569    fi
36570  fi
36571
36572  else
36573    # FIXME: is this correct for microsoft?
36574    AS="$CC -c"
36575  fi
36576
36577
36578  #
36579  # Setup the archiver (AR)
36580  #
36581  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36582    # The corresponding ar tool is lib.exe (used to create static libraries)
36583    # Extract the first word of "lib", so it can be a program name with args.
36584set dummy lib; ac_word=$2
36585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36586$as_echo_n "checking for $ac_word... " >&6; }
36587if ${ac_cv_prog_AR+:} false; then :
36588  $as_echo_n "(cached) " >&6
36589else
36590  if test -n "$AR"; then
36591  ac_cv_prog_AR="$AR" # Let the user override the test.
36592else
36593as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36594for as_dir in $PATH
36595do
36596  IFS=$as_save_IFS
36597  test -z "$as_dir" && as_dir=.
36598    for ac_exec_ext in '' $ac_executable_extensions; do
36599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36600    ac_cv_prog_AR="lib"
36601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36602    break 2
36603  fi
36604done
36605  done
36606IFS=$as_save_IFS
36607
36608fi
36609fi
36610AR=$ac_cv_prog_AR
36611if test -n "$AR"; then
36612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36613$as_echo "$AR" >&6; }
36614else
36615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36616$as_echo "no" >&6; }
36617fi
36618
36619
36620  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
36621
36622
36623  # Publish this variable in the help.
36624
36625
36626  if [ -z "${AR+x}" ]; then
36627    # The variable is not set by user, try to locate tool using the code snippet
36628    if test -n "$ac_tool_prefix"; then
36629  for ac_prog in ar gcc-ar
36630  do
36631    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36632set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36634$as_echo_n "checking for $ac_word... " >&6; }
36635if ${ac_cv_prog_AR+:} false; then :
36636  $as_echo_n "(cached) " >&6
36637else
36638  if test -n "$AR"; then
36639  ac_cv_prog_AR="$AR" # Let the user override the test.
36640else
36641as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36642for as_dir in $PATH
36643do
36644  IFS=$as_save_IFS
36645  test -z "$as_dir" && as_dir=.
36646    for ac_exec_ext in '' $ac_executable_extensions; do
36647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36648    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36650    break 2
36651  fi
36652done
36653  done
36654IFS=$as_save_IFS
36655
36656fi
36657fi
36658AR=$ac_cv_prog_AR
36659if test -n "$AR"; then
36660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36661$as_echo "$AR" >&6; }
36662else
36663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36664$as_echo "no" >&6; }
36665fi
36666
36667
36668    test -n "$AR" && break
36669  done
36670fi
36671if test -z "$AR"; then
36672  ac_ct_AR=$AR
36673  for ac_prog in ar gcc-ar
36674do
36675  # Extract the first word of "$ac_prog", so it can be a program name with args.
36676set dummy $ac_prog; ac_word=$2
36677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36678$as_echo_n "checking for $ac_word... " >&6; }
36679if ${ac_cv_prog_ac_ct_AR+:} false; then :
36680  $as_echo_n "(cached) " >&6
36681else
36682  if test -n "$ac_ct_AR"; then
36683  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36684else
36685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36686for as_dir in $PATH
36687do
36688  IFS=$as_save_IFS
36689  test -z "$as_dir" && as_dir=.
36690    for ac_exec_ext in '' $ac_executable_extensions; do
36691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36692    ac_cv_prog_ac_ct_AR="$ac_prog"
36693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36694    break 2
36695  fi
36696done
36697  done
36698IFS=$as_save_IFS
36699
36700fi
36701fi
36702ac_ct_AR=$ac_cv_prog_ac_ct_AR
36703if test -n "$ac_ct_AR"; then
36704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36705$as_echo "$ac_ct_AR" >&6; }
36706else
36707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36708$as_echo "no" >&6; }
36709fi
36710
36711
36712  test -n "$ac_ct_AR" && break
36713done
36714
36715  if test "x$ac_ct_AR" = x; then
36716    AR=""
36717  else
36718    case $cross_compiling:$ac_tool_warned in
36719yes:)
36720{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36721$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36722ac_tool_warned=yes ;;
36723esac
36724    AR=$ac_ct_AR
36725  fi
36726fi
36727
36728  else
36729    # The variable is set, but is it from the command line or the environment?
36730
36731    # Try to remove the string !AR! from our list.
36732    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36733    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36734      # If it failed, the variable was not from the command line. Ignore it,
36735      # but warn the user (except for BASH, which is always set by the calling BASH).
36736      if test "xAR" != xBASH; then
36737        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36738$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36739      fi
36740      # Try to locate tool using the code snippet
36741      if test -n "$ac_tool_prefix"; then
36742  for ac_prog in ar gcc-ar
36743  do
36744    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36745set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36747$as_echo_n "checking for $ac_word... " >&6; }
36748if ${ac_cv_prog_AR+:} false; then :
36749  $as_echo_n "(cached) " >&6
36750else
36751  if test -n "$AR"; then
36752  ac_cv_prog_AR="$AR" # Let the user override the test.
36753else
36754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36755for as_dir in $PATH
36756do
36757  IFS=$as_save_IFS
36758  test -z "$as_dir" && as_dir=.
36759    for ac_exec_ext in '' $ac_executable_extensions; do
36760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36761    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36763    break 2
36764  fi
36765done
36766  done
36767IFS=$as_save_IFS
36768
36769fi
36770fi
36771AR=$ac_cv_prog_AR
36772if test -n "$AR"; then
36773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36774$as_echo "$AR" >&6; }
36775else
36776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36777$as_echo "no" >&6; }
36778fi
36779
36780
36781    test -n "$AR" && break
36782  done
36783fi
36784if test -z "$AR"; then
36785  ac_ct_AR=$AR
36786  for ac_prog in ar gcc-ar
36787do
36788  # Extract the first word of "$ac_prog", so it can be a program name with args.
36789set dummy $ac_prog; ac_word=$2
36790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36791$as_echo_n "checking for $ac_word... " >&6; }
36792if ${ac_cv_prog_ac_ct_AR+:} false; then :
36793  $as_echo_n "(cached) " >&6
36794else
36795  if test -n "$ac_ct_AR"; then
36796  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36797else
36798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36799for as_dir in $PATH
36800do
36801  IFS=$as_save_IFS
36802  test -z "$as_dir" && as_dir=.
36803    for ac_exec_ext in '' $ac_executable_extensions; do
36804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36805    ac_cv_prog_ac_ct_AR="$ac_prog"
36806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36807    break 2
36808  fi
36809done
36810  done
36811IFS=$as_save_IFS
36812
36813fi
36814fi
36815ac_ct_AR=$ac_cv_prog_ac_ct_AR
36816if test -n "$ac_ct_AR"; then
36817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36818$as_echo "$ac_ct_AR" >&6; }
36819else
36820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36821$as_echo "no" >&6; }
36822fi
36823
36824
36825  test -n "$ac_ct_AR" && break
36826done
36827
36828  if test "x$ac_ct_AR" = x; then
36829    AR=""
36830  else
36831    case $cross_compiling:$ac_tool_warned in
36832yes:)
36833{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36834$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36835ac_tool_warned=yes ;;
36836esac
36837    AR=$ac_ct_AR
36838  fi
36839fi
36840
36841    else
36842      # If it succeeded, then it was overridden by the user. We will use it
36843      # for the tool.
36844
36845      # First remove it from the list of overridden variables, so we can test
36846      # for unknown variables in the end.
36847      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36848
36849      # Check if we try to supply an empty value
36850      if test "x$AR" = x; then
36851        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36852$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36853        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36854$as_echo_n "checking for AR... " >&6; }
36855        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36856$as_echo "disabled" >&6; }
36857      else
36858        # Check if the provided tool contains a complete path.
36859        tool_specified="$AR"
36860        tool_basename="${tool_specified##*/}"
36861        if test "x$tool_basename" = "x$tool_specified"; then
36862          # A command without a complete path is provided, search $PATH.
36863          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36864$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36865          # Extract the first word of "$tool_basename", so it can be a program name with args.
36866set dummy $tool_basename; ac_word=$2
36867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36868$as_echo_n "checking for $ac_word... " >&6; }
36869if ${ac_cv_path_AR+:} false; then :
36870  $as_echo_n "(cached) " >&6
36871else
36872  case $AR in
36873  [\\/]* | ?:[\\/]*)
36874  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36875  ;;
36876  *)
36877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36878for as_dir in $PATH
36879do
36880  IFS=$as_save_IFS
36881  test -z "$as_dir" && as_dir=.
36882    for ac_exec_ext in '' $ac_executable_extensions; do
36883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36884    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36886    break 2
36887  fi
36888done
36889  done
36890IFS=$as_save_IFS
36891
36892  ;;
36893esac
36894fi
36895AR=$ac_cv_path_AR
36896if test -n "$AR"; then
36897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36898$as_echo "$AR" >&6; }
36899else
36900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36901$as_echo "no" >&6; }
36902fi
36903
36904
36905          if test "x$AR" = x; then
36906            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36907          fi
36908        else
36909          # Otherwise we believe it is a complete path. Use it as it is.
36910          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36911$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36912          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36913$as_echo_n "checking for AR... " >&6; }
36914          if test ! -x "$tool_specified"; then
36915            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36916$as_echo "not found" >&6; }
36917            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36918          fi
36919          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36920$as_echo "$tool_specified" >&6; }
36921        fi
36922      fi
36923    fi
36924
36925  fi
36926
36927
36928  else
36929
36930
36931  # Publish this variable in the help.
36932
36933
36934  if [ -z "${AR+x}" ]; then
36935    # The variable is not set by user, try to locate tool using the code snippet
36936    if test -n "$ac_tool_prefix"; then
36937  for ac_prog in ar
36938  do
36939    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36940set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36942$as_echo_n "checking for $ac_word... " >&6; }
36943if ${ac_cv_prog_AR+:} false; then :
36944  $as_echo_n "(cached) " >&6
36945else
36946  if test -n "$AR"; then
36947  ac_cv_prog_AR="$AR" # Let the user override the test.
36948else
36949as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36950for as_dir in $PATH
36951do
36952  IFS=$as_save_IFS
36953  test -z "$as_dir" && as_dir=.
36954    for ac_exec_ext in '' $ac_executable_extensions; do
36955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36956    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36958    break 2
36959  fi
36960done
36961  done
36962IFS=$as_save_IFS
36963
36964fi
36965fi
36966AR=$ac_cv_prog_AR
36967if test -n "$AR"; then
36968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36969$as_echo "$AR" >&6; }
36970else
36971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36972$as_echo "no" >&6; }
36973fi
36974
36975
36976    test -n "$AR" && break
36977  done
36978fi
36979if test -z "$AR"; then
36980  ac_ct_AR=$AR
36981  for ac_prog in ar
36982do
36983  # Extract the first word of "$ac_prog", so it can be a program name with args.
36984set dummy $ac_prog; ac_word=$2
36985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36986$as_echo_n "checking for $ac_word... " >&6; }
36987if ${ac_cv_prog_ac_ct_AR+:} false; then :
36988  $as_echo_n "(cached) " >&6
36989else
36990  if test -n "$ac_ct_AR"; then
36991  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36992else
36993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36994for as_dir in $PATH
36995do
36996  IFS=$as_save_IFS
36997  test -z "$as_dir" && as_dir=.
36998    for ac_exec_ext in '' $ac_executable_extensions; do
36999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37000    ac_cv_prog_ac_ct_AR="$ac_prog"
37001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37002    break 2
37003  fi
37004done
37005  done
37006IFS=$as_save_IFS
37007
37008fi
37009fi
37010ac_ct_AR=$ac_cv_prog_ac_ct_AR
37011if test -n "$ac_ct_AR"; then
37012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37013$as_echo "$ac_ct_AR" >&6; }
37014else
37015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37016$as_echo "no" >&6; }
37017fi
37018
37019
37020  test -n "$ac_ct_AR" && break
37021done
37022
37023  if test "x$ac_ct_AR" = x; then
37024    AR=""
37025  else
37026    case $cross_compiling:$ac_tool_warned in
37027yes:)
37028{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37029$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37030ac_tool_warned=yes ;;
37031esac
37032    AR=$ac_ct_AR
37033  fi
37034fi
37035
37036  else
37037    # The variable is set, but is it from the command line or the environment?
37038
37039    # Try to remove the string !AR! from our list.
37040    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37041    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37042      # If it failed, the variable was not from the command line. Ignore it,
37043      # but warn the user (except for BASH, which is always set by the calling BASH).
37044      if test "xAR" != xBASH; then
37045        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37046$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37047      fi
37048      # Try to locate tool using the code snippet
37049      if test -n "$ac_tool_prefix"; then
37050  for ac_prog in ar
37051  do
37052    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37053set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37055$as_echo_n "checking for $ac_word... " >&6; }
37056if ${ac_cv_prog_AR+:} false; then :
37057  $as_echo_n "(cached) " >&6
37058else
37059  if test -n "$AR"; then
37060  ac_cv_prog_AR="$AR" # Let the user override the test.
37061else
37062as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37063for as_dir in $PATH
37064do
37065  IFS=$as_save_IFS
37066  test -z "$as_dir" && as_dir=.
37067    for ac_exec_ext in '' $ac_executable_extensions; do
37068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37069    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37071    break 2
37072  fi
37073done
37074  done
37075IFS=$as_save_IFS
37076
37077fi
37078fi
37079AR=$ac_cv_prog_AR
37080if test -n "$AR"; then
37081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37082$as_echo "$AR" >&6; }
37083else
37084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37085$as_echo "no" >&6; }
37086fi
37087
37088
37089    test -n "$AR" && break
37090  done
37091fi
37092if test -z "$AR"; then
37093  ac_ct_AR=$AR
37094  for ac_prog in ar
37095do
37096  # Extract the first word of "$ac_prog", so it can be a program name with args.
37097set dummy $ac_prog; ac_word=$2
37098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37099$as_echo_n "checking for $ac_word... " >&6; }
37100if ${ac_cv_prog_ac_ct_AR+:} false; then :
37101  $as_echo_n "(cached) " >&6
37102else
37103  if test -n "$ac_ct_AR"; then
37104  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37105else
37106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37107for as_dir in $PATH
37108do
37109  IFS=$as_save_IFS
37110  test -z "$as_dir" && as_dir=.
37111    for ac_exec_ext in '' $ac_executable_extensions; do
37112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37113    ac_cv_prog_ac_ct_AR="$ac_prog"
37114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37115    break 2
37116  fi
37117done
37118  done
37119IFS=$as_save_IFS
37120
37121fi
37122fi
37123ac_ct_AR=$ac_cv_prog_ac_ct_AR
37124if test -n "$ac_ct_AR"; then
37125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37126$as_echo "$ac_ct_AR" >&6; }
37127else
37128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37129$as_echo "no" >&6; }
37130fi
37131
37132
37133  test -n "$ac_ct_AR" && break
37134done
37135
37136  if test "x$ac_ct_AR" = x; then
37137    AR=""
37138  else
37139    case $cross_compiling:$ac_tool_warned in
37140yes:)
37141{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37142$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37143ac_tool_warned=yes ;;
37144esac
37145    AR=$ac_ct_AR
37146  fi
37147fi
37148
37149    else
37150      # If it succeeded, then it was overridden by the user. We will use it
37151      # for the tool.
37152
37153      # First remove it from the list of overridden variables, so we can test
37154      # for unknown variables in the end.
37155      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37156
37157      # Check if we try to supply an empty value
37158      if test "x$AR" = x; then
37159        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37160$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37161        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37162$as_echo_n "checking for AR... " >&6; }
37163        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37164$as_echo "disabled" >&6; }
37165      else
37166        # Check if the provided tool contains a complete path.
37167        tool_specified="$AR"
37168        tool_basename="${tool_specified##*/}"
37169        if test "x$tool_basename" = "x$tool_specified"; then
37170          # A command without a complete path is provided, search $PATH.
37171          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37172$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37173          # Extract the first word of "$tool_basename", so it can be a program name with args.
37174set dummy $tool_basename; ac_word=$2
37175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37176$as_echo_n "checking for $ac_word... " >&6; }
37177if ${ac_cv_path_AR+:} false; then :
37178  $as_echo_n "(cached) " >&6
37179else
37180  case $AR in
37181  [\\/]* | ?:[\\/]*)
37182  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37183  ;;
37184  *)
37185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37186for as_dir in $PATH
37187do
37188  IFS=$as_save_IFS
37189  test -z "$as_dir" && as_dir=.
37190    for ac_exec_ext in '' $ac_executable_extensions; do
37191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37192    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37194    break 2
37195  fi
37196done
37197  done
37198IFS=$as_save_IFS
37199
37200  ;;
37201esac
37202fi
37203AR=$ac_cv_path_AR
37204if test -n "$AR"; then
37205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37206$as_echo "$AR" >&6; }
37207else
37208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37209$as_echo "no" >&6; }
37210fi
37211
37212
37213          if test "x$AR" = x; then
37214            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37215          fi
37216        else
37217          # Otherwise we believe it is a complete path. Use it as it is.
37218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37219$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37220          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37221$as_echo_n "checking for AR... " >&6; }
37222          if test ! -x "$tool_specified"; then
37223            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37224$as_echo "not found" >&6; }
37225            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37226          fi
37227          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37228$as_echo "$tool_specified" >&6; }
37229        fi
37230      fi
37231    fi
37232
37233  fi
37234
37235
37236  fi
37237
37238  # Only process if variable expands to non-empty
37239
37240  if test "x$AR" != x; then
37241    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37242
37243  # First separate the path from the arguments. This will split at the first
37244  # space.
37245  complete="$AR"
37246  path="${complete%% *}"
37247  tmp="$complete EOL"
37248  arguments="${tmp#* }"
37249
37250  # Input might be given as Windows format, start by converting to
37251  # unix format.
37252  new_path=`$CYGPATH -u "$path"`
37253
37254  # Now try to locate executable using which
37255  new_path=`$WHICH "$new_path" 2> /dev/null`
37256  # bat and cmd files are not always considered executable in cygwin causing which
37257  # to not find them
37258  if test "x$new_path" = x \
37259      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37260      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37261    new_path=`$CYGPATH -u "$path"`
37262  fi
37263  if test "x$new_path" = x; then
37264    # Oops. Which didn't find the executable.
37265    # The splitting of arguments from the executable at a space might have been incorrect,
37266    # since paths with space are more likely in Windows. Give it another try with the whole
37267    # argument.
37268    path="$complete"
37269    arguments="EOL"
37270    new_path=`$CYGPATH -u "$path"`
37271    new_path=`$WHICH "$new_path" 2> /dev/null`
37272    # bat and cmd files are not always considered executable in cygwin causing which
37273    # to not find them
37274    if test "x$new_path" = x \
37275        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37276        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37277      new_path=`$CYGPATH -u "$path"`
37278    fi
37279    if test "x$new_path" = x; then
37280      # It's still not found. Now this is an unrecoverable error.
37281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37282$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37283      has_space=`$ECHO "$complete" | $GREP " "`
37284      if test "x$has_space" != x; then
37285        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37286$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37287      fi
37288      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37289    fi
37290  fi
37291
37292  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37293  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37294  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37295  # "foo.exe" is OK but "foo" is an error.
37296  #
37297  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37298  # It is also a way to make sure we got the proper file name for the real test later on.
37299  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37300  if test "x$test_shortpath" = x; then
37301    # Short path failed, file does not exist as specified.
37302    # Try adding .exe or .cmd
37303    if test -f "${new_path}.exe"; then
37304      input_to_shortpath="${new_path}.exe"
37305    elif test -f "${new_path}.cmd"; then
37306      input_to_shortpath="${new_path}.cmd"
37307    else
37308      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37309$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37310      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37311$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37312      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37313    fi
37314  else
37315    input_to_shortpath="$new_path"
37316  fi
37317
37318  # Call helper function which possibly converts this using DOS-style short mode.
37319  # If so, the updated path is stored in $new_path.
37320  new_path="$input_to_shortpath"
37321
37322  input_path="$input_to_shortpath"
37323  # Check if we need to convert this using DOS-style short mode. If the path
37324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37325  # take no chances and rewrite it.
37326  # Note: m4 eats our [], so we need to use [ and ] instead.
37327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37328  if test "x$has_forbidden_chars" != x; then
37329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37330    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37331    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37332    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37333      # Going to short mode and back again did indeed matter. Since short mode is
37334      # case insensitive, let's make it lowercase to improve readability.
37335      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37336      # Now convert it back to Unix-style (cygpath)
37337      input_path=`$CYGPATH -u "$shortmode_path"`
37338      new_path="$input_path"
37339    fi
37340  fi
37341
37342  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37343  if test "x$test_cygdrive_prefix" = x; then
37344    # As a simple fix, exclude /usr/bin since it's not a real path.
37345    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37346      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37347      # a path prefixed by /cygdrive for fixpath to work.
37348      new_path="$CYGWIN_ROOT_PATH$input_path"
37349    fi
37350  fi
37351
37352  # remove trailing .exe if any
37353  new_path="${new_path/%.exe/}"
37354
37355    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37356
37357  # First separate the path from the arguments. This will split at the first
37358  # space.
37359  complete="$AR"
37360  path="${complete%% *}"
37361  tmp="$complete EOL"
37362  arguments="${tmp#* }"
37363
37364  # Input might be given as Windows format, start by converting to
37365  # unix format.
37366  new_path="$path"
37367
37368  windows_path="$new_path"
37369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37370    unix_path=`$CYGPATH -u "$windows_path"`
37371    new_path="$unix_path"
37372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37374    new_path="$unix_path"
37375  fi
37376
37377
37378  # Now try to locate executable using which
37379  new_path=`$WHICH "$new_path" 2> /dev/null`
37380
37381  if test "x$new_path" = x; then
37382    # Oops. Which didn't find the executable.
37383    # The splitting of arguments from the executable at a space might have been incorrect,
37384    # since paths with space are more likely in Windows. Give it another try with the whole
37385    # argument.
37386    path="$complete"
37387    arguments="EOL"
37388    new_path="$path"
37389
37390  windows_path="$new_path"
37391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37392    unix_path=`$CYGPATH -u "$windows_path"`
37393    new_path="$unix_path"
37394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37396    new_path="$unix_path"
37397  fi
37398
37399
37400    new_path=`$WHICH "$new_path" 2> /dev/null`
37401    # bat and cmd files are not always considered executable in MSYS causing which
37402    # to not find them
37403    if test "x$new_path" = x \
37404        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37405        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37406      new_path="$path"
37407
37408  windows_path="$new_path"
37409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37410    unix_path=`$CYGPATH -u "$windows_path"`
37411    new_path="$unix_path"
37412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37414    new_path="$unix_path"
37415  fi
37416
37417    fi
37418
37419    if test "x$new_path" = x; then
37420      # It's still not found. Now this is an unrecoverable error.
37421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37422$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37423      has_space=`$ECHO "$complete" | $GREP " "`
37424      if test "x$has_space" != x; then
37425        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37426$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37427      fi
37428      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37429    fi
37430  fi
37431
37432  # Now new_path has a complete unix path to the binary
37433  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37434    # Keep paths in /bin as-is, but remove trailing .exe if any
37435    new_path="${new_path/%.exe/}"
37436    # Do not save /bin paths to all_fixpath_prefixes!
37437  else
37438    # Not in mixed or Windows style, start by that.
37439    new_path=`cmd //c echo $new_path`
37440
37441  input_path="$new_path"
37442  # Check if we need to convert this using DOS-style short mode. If the path
37443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37444  # take no chances and rewrite it.
37445  # Note: m4 eats our [], so we need to use [ and ] instead.
37446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37447  if test "x$has_forbidden_chars" != x; then
37448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37450  fi
37451
37452    # Output is in $new_path
37453
37454  windows_path="$new_path"
37455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37456    unix_path=`$CYGPATH -u "$windows_path"`
37457    new_path="$unix_path"
37458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37460    new_path="$unix_path"
37461  fi
37462
37463    # remove trailing .exe if any
37464    new_path="${new_path/%.exe/}"
37465
37466    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37467    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37468  fi
37469
37470    else
37471      # We're on a unix platform. Hooray! :)
37472      # First separate the path from the arguments. This will split at the first
37473      # space.
37474      complete="$AR"
37475      path="${complete%% *}"
37476      tmp="$complete EOL"
37477      arguments="${tmp#* }"
37478
37479      # Cannot rely on the command "which" here since it doesn't always work.
37480      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37481      if test -z "$is_absolute_path"; then
37482        # Path to executable is not absolute. Find it.
37483        IFS_save="$IFS"
37484        IFS=:
37485        for p in $PATH; do
37486          if test -f "$p/$path" && test -x "$p/$path"; then
37487            new_path="$p/$path"
37488            break
37489          fi
37490        done
37491        IFS="$IFS_save"
37492      else
37493        # This is an absolute path, we can use it without further modifications.
37494        new_path="$path"
37495      fi
37496
37497      if test "x$new_path" = x; then
37498        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37499$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37500        has_space=`$ECHO "$complete" | $GREP " "`
37501        if test "x$has_space" != x; then
37502          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37503$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37504        fi
37505        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37506      fi
37507    fi
37508
37509    # Now join together the path and the arguments once again
37510    if test "x$arguments" != xEOL; then
37511      new_complete="$new_path ${arguments% *}"
37512    else
37513      new_complete="$new_path"
37514    fi
37515
37516    if test "x$complete" != "x$new_complete"; then
37517      AR="$new_complete"
37518      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37519$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37520    fi
37521  fi
37522
37523
37524
37525  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37526
37527
37528  # Publish this variable in the help.
37529
37530
37531  if [ -z "${LIPO+x}" ]; then
37532    # The variable is not set by user, try to locate tool using the code snippet
37533    for ac_prog in lipo
37534do
37535  # Extract the first word of "$ac_prog", so it can be a program name with args.
37536set dummy $ac_prog; ac_word=$2
37537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37538$as_echo_n "checking for $ac_word... " >&6; }
37539if ${ac_cv_path_LIPO+:} false; then :
37540  $as_echo_n "(cached) " >&6
37541else
37542  case $LIPO in
37543  [\\/]* | ?:[\\/]*)
37544  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37545  ;;
37546  *)
37547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37548for as_dir in $PATH
37549do
37550  IFS=$as_save_IFS
37551  test -z "$as_dir" && as_dir=.
37552    for ac_exec_ext in '' $ac_executable_extensions; do
37553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37554    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37556    break 2
37557  fi
37558done
37559  done
37560IFS=$as_save_IFS
37561
37562  ;;
37563esac
37564fi
37565LIPO=$ac_cv_path_LIPO
37566if test -n "$LIPO"; then
37567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37568$as_echo "$LIPO" >&6; }
37569else
37570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37571$as_echo "no" >&6; }
37572fi
37573
37574
37575  test -n "$LIPO" && break
37576done
37577
37578  else
37579    # The variable is set, but is it from the command line or the environment?
37580
37581    # Try to remove the string !LIPO! from our list.
37582    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
37583    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37584      # If it failed, the variable was not from the command line. Ignore it,
37585      # but warn the user (except for BASH, which is always set by the calling BASH).
37586      if test "xLIPO" != xBASH; then
37587        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
37588$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
37589      fi
37590      # Try to locate tool using the code snippet
37591      for ac_prog in lipo
37592do
37593  # Extract the first word of "$ac_prog", so it can be a program name with args.
37594set dummy $ac_prog; ac_word=$2
37595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37596$as_echo_n "checking for $ac_word... " >&6; }
37597if ${ac_cv_path_LIPO+:} false; then :
37598  $as_echo_n "(cached) " >&6
37599else
37600  case $LIPO in
37601  [\\/]* | ?:[\\/]*)
37602  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37603  ;;
37604  *)
37605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37606for as_dir in $PATH
37607do
37608  IFS=$as_save_IFS
37609  test -z "$as_dir" && as_dir=.
37610    for ac_exec_ext in '' $ac_executable_extensions; do
37611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37612    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37614    break 2
37615  fi
37616done
37617  done
37618IFS=$as_save_IFS
37619
37620  ;;
37621esac
37622fi
37623LIPO=$ac_cv_path_LIPO
37624if test -n "$LIPO"; then
37625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37626$as_echo "$LIPO" >&6; }
37627else
37628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37629$as_echo "no" >&6; }
37630fi
37631
37632
37633  test -n "$LIPO" && break
37634done
37635
37636    else
37637      # If it succeeded, then it was overridden by the user. We will use it
37638      # for the tool.
37639
37640      # First remove it from the list of overridden variables, so we can test
37641      # for unknown variables in the end.
37642      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37643
37644      # Check if we try to supply an empty value
37645      if test "x$LIPO" = x; then
37646        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
37647$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
37648        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37649$as_echo_n "checking for LIPO... " >&6; }
37650        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37651$as_echo "disabled" >&6; }
37652      else
37653        # Check if the provided tool contains a complete path.
37654        tool_specified="$LIPO"
37655        tool_basename="${tool_specified##*/}"
37656        if test "x$tool_basename" = "x$tool_specified"; then
37657          # A command without a complete path is provided, search $PATH.
37658          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
37659$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
37660          # Extract the first word of "$tool_basename", so it can be a program name with args.
37661set dummy $tool_basename; ac_word=$2
37662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37663$as_echo_n "checking for $ac_word... " >&6; }
37664if ${ac_cv_path_LIPO+:} false; then :
37665  $as_echo_n "(cached) " >&6
37666else
37667  case $LIPO in
37668  [\\/]* | ?:[\\/]*)
37669  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37670  ;;
37671  *)
37672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37673for as_dir in $PATH
37674do
37675  IFS=$as_save_IFS
37676  test -z "$as_dir" && as_dir=.
37677    for ac_exec_ext in '' $ac_executable_extensions; do
37678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37679    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37681    break 2
37682  fi
37683done
37684  done
37685IFS=$as_save_IFS
37686
37687  ;;
37688esac
37689fi
37690LIPO=$ac_cv_path_LIPO
37691if test -n "$LIPO"; then
37692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37693$as_echo "$LIPO" >&6; }
37694else
37695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37696$as_echo "no" >&6; }
37697fi
37698
37699
37700          if test "x$LIPO" = x; then
37701            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37702          fi
37703        else
37704          # Otherwise we believe it is a complete path. Use it as it is.
37705          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
37706$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
37707          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37708$as_echo_n "checking for LIPO... " >&6; }
37709          if test ! -x "$tool_specified"; then
37710            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37711$as_echo "not found" >&6; }
37712            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
37713          fi
37714          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37715$as_echo "$tool_specified" >&6; }
37716        fi
37717      fi
37718    fi
37719
37720  fi
37721
37722
37723
37724  # Only process if variable expands to non-empty
37725
37726  if test "x$LIPO" != x; then
37727    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37728
37729  # First separate the path from the arguments. This will split at the first
37730  # space.
37731  complete="$LIPO"
37732  path="${complete%% *}"
37733  tmp="$complete EOL"
37734  arguments="${tmp#* }"
37735
37736  # Input might be given as Windows format, start by converting to
37737  # unix format.
37738  new_path=`$CYGPATH -u "$path"`
37739
37740  # Now try to locate executable using which
37741  new_path=`$WHICH "$new_path" 2> /dev/null`
37742  # bat and cmd files are not always considered executable in cygwin causing which
37743  # to not find them
37744  if test "x$new_path" = x \
37745      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37746      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37747    new_path=`$CYGPATH -u "$path"`
37748  fi
37749  if test "x$new_path" = x; then
37750    # Oops. Which didn't find the executable.
37751    # The splitting of arguments from the executable at a space might have been incorrect,
37752    # since paths with space are more likely in Windows. Give it another try with the whole
37753    # argument.
37754    path="$complete"
37755    arguments="EOL"
37756    new_path=`$CYGPATH -u "$path"`
37757    new_path=`$WHICH "$new_path" 2> /dev/null`
37758    # bat and cmd files are not always considered executable in cygwin causing which
37759    # to not find them
37760    if test "x$new_path" = x \
37761        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37762        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37763      new_path=`$CYGPATH -u "$path"`
37764    fi
37765    if test "x$new_path" = x; then
37766      # It's still not found. Now this is an unrecoverable error.
37767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37768$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37769      has_space=`$ECHO "$complete" | $GREP " "`
37770      if test "x$has_space" != x; then
37771        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37772$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37773      fi
37774      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37775    fi
37776  fi
37777
37778  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37779  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37780  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37781  # "foo.exe" is OK but "foo" is an error.
37782  #
37783  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37784  # It is also a way to make sure we got the proper file name for the real test later on.
37785  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37786  if test "x$test_shortpath" = x; then
37787    # Short path failed, file does not exist as specified.
37788    # Try adding .exe or .cmd
37789    if test -f "${new_path}.exe"; then
37790      input_to_shortpath="${new_path}.exe"
37791    elif test -f "${new_path}.cmd"; then
37792      input_to_shortpath="${new_path}.cmd"
37793    else
37794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
37795$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
37796      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37797$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37798      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37799    fi
37800  else
37801    input_to_shortpath="$new_path"
37802  fi
37803
37804  # Call helper function which possibly converts this using DOS-style short mode.
37805  # If so, the updated path is stored in $new_path.
37806  new_path="$input_to_shortpath"
37807
37808  input_path="$input_to_shortpath"
37809  # Check if we need to convert this using DOS-style short mode. If the path
37810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37811  # take no chances and rewrite it.
37812  # Note: m4 eats our [], so we need to use [ and ] instead.
37813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37814  if test "x$has_forbidden_chars" != x; then
37815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37819      # Going to short mode and back again did indeed matter. Since short mode is
37820      # case insensitive, let's make it lowercase to improve readability.
37821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37822      # Now convert it back to Unix-style (cygpath)
37823      input_path=`$CYGPATH -u "$shortmode_path"`
37824      new_path="$input_path"
37825    fi
37826  fi
37827
37828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37829  if test "x$test_cygdrive_prefix" = x; then
37830    # As a simple fix, exclude /usr/bin since it's not a real path.
37831    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37833      # a path prefixed by /cygdrive for fixpath to work.
37834      new_path="$CYGWIN_ROOT_PATH$input_path"
37835    fi
37836  fi
37837
37838  # remove trailing .exe if any
37839  new_path="${new_path/%.exe/}"
37840
37841    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37842
37843  # First separate the path from the arguments. This will split at the first
37844  # space.
37845  complete="$LIPO"
37846  path="${complete%% *}"
37847  tmp="$complete EOL"
37848  arguments="${tmp#* }"
37849
37850  # Input might be given as Windows format, start by converting to
37851  # unix format.
37852  new_path="$path"
37853
37854  windows_path="$new_path"
37855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37856    unix_path=`$CYGPATH -u "$windows_path"`
37857    new_path="$unix_path"
37858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37860    new_path="$unix_path"
37861  fi
37862
37863
37864  # Now try to locate executable using which
37865  new_path=`$WHICH "$new_path" 2> /dev/null`
37866
37867  if test "x$new_path" = x; then
37868    # Oops. Which didn't find the executable.
37869    # The splitting of arguments from the executable at a space might have been incorrect,
37870    # since paths with space are more likely in Windows. Give it another try with the whole
37871    # argument.
37872    path="$complete"
37873    arguments="EOL"
37874    new_path="$path"
37875
37876  windows_path="$new_path"
37877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37878    unix_path=`$CYGPATH -u "$windows_path"`
37879    new_path="$unix_path"
37880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37882    new_path="$unix_path"
37883  fi
37884
37885
37886    new_path=`$WHICH "$new_path" 2> /dev/null`
37887    # bat and cmd files are not always considered executable in MSYS causing which
37888    # to not find them
37889    if test "x$new_path" = x \
37890        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37891        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37892      new_path="$path"
37893
37894  windows_path="$new_path"
37895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37896    unix_path=`$CYGPATH -u "$windows_path"`
37897    new_path="$unix_path"
37898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37900    new_path="$unix_path"
37901  fi
37902
37903    fi
37904
37905    if test "x$new_path" = x; then
37906      # It's still not found. Now this is an unrecoverable error.
37907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37908$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37909      has_space=`$ECHO "$complete" | $GREP " "`
37910      if test "x$has_space" != x; then
37911        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37912$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37913      fi
37914      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37915    fi
37916  fi
37917
37918  # Now new_path has a complete unix path to the binary
37919  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37920    # Keep paths in /bin as-is, but remove trailing .exe if any
37921    new_path="${new_path/%.exe/}"
37922    # Do not save /bin paths to all_fixpath_prefixes!
37923  else
37924    # Not in mixed or Windows style, start by that.
37925    new_path=`cmd //c echo $new_path`
37926
37927  input_path="$new_path"
37928  # Check if we need to convert this using DOS-style short mode. If the path
37929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37930  # take no chances and rewrite it.
37931  # Note: m4 eats our [], so we need to use [ and ] instead.
37932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37933  if test "x$has_forbidden_chars" != x; then
37934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37935    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37936  fi
37937
37938    # Output is in $new_path
37939
37940  windows_path="$new_path"
37941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37942    unix_path=`$CYGPATH -u "$windows_path"`
37943    new_path="$unix_path"
37944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37946    new_path="$unix_path"
37947  fi
37948
37949    # remove trailing .exe if any
37950    new_path="${new_path/%.exe/}"
37951
37952    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37953    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37954  fi
37955
37956    else
37957      # We're on a unix platform. Hooray! :)
37958      # First separate the path from the arguments. This will split at the first
37959      # space.
37960      complete="$LIPO"
37961      path="${complete%% *}"
37962      tmp="$complete EOL"
37963      arguments="${tmp#* }"
37964
37965      # Cannot rely on the command "which" here since it doesn't always work.
37966      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37967      if test -z "$is_absolute_path"; then
37968        # Path to executable is not absolute. Find it.
37969        IFS_save="$IFS"
37970        IFS=:
37971        for p in $PATH; do
37972          if test -f "$p/$path" && test -x "$p/$path"; then
37973            new_path="$p/$path"
37974            break
37975          fi
37976        done
37977        IFS="$IFS_save"
37978      else
37979        # This is an absolute path, we can use it without further modifications.
37980        new_path="$path"
37981      fi
37982
37983      if test "x$new_path" = x; then
37984        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37985$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37986        has_space=`$ECHO "$complete" | $GREP " "`
37987        if test "x$has_space" != x; then
37988          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37989$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37990        fi
37991        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37992      fi
37993    fi
37994
37995    # Now join together the path and the arguments once again
37996    if test "x$arguments" != xEOL; then
37997      new_complete="$new_path ${arguments% *}"
37998    else
37999      new_complete="$new_path"
38000    fi
38001
38002    if test "x$complete" != "x$new_complete"; then
38003      LIPO="$new_complete"
38004      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38005$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38006    fi
38007  fi
38008
38009  fi
38010
38011  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38012    # Extract the first word of "mt", so it can be a program name with args.
38013set dummy mt; ac_word=$2
38014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38015$as_echo_n "checking for $ac_word... " >&6; }
38016if ${ac_cv_prog_MT+:} false; then :
38017  $as_echo_n "(cached) " >&6
38018else
38019  if test -n "$MT"; then
38020  ac_cv_prog_MT="$MT" # Let the user override the test.
38021else
38022  ac_prog_rejected=no
38023as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38024for as_dir in $PATH
38025do
38026  IFS=$as_save_IFS
38027  test -z "$as_dir" && as_dir=.
38028    for ac_exec_ext in '' $ac_executable_extensions; do
38029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38030    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38031       ac_prog_rejected=yes
38032       continue
38033     fi
38034    ac_cv_prog_MT="mt"
38035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38036    break 2
38037  fi
38038done
38039  done
38040IFS=$as_save_IFS
38041
38042if test $ac_prog_rejected = yes; then
38043  # We found a bogon in the path, so make sure we never use it.
38044  set dummy $ac_cv_prog_MT
38045  shift
38046  if test $# != 0; then
38047    # We chose a different compiler from the bogus one.
38048    # However, it has the same basename, so the bogon will be chosen
38049    # first if we set MT to just the basename; use the full file name.
38050    shift
38051    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38052  fi
38053fi
38054fi
38055fi
38056MT=$ac_cv_prog_MT
38057if test -n "$MT"; then
38058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38059$as_echo "$MT" >&6; }
38060else
38061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38062$as_echo "no" >&6; }
38063fi
38064
38065
38066
38067  # Only process if variable expands to non-empty
38068
38069  if test "x$MT" != x; then
38070    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38071
38072  # First separate the path from the arguments. This will split at the first
38073  # space.
38074  complete="$MT"
38075  path="${complete%% *}"
38076  tmp="$complete EOL"
38077  arguments="${tmp#* }"
38078
38079  # Input might be given as Windows format, start by converting to
38080  # unix format.
38081  new_path=`$CYGPATH -u "$path"`
38082
38083  # Now try to locate executable using which
38084  new_path=`$WHICH "$new_path" 2> /dev/null`
38085  # bat and cmd files are not always considered executable in cygwin causing which
38086  # to not find them
38087  if test "x$new_path" = x \
38088      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38089      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38090    new_path=`$CYGPATH -u "$path"`
38091  fi
38092  if test "x$new_path" = x; then
38093    # Oops. Which didn't find the executable.
38094    # The splitting of arguments from the executable at a space might have been incorrect,
38095    # since paths with space are more likely in Windows. Give it another try with the whole
38096    # argument.
38097    path="$complete"
38098    arguments="EOL"
38099    new_path=`$CYGPATH -u "$path"`
38100    new_path=`$WHICH "$new_path" 2> /dev/null`
38101    # bat and cmd files are not always considered executable in cygwin causing which
38102    # to not find them
38103    if test "x$new_path" = x \
38104        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38105        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38106      new_path=`$CYGPATH -u "$path"`
38107    fi
38108    if test "x$new_path" = x; then
38109      # It's still not found. Now this is an unrecoverable error.
38110      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38111$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38112      has_space=`$ECHO "$complete" | $GREP " "`
38113      if test "x$has_space" != x; then
38114        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38115$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38116      fi
38117      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38118    fi
38119  fi
38120
38121  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38122  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38123  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38124  # "foo.exe" is OK but "foo" is an error.
38125  #
38126  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38127  # It is also a way to make sure we got the proper file name for the real test later on.
38128  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38129  if test "x$test_shortpath" = x; then
38130    # Short path failed, file does not exist as specified.
38131    # Try adding .exe or .cmd
38132    if test -f "${new_path}.exe"; then
38133      input_to_shortpath="${new_path}.exe"
38134    elif test -f "${new_path}.cmd"; then
38135      input_to_shortpath="${new_path}.cmd"
38136    else
38137      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38138$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38139      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38140$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38141      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38142    fi
38143  else
38144    input_to_shortpath="$new_path"
38145  fi
38146
38147  # Call helper function which possibly converts this using DOS-style short mode.
38148  # If so, the updated path is stored in $new_path.
38149  new_path="$input_to_shortpath"
38150
38151  input_path="$input_to_shortpath"
38152  # Check if we need to convert this using DOS-style short mode. If the path
38153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38154  # take no chances and rewrite it.
38155  # Note: m4 eats our [], so we need to use [ and ] instead.
38156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38157  if test "x$has_forbidden_chars" != x; then
38158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38159    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38160    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38161    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38162      # Going to short mode and back again did indeed matter. Since short mode is
38163      # case insensitive, let's make it lowercase to improve readability.
38164      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38165      # Now convert it back to Unix-style (cygpath)
38166      input_path=`$CYGPATH -u "$shortmode_path"`
38167      new_path="$input_path"
38168    fi
38169  fi
38170
38171  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38172  if test "x$test_cygdrive_prefix" = x; then
38173    # As a simple fix, exclude /usr/bin since it's not a real path.
38174    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38175      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38176      # a path prefixed by /cygdrive for fixpath to work.
38177      new_path="$CYGWIN_ROOT_PATH$input_path"
38178    fi
38179  fi
38180
38181  # remove trailing .exe if any
38182  new_path="${new_path/%.exe/}"
38183
38184    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38185
38186  # First separate the path from the arguments. This will split at the first
38187  # space.
38188  complete="$MT"
38189  path="${complete%% *}"
38190  tmp="$complete EOL"
38191  arguments="${tmp#* }"
38192
38193  # Input might be given as Windows format, start by converting to
38194  # unix format.
38195  new_path="$path"
38196
38197  windows_path="$new_path"
38198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38199    unix_path=`$CYGPATH -u "$windows_path"`
38200    new_path="$unix_path"
38201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38203    new_path="$unix_path"
38204  fi
38205
38206
38207  # Now try to locate executable using which
38208  new_path=`$WHICH "$new_path" 2> /dev/null`
38209
38210  if test "x$new_path" = x; then
38211    # Oops. Which didn't find the executable.
38212    # The splitting of arguments from the executable at a space might have been incorrect,
38213    # since paths with space are more likely in Windows. Give it another try with the whole
38214    # argument.
38215    path="$complete"
38216    arguments="EOL"
38217    new_path="$path"
38218
38219  windows_path="$new_path"
38220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38221    unix_path=`$CYGPATH -u "$windows_path"`
38222    new_path="$unix_path"
38223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38225    new_path="$unix_path"
38226  fi
38227
38228
38229    new_path=`$WHICH "$new_path" 2> /dev/null`
38230    # bat and cmd files are not always considered executable in MSYS causing which
38231    # to not find them
38232    if test "x$new_path" = x \
38233        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38234        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38235      new_path="$path"
38236
38237  windows_path="$new_path"
38238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38239    unix_path=`$CYGPATH -u "$windows_path"`
38240    new_path="$unix_path"
38241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38243    new_path="$unix_path"
38244  fi
38245
38246    fi
38247
38248    if test "x$new_path" = x; then
38249      # It's still not found. Now this is an unrecoverable error.
38250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38251$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38252      has_space=`$ECHO "$complete" | $GREP " "`
38253      if test "x$has_space" != x; then
38254        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38255$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38256      fi
38257      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38258    fi
38259  fi
38260
38261  # Now new_path has a complete unix path to the binary
38262  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38263    # Keep paths in /bin as-is, but remove trailing .exe if any
38264    new_path="${new_path/%.exe/}"
38265    # Do not save /bin paths to all_fixpath_prefixes!
38266  else
38267    # Not in mixed or Windows style, start by that.
38268    new_path=`cmd //c echo $new_path`
38269
38270  input_path="$new_path"
38271  # Check if we need to convert this using DOS-style short mode. If the path
38272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38273  # take no chances and rewrite it.
38274  # Note: m4 eats our [], so we need to use [ and ] instead.
38275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38276  if test "x$has_forbidden_chars" != x; then
38277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38279  fi
38280
38281    # Output is in $new_path
38282
38283  windows_path="$new_path"
38284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38285    unix_path=`$CYGPATH -u "$windows_path"`
38286    new_path="$unix_path"
38287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38289    new_path="$unix_path"
38290  fi
38291
38292    # remove trailing .exe if any
38293    new_path="${new_path/%.exe/}"
38294
38295    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38296    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38297  fi
38298
38299    else
38300      # We're on a unix platform. Hooray! :)
38301      # First separate the path from the arguments. This will split at the first
38302      # space.
38303      complete="$MT"
38304      path="${complete%% *}"
38305      tmp="$complete EOL"
38306      arguments="${tmp#* }"
38307
38308      # Cannot rely on the command "which" here since it doesn't always work.
38309      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38310      if test -z "$is_absolute_path"; then
38311        # Path to executable is not absolute. Find it.
38312        IFS_save="$IFS"
38313        IFS=:
38314        for p in $PATH; do
38315          if test -f "$p/$path" && test -x "$p/$path"; then
38316            new_path="$p/$path"
38317            break
38318          fi
38319        done
38320        IFS="$IFS_save"
38321      else
38322        # This is an absolute path, we can use it without further modifications.
38323        new_path="$path"
38324      fi
38325
38326      if test "x$new_path" = x; then
38327        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38328$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38329        has_space=`$ECHO "$complete" | $GREP " "`
38330        if test "x$has_space" != x; then
38331          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38332$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38333        fi
38334        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38335      fi
38336    fi
38337
38338    # Now join together the path and the arguments once again
38339    if test "x$arguments" != xEOL; then
38340      new_complete="$new_path ${arguments% *}"
38341    else
38342      new_complete="$new_path"
38343    fi
38344
38345    if test "x$complete" != "x$new_complete"; then
38346      MT="$new_complete"
38347      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38348$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38349    fi
38350  fi
38351
38352    # Setup the resource compiler (RC)
38353    # Extract the first word of "rc", so it can be a program name with args.
38354set dummy rc; ac_word=$2
38355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38356$as_echo_n "checking for $ac_word... " >&6; }
38357if ${ac_cv_prog_RC+:} false; then :
38358  $as_echo_n "(cached) " >&6
38359else
38360  if test -n "$RC"; then
38361  ac_cv_prog_RC="$RC" # Let the user override the test.
38362else
38363  ac_prog_rejected=no
38364as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38365for as_dir in $PATH
38366do
38367  IFS=$as_save_IFS
38368  test -z "$as_dir" && as_dir=.
38369    for ac_exec_ext in '' $ac_executable_extensions; do
38370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38371    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38372       ac_prog_rejected=yes
38373       continue
38374     fi
38375    ac_cv_prog_RC="rc"
38376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38377    break 2
38378  fi
38379done
38380  done
38381IFS=$as_save_IFS
38382
38383if test $ac_prog_rejected = yes; then
38384  # We found a bogon in the path, so make sure we never use it.
38385  set dummy $ac_cv_prog_RC
38386  shift
38387  if test $# != 0; then
38388    # We chose a different compiler from the bogus one.
38389    # However, it has the same basename, so the bogon will be chosen
38390    # first if we set RC to just the basename; use the full file name.
38391    shift
38392    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38393  fi
38394fi
38395fi
38396fi
38397RC=$ac_cv_prog_RC
38398if test -n "$RC"; then
38399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38400$as_echo "$RC" >&6; }
38401else
38402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38403$as_echo "no" >&6; }
38404fi
38405
38406
38407
38408  # Only process if variable expands to non-empty
38409
38410  if test "x$RC" != x; then
38411    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38412
38413  # First separate the path from the arguments. This will split at the first
38414  # space.
38415  complete="$RC"
38416  path="${complete%% *}"
38417  tmp="$complete EOL"
38418  arguments="${tmp#* }"
38419
38420  # Input might be given as Windows format, start by converting to
38421  # unix format.
38422  new_path=`$CYGPATH -u "$path"`
38423
38424  # Now try to locate executable using which
38425  new_path=`$WHICH "$new_path" 2> /dev/null`
38426  # bat and cmd files are not always considered executable in cygwin causing which
38427  # to not find them
38428  if test "x$new_path" = x \
38429      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38430      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38431    new_path=`$CYGPATH -u "$path"`
38432  fi
38433  if test "x$new_path" = x; then
38434    # Oops. Which didn't find the executable.
38435    # The splitting of arguments from the executable at a space might have been incorrect,
38436    # since paths with space are more likely in Windows. Give it another try with the whole
38437    # argument.
38438    path="$complete"
38439    arguments="EOL"
38440    new_path=`$CYGPATH -u "$path"`
38441    new_path=`$WHICH "$new_path" 2> /dev/null`
38442    # bat and cmd files are not always considered executable in cygwin causing which
38443    # to not find them
38444    if test "x$new_path" = x \
38445        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38446        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38447      new_path=`$CYGPATH -u "$path"`
38448    fi
38449    if test "x$new_path" = x; then
38450      # It's still not found. Now this is an unrecoverable error.
38451      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38452$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38453      has_space=`$ECHO "$complete" | $GREP " "`
38454      if test "x$has_space" != x; then
38455        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38456$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38457      fi
38458      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38459    fi
38460  fi
38461
38462  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38463  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38464  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38465  # "foo.exe" is OK but "foo" is an error.
38466  #
38467  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38468  # It is also a way to make sure we got the proper file name for the real test later on.
38469  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38470  if test "x$test_shortpath" = x; then
38471    # Short path failed, file does not exist as specified.
38472    # Try adding .exe or .cmd
38473    if test -f "${new_path}.exe"; then
38474      input_to_shortpath="${new_path}.exe"
38475    elif test -f "${new_path}.cmd"; then
38476      input_to_shortpath="${new_path}.cmd"
38477    else
38478      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38479$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38480      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38481$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38482      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38483    fi
38484  else
38485    input_to_shortpath="$new_path"
38486  fi
38487
38488  # Call helper function which possibly converts this using DOS-style short mode.
38489  # If so, the updated path is stored in $new_path.
38490  new_path="$input_to_shortpath"
38491
38492  input_path="$input_to_shortpath"
38493  # Check if we need to convert this using DOS-style short mode. If the path
38494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38495  # take no chances and rewrite it.
38496  # Note: m4 eats our [], so we need to use [ and ] instead.
38497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38498  if test "x$has_forbidden_chars" != x; then
38499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38500    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38501    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38502    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38503      # Going to short mode and back again did indeed matter. Since short mode is
38504      # case insensitive, let's make it lowercase to improve readability.
38505      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38506      # Now convert it back to Unix-style (cygpath)
38507      input_path=`$CYGPATH -u "$shortmode_path"`
38508      new_path="$input_path"
38509    fi
38510  fi
38511
38512  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38513  if test "x$test_cygdrive_prefix" = x; then
38514    # As a simple fix, exclude /usr/bin since it's not a real path.
38515    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38516      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38517      # a path prefixed by /cygdrive for fixpath to work.
38518      new_path="$CYGWIN_ROOT_PATH$input_path"
38519    fi
38520  fi
38521
38522  # remove trailing .exe if any
38523  new_path="${new_path/%.exe/}"
38524
38525    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38526
38527  # First separate the path from the arguments. This will split at the first
38528  # space.
38529  complete="$RC"
38530  path="${complete%% *}"
38531  tmp="$complete EOL"
38532  arguments="${tmp#* }"
38533
38534  # Input might be given as Windows format, start by converting to
38535  # unix format.
38536  new_path="$path"
38537
38538  windows_path="$new_path"
38539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38540    unix_path=`$CYGPATH -u "$windows_path"`
38541    new_path="$unix_path"
38542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38544    new_path="$unix_path"
38545  fi
38546
38547
38548  # Now try to locate executable using which
38549  new_path=`$WHICH "$new_path" 2> /dev/null`
38550
38551  if test "x$new_path" = x; then
38552    # Oops. Which didn't find the executable.
38553    # The splitting of arguments from the executable at a space might have been incorrect,
38554    # since paths with space are more likely in Windows. Give it another try with the whole
38555    # argument.
38556    path="$complete"
38557    arguments="EOL"
38558    new_path="$path"
38559
38560  windows_path="$new_path"
38561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38562    unix_path=`$CYGPATH -u "$windows_path"`
38563    new_path="$unix_path"
38564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38566    new_path="$unix_path"
38567  fi
38568
38569
38570    new_path=`$WHICH "$new_path" 2> /dev/null`
38571    # bat and cmd files are not always considered executable in MSYS causing which
38572    # to not find them
38573    if test "x$new_path" = x \
38574        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38575        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38576      new_path="$path"
38577
38578  windows_path="$new_path"
38579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38580    unix_path=`$CYGPATH -u "$windows_path"`
38581    new_path="$unix_path"
38582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38584    new_path="$unix_path"
38585  fi
38586
38587    fi
38588
38589    if test "x$new_path" = x; then
38590      # It's still not found. Now this is an unrecoverable error.
38591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38592$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38593      has_space=`$ECHO "$complete" | $GREP " "`
38594      if test "x$has_space" != x; then
38595        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38596$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38597      fi
38598      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38599    fi
38600  fi
38601
38602  # Now new_path has a complete unix path to the binary
38603  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38604    # Keep paths in /bin as-is, but remove trailing .exe if any
38605    new_path="${new_path/%.exe/}"
38606    # Do not save /bin paths to all_fixpath_prefixes!
38607  else
38608    # Not in mixed or Windows style, start by that.
38609    new_path=`cmd //c echo $new_path`
38610
38611  input_path="$new_path"
38612  # Check if we need to convert this using DOS-style short mode. If the path
38613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38614  # take no chances and rewrite it.
38615  # Note: m4 eats our [], so we need to use [ and ] instead.
38616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38617  if test "x$has_forbidden_chars" != x; then
38618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38620  fi
38621
38622    # Output is in $new_path
38623
38624  windows_path="$new_path"
38625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38626    unix_path=`$CYGPATH -u "$windows_path"`
38627    new_path="$unix_path"
38628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38630    new_path="$unix_path"
38631  fi
38632
38633    # remove trailing .exe if any
38634    new_path="${new_path/%.exe/}"
38635
38636    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38637    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38638  fi
38639
38640    else
38641      # We're on a unix platform. Hooray! :)
38642      # First separate the path from the arguments. This will split at the first
38643      # space.
38644      complete="$RC"
38645      path="${complete%% *}"
38646      tmp="$complete EOL"
38647      arguments="${tmp#* }"
38648
38649      # Cannot rely on the command "which" here since it doesn't always work.
38650      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38651      if test -z "$is_absolute_path"; then
38652        # Path to executable is not absolute. Find it.
38653        IFS_save="$IFS"
38654        IFS=:
38655        for p in $PATH; do
38656          if test -f "$p/$path" && test -x "$p/$path"; then
38657            new_path="$p/$path"
38658            break
38659          fi
38660        done
38661        IFS="$IFS_save"
38662      else
38663        # This is an absolute path, we can use it without further modifications.
38664        new_path="$path"
38665      fi
38666
38667      if test "x$new_path" = x; then
38668        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38669$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38670        has_space=`$ECHO "$complete" | $GREP " "`
38671        if test "x$has_space" != x; then
38672          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38673$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38674        fi
38675        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38676      fi
38677    fi
38678
38679    # Now join together the path and the arguments once again
38680    if test "x$arguments" != xEOL; then
38681      new_complete="$new_path ${arguments% *}"
38682    else
38683      new_complete="$new_path"
38684    fi
38685
38686    if test "x$complete" != "x$new_complete"; then
38687      RC="$new_complete"
38688      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
38689$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
38690    fi
38691  fi
38692
38693    # Extract the first word of "dumpbin", so it can be a program name with args.
38694set dummy dumpbin; ac_word=$2
38695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38696$as_echo_n "checking for $ac_word... " >&6; }
38697if ${ac_cv_prog_DUMPBIN+:} false; then :
38698  $as_echo_n "(cached) " >&6
38699else
38700  if test -n "$DUMPBIN"; then
38701  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
38702else
38703as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38704for as_dir in $PATH
38705do
38706  IFS=$as_save_IFS
38707  test -z "$as_dir" && as_dir=.
38708    for ac_exec_ext in '' $ac_executable_extensions; do
38709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38710    ac_cv_prog_DUMPBIN="dumpbin"
38711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38712    break 2
38713  fi
38714done
38715  done
38716IFS=$as_save_IFS
38717
38718fi
38719fi
38720DUMPBIN=$ac_cv_prog_DUMPBIN
38721if test -n "$DUMPBIN"; then
38722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
38723$as_echo "$DUMPBIN" >&6; }
38724else
38725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38726$as_echo "no" >&6; }
38727fi
38728
38729
38730
38731  # Only process if variable expands to non-empty
38732
38733  if test "x$DUMPBIN" != x; then
38734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38735
38736  # First separate the path from the arguments. This will split at the first
38737  # space.
38738  complete="$DUMPBIN"
38739  path="${complete%% *}"
38740  tmp="$complete EOL"
38741  arguments="${tmp#* }"
38742
38743  # Input might be given as Windows format, start by converting to
38744  # unix format.
38745  new_path=`$CYGPATH -u "$path"`
38746
38747  # Now try to locate executable using which
38748  new_path=`$WHICH "$new_path" 2> /dev/null`
38749  # bat and cmd files are not always considered executable in cygwin causing which
38750  # to not find them
38751  if test "x$new_path" = x \
38752      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38753      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38754    new_path=`$CYGPATH -u "$path"`
38755  fi
38756  if test "x$new_path" = x; then
38757    # Oops. Which didn't find the executable.
38758    # The splitting of arguments from the executable at a space might have been incorrect,
38759    # since paths with space are more likely in Windows. Give it another try with the whole
38760    # argument.
38761    path="$complete"
38762    arguments="EOL"
38763    new_path=`$CYGPATH -u "$path"`
38764    new_path=`$WHICH "$new_path" 2> /dev/null`
38765    # bat and cmd files are not always considered executable in cygwin causing which
38766    # to not find them
38767    if test "x$new_path" = x \
38768        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38769        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38770      new_path=`$CYGPATH -u "$path"`
38771    fi
38772    if test "x$new_path" = x; then
38773      # It's still not found. Now this is an unrecoverable error.
38774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38775$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38776      has_space=`$ECHO "$complete" | $GREP " "`
38777      if test "x$has_space" != x; then
38778        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38779$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38780      fi
38781      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38782    fi
38783  fi
38784
38785  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38786  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38787  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38788  # "foo.exe" is OK but "foo" is an error.
38789  #
38790  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38791  # It is also a way to make sure we got the proper file name for the real test later on.
38792  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38793  if test "x$test_shortpath" = x; then
38794    # Short path failed, file does not exist as specified.
38795    # Try adding .exe or .cmd
38796    if test -f "${new_path}.exe"; then
38797      input_to_shortpath="${new_path}.exe"
38798    elif test -f "${new_path}.cmd"; then
38799      input_to_shortpath="${new_path}.cmd"
38800    else
38801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
38802$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
38803      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38804$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38805      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38806    fi
38807  else
38808    input_to_shortpath="$new_path"
38809  fi
38810
38811  # Call helper function which possibly converts this using DOS-style short mode.
38812  # If so, the updated path is stored in $new_path.
38813  new_path="$input_to_shortpath"
38814
38815  input_path="$input_to_shortpath"
38816  # Check if we need to convert this using DOS-style short mode. If the path
38817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38818  # take no chances and rewrite it.
38819  # Note: m4 eats our [], so we need to use [ and ] instead.
38820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38821  if test "x$has_forbidden_chars" != x; then
38822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38826      # Going to short mode and back again did indeed matter. Since short mode is
38827      # case insensitive, let's make it lowercase to improve readability.
38828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38829      # Now convert it back to Unix-style (cygpath)
38830      input_path=`$CYGPATH -u "$shortmode_path"`
38831      new_path="$input_path"
38832    fi
38833  fi
38834
38835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38836  if test "x$test_cygdrive_prefix" = x; then
38837    # As a simple fix, exclude /usr/bin since it's not a real path.
38838    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38840      # a path prefixed by /cygdrive for fixpath to work.
38841      new_path="$CYGWIN_ROOT_PATH$input_path"
38842    fi
38843  fi
38844
38845  # remove trailing .exe if any
38846  new_path="${new_path/%.exe/}"
38847
38848    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38849
38850  # First separate the path from the arguments. This will split at the first
38851  # space.
38852  complete="$DUMPBIN"
38853  path="${complete%% *}"
38854  tmp="$complete EOL"
38855  arguments="${tmp#* }"
38856
38857  # Input might be given as Windows format, start by converting to
38858  # unix format.
38859  new_path="$path"
38860
38861  windows_path="$new_path"
38862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38863    unix_path=`$CYGPATH -u "$windows_path"`
38864    new_path="$unix_path"
38865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38867    new_path="$unix_path"
38868  fi
38869
38870
38871  # Now try to locate executable using which
38872  new_path=`$WHICH "$new_path" 2> /dev/null`
38873
38874  if test "x$new_path" = x; then
38875    # Oops. Which didn't find the executable.
38876    # The splitting of arguments from the executable at a space might have been incorrect,
38877    # since paths with space are more likely in Windows. Give it another try with the whole
38878    # argument.
38879    path="$complete"
38880    arguments="EOL"
38881    new_path="$path"
38882
38883  windows_path="$new_path"
38884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38885    unix_path=`$CYGPATH -u "$windows_path"`
38886    new_path="$unix_path"
38887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38889    new_path="$unix_path"
38890  fi
38891
38892
38893    new_path=`$WHICH "$new_path" 2> /dev/null`
38894    # bat and cmd files are not always considered executable in MSYS causing which
38895    # to not find them
38896    if test "x$new_path" = x \
38897        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38898        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38899      new_path="$path"
38900
38901  windows_path="$new_path"
38902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38903    unix_path=`$CYGPATH -u "$windows_path"`
38904    new_path="$unix_path"
38905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38907    new_path="$unix_path"
38908  fi
38909
38910    fi
38911
38912    if test "x$new_path" = x; then
38913      # It's still not found. Now this is an unrecoverable error.
38914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38915$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38916      has_space=`$ECHO "$complete" | $GREP " "`
38917      if test "x$has_space" != x; then
38918        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38919$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38920      fi
38921      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38922    fi
38923  fi
38924
38925  # Now new_path has a complete unix path to the binary
38926  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38927    # Keep paths in /bin as-is, but remove trailing .exe if any
38928    new_path="${new_path/%.exe/}"
38929    # Do not save /bin paths to all_fixpath_prefixes!
38930  else
38931    # Not in mixed or Windows style, start by that.
38932    new_path=`cmd //c echo $new_path`
38933
38934  input_path="$new_path"
38935  # Check if we need to convert this using DOS-style short mode. If the path
38936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38937  # take no chances and rewrite it.
38938  # Note: m4 eats our [], so we need to use [ and ] instead.
38939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38940  if test "x$has_forbidden_chars" != x; then
38941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38943  fi
38944
38945    # Output is in $new_path
38946
38947  windows_path="$new_path"
38948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38949    unix_path=`$CYGPATH -u "$windows_path"`
38950    new_path="$unix_path"
38951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38953    new_path="$unix_path"
38954  fi
38955
38956    # remove trailing .exe if any
38957    new_path="${new_path/%.exe/}"
38958
38959    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38960    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38961  fi
38962
38963    else
38964      # We're on a unix platform. Hooray! :)
38965      # First separate the path from the arguments. This will split at the first
38966      # space.
38967      complete="$DUMPBIN"
38968      path="${complete%% *}"
38969      tmp="$complete EOL"
38970      arguments="${tmp#* }"
38971
38972      # Cannot rely on the command "which" here since it doesn't always work.
38973      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38974      if test -z "$is_absolute_path"; then
38975        # Path to executable is not absolute. Find it.
38976        IFS_save="$IFS"
38977        IFS=:
38978        for p in $PATH; do
38979          if test -f "$p/$path" && test -x "$p/$path"; then
38980            new_path="$p/$path"
38981            break
38982          fi
38983        done
38984        IFS="$IFS_save"
38985      else
38986        # This is an absolute path, we can use it without further modifications.
38987        new_path="$path"
38988      fi
38989
38990      if test "x$new_path" = x; then
38991        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38992$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38993        has_space=`$ECHO "$complete" | $GREP " "`
38994        if test "x$has_space" != x; then
38995          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38996$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38997        fi
38998        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38999      fi
39000    fi
39001
39002    # Now join together the path and the arguments once again
39003    if test "x$arguments" != xEOL; then
39004      new_complete="$new_path ${arguments% *}"
39005    else
39006      new_complete="$new_path"
39007    fi
39008
39009    if test "x$complete" != "x$new_complete"; then
39010      DUMPBIN="$new_complete"
39011      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39012$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39013    fi
39014  fi
39015
39016    # We need to check for 'msbuild.exe' because at the place where we expect to
39017    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39018    # won't find the 'msbuild.exe' executable in that case (and the
39019    # 'ac_executable_extensions' is unusable due to performance reasons).
39020    # Notice that we intentionally don't fix up the path to MSBUILD because we
39021    # will call it in a DOS shell during freetype detection on Windows (see
39022    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39023    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39024set dummy msbuild.exe; ac_word=$2
39025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39026$as_echo_n "checking for $ac_word... " >&6; }
39027if ${ac_cv_prog_MSBUILD+:} false; then :
39028  $as_echo_n "(cached) " >&6
39029else
39030  if test -n "$MSBUILD"; then
39031  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39032else
39033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39034for as_dir in $PATH
39035do
39036  IFS=$as_save_IFS
39037  test -z "$as_dir" && as_dir=.
39038    for ac_exec_ext in '' $ac_executable_extensions; do
39039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39040    ac_cv_prog_MSBUILD="msbuild.exe"
39041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39042    break 2
39043  fi
39044done
39045  done
39046IFS=$as_save_IFS
39047
39048fi
39049fi
39050MSBUILD=$ac_cv_prog_MSBUILD
39051if test -n "$MSBUILD"; then
39052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39053$as_echo "$MSBUILD" >&6; }
39054else
39055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39056$as_echo "no" >&6; }
39057fi
39058
39059
39060  fi
39061
39062  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39063
39064
39065  # Publish this variable in the help.
39066
39067
39068  if [ -z "${STRIP+x}" ]; then
39069    # The variable is not set by user, try to locate tool using the code snippet
39070    for ac_prog in strip
39071do
39072  # Extract the first word of "$ac_prog", so it can be a program name with args.
39073set dummy $ac_prog; ac_word=$2
39074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39075$as_echo_n "checking for $ac_word... " >&6; }
39076if ${ac_cv_path_STRIP+:} false; then :
39077  $as_echo_n "(cached) " >&6
39078else
39079  case $STRIP in
39080  [\\/]* | ?:[\\/]*)
39081  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39082  ;;
39083  *)
39084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39085for as_dir in $PATH
39086do
39087  IFS=$as_save_IFS
39088  test -z "$as_dir" && as_dir=.
39089    for ac_exec_ext in '' $ac_executable_extensions; do
39090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39091    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39093    break 2
39094  fi
39095done
39096  done
39097IFS=$as_save_IFS
39098
39099  ;;
39100esac
39101fi
39102STRIP=$ac_cv_path_STRIP
39103if test -n "$STRIP"; then
39104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39105$as_echo "$STRIP" >&6; }
39106else
39107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39108$as_echo "no" >&6; }
39109fi
39110
39111
39112  test -n "$STRIP" && break
39113done
39114
39115  else
39116    # The variable is set, but is it from the command line or the environment?
39117
39118    # Try to remove the string !STRIP! from our list.
39119    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39120    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39121      # If it failed, the variable was not from the command line. Ignore it,
39122      # but warn the user (except for BASH, which is always set by the calling BASH).
39123      if test "xSTRIP" != xBASH; then
39124        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39125$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39126      fi
39127      # Try to locate tool using the code snippet
39128      for ac_prog in strip
39129do
39130  # Extract the first word of "$ac_prog", so it can be a program name with args.
39131set dummy $ac_prog; ac_word=$2
39132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39133$as_echo_n "checking for $ac_word... " >&6; }
39134if ${ac_cv_path_STRIP+:} false; then :
39135  $as_echo_n "(cached) " >&6
39136else
39137  case $STRIP in
39138  [\\/]* | ?:[\\/]*)
39139  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39140  ;;
39141  *)
39142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39143for as_dir in $PATH
39144do
39145  IFS=$as_save_IFS
39146  test -z "$as_dir" && as_dir=.
39147    for ac_exec_ext in '' $ac_executable_extensions; do
39148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39149    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39151    break 2
39152  fi
39153done
39154  done
39155IFS=$as_save_IFS
39156
39157  ;;
39158esac
39159fi
39160STRIP=$ac_cv_path_STRIP
39161if test -n "$STRIP"; then
39162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39163$as_echo "$STRIP" >&6; }
39164else
39165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39166$as_echo "no" >&6; }
39167fi
39168
39169
39170  test -n "$STRIP" && break
39171done
39172
39173    else
39174      # If it succeeded, then it was overridden by the user. We will use it
39175      # for the tool.
39176
39177      # First remove it from the list of overridden variables, so we can test
39178      # for unknown variables in the end.
39179      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39180
39181      # Check if we try to supply an empty value
39182      if test "x$STRIP" = x; then
39183        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39184$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39185        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39186$as_echo_n "checking for STRIP... " >&6; }
39187        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39188$as_echo "disabled" >&6; }
39189      else
39190        # Check if the provided tool contains a complete path.
39191        tool_specified="$STRIP"
39192        tool_basename="${tool_specified##*/}"
39193        if test "x$tool_basename" = "x$tool_specified"; then
39194          # A command without a complete path is provided, search $PATH.
39195          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39196$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39197          # Extract the first word of "$tool_basename", so it can be a program name with args.
39198set dummy $tool_basename; ac_word=$2
39199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39200$as_echo_n "checking for $ac_word... " >&6; }
39201if ${ac_cv_path_STRIP+:} false; then :
39202  $as_echo_n "(cached) " >&6
39203else
39204  case $STRIP in
39205  [\\/]* | ?:[\\/]*)
39206  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39207  ;;
39208  *)
39209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39210for as_dir in $PATH
39211do
39212  IFS=$as_save_IFS
39213  test -z "$as_dir" && as_dir=.
39214    for ac_exec_ext in '' $ac_executable_extensions; do
39215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39216    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39218    break 2
39219  fi
39220done
39221  done
39222IFS=$as_save_IFS
39223
39224  ;;
39225esac
39226fi
39227STRIP=$ac_cv_path_STRIP
39228if test -n "$STRIP"; then
39229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39230$as_echo "$STRIP" >&6; }
39231else
39232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39233$as_echo "no" >&6; }
39234fi
39235
39236
39237          if test "x$STRIP" = x; then
39238            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39239          fi
39240        else
39241          # Otherwise we believe it is a complete path. Use it as it is.
39242          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39243$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39244          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39245$as_echo_n "checking for STRIP... " >&6; }
39246          if test ! -x "$tool_specified"; then
39247            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39248$as_echo "not found" >&6; }
39249            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39250          fi
39251          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39252$as_echo "$tool_specified" >&6; }
39253        fi
39254      fi
39255    fi
39256
39257  fi
39258
39259
39260
39261  # Only process if variable expands to non-empty
39262
39263  if test "x$STRIP" != x; then
39264    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39265
39266  # First separate the path from the arguments. This will split at the first
39267  # space.
39268  complete="$STRIP"
39269  path="${complete%% *}"
39270  tmp="$complete EOL"
39271  arguments="${tmp#* }"
39272
39273  # Input might be given as Windows format, start by converting to
39274  # unix format.
39275  new_path=`$CYGPATH -u "$path"`
39276
39277  # Now try to locate executable using which
39278  new_path=`$WHICH "$new_path" 2> /dev/null`
39279  # bat and cmd files are not always considered executable in cygwin causing which
39280  # to not find them
39281  if test "x$new_path" = x \
39282      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39283      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39284    new_path=`$CYGPATH -u "$path"`
39285  fi
39286  if test "x$new_path" = x; then
39287    # Oops. Which didn't find the executable.
39288    # The splitting of arguments from the executable at a space might have been incorrect,
39289    # since paths with space are more likely in Windows. Give it another try with the whole
39290    # argument.
39291    path="$complete"
39292    arguments="EOL"
39293    new_path=`$CYGPATH -u "$path"`
39294    new_path=`$WHICH "$new_path" 2> /dev/null`
39295    # bat and cmd files are not always considered executable in cygwin causing which
39296    # to not find them
39297    if test "x$new_path" = x \
39298        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39299        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39300      new_path=`$CYGPATH -u "$path"`
39301    fi
39302    if test "x$new_path" = x; then
39303      # It's still not found. Now this is an unrecoverable error.
39304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39305$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39306      has_space=`$ECHO "$complete" | $GREP " "`
39307      if test "x$has_space" != x; then
39308        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39309$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39310      fi
39311      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39312    fi
39313  fi
39314
39315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39318  # "foo.exe" is OK but "foo" is an error.
39319  #
39320  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39321  # It is also a way to make sure we got the proper file name for the real test later on.
39322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39323  if test "x$test_shortpath" = x; then
39324    # Short path failed, file does not exist as specified.
39325    # Try adding .exe or .cmd
39326    if test -f "${new_path}.exe"; then
39327      input_to_shortpath="${new_path}.exe"
39328    elif test -f "${new_path}.cmd"; then
39329      input_to_shortpath="${new_path}.cmd"
39330    else
39331      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39332$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39333      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39334$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39335      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39336    fi
39337  else
39338    input_to_shortpath="$new_path"
39339  fi
39340
39341  # Call helper function which possibly converts this using DOS-style short mode.
39342  # If so, the updated path is stored in $new_path.
39343  new_path="$input_to_shortpath"
39344
39345  input_path="$input_to_shortpath"
39346  # Check if we need to convert this using DOS-style short mode. If the path
39347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39348  # take no chances and rewrite it.
39349  # Note: m4 eats our [], so we need to use [ and ] instead.
39350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39351  if test "x$has_forbidden_chars" != x; then
39352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39353    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39354    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39355    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39356      # Going to short mode and back again did indeed matter. Since short mode is
39357      # case insensitive, let's make it lowercase to improve readability.
39358      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39359      # Now convert it back to Unix-style (cygpath)
39360      input_path=`$CYGPATH -u "$shortmode_path"`
39361      new_path="$input_path"
39362    fi
39363  fi
39364
39365  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39366  if test "x$test_cygdrive_prefix" = x; then
39367    # As a simple fix, exclude /usr/bin since it's not a real path.
39368    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39369      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39370      # a path prefixed by /cygdrive for fixpath to work.
39371      new_path="$CYGWIN_ROOT_PATH$input_path"
39372    fi
39373  fi
39374
39375  # remove trailing .exe if any
39376  new_path="${new_path/%.exe/}"
39377
39378    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39379
39380  # First separate the path from the arguments. This will split at the first
39381  # space.
39382  complete="$STRIP"
39383  path="${complete%% *}"
39384  tmp="$complete EOL"
39385  arguments="${tmp#* }"
39386
39387  # Input might be given as Windows format, start by converting to
39388  # unix format.
39389  new_path="$path"
39390
39391  windows_path="$new_path"
39392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39393    unix_path=`$CYGPATH -u "$windows_path"`
39394    new_path="$unix_path"
39395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39397    new_path="$unix_path"
39398  fi
39399
39400
39401  # Now try to locate executable using which
39402  new_path=`$WHICH "$new_path" 2> /dev/null`
39403
39404  if test "x$new_path" = x; then
39405    # Oops. Which didn't find the executable.
39406    # The splitting of arguments from the executable at a space might have been incorrect,
39407    # since paths with space are more likely in Windows. Give it another try with the whole
39408    # argument.
39409    path="$complete"
39410    arguments="EOL"
39411    new_path="$path"
39412
39413  windows_path="$new_path"
39414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39415    unix_path=`$CYGPATH -u "$windows_path"`
39416    new_path="$unix_path"
39417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39419    new_path="$unix_path"
39420  fi
39421
39422
39423    new_path=`$WHICH "$new_path" 2> /dev/null`
39424    # bat and cmd files are not always considered executable in MSYS causing which
39425    # to not find them
39426    if test "x$new_path" = x \
39427        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39428        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39429      new_path="$path"
39430
39431  windows_path="$new_path"
39432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39433    unix_path=`$CYGPATH -u "$windows_path"`
39434    new_path="$unix_path"
39435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39437    new_path="$unix_path"
39438  fi
39439
39440    fi
39441
39442    if test "x$new_path" = x; then
39443      # It's still not found. Now this is an unrecoverable error.
39444      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39445$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39446      has_space=`$ECHO "$complete" | $GREP " "`
39447      if test "x$has_space" != x; then
39448        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39449$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39450      fi
39451      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39452    fi
39453  fi
39454
39455  # Now new_path has a complete unix path to the binary
39456  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39457    # Keep paths in /bin as-is, but remove trailing .exe if any
39458    new_path="${new_path/%.exe/}"
39459    # Do not save /bin paths to all_fixpath_prefixes!
39460  else
39461    # Not in mixed or Windows style, start by that.
39462    new_path=`cmd //c echo $new_path`
39463
39464  input_path="$new_path"
39465  # Check if we need to convert this using DOS-style short mode. If the path
39466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39467  # take no chances and rewrite it.
39468  # Note: m4 eats our [], so we need to use [ and ] instead.
39469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39470  if test "x$has_forbidden_chars" != x; then
39471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39472    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39473  fi
39474
39475    # Output is in $new_path
39476
39477  windows_path="$new_path"
39478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39479    unix_path=`$CYGPATH -u "$windows_path"`
39480    new_path="$unix_path"
39481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39483    new_path="$unix_path"
39484  fi
39485
39486    # remove trailing .exe if any
39487    new_path="${new_path/%.exe/}"
39488
39489    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39490    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39491  fi
39492
39493    else
39494      # We're on a unix platform. Hooray! :)
39495      # First separate the path from the arguments. This will split at the first
39496      # space.
39497      complete="$STRIP"
39498      path="${complete%% *}"
39499      tmp="$complete EOL"
39500      arguments="${tmp#* }"
39501
39502      # Cannot rely on the command "which" here since it doesn't always work.
39503      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39504      if test -z "$is_absolute_path"; then
39505        # Path to executable is not absolute. Find it.
39506        IFS_save="$IFS"
39507        IFS=:
39508        for p in $PATH; do
39509          if test -f "$p/$path" && test -x "$p/$path"; then
39510            new_path="$p/$path"
39511            break
39512          fi
39513        done
39514        IFS="$IFS_save"
39515      else
39516        # This is an absolute path, we can use it without further modifications.
39517        new_path="$path"
39518      fi
39519
39520      if test "x$new_path" = x; then
39521        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39522$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39523        has_space=`$ECHO "$complete" | $GREP " "`
39524        if test "x$has_space" != x; then
39525          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39526$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39527        fi
39528        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39529      fi
39530    fi
39531
39532    # Now join together the path and the arguments once again
39533    if test "x$arguments" != xEOL; then
39534      new_complete="$new_path ${arguments% *}"
39535    else
39536      new_complete="$new_path"
39537    fi
39538
39539    if test "x$complete" != "x$new_complete"; then
39540      STRIP="$new_complete"
39541      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39542$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39543    fi
39544  fi
39545
39546
39547
39548  # Publish this variable in the help.
39549
39550
39551  if [ -z "${NM+x}" ]; then
39552    # The variable is not set by user, try to locate tool using the code snippet
39553    for ac_prog in nm
39554do
39555  # Extract the first word of "$ac_prog", so it can be a program name with args.
39556set dummy $ac_prog; ac_word=$2
39557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39558$as_echo_n "checking for $ac_word... " >&6; }
39559if ${ac_cv_path_NM+:} false; then :
39560  $as_echo_n "(cached) " >&6
39561else
39562  case $NM in
39563  [\\/]* | ?:[\\/]*)
39564  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39565  ;;
39566  *)
39567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39568for as_dir in $PATH
39569do
39570  IFS=$as_save_IFS
39571  test -z "$as_dir" && as_dir=.
39572    for ac_exec_ext in '' $ac_executable_extensions; do
39573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39574    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39576    break 2
39577  fi
39578done
39579  done
39580IFS=$as_save_IFS
39581
39582  ;;
39583esac
39584fi
39585NM=$ac_cv_path_NM
39586if test -n "$NM"; then
39587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39588$as_echo "$NM" >&6; }
39589else
39590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39591$as_echo "no" >&6; }
39592fi
39593
39594
39595  test -n "$NM" && break
39596done
39597
39598  else
39599    # The variable is set, but is it from the command line or the environment?
39600
39601    # Try to remove the string !NM! from our list.
39602    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39603    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39604      # If it failed, the variable was not from the command line. Ignore it,
39605      # but warn the user (except for BASH, which is always set by the calling BASH).
39606      if test "xNM" != xBASH; then
39607        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39608$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39609      fi
39610      # Try to locate tool using the code snippet
39611      for ac_prog in nm
39612do
39613  # Extract the first word of "$ac_prog", so it can be a program name with args.
39614set dummy $ac_prog; ac_word=$2
39615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39616$as_echo_n "checking for $ac_word... " >&6; }
39617if ${ac_cv_path_NM+:} false; then :
39618  $as_echo_n "(cached) " >&6
39619else
39620  case $NM in
39621  [\\/]* | ?:[\\/]*)
39622  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39623  ;;
39624  *)
39625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39626for as_dir in $PATH
39627do
39628  IFS=$as_save_IFS
39629  test -z "$as_dir" && as_dir=.
39630    for ac_exec_ext in '' $ac_executable_extensions; do
39631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39632    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39634    break 2
39635  fi
39636done
39637  done
39638IFS=$as_save_IFS
39639
39640  ;;
39641esac
39642fi
39643NM=$ac_cv_path_NM
39644if test -n "$NM"; then
39645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39646$as_echo "$NM" >&6; }
39647else
39648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39649$as_echo "no" >&6; }
39650fi
39651
39652
39653  test -n "$NM" && break
39654done
39655
39656    else
39657      # If it succeeded, then it was overridden by the user. We will use it
39658      # for the tool.
39659
39660      # First remove it from the list of overridden variables, so we can test
39661      # for unknown variables in the end.
39662      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39663
39664      # Check if we try to supply an empty value
39665      if test "x$NM" = x; then
39666        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
39667$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
39668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39669$as_echo_n "checking for NM... " >&6; }
39670        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39671$as_echo "disabled" >&6; }
39672      else
39673        # Check if the provided tool contains a complete path.
39674        tool_specified="$NM"
39675        tool_basename="${tool_specified##*/}"
39676        if test "x$tool_basename" = "x$tool_specified"; then
39677          # A command without a complete path is provided, search $PATH.
39678          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
39679$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
39680          # Extract the first word of "$tool_basename", so it can be a program name with args.
39681set dummy $tool_basename; ac_word=$2
39682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39683$as_echo_n "checking for $ac_word... " >&6; }
39684if ${ac_cv_path_NM+:} false; then :
39685  $as_echo_n "(cached) " >&6
39686else
39687  case $NM in
39688  [\\/]* | ?:[\\/]*)
39689  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39690  ;;
39691  *)
39692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39693for as_dir in $PATH
39694do
39695  IFS=$as_save_IFS
39696  test -z "$as_dir" && as_dir=.
39697    for ac_exec_ext in '' $ac_executable_extensions; do
39698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39699    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39701    break 2
39702  fi
39703done
39704  done
39705IFS=$as_save_IFS
39706
39707  ;;
39708esac
39709fi
39710NM=$ac_cv_path_NM
39711if test -n "$NM"; then
39712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39713$as_echo "$NM" >&6; }
39714else
39715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39716$as_echo "no" >&6; }
39717fi
39718
39719
39720          if test "x$NM" = x; then
39721            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39722          fi
39723        else
39724          # Otherwise we believe it is a complete path. Use it as it is.
39725          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
39726$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
39727          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39728$as_echo_n "checking for NM... " >&6; }
39729          if test ! -x "$tool_specified"; then
39730            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39731$as_echo "not found" >&6; }
39732            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
39733          fi
39734          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39735$as_echo "$tool_specified" >&6; }
39736        fi
39737      fi
39738    fi
39739
39740  fi
39741
39742
39743
39744  # Only process if variable expands to non-empty
39745
39746  if test "x$NM" != x; then
39747    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39748
39749  # First separate the path from the arguments. This will split at the first
39750  # space.
39751  complete="$NM"
39752  path="${complete%% *}"
39753  tmp="$complete EOL"
39754  arguments="${tmp#* }"
39755
39756  # Input might be given as Windows format, start by converting to
39757  # unix format.
39758  new_path=`$CYGPATH -u "$path"`
39759
39760  # Now try to locate executable using which
39761  new_path=`$WHICH "$new_path" 2> /dev/null`
39762  # bat and cmd files are not always considered executable in cygwin causing which
39763  # to not find them
39764  if test "x$new_path" = x \
39765      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39766      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39767    new_path=`$CYGPATH -u "$path"`
39768  fi
39769  if test "x$new_path" = x; then
39770    # Oops. Which didn't find the executable.
39771    # The splitting of arguments from the executable at a space might have been incorrect,
39772    # since paths with space are more likely in Windows. Give it another try with the whole
39773    # argument.
39774    path="$complete"
39775    arguments="EOL"
39776    new_path=`$CYGPATH -u "$path"`
39777    new_path=`$WHICH "$new_path" 2> /dev/null`
39778    # bat and cmd files are not always considered executable in cygwin causing which
39779    # to not find them
39780    if test "x$new_path" = x \
39781        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39782        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39783      new_path=`$CYGPATH -u "$path"`
39784    fi
39785    if test "x$new_path" = x; then
39786      # It's still not found. Now this is an unrecoverable error.
39787      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39788$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39789      has_space=`$ECHO "$complete" | $GREP " "`
39790      if test "x$has_space" != x; then
39791        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39792$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39793      fi
39794      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39795    fi
39796  fi
39797
39798  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39799  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39800  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39801  # "foo.exe" is OK but "foo" is an error.
39802  #
39803  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39804  # It is also a way to make sure we got the proper file name for the real test later on.
39805  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39806  if test "x$test_shortpath" = x; then
39807    # Short path failed, file does not exist as specified.
39808    # Try adding .exe or .cmd
39809    if test -f "${new_path}.exe"; then
39810      input_to_shortpath="${new_path}.exe"
39811    elif test -f "${new_path}.cmd"; then
39812      input_to_shortpath="${new_path}.cmd"
39813    else
39814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
39815$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
39816      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39817$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39818      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39819    fi
39820  else
39821    input_to_shortpath="$new_path"
39822  fi
39823
39824  # Call helper function which possibly converts this using DOS-style short mode.
39825  # If so, the updated path is stored in $new_path.
39826  new_path="$input_to_shortpath"
39827
39828  input_path="$input_to_shortpath"
39829  # Check if we need to convert this using DOS-style short mode. If the path
39830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39831  # take no chances and rewrite it.
39832  # Note: m4 eats our [], so we need to use [ and ] instead.
39833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39834  if test "x$has_forbidden_chars" != x; then
39835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39836    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39837    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39838    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39839      # Going to short mode and back again did indeed matter. Since short mode is
39840      # case insensitive, let's make it lowercase to improve readability.
39841      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39842      # Now convert it back to Unix-style (cygpath)
39843      input_path=`$CYGPATH -u "$shortmode_path"`
39844      new_path="$input_path"
39845    fi
39846  fi
39847
39848  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39849  if test "x$test_cygdrive_prefix" = x; then
39850    # As a simple fix, exclude /usr/bin since it's not a real path.
39851    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39852      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39853      # a path prefixed by /cygdrive for fixpath to work.
39854      new_path="$CYGWIN_ROOT_PATH$input_path"
39855    fi
39856  fi
39857
39858  # remove trailing .exe if any
39859  new_path="${new_path/%.exe/}"
39860
39861    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39862
39863  # First separate the path from the arguments. This will split at the first
39864  # space.
39865  complete="$NM"
39866  path="${complete%% *}"
39867  tmp="$complete EOL"
39868  arguments="${tmp#* }"
39869
39870  # Input might be given as Windows format, start by converting to
39871  # unix format.
39872  new_path="$path"
39873
39874  windows_path="$new_path"
39875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39876    unix_path=`$CYGPATH -u "$windows_path"`
39877    new_path="$unix_path"
39878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39880    new_path="$unix_path"
39881  fi
39882
39883
39884  # Now try to locate executable using which
39885  new_path=`$WHICH "$new_path" 2> /dev/null`
39886
39887  if test "x$new_path" = x; then
39888    # Oops. Which didn't find the executable.
39889    # The splitting of arguments from the executable at a space might have been incorrect,
39890    # since paths with space are more likely in Windows. Give it another try with the whole
39891    # argument.
39892    path="$complete"
39893    arguments="EOL"
39894    new_path="$path"
39895
39896  windows_path="$new_path"
39897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39898    unix_path=`$CYGPATH -u "$windows_path"`
39899    new_path="$unix_path"
39900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39902    new_path="$unix_path"
39903  fi
39904
39905
39906    new_path=`$WHICH "$new_path" 2> /dev/null`
39907    # bat and cmd files are not always considered executable in MSYS causing which
39908    # to not find them
39909    if test "x$new_path" = x \
39910        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39911        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39912      new_path="$path"
39913
39914  windows_path="$new_path"
39915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39916    unix_path=`$CYGPATH -u "$windows_path"`
39917    new_path="$unix_path"
39918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39920    new_path="$unix_path"
39921  fi
39922
39923    fi
39924
39925    if test "x$new_path" = x; then
39926      # It's still not found. Now this is an unrecoverable error.
39927      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39928$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39929      has_space=`$ECHO "$complete" | $GREP " "`
39930      if test "x$has_space" != x; then
39931        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39932$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39933      fi
39934      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39935    fi
39936  fi
39937
39938  # Now new_path has a complete unix path to the binary
39939  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39940    # Keep paths in /bin as-is, but remove trailing .exe if any
39941    new_path="${new_path/%.exe/}"
39942    # Do not save /bin paths to all_fixpath_prefixes!
39943  else
39944    # Not in mixed or Windows style, start by that.
39945    new_path=`cmd //c echo $new_path`
39946
39947  input_path="$new_path"
39948  # Check if we need to convert this using DOS-style short mode. If the path
39949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39950  # take no chances and rewrite it.
39951  # Note: m4 eats our [], so we need to use [ and ] instead.
39952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39953  if test "x$has_forbidden_chars" != x; then
39954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39955    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39956  fi
39957
39958    # Output is in $new_path
39959
39960  windows_path="$new_path"
39961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39962    unix_path=`$CYGPATH -u "$windows_path"`
39963    new_path="$unix_path"
39964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39966    new_path="$unix_path"
39967  fi
39968
39969    # remove trailing .exe if any
39970    new_path="${new_path/%.exe/}"
39971
39972    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39973    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39974  fi
39975
39976    else
39977      # We're on a unix platform. Hooray! :)
39978      # First separate the path from the arguments. This will split at the first
39979      # space.
39980      complete="$NM"
39981      path="${complete%% *}"
39982      tmp="$complete EOL"
39983      arguments="${tmp#* }"
39984
39985      # Cannot rely on the command "which" here since it doesn't always work.
39986      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39987      if test -z "$is_absolute_path"; then
39988        # Path to executable is not absolute. Find it.
39989        IFS_save="$IFS"
39990        IFS=:
39991        for p in $PATH; do
39992          if test -f "$p/$path" && test -x "$p/$path"; then
39993            new_path="$p/$path"
39994            break
39995          fi
39996        done
39997        IFS="$IFS_save"
39998      else
39999        # This is an absolute path, we can use it without further modifications.
40000        new_path="$path"
40001      fi
40002
40003      if test "x$new_path" = x; then
40004        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40005$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40006        has_space=`$ECHO "$complete" | $GREP " "`
40007        if test "x$has_space" != x; then
40008          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40009$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40010        fi
40011        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40012      fi
40013    fi
40014
40015    # Now join together the path and the arguments once again
40016    if test "x$arguments" != xEOL; then
40017      new_complete="$new_path ${arguments% *}"
40018    else
40019      new_complete="$new_path"
40020    fi
40021
40022    if test "x$complete" != "x$new_complete"; then
40023      NM="$new_complete"
40024      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40025$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40026    fi
40027  fi
40028
40029
40030
40031  # Publish this variable in the help.
40032
40033
40034  if [ -z "${GNM+x}" ]; then
40035    # The variable is not set by user, try to locate tool using the code snippet
40036    for ac_prog in gnm
40037do
40038  # Extract the first word of "$ac_prog", so it can be a program name with args.
40039set dummy $ac_prog; ac_word=$2
40040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40041$as_echo_n "checking for $ac_word... " >&6; }
40042if ${ac_cv_path_GNM+:} false; then :
40043  $as_echo_n "(cached) " >&6
40044else
40045  case $GNM in
40046  [\\/]* | ?:[\\/]*)
40047  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40048  ;;
40049  *)
40050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40051for as_dir in $PATH
40052do
40053  IFS=$as_save_IFS
40054  test -z "$as_dir" && as_dir=.
40055    for ac_exec_ext in '' $ac_executable_extensions; do
40056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40057    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40059    break 2
40060  fi
40061done
40062  done
40063IFS=$as_save_IFS
40064
40065  ;;
40066esac
40067fi
40068GNM=$ac_cv_path_GNM
40069if test -n "$GNM"; then
40070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40071$as_echo "$GNM" >&6; }
40072else
40073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40074$as_echo "no" >&6; }
40075fi
40076
40077
40078  test -n "$GNM" && break
40079done
40080
40081  else
40082    # The variable is set, but is it from the command line or the environment?
40083
40084    # Try to remove the string !GNM! from our list.
40085    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40086    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40087      # If it failed, the variable was not from the command line. Ignore it,
40088      # but warn the user (except for BASH, which is always set by the calling BASH).
40089      if test "xGNM" != xBASH; then
40090        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40091$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40092      fi
40093      # Try to locate tool using the code snippet
40094      for ac_prog in gnm
40095do
40096  # Extract the first word of "$ac_prog", so it can be a program name with args.
40097set dummy $ac_prog; ac_word=$2
40098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40099$as_echo_n "checking for $ac_word... " >&6; }
40100if ${ac_cv_path_GNM+:} false; then :
40101  $as_echo_n "(cached) " >&6
40102else
40103  case $GNM in
40104  [\\/]* | ?:[\\/]*)
40105  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40106  ;;
40107  *)
40108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40109for as_dir in $PATH
40110do
40111  IFS=$as_save_IFS
40112  test -z "$as_dir" && as_dir=.
40113    for ac_exec_ext in '' $ac_executable_extensions; do
40114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40115    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40117    break 2
40118  fi
40119done
40120  done
40121IFS=$as_save_IFS
40122
40123  ;;
40124esac
40125fi
40126GNM=$ac_cv_path_GNM
40127if test -n "$GNM"; then
40128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40129$as_echo "$GNM" >&6; }
40130else
40131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40132$as_echo "no" >&6; }
40133fi
40134
40135
40136  test -n "$GNM" && break
40137done
40138
40139    else
40140      # If it succeeded, then it was overridden by the user. We will use it
40141      # for the tool.
40142
40143      # First remove it from the list of overridden variables, so we can test
40144      # for unknown variables in the end.
40145      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40146
40147      # Check if we try to supply an empty value
40148      if test "x$GNM" = x; then
40149        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40150$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40151        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40152$as_echo_n "checking for GNM... " >&6; }
40153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40154$as_echo "disabled" >&6; }
40155      else
40156        # Check if the provided tool contains a complete path.
40157        tool_specified="$GNM"
40158        tool_basename="${tool_specified##*/}"
40159        if test "x$tool_basename" = "x$tool_specified"; then
40160          # A command without a complete path is provided, search $PATH.
40161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40162$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40163          # Extract the first word of "$tool_basename", so it can be a program name with args.
40164set dummy $tool_basename; ac_word=$2
40165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40166$as_echo_n "checking for $ac_word... " >&6; }
40167if ${ac_cv_path_GNM+:} false; then :
40168  $as_echo_n "(cached) " >&6
40169else
40170  case $GNM in
40171  [\\/]* | ?:[\\/]*)
40172  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40173  ;;
40174  *)
40175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40176for as_dir in $PATH
40177do
40178  IFS=$as_save_IFS
40179  test -z "$as_dir" && as_dir=.
40180    for ac_exec_ext in '' $ac_executable_extensions; do
40181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40182    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40184    break 2
40185  fi
40186done
40187  done
40188IFS=$as_save_IFS
40189
40190  ;;
40191esac
40192fi
40193GNM=$ac_cv_path_GNM
40194if test -n "$GNM"; then
40195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40196$as_echo "$GNM" >&6; }
40197else
40198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40199$as_echo "no" >&6; }
40200fi
40201
40202
40203          if test "x$GNM" = x; then
40204            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40205          fi
40206        else
40207          # Otherwise we believe it is a complete path. Use it as it is.
40208          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40209$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40210          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40211$as_echo_n "checking for GNM... " >&6; }
40212          if test ! -x "$tool_specified"; then
40213            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40214$as_echo "not found" >&6; }
40215            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40216          fi
40217          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40218$as_echo "$tool_specified" >&6; }
40219        fi
40220      fi
40221    fi
40222
40223  fi
40224
40225
40226
40227  # Only process if variable expands to non-empty
40228
40229  if test "x$GNM" != x; then
40230    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40231
40232  # First separate the path from the arguments. This will split at the first
40233  # space.
40234  complete="$GNM"
40235  path="${complete%% *}"
40236  tmp="$complete EOL"
40237  arguments="${tmp#* }"
40238
40239  # Input might be given as Windows format, start by converting to
40240  # unix format.
40241  new_path=`$CYGPATH -u "$path"`
40242
40243  # Now try to locate executable using which
40244  new_path=`$WHICH "$new_path" 2> /dev/null`
40245  # bat and cmd files are not always considered executable in cygwin causing which
40246  # to not find them
40247  if test "x$new_path" = x \
40248      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40249      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40250    new_path=`$CYGPATH -u "$path"`
40251  fi
40252  if test "x$new_path" = x; then
40253    # Oops. Which didn't find the executable.
40254    # The splitting of arguments from the executable at a space might have been incorrect,
40255    # since paths with space are more likely in Windows. Give it another try with the whole
40256    # argument.
40257    path="$complete"
40258    arguments="EOL"
40259    new_path=`$CYGPATH -u "$path"`
40260    new_path=`$WHICH "$new_path" 2> /dev/null`
40261    # bat and cmd files are not always considered executable in cygwin causing which
40262    # to not find them
40263    if test "x$new_path" = x \
40264        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40265        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40266      new_path=`$CYGPATH -u "$path"`
40267    fi
40268    if test "x$new_path" = x; then
40269      # It's still not found. Now this is an unrecoverable error.
40270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40271$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40272      has_space=`$ECHO "$complete" | $GREP " "`
40273      if test "x$has_space" != x; then
40274        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40275$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40276      fi
40277      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40278    fi
40279  fi
40280
40281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40284  # "foo.exe" is OK but "foo" is an error.
40285  #
40286  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40287  # It is also a way to make sure we got the proper file name for the real test later on.
40288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40289  if test "x$test_shortpath" = x; then
40290    # Short path failed, file does not exist as specified.
40291    # Try adding .exe or .cmd
40292    if test -f "${new_path}.exe"; then
40293      input_to_shortpath="${new_path}.exe"
40294    elif test -f "${new_path}.cmd"; then
40295      input_to_shortpath="${new_path}.cmd"
40296    else
40297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40298$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40299      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40300$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40301      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40302    fi
40303  else
40304    input_to_shortpath="$new_path"
40305  fi
40306
40307  # Call helper function which possibly converts this using DOS-style short mode.
40308  # If so, the updated path is stored in $new_path.
40309  new_path="$input_to_shortpath"
40310
40311  input_path="$input_to_shortpath"
40312  # Check if we need to convert this using DOS-style short mode. If the path
40313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40314  # take no chances and rewrite it.
40315  # Note: m4 eats our [], so we need to use [ and ] instead.
40316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40317  if test "x$has_forbidden_chars" != x; then
40318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40322      # Going to short mode and back again did indeed matter. Since short mode is
40323      # case insensitive, let's make it lowercase to improve readability.
40324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40325      # Now convert it back to Unix-style (cygpath)
40326      input_path=`$CYGPATH -u "$shortmode_path"`
40327      new_path="$input_path"
40328    fi
40329  fi
40330
40331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40332  if test "x$test_cygdrive_prefix" = x; then
40333    # As a simple fix, exclude /usr/bin since it's not a real path.
40334    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40336      # a path prefixed by /cygdrive for fixpath to work.
40337      new_path="$CYGWIN_ROOT_PATH$input_path"
40338    fi
40339  fi
40340
40341  # remove trailing .exe if any
40342  new_path="${new_path/%.exe/}"
40343
40344    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40345
40346  # First separate the path from the arguments. This will split at the first
40347  # space.
40348  complete="$GNM"
40349  path="${complete%% *}"
40350  tmp="$complete EOL"
40351  arguments="${tmp#* }"
40352
40353  # Input might be given as Windows format, start by converting to
40354  # unix format.
40355  new_path="$path"
40356
40357  windows_path="$new_path"
40358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40359    unix_path=`$CYGPATH -u "$windows_path"`
40360    new_path="$unix_path"
40361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40363    new_path="$unix_path"
40364  fi
40365
40366
40367  # Now try to locate executable using which
40368  new_path=`$WHICH "$new_path" 2> /dev/null`
40369
40370  if test "x$new_path" = x; then
40371    # Oops. Which didn't find the executable.
40372    # The splitting of arguments from the executable at a space might have been incorrect,
40373    # since paths with space are more likely in Windows. Give it another try with the whole
40374    # argument.
40375    path="$complete"
40376    arguments="EOL"
40377    new_path="$path"
40378
40379  windows_path="$new_path"
40380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40381    unix_path=`$CYGPATH -u "$windows_path"`
40382    new_path="$unix_path"
40383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40385    new_path="$unix_path"
40386  fi
40387
40388
40389    new_path=`$WHICH "$new_path" 2> /dev/null`
40390    # bat and cmd files are not always considered executable in MSYS causing which
40391    # to not find them
40392    if test "x$new_path" = x \
40393        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40394        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40395      new_path="$path"
40396
40397  windows_path="$new_path"
40398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40399    unix_path=`$CYGPATH -u "$windows_path"`
40400    new_path="$unix_path"
40401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40403    new_path="$unix_path"
40404  fi
40405
40406    fi
40407
40408    if test "x$new_path" = x; then
40409      # It's still not found. Now this is an unrecoverable error.
40410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40411$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40412      has_space=`$ECHO "$complete" | $GREP " "`
40413      if test "x$has_space" != x; then
40414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40416      fi
40417      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40418    fi
40419  fi
40420
40421  # Now new_path has a complete unix path to the binary
40422  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40423    # Keep paths in /bin as-is, but remove trailing .exe if any
40424    new_path="${new_path/%.exe/}"
40425    # Do not save /bin paths to all_fixpath_prefixes!
40426  else
40427    # Not in mixed or Windows style, start by that.
40428    new_path=`cmd //c echo $new_path`
40429
40430  input_path="$new_path"
40431  # Check if we need to convert this using DOS-style short mode. If the path
40432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40433  # take no chances and rewrite it.
40434  # Note: m4 eats our [], so we need to use [ and ] instead.
40435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40436  if test "x$has_forbidden_chars" != x; then
40437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40439  fi
40440
40441    # Output is in $new_path
40442
40443  windows_path="$new_path"
40444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40445    unix_path=`$CYGPATH -u "$windows_path"`
40446    new_path="$unix_path"
40447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40449    new_path="$unix_path"
40450  fi
40451
40452    # remove trailing .exe if any
40453    new_path="${new_path/%.exe/}"
40454
40455    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40456    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40457  fi
40458
40459    else
40460      # We're on a unix platform. Hooray! :)
40461      # First separate the path from the arguments. This will split at the first
40462      # space.
40463      complete="$GNM"
40464      path="${complete%% *}"
40465      tmp="$complete EOL"
40466      arguments="${tmp#* }"
40467
40468      # Cannot rely on the command "which" here since it doesn't always work.
40469      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40470      if test -z "$is_absolute_path"; then
40471        # Path to executable is not absolute. Find it.
40472        IFS_save="$IFS"
40473        IFS=:
40474        for p in $PATH; do
40475          if test -f "$p/$path" && test -x "$p/$path"; then
40476            new_path="$p/$path"
40477            break
40478          fi
40479        done
40480        IFS="$IFS_save"
40481      else
40482        # This is an absolute path, we can use it without further modifications.
40483        new_path="$path"
40484      fi
40485
40486      if test "x$new_path" = x; then
40487        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40488$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40489        has_space=`$ECHO "$complete" | $GREP " "`
40490        if test "x$has_space" != x; then
40491          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40492$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40493        fi
40494        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40495      fi
40496    fi
40497
40498    # Now join together the path and the arguments once again
40499    if test "x$arguments" != xEOL; then
40500      new_complete="$new_path ${arguments% *}"
40501    else
40502      new_complete="$new_path"
40503    fi
40504
40505    if test "x$complete" != "x$new_complete"; then
40506      GNM="$new_complete"
40507      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40508$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40509    fi
40510  fi
40511
40512  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40513    # FIXME: we should unify this with the solaris case above.
40514
40515
40516  # Publish this variable in the help.
40517
40518
40519  if [ -z "${STRIP+x}" ]; then
40520    # The variable is not set by user, try to locate tool using the code snippet
40521    if test -n "$ac_tool_prefix"; then
40522  for ac_prog in strip
40523  do
40524    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40525set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40527$as_echo_n "checking for $ac_word... " >&6; }
40528if ${ac_cv_prog_STRIP+:} false; then :
40529  $as_echo_n "(cached) " >&6
40530else
40531  if test -n "$STRIP"; then
40532  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40533else
40534as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40535for as_dir in $PATH
40536do
40537  IFS=$as_save_IFS
40538  test -z "$as_dir" && as_dir=.
40539    for ac_exec_ext in '' $ac_executable_extensions; do
40540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40541    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40543    break 2
40544  fi
40545done
40546  done
40547IFS=$as_save_IFS
40548
40549fi
40550fi
40551STRIP=$ac_cv_prog_STRIP
40552if test -n "$STRIP"; then
40553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40554$as_echo "$STRIP" >&6; }
40555else
40556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40557$as_echo "no" >&6; }
40558fi
40559
40560
40561    test -n "$STRIP" && break
40562  done
40563fi
40564if test -z "$STRIP"; then
40565  ac_ct_STRIP=$STRIP
40566  for ac_prog in strip
40567do
40568  # Extract the first word of "$ac_prog", so it can be a program name with args.
40569set dummy $ac_prog; ac_word=$2
40570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40571$as_echo_n "checking for $ac_word... " >&6; }
40572if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40573  $as_echo_n "(cached) " >&6
40574else
40575  if test -n "$ac_ct_STRIP"; then
40576  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40577else
40578as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40579for as_dir in $PATH
40580do
40581  IFS=$as_save_IFS
40582  test -z "$as_dir" && as_dir=.
40583    for ac_exec_ext in '' $ac_executable_extensions; do
40584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40585    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40587    break 2
40588  fi
40589done
40590  done
40591IFS=$as_save_IFS
40592
40593fi
40594fi
40595ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40596if test -n "$ac_ct_STRIP"; then
40597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40598$as_echo "$ac_ct_STRIP" >&6; }
40599else
40600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40601$as_echo "no" >&6; }
40602fi
40603
40604
40605  test -n "$ac_ct_STRIP" && break
40606done
40607
40608  if test "x$ac_ct_STRIP" = x; then
40609    STRIP=""
40610  else
40611    case $cross_compiling:$ac_tool_warned in
40612yes:)
40613{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40614$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40615ac_tool_warned=yes ;;
40616esac
40617    STRIP=$ac_ct_STRIP
40618  fi
40619fi
40620
40621  else
40622    # The variable is set, but is it from the command line or the environment?
40623
40624    # Try to remove the string !STRIP! from our list.
40625    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40626    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40627      # If it failed, the variable was not from the command line. Ignore it,
40628      # but warn the user (except for BASH, which is always set by the calling BASH).
40629      if test "xSTRIP" != xBASH; then
40630        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40631$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40632      fi
40633      # Try to locate tool using the code snippet
40634      if test -n "$ac_tool_prefix"; then
40635  for ac_prog in strip
40636  do
40637    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40638set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40640$as_echo_n "checking for $ac_word... " >&6; }
40641if ${ac_cv_prog_STRIP+:} false; then :
40642  $as_echo_n "(cached) " >&6
40643else
40644  if test -n "$STRIP"; then
40645  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40646else
40647as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40648for as_dir in $PATH
40649do
40650  IFS=$as_save_IFS
40651  test -z "$as_dir" && as_dir=.
40652    for ac_exec_ext in '' $ac_executable_extensions; do
40653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40654    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40656    break 2
40657  fi
40658done
40659  done
40660IFS=$as_save_IFS
40661
40662fi
40663fi
40664STRIP=$ac_cv_prog_STRIP
40665if test -n "$STRIP"; then
40666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40667$as_echo "$STRIP" >&6; }
40668else
40669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40670$as_echo "no" >&6; }
40671fi
40672
40673
40674    test -n "$STRIP" && break
40675  done
40676fi
40677if test -z "$STRIP"; then
40678  ac_ct_STRIP=$STRIP
40679  for ac_prog in strip
40680do
40681  # Extract the first word of "$ac_prog", so it can be a program name with args.
40682set dummy $ac_prog; ac_word=$2
40683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40684$as_echo_n "checking for $ac_word... " >&6; }
40685if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40686  $as_echo_n "(cached) " >&6
40687else
40688  if test -n "$ac_ct_STRIP"; then
40689  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40690else
40691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40692for as_dir in $PATH
40693do
40694  IFS=$as_save_IFS
40695  test -z "$as_dir" && as_dir=.
40696    for ac_exec_ext in '' $ac_executable_extensions; do
40697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40698    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40700    break 2
40701  fi
40702done
40703  done
40704IFS=$as_save_IFS
40705
40706fi
40707fi
40708ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40709if test -n "$ac_ct_STRIP"; then
40710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40711$as_echo "$ac_ct_STRIP" >&6; }
40712else
40713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40714$as_echo "no" >&6; }
40715fi
40716
40717
40718  test -n "$ac_ct_STRIP" && break
40719done
40720
40721  if test "x$ac_ct_STRIP" = x; then
40722    STRIP=""
40723  else
40724    case $cross_compiling:$ac_tool_warned in
40725yes:)
40726{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40727$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40728ac_tool_warned=yes ;;
40729esac
40730    STRIP=$ac_ct_STRIP
40731  fi
40732fi
40733
40734    else
40735      # If it succeeded, then it was overridden by the user. We will use it
40736      # for the tool.
40737
40738      # First remove it from the list of overridden variables, so we can test
40739      # for unknown variables in the end.
40740      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40741
40742      # Check if we try to supply an empty value
40743      if test "x$STRIP" = x; then
40744        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40745$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40746        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40747$as_echo_n "checking for STRIP... " >&6; }
40748        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40749$as_echo "disabled" >&6; }
40750      else
40751        # Check if the provided tool contains a complete path.
40752        tool_specified="$STRIP"
40753        tool_basename="${tool_specified##*/}"
40754        if test "x$tool_basename" = "x$tool_specified"; then
40755          # A command without a complete path is provided, search $PATH.
40756          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40757$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40758          # Extract the first word of "$tool_basename", so it can be a program name with args.
40759set dummy $tool_basename; ac_word=$2
40760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40761$as_echo_n "checking for $ac_word... " >&6; }
40762if ${ac_cv_path_STRIP+:} false; then :
40763  $as_echo_n "(cached) " >&6
40764else
40765  case $STRIP in
40766  [\\/]* | ?:[\\/]*)
40767  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40768  ;;
40769  *)
40770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40771for as_dir in $PATH
40772do
40773  IFS=$as_save_IFS
40774  test -z "$as_dir" && as_dir=.
40775    for ac_exec_ext in '' $ac_executable_extensions; do
40776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40777    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40779    break 2
40780  fi
40781done
40782  done
40783IFS=$as_save_IFS
40784
40785  ;;
40786esac
40787fi
40788STRIP=$ac_cv_path_STRIP
40789if test -n "$STRIP"; then
40790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40791$as_echo "$STRIP" >&6; }
40792else
40793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40794$as_echo "no" >&6; }
40795fi
40796
40797
40798          if test "x$STRIP" = x; then
40799            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40800          fi
40801        else
40802          # Otherwise we believe it is a complete path. Use it as it is.
40803          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40804$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40805          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40806$as_echo_n "checking for STRIP... " >&6; }
40807          if test ! -x "$tool_specified"; then
40808            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40809$as_echo "not found" >&6; }
40810            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40811          fi
40812          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40813$as_echo "$tool_specified" >&6; }
40814        fi
40815      fi
40816    fi
40817
40818  fi
40819
40820
40821
40822  # Only process if variable expands to non-empty
40823
40824  if test "x$STRIP" != x; then
40825    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40826
40827  # First separate the path from the arguments. This will split at the first
40828  # space.
40829  complete="$STRIP"
40830  path="${complete%% *}"
40831  tmp="$complete EOL"
40832  arguments="${tmp#* }"
40833
40834  # Input might be given as Windows format, start by converting to
40835  # unix format.
40836  new_path=`$CYGPATH -u "$path"`
40837
40838  # Now try to locate executable using which
40839  new_path=`$WHICH "$new_path" 2> /dev/null`
40840  # bat and cmd files are not always considered executable in cygwin causing which
40841  # to not find them
40842  if test "x$new_path" = x \
40843      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40844      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40845    new_path=`$CYGPATH -u "$path"`
40846  fi
40847  if test "x$new_path" = x; then
40848    # Oops. Which didn't find the executable.
40849    # The splitting of arguments from the executable at a space might have been incorrect,
40850    # since paths with space are more likely in Windows. Give it another try with the whole
40851    # argument.
40852    path="$complete"
40853    arguments="EOL"
40854    new_path=`$CYGPATH -u "$path"`
40855    new_path=`$WHICH "$new_path" 2> /dev/null`
40856    # bat and cmd files are not always considered executable in cygwin causing which
40857    # to not find them
40858    if test "x$new_path" = x \
40859        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40860        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40861      new_path=`$CYGPATH -u "$path"`
40862    fi
40863    if test "x$new_path" = x; then
40864      # It's still not found. Now this is an unrecoverable error.
40865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40866$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40867      has_space=`$ECHO "$complete" | $GREP " "`
40868      if test "x$has_space" != x; then
40869        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40870$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40871      fi
40872      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40873    fi
40874  fi
40875
40876  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40877  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40878  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40879  # "foo.exe" is OK but "foo" is an error.
40880  #
40881  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40882  # It is also a way to make sure we got the proper file name for the real test later on.
40883  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40884  if test "x$test_shortpath" = x; then
40885    # Short path failed, file does not exist as specified.
40886    # Try adding .exe or .cmd
40887    if test -f "${new_path}.exe"; then
40888      input_to_shortpath="${new_path}.exe"
40889    elif test -f "${new_path}.cmd"; then
40890      input_to_shortpath="${new_path}.cmd"
40891    else
40892      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40893$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40894      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40895$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40896      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40897    fi
40898  else
40899    input_to_shortpath="$new_path"
40900  fi
40901
40902  # Call helper function which possibly converts this using DOS-style short mode.
40903  # If so, the updated path is stored in $new_path.
40904  new_path="$input_to_shortpath"
40905
40906  input_path="$input_to_shortpath"
40907  # Check if we need to convert this using DOS-style short mode. If the path
40908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40909  # take no chances and rewrite it.
40910  # Note: m4 eats our [], so we need to use [ and ] instead.
40911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40912  if test "x$has_forbidden_chars" != x; then
40913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40914    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40915    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40916    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40917      # Going to short mode and back again did indeed matter. Since short mode is
40918      # case insensitive, let's make it lowercase to improve readability.
40919      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40920      # Now convert it back to Unix-style (cygpath)
40921      input_path=`$CYGPATH -u "$shortmode_path"`
40922      new_path="$input_path"
40923    fi
40924  fi
40925
40926  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40927  if test "x$test_cygdrive_prefix" = x; then
40928    # As a simple fix, exclude /usr/bin since it's not a real path.
40929    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40930      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40931      # a path prefixed by /cygdrive for fixpath to work.
40932      new_path="$CYGWIN_ROOT_PATH$input_path"
40933    fi
40934  fi
40935
40936  # remove trailing .exe if any
40937  new_path="${new_path/%.exe/}"
40938
40939    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40940
40941  # First separate the path from the arguments. This will split at the first
40942  # space.
40943  complete="$STRIP"
40944  path="${complete%% *}"
40945  tmp="$complete EOL"
40946  arguments="${tmp#* }"
40947
40948  # Input might be given as Windows format, start by converting to
40949  # unix format.
40950  new_path="$path"
40951
40952  windows_path="$new_path"
40953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40954    unix_path=`$CYGPATH -u "$windows_path"`
40955    new_path="$unix_path"
40956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40958    new_path="$unix_path"
40959  fi
40960
40961
40962  # Now try to locate executable using which
40963  new_path=`$WHICH "$new_path" 2> /dev/null`
40964
40965  if test "x$new_path" = x; then
40966    # Oops. Which didn't find the executable.
40967    # The splitting of arguments from the executable at a space might have been incorrect,
40968    # since paths with space are more likely in Windows. Give it another try with the whole
40969    # argument.
40970    path="$complete"
40971    arguments="EOL"
40972    new_path="$path"
40973
40974  windows_path="$new_path"
40975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40976    unix_path=`$CYGPATH -u "$windows_path"`
40977    new_path="$unix_path"
40978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40980    new_path="$unix_path"
40981  fi
40982
40983
40984    new_path=`$WHICH "$new_path" 2> /dev/null`
40985    # bat and cmd files are not always considered executable in MSYS causing which
40986    # to not find them
40987    if test "x$new_path" = x \
40988        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40989        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40990      new_path="$path"
40991
40992  windows_path="$new_path"
40993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40994    unix_path=`$CYGPATH -u "$windows_path"`
40995    new_path="$unix_path"
40996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40998    new_path="$unix_path"
40999  fi
41000
41001    fi
41002
41003    if test "x$new_path" = x; then
41004      # It's still not found. Now this is an unrecoverable error.
41005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41006$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41007      has_space=`$ECHO "$complete" | $GREP " "`
41008      if test "x$has_space" != x; then
41009        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41010$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41011      fi
41012      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41013    fi
41014  fi
41015
41016  # Now new_path has a complete unix path to the binary
41017  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41018    # Keep paths in /bin as-is, but remove trailing .exe if any
41019    new_path="${new_path/%.exe/}"
41020    # Do not save /bin paths to all_fixpath_prefixes!
41021  else
41022    # Not in mixed or Windows style, start by that.
41023    new_path=`cmd //c echo $new_path`
41024
41025  input_path="$new_path"
41026  # Check if we need to convert this using DOS-style short mode. If the path
41027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41028  # take no chances and rewrite it.
41029  # Note: m4 eats our [], so we need to use [ and ] instead.
41030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41031  if test "x$has_forbidden_chars" != x; then
41032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41033    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41034  fi
41035
41036    # Output is in $new_path
41037
41038  windows_path="$new_path"
41039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41040    unix_path=`$CYGPATH -u "$windows_path"`
41041    new_path="$unix_path"
41042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41044    new_path="$unix_path"
41045  fi
41046
41047    # remove trailing .exe if any
41048    new_path="${new_path/%.exe/}"
41049
41050    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41051    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41052  fi
41053
41054    else
41055      # We're on a unix platform. Hooray! :)
41056      # First separate the path from the arguments. This will split at the first
41057      # space.
41058      complete="$STRIP"
41059      path="${complete%% *}"
41060      tmp="$complete EOL"
41061      arguments="${tmp#* }"
41062
41063      # Cannot rely on the command "which" here since it doesn't always work.
41064      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41065      if test -z "$is_absolute_path"; then
41066        # Path to executable is not absolute. Find it.
41067        IFS_save="$IFS"
41068        IFS=:
41069        for p in $PATH; do
41070          if test -f "$p/$path" && test -x "$p/$path"; then
41071            new_path="$p/$path"
41072            break
41073          fi
41074        done
41075        IFS="$IFS_save"
41076      else
41077        # This is an absolute path, we can use it without further modifications.
41078        new_path="$path"
41079      fi
41080
41081      if test "x$new_path" = x; then
41082        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41083$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41084        has_space=`$ECHO "$complete" | $GREP " "`
41085        if test "x$has_space" != x; then
41086          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41087$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41088        fi
41089        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41090      fi
41091    fi
41092
41093    # Now join together the path and the arguments once again
41094    if test "x$arguments" != xEOL; then
41095      new_complete="$new_path ${arguments% *}"
41096    else
41097      new_complete="$new_path"
41098    fi
41099
41100    if test "x$complete" != "x$new_complete"; then
41101      STRIP="$new_complete"
41102      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41103$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41104    fi
41105  fi
41106
41107    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41108
41109
41110  # Publish this variable in the help.
41111
41112
41113  if [ -z "${NM+x}" ]; then
41114    # The variable is not set by user, try to locate tool using the code snippet
41115    if test -n "$ac_tool_prefix"; then
41116  for ac_prog in nm gcc-nm
41117  do
41118    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41119set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41121$as_echo_n "checking for $ac_word... " >&6; }
41122if ${ac_cv_prog_NM+:} false; then :
41123  $as_echo_n "(cached) " >&6
41124else
41125  if test -n "$NM"; then
41126  ac_cv_prog_NM="$NM" # Let the user override the test.
41127else
41128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41129for as_dir in $PATH
41130do
41131  IFS=$as_save_IFS
41132  test -z "$as_dir" && as_dir=.
41133    for ac_exec_ext in '' $ac_executable_extensions; do
41134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41135    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41137    break 2
41138  fi
41139done
41140  done
41141IFS=$as_save_IFS
41142
41143fi
41144fi
41145NM=$ac_cv_prog_NM
41146if test -n "$NM"; then
41147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41148$as_echo "$NM" >&6; }
41149else
41150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41151$as_echo "no" >&6; }
41152fi
41153
41154
41155    test -n "$NM" && break
41156  done
41157fi
41158if test -z "$NM"; then
41159  ac_ct_NM=$NM
41160  for ac_prog in nm gcc-nm
41161do
41162  # Extract the first word of "$ac_prog", so it can be a program name with args.
41163set dummy $ac_prog; ac_word=$2
41164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41165$as_echo_n "checking for $ac_word... " >&6; }
41166if ${ac_cv_prog_ac_ct_NM+:} false; then :
41167  $as_echo_n "(cached) " >&6
41168else
41169  if test -n "$ac_ct_NM"; then
41170  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41171else
41172as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41173for as_dir in $PATH
41174do
41175  IFS=$as_save_IFS
41176  test -z "$as_dir" && as_dir=.
41177    for ac_exec_ext in '' $ac_executable_extensions; do
41178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41179    ac_cv_prog_ac_ct_NM="$ac_prog"
41180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41181    break 2
41182  fi
41183done
41184  done
41185IFS=$as_save_IFS
41186
41187fi
41188fi
41189ac_ct_NM=$ac_cv_prog_ac_ct_NM
41190if test -n "$ac_ct_NM"; then
41191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41192$as_echo "$ac_ct_NM" >&6; }
41193else
41194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41195$as_echo "no" >&6; }
41196fi
41197
41198
41199  test -n "$ac_ct_NM" && break
41200done
41201
41202  if test "x$ac_ct_NM" = x; then
41203    NM=""
41204  else
41205    case $cross_compiling:$ac_tool_warned in
41206yes:)
41207{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41208$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41209ac_tool_warned=yes ;;
41210esac
41211    NM=$ac_ct_NM
41212  fi
41213fi
41214
41215  else
41216    # The variable is set, but is it from the command line or the environment?
41217
41218    # Try to remove the string !NM! from our list.
41219    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41220    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41221      # If it failed, the variable was not from the command line. Ignore it,
41222      # but warn the user (except for BASH, which is always set by the calling BASH).
41223      if test "xNM" != xBASH; then
41224        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41225$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41226      fi
41227      # Try to locate tool using the code snippet
41228      if test -n "$ac_tool_prefix"; then
41229  for ac_prog in nm gcc-nm
41230  do
41231    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41232set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41234$as_echo_n "checking for $ac_word... " >&6; }
41235if ${ac_cv_prog_NM+:} false; then :
41236  $as_echo_n "(cached) " >&6
41237else
41238  if test -n "$NM"; then
41239  ac_cv_prog_NM="$NM" # Let the user override the test.
41240else
41241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41242for as_dir in $PATH
41243do
41244  IFS=$as_save_IFS
41245  test -z "$as_dir" && as_dir=.
41246    for ac_exec_ext in '' $ac_executable_extensions; do
41247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41248    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41250    break 2
41251  fi
41252done
41253  done
41254IFS=$as_save_IFS
41255
41256fi
41257fi
41258NM=$ac_cv_prog_NM
41259if test -n "$NM"; then
41260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41261$as_echo "$NM" >&6; }
41262else
41263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41264$as_echo "no" >&6; }
41265fi
41266
41267
41268    test -n "$NM" && break
41269  done
41270fi
41271if test -z "$NM"; then
41272  ac_ct_NM=$NM
41273  for ac_prog in nm gcc-nm
41274do
41275  # Extract the first word of "$ac_prog", so it can be a program name with args.
41276set dummy $ac_prog; ac_word=$2
41277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41278$as_echo_n "checking for $ac_word... " >&6; }
41279if ${ac_cv_prog_ac_ct_NM+:} false; then :
41280  $as_echo_n "(cached) " >&6
41281else
41282  if test -n "$ac_ct_NM"; then
41283  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41284else
41285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41286for as_dir in $PATH
41287do
41288  IFS=$as_save_IFS
41289  test -z "$as_dir" && as_dir=.
41290    for ac_exec_ext in '' $ac_executable_extensions; do
41291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41292    ac_cv_prog_ac_ct_NM="$ac_prog"
41293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41294    break 2
41295  fi
41296done
41297  done
41298IFS=$as_save_IFS
41299
41300fi
41301fi
41302ac_ct_NM=$ac_cv_prog_ac_ct_NM
41303if test -n "$ac_ct_NM"; then
41304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41305$as_echo "$ac_ct_NM" >&6; }
41306else
41307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41308$as_echo "no" >&6; }
41309fi
41310
41311
41312  test -n "$ac_ct_NM" && break
41313done
41314
41315  if test "x$ac_ct_NM" = x; then
41316    NM=""
41317  else
41318    case $cross_compiling:$ac_tool_warned in
41319yes:)
41320{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41321$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41322ac_tool_warned=yes ;;
41323esac
41324    NM=$ac_ct_NM
41325  fi
41326fi
41327
41328    else
41329      # If it succeeded, then it was overridden by the user. We will use it
41330      # for the tool.
41331
41332      # First remove it from the list of overridden variables, so we can test
41333      # for unknown variables in the end.
41334      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41335
41336      # Check if we try to supply an empty value
41337      if test "x$NM" = x; then
41338        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41339$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41340        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41341$as_echo_n "checking for NM... " >&6; }
41342        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41343$as_echo "disabled" >&6; }
41344      else
41345        # Check if the provided tool contains a complete path.
41346        tool_specified="$NM"
41347        tool_basename="${tool_specified##*/}"
41348        if test "x$tool_basename" = "x$tool_specified"; then
41349          # A command without a complete path is provided, search $PATH.
41350          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41351$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41352          # Extract the first word of "$tool_basename", so it can be a program name with args.
41353set dummy $tool_basename; ac_word=$2
41354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41355$as_echo_n "checking for $ac_word... " >&6; }
41356if ${ac_cv_path_NM+:} false; then :
41357  $as_echo_n "(cached) " >&6
41358else
41359  case $NM in
41360  [\\/]* | ?:[\\/]*)
41361  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41362  ;;
41363  *)
41364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41365for as_dir in $PATH
41366do
41367  IFS=$as_save_IFS
41368  test -z "$as_dir" && as_dir=.
41369    for ac_exec_ext in '' $ac_executable_extensions; do
41370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41371    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41373    break 2
41374  fi
41375done
41376  done
41377IFS=$as_save_IFS
41378
41379  ;;
41380esac
41381fi
41382NM=$ac_cv_path_NM
41383if test -n "$NM"; then
41384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41385$as_echo "$NM" >&6; }
41386else
41387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41388$as_echo "no" >&6; }
41389fi
41390
41391
41392          if test "x$NM" = x; then
41393            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41394          fi
41395        else
41396          # Otherwise we believe it is a complete path. Use it as it is.
41397          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41398$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41399          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41400$as_echo_n "checking for NM... " >&6; }
41401          if test ! -x "$tool_specified"; then
41402            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41403$as_echo "not found" >&6; }
41404            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41405          fi
41406          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41407$as_echo "$tool_specified" >&6; }
41408        fi
41409      fi
41410    fi
41411
41412  fi
41413
41414
41415    else
41416
41417
41418  # Publish this variable in the help.
41419
41420
41421  if [ -z "${NM+x}" ]; then
41422    # The variable is not set by user, try to locate tool using the code snippet
41423    if test -n "$ac_tool_prefix"; then
41424  for ac_prog in nm
41425  do
41426    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41427set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41429$as_echo_n "checking for $ac_word... " >&6; }
41430if ${ac_cv_prog_NM+:} false; then :
41431  $as_echo_n "(cached) " >&6
41432else
41433  if test -n "$NM"; then
41434  ac_cv_prog_NM="$NM" # Let the user override the test.
41435else
41436as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41437for as_dir in $PATH
41438do
41439  IFS=$as_save_IFS
41440  test -z "$as_dir" && as_dir=.
41441    for ac_exec_ext in '' $ac_executable_extensions; do
41442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41443    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41445    break 2
41446  fi
41447done
41448  done
41449IFS=$as_save_IFS
41450
41451fi
41452fi
41453NM=$ac_cv_prog_NM
41454if test -n "$NM"; then
41455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41456$as_echo "$NM" >&6; }
41457else
41458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41459$as_echo "no" >&6; }
41460fi
41461
41462
41463    test -n "$NM" && break
41464  done
41465fi
41466if test -z "$NM"; then
41467  ac_ct_NM=$NM
41468  for ac_prog in nm
41469do
41470  # Extract the first word of "$ac_prog", so it can be a program name with args.
41471set dummy $ac_prog; ac_word=$2
41472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41473$as_echo_n "checking for $ac_word... " >&6; }
41474if ${ac_cv_prog_ac_ct_NM+:} false; then :
41475  $as_echo_n "(cached) " >&6
41476else
41477  if test -n "$ac_ct_NM"; then
41478  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41479else
41480as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41481for as_dir in $PATH
41482do
41483  IFS=$as_save_IFS
41484  test -z "$as_dir" && as_dir=.
41485    for ac_exec_ext in '' $ac_executable_extensions; do
41486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41487    ac_cv_prog_ac_ct_NM="$ac_prog"
41488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41489    break 2
41490  fi
41491done
41492  done
41493IFS=$as_save_IFS
41494
41495fi
41496fi
41497ac_ct_NM=$ac_cv_prog_ac_ct_NM
41498if test -n "$ac_ct_NM"; then
41499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41500$as_echo "$ac_ct_NM" >&6; }
41501else
41502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41503$as_echo "no" >&6; }
41504fi
41505
41506
41507  test -n "$ac_ct_NM" && break
41508done
41509
41510  if test "x$ac_ct_NM" = x; then
41511    NM=""
41512  else
41513    case $cross_compiling:$ac_tool_warned in
41514yes:)
41515{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41516$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41517ac_tool_warned=yes ;;
41518esac
41519    NM=$ac_ct_NM
41520  fi
41521fi
41522
41523  else
41524    # The variable is set, but is it from the command line or the environment?
41525
41526    # Try to remove the string !NM! from our list.
41527    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41528    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41529      # If it failed, the variable was not from the command line. Ignore it,
41530      # but warn the user (except for BASH, which is always set by the calling BASH).
41531      if test "xNM" != xBASH; then
41532        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41533$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41534      fi
41535      # Try to locate tool using the code snippet
41536      if test -n "$ac_tool_prefix"; then
41537  for ac_prog in nm
41538  do
41539    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41540set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41542$as_echo_n "checking for $ac_word... " >&6; }
41543if ${ac_cv_prog_NM+:} false; then :
41544  $as_echo_n "(cached) " >&6
41545else
41546  if test -n "$NM"; then
41547  ac_cv_prog_NM="$NM" # Let the user override the test.
41548else
41549as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41550for as_dir in $PATH
41551do
41552  IFS=$as_save_IFS
41553  test -z "$as_dir" && as_dir=.
41554    for ac_exec_ext in '' $ac_executable_extensions; do
41555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41556    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41558    break 2
41559  fi
41560done
41561  done
41562IFS=$as_save_IFS
41563
41564fi
41565fi
41566NM=$ac_cv_prog_NM
41567if test -n "$NM"; then
41568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41569$as_echo "$NM" >&6; }
41570else
41571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41572$as_echo "no" >&6; }
41573fi
41574
41575
41576    test -n "$NM" && break
41577  done
41578fi
41579if test -z "$NM"; then
41580  ac_ct_NM=$NM
41581  for ac_prog in nm
41582do
41583  # Extract the first word of "$ac_prog", so it can be a program name with args.
41584set dummy $ac_prog; ac_word=$2
41585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41586$as_echo_n "checking for $ac_word... " >&6; }
41587if ${ac_cv_prog_ac_ct_NM+:} false; then :
41588  $as_echo_n "(cached) " >&6
41589else
41590  if test -n "$ac_ct_NM"; then
41591  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41592else
41593as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41594for as_dir in $PATH
41595do
41596  IFS=$as_save_IFS
41597  test -z "$as_dir" && as_dir=.
41598    for ac_exec_ext in '' $ac_executable_extensions; do
41599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41600    ac_cv_prog_ac_ct_NM="$ac_prog"
41601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41602    break 2
41603  fi
41604done
41605  done
41606IFS=$as_save_IFS
41607
41608fi
41609fi
41610ac_ct_NM=$ac_cv_prog_ac_ct_NM
41611if test -n "$ac_ct_NM"; then
41612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41613$as_echo "$ac_ct_NM" >&6; }
41614else
41615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41616$as_echo "no" >&6; }
41617fi
41618
41619
41620  test -n "$ac_ct_NM" && break
41621done
41622
41623  if test "x$ac_ct_NM" = x; then
41624    NM=""
41625  else
41626    case $cross_compiling:$ac_tool_warned in
41627yes:)
41628{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41629$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41630ac_tool_warned=yes ;;
41631esac
41632    NM=$ac_ct_NM
41633  fi
41634fi
41635
41636    else
41637      # If it succeeded, then it was overridden by the user. We will use it
41638      # for the tool.
41639
41640      # First remove it from the list of overridden variables, so we can test
41641      # for unknown variables in the end.
41642      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41643
41644      # Check if we try to supply an empty value
41645      if test "x$NM" = x; then
41646        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41647$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41648        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41649$as_echo_n "checking for NM... " >&6; }
41650        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41651$as_echo "disabled" >&6; }
41652      else
41653        # Check if the provided tool contains a complete path.
41654        tool_specified="$NM"
41655        tool_basename="${tool_specified##*/}"
41656        if test "x$tool_basename" = "x$tool_specified"; then
41657          # A command without a complete path is provided, search $PATH.
41658          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41659$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41660          # Extract the first word of "$tool_basename", so it can be a program name with args.
41661set dummy $tool_basename; ac_word=$2
41662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41663$as_echo_n "checking for $ac_word... " >&6; }
41664if ${ac_cv_path_NM+:} false; then :
41665  $as_echo_n "(cached) " >&6
41666else
41667  case $NM in
41668  [\\/]* | ?:[\\/]*)
41669  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41670  ;;
41671  *)
41672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41673for as_dir in $PATH
41674do
41675  IFS=$as_save_IFS
41676  test -z "$as_dir" && as_dir=.
41677    for ac_exec_ext in '' $ac_executable_extensions; do
41678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41679    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41681    break 2
41682  fi
41683done
41684  done
41685IFS=$as_save_IFS
41686
41687  ;;
41688esac
41689fi
41690NM=$ac_cv_path_NM
41691if test -n "$NM"; then
41692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41693$as_echo "$NM" >&6; }
41694else
41695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41696$as_echo "no" >&6; }
41697fi
41698
41699
41700          if test "x$NM" = x; then
41701            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41702          fi
41703        else
41704          # Otherwise we believe it is a complete path. Use it as it is.
41705          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41706$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41707          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41708$as_echo_n "checking for NM... " >&6; }
41709          if test ! -x "$tool_specified"; then
41710            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41711$as_echo "not found" >&6; }
41712            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41713          fi
41714          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41715$as_echo "$tool_specified" >&6; }
41716        fi
41717      fi
41718    fi
41719
41720  fi
41721
41722
41723    fi
41724
41725  # Only process if variable expands to non-empty
41726
41727  if test "x$NM" != x; then
41728    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41729
41730  # First separate the path from the arguments. This will split at the first
41731  # space.
41732  complete="$NM"
41733  path="${complete%% *}"
41734  tmp="$complete EOL"
41735  arguments="${tmp#* }"
41736
41737  # Input might be given as Windows format, start by converting to
41738  # unix format.
41739  new_path=`$CYGPATH -u "$path"`
41740
41741  # Now try to locate executable using which
41742  new_path=`$WHICH "$new_path" 2> /dev/null`
41743  # bat and cmd files are not always considered executable in cygwin causing which
41744  # to not find them
41745  if test "x$new_path" = x \
41746      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41747      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41748    new_path=`$CYGPATH -u "$path"`
41749  fi
41750  if test "x$new_path" = x; then
41751    # Oops. Which didn't find the executable.
41752    # The splitting of arguments from the executable at a space might have been incorrect,
41753    # since paths with space are more likely in Windows. Give it another try with the whole
41754    # argument.
41755    path="$complete"
41756    arguments="EOL"
41757    new_path=`$CYGPATH -u "$path"`
41758    new_path=`$WHICH "$new_path" 2> /dev/null`
41759    # bat and cmd files are not always considered executable in cygwin causing which
41760    # to not find them
41761    if test "x$new_path" = x \
41762        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41763        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41764      new_path=`$CYGPATH -u "$path"`
41765    fi
41766    if test "x$new_path" = x; then
41767      # It's still not found. Now this is an unrecoverable error.
41768      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41769$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41770      has_space=`$ECHO "$complete" | $GREP " "`
41771      if test "x$has_space" != x; then
41772        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41773$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41774      fi
41775      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41776    fi
41777  fi
41778
41779  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41780  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41781  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41782  # "foo.exe" is OK but "foo" is an error.
41783  #
41784  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41785  # It is also a way to make sure we got the proper file name for the real test later on.
41786  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41787  if test "x$test_shortpath" = x; then
41788    # Short path failed, file does not exist as specified.
41789    # Try adding .exe or .cmd
41790    if test -f "${new_path}.exe"; then
41791      input_to_shortpath="${new_path}.exe"
41792    elif test -f "${new_path}.cmd"; then
41793      input_to_shortpath="${new_path}.cmd"
41794    else
41795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41796$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41797      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41798$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41799      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41800    fi
41801  else
41802    input_to_shortpath="$new_path"
41803  fi
41804
41805  # Call helper function which possibly converts this using DOS-style short mode.
41806  # If so, the updated path is stored in $new_path.
41807  new_path="$input_to_shortpath"
41808
41809  input_path="$input_to_shortpath"
41810  # Check if we need to convert this using DOS-style short mode. If the path
41811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41812  # take no chances and rewrite it.
41813  # Note: m4 eats our [], so we need to use [ and ] instead.
41814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41815  if test "x$has_forbidden_chars" != x; then
41816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41817    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41818    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41819    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41820      # Going to short mode and back again did indeed matter. Since short mode is
41821      # case insensitive, let's make it lowercase to improve readability.
41822      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41823      # Now convert it back to Unix-style (cygpath)
41824      input_path=`$CYGPATH -u "$shortmode_path"`
41825      new_path="$input_path"
41826    fi
41827  fi
41828
41829  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41830  if test "x$test_cygdrive_prefix" = x; then
41831    # As a simple fix, exclude /usr/bin since it's not a real path.
41832    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41833      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41834      # a path prefixed by /cygdrive for fixpath to work.
41835      new_path="$CYGWIN_ROOT_PATH$input_path"
41836    fi
41837  fi
41838
41839  # remove trailing .exe if any
41840  new_path="${new_path/%.exe/}"
41841
41842    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41843
41844  # First separate the path from the arguments. This will split at the first
41845  # space.
41846  complete="$NM"
41847  path="${complete%% *}"
41848  tmp="$complete EOL"
41849  arguments="${tmp#* }"
41850
41851  # Input might be given as Windows format, start by converting to
41852  # unix format.
41853  new_path="$path"
41854
41855  windows_path="$new_path"
41856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41857    unix_path=`$CYGPATH -u "$windows_path"`
41858    new_path="$unix_path"
41859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41861    new_path="$unix_path"
41862  fi
41863
41864
41865  # Now try to locate executable using which
41866  new_path=`$WHICH "$new_path" 2> /dev/null`
41867
41868  if test "x$new_path" = x; then
41869    # Oops. Which didn't find the executable.
41870    # The splitting of arguments from the executable at a space might have been incorrect,
41871    # since paths with space are more likely in Windows. Give it another try with the whole
41872    # argument.
41873    path="$complete"
41874    arguments="EOL"
41875    new_path="$path"
41876
41877  windows_path="$new_path"
41878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41879    unix_path=`$CYGPATH -u "$windows_path"`
41880    new_path="$unix_path"
41881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41883    new_path="$unix_path"
41884  fi
41885
41886
41887    new_path=`$WHICH "$new_path" 2> /dev/null`
41888    # bat and cmd files are not always considered executable in MSYS causing which
41889    # to not find them
41890    if test "x$new_path" = x \
41891        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41892        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41893      new_path="$path"
41894
41895  windows_path="$new_path"
41896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41897    unix_path=`$CYGPATH -u "$windows_path"`
41898    new_path="$unix_path"
41899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41901    new_path="$unix_path"
41902  fi
41903
41904    fi
41905
41906    if test "x$new_path" = x; then
41907      # It's still not found. Now this is an unrecoverable error.
41908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41909$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41910      has_space=`$ECHO "$complete" | $GREP " "`
41911      if test "x$has_space" != x; then
41912        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41913$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41914      fi
41915      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41916    fi
41917  fi
41918
41919  # Now new_path has a complete unix path to the binary
41920  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41921    # Keep paths in /bin as-is, but remove trailing .exe if any
41922    new_path="${new_path/%.exe/}"
41923    # Do not save /bin paths to all_fixpath_prefixes!
41924  else
41925    # Not in mixed or Windows style, start by that.
41926    new_path=`cmd //c echo $new_path`
41927
41928  input_path="$new_path"
41929  # Check if we need to convert this using DOS-style short mode. If the path
41930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41931  # take no chances and rewrite it.
41932  # Note: m4 eats our [], so we need to use [ and ] instead.
41933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41934  if test "x$has_forbidden_chars" != x; then
41935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41936    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41937  fi
41938
41939    # Output is in $new_path
41940
41941  windows_path="$new_path"
41942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41943    unix_path=`$CYGPATH -u "$windows_path"`
41944    new_path="$unix_path"
41945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41947    new_path="$unix_path"
41948  fi
41949
41950    # remove trailing .exe if any
41951    new_path="${new_path/%.exe/}"
41952
41953    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41954    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41955  fi
41956
41957    else
41958      # We're on a unix platform. Hooray! :)
41959      # First separate the path from the arguments. This will split at the first
41960      # space.
41961      complete="$NM"
41962      path="${complete%% *}"
41963      tmp="$complete EOL"
41964      arguments="${tmp#* }"
41965
41966      # Cannot rely on the command "which" here since it doesn't always work.
41967      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41968      if test -z "$is_absolute_path"; then
41969        # Path to executable is not absolute. Find it.
41970        IFS_save="$IFS"
41971        IFS=:
41972        for p in $PATH; do
41973          if test -f "$p/$path" && test -x "$p/$path"; then
41974            new_path="$p/$path"
41975            break
41976          fi
41977        done
41978        IFS="$IFS_save"
41979      else
41980        # This is an absolute path, we can use it without further modifications.
41981        new_path="$path"
41982      fi
41983
41984      if test "x$new_path" = x; then
41985        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41986$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41987        has_space=`$ECHO "$complete" | $GREP " "`
41988        if test "x$has_space" != x; then
41989          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41990$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41991        fi
41992        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41993      fi
41994    fi
41995
41996    # Now join together the path and the arguments once again
41997    if test "x$arguments" != xEOL; then
41998      new_complete="$new_path ${arguments% *}"
41999    else
42000      new_complete="$new_path"
42001    fi
42002
42003    if test "x$complete" != "x$new_complete"; then
42004      NM="$new_complete"
42005      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42006$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42007    fi
42008  fi
42009
42010    GNM="$NM"
42011
42012  fi
42013
42014  # objcopy is used for moving debug symbols to separate files when
42015  # full debug symbols are enabled.
42016  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42017
42018
42019  # Publish this variable in the help.
42020
42021
42022  if [ -z "${OBJCOPY+x}" ]; then
42023    # The variable is not set by user, try to locate tool using the code snippet
42024    if test -n "$ac_tool_prefix"; then
42025  for ac_prog in gobjcopy objcopy
42026  do
42027    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42028set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42030$as_echo_n "checking for $ac_word... " >&6; }
42031if ${ac_cv_prog_OBJCOPY+:} false; then :
42032  $as_echo_n "(cached) " >&6
42033else
42034  if test -n "$OBJCOPY"; then
42035  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42036else
42037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42038for as_dir in $PATH
42039do
42040  IFS=$as_save_IFS
42041  test -z "$as_dir" && as_dir=.
42042    for ac_exec_ext in '' $ac_executable_extensions; do
42043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42044    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42046    break 2
42047  fi
42048done
42049  done
42050IFS=$as_save_IFS
42051
42052fi
42053fi
42054OBJCOPY=$ac_cv_prog_OBJCOPY
42055if test -n "$OBJCOPY"; then
42056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42057$as_echo "$OBJCOPY" >&6; }
42058else
42059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42060$as_echo "no" >&6; }
42061fi
42062
42063
42064    test -n "$OBJCOPY" && break
42065  done
42066fi
42067if test -z "$OBJCOPY"; then
42068  ac_ct_OBJCOPY=$OBJCOPY
42069  for ac_prog in gobjcopy objcopy
42070do
42071  # Extract the first word of "$ac_prog", so it can be a program name with args.
42072set dummy $ac_prog; ac_word=$2
42073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42074$as_echo_n "checking for $ac_word... " >&6; }
42075if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42076  $as_echo_n "(cached) " >&6
42077else
42078  if test -n "$ac_ct_OBJCOPY"; then
42079  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42080else
42081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42082for as_dir in $PATH
42083do
42084  IFS=$as_save_IFS
42085  test -z "$as_dir" && as_dir=.
42086    for ac_exec_ext in '' $ac_executable_extensions; do
42087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42088    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42090    break 2
42091  fi
42092done
42093  done
42094IFS=$as_save_IFS
42095
42096fi
42097fi
42098ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42099if test -n "$ac_ct_OBJCOPY"; then
42100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42101$as_echo "$ac_ct_OBJCOPY" >&6; }
42102else
42103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42104$as_echo "no" >&6; }
42105fi
42106
42107
42108  test -n "$ac_ct_OBJCOPY" && break
42109done
42110
42111  if test "x$ac_ct_OBJCOPY" = x; then
42112    OBJCOPY=""
42113  else
42114    case $cross_compiling:$ac_tool_warned in
42115yes:)
42116{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42117$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42118ac_tool_warned=yes ;;
42119esac
42120    OBJCOPY=$ac_ct_OBJCOPY
42121  fi
42122fi
42123
42124  else
42125    # The variable is set, but is it from the command line or the environment?
42126
42127    # Try to remove the string !OBJCOPY! from our list.
42128    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42129    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42130      # If it failed, the variable was not from the command line. Ignore it,
42131      # but warn the user (except for BASH, which is always set by the calling BASH).
42132      if test "xOBJCOPY" != xBASH; then
42133        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42134$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42135      fi
42136      # Try to locate tool using the code snippet
42137      if test -n "$ac_tool_prefix"; then
42138  for ac_prog in gobjcopy objcopy
42139  do
42140    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42141set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42143$as_echo_n "checking for $ac_word... " >&6; }
42144if ${ac_cv_prog_OBJCOPY+:} false; then :
42145  $as_echo_n "(cached) " >&6
42146else
42147  if test -n "$OBJCOPY"; then
42148  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42149else
42150as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42151for as_dir in $PATH
42152do
42153  IFS=$as_save_IFS
42154  test -z "$as_dir" && as_dir=.
42155    for ac_exec_ext in '' $ac_executable_extensions; do
42156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42157    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42159    break 2
42160  fi
42161done
42162  done
42163IFS=$as_save_IFS
42164
42165fi
42166fi
42167OBJCOPY=$ac_cv_prog_OBJCOPY
42168if test -n "$OBJCOPY"; then
42169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42170$as_echo "$OBJCOPY" >&6; }
42171else
42172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42173$as_echo "no" >&6; }
42174fi
42175
42176
42177    test -n "$OBJCOPY" && break
42178  done
42179fi
42180if test -z "$OBJCOPY"; then
42181  ac_ct_OBJCOPY=$OBJCOPY
42182  for ac_prog in gobjcopy objcopy
42183do
42184  # Extract the first word of "$ac_prog", so it can be a program name with args.
42185set dummy $ac_prog; ac_word=$2
42186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42187$as_echo_n "checking for $ac_word... " >&6; }
42188if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42189  $as_echo_n "(cached) " >&6
42190else
42191  if test -n "$ac_ct_OBJCOPY"; then
42192  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42193else
42194as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42195for as_dir in $PATH
42196do
42197  IFS=$as_save_IFS
42198  test -z "$as_dir" && as_dir=.
42199    for ac_exec_ext in '' $ac_executable_extensions; do
42200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42201    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42203    break 2
42204  fi
42205done
42206  done
42207IFS=$as_save_IFS
42208
42209fi
42210fi
42211ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42212if test -n "$ac_ct_OBJCOPY"; then
42213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42214$as_echo "$ac_ct_OBJCOPY" >&6; }
42215else
42216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42217$as_echo "no" >&6; }
42218fi
42219
42220
42221  test -n "$ac_ct_OBJCOPY" && break
42222done
42223
42224  if test "x$ac_ct_OBJCOPY" = x; then
42225    OBJCOPY=""
42226  else
42227    case $cross_compiling:$ac_tool_warned in
42228yes:)
42229{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42230$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42231ac_tool_warned=yes ;;
42232esac
42233    OBJCOPY=$ac_ct_OBJCOPY
42234  fi
42235fi
42236
42237    else
42238      # If it succeeded, then it was overridden by the user. We will use it
42239      # for the tool.
42240
42241      # First remove it from the list of overridden variables, so we can test
42242      # for unknown variables in the end.
42243      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42244
42245      # Check if we try to supply an empty value
42246      if test "x$OBJCOPY" = x; then
42247        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42248$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42249        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42250$as_echo_n "checking for OBJCOPY... " >&6; }
42251        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42252$as_echo "disabled" >&6; }
42253      else
42254        # Check if the provided tool contains a complete path.
42255        tool_specified="$OBJCOPY"
42256        tool_basename="${tool_specified##*/}"
42257        if test "x$tool_basename" = "x$tool_specified"; then
42258          # A command without a complete path is provided, search $PATH.
42259          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42260$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42261          # Extract the first word of "$tool_basename", so it can be a program name with args.
42262set dummy $tool_basename; ac_word=$2
42263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42264$as_echo_n "checking for $ac_word... " >&6; }
42265if ${ac_cv_path_OBJCOPY+:} false; then :
42266  $as_echo_n "(cached) " >&6
42267else
42268  case $OBJCOPY in
42269  [\\/]* | ?:[\\/]*)
42270  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42271  ;;
42272  *)
42273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42274for as_dir in $PATH
42275do
42276  IFS=$as_save_IFS
42277  test -z "$as_dir" && as_dir=.
42278    for ac_exec_ext in '' $ac_executable_extensions; do
42279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42280    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42282    break 2
42283  fi
42284done
42285  done
42286IFS=$as_save_IFS
42287
42288  ;;
42289esac
42290fi
42291OBJCOPY=$ac_cv_path_OBJCOPY
42292if test -n "$OBJCOPY"; then
42293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42294$as_echo "$OBJCOPY" >&6; }
42295else
42296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42297$as_echo "no" >&6; }
42298fi
42299
42300
42301          if test "x$OBJCOPY" = x; then
42302            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42303          fi
42304        else
42305          # Otherwise we believe it is a complete path. Use it as it is.
42306          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42307$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42308          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42309$as_echo_n "checking for OBJCOPY... " >&6; }
42310          if test ! -x "$tool_specified"; then
42311            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42312$as_echo "not found" >&6; }
42313            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42314          fi
42315          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42316$as_echo "$tool_specified" >&6; }
42317        fi
42318      fi
42319    fi
42320
42321  fi
42322
42323
42324    # Only call fixup if objcopy was found.
42325    if test -n "$OBJCOPY"; then
42326
42327  # Only process if variable expands to non-empty
42328
42329  if test "x$OBJCOPY" != x; then
42330    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42331
42332  # First separate the path from the arguments. This will split at the first
42333  # space.
42334  complete="$OBJCOPY"
42335  path="${complete%% *}"
42336  tmp="$complete EOL"
42337  arguments="${tmp#* }"
42338
42339  # Input might be given as Windows format, start by converting to
42340  # unix format.
42341  new_path=`$CYGPATH -u "$path"`
42342
42343  # Now try to locate executable using which
42344  new_path=`$WHICH "$new_path" 2> /dev/null`
42345  # bat and cmd files are not always considered executable in cygwin causing which
42346  # to not find them
42347  if test "x$new_path" = x \
42348      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42349      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42350    new_path=`$CYGPATH -u "$path"`
42351  fi
42352  if test "x$new_path" = x; then
42353    # Oops. Which didn't find the executable.
42354    # The splitting of arguments from the executable at a space might have been incorrect,
42355    # since paths with space are more likely in Windows. Give it another try with the whole
42356    # argument.
42357    path="$complete"
42358    arguments="EOL"
42359    new_path=`$CYGPATH -u "$path"`
42360    new_path=`$WHICH "$new_path" 2> /dev/null`
42361    # bat and cmd files are not always considered executable in cygwin causing which
42362    # to not find them
42363    if test "x$new_path" = x \
42364        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42365        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42366      new_path=`$CYGPATH -u "$path"`
42367    fi
42368    if test "x$new_path" = x; then
42369      # It's still not found. Now this is an unrecoverable error.
42370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42371$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42372      has_space=`$ECHO "$complete" | $GREP " "`
42373      if test "x$has_space" != x; then
42374        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42375$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42376      fi
42377      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42378    fi
42379  fi
42380
42381  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42382  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42383  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42384  # "foo.exe" is OK but "foo" is an error.
42385  #
42386  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42387  # It is also a way to make sure we got the proper file name for the real test later on.
42388  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42389  if test "x$test_shortpath" = x; then
42390    # Short path failed, file does not exist as specified.
42391    # Try adding .exe or .cmd
42392    if test -f "${new_path}.exe"; then
42393      input_to_shortpath="${new_path}.exe"
42394    elif test -f "${new_path}.cmd"; then
42395      input_to_shortpath="${new_path}.cmd"
42396    else
42397      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42398$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42399      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42400$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42401      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42402    fi
42403  else
42404    input_to_shortpath="$new_path"
42405  fi
42406
42407  # Call helper function which possibly converts this using DOS-style short mode.
42408  # If so, the updated path is stored in $new_path.
42409  new_path="$input_to_shortpath"
42410
42411  input_path="$input_to_shortpath"
42412  # Check if we need to convert this using DOS-style short mode. If the path
42413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42414  # take no chances and rewrite it.
42415  # Note: m4 eats our [], so we need to use [ and ] instead.
42416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42417  if test "x$has_forbidden_chars" != x; then
42418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42419    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42420    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42421    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42422      # Going to short mode and back again did indeed matter. Since short mode is
42423      # case insensitive, let's make it lowercase to improve readability.
42424      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42425      # Now convert it back to Unix-style (cygpath)
42426      input_path=`$CYGPATH -u "$shortmode_path"`
42427      new_path="$input_path"
42428    fi
42429  fi
42430
42431  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42432  if test "x$test_cygdrive_prefix" = x; then
42433    # As a simple fix, exclude /usr/bin since it's not a real path.
42434    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42435      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42436      # a path prefixed by /cygdrive for fixpath to work.
42437      new_path="$CYGWIN_ROOT_PATH$input_path"
42438    fi
42439  fi
42440
42441  # remove trailing .exe if any
42442  new_path="${new_path/%.exe/}"
42443
42444    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42445
42446  # First separate the path from the arguments. This will split at the first
42447  # space.
42448  complete="$OBJCOPY"
42449  path="${complete%% *}"
42450  tmp="$complete EOL"
42451  arguments="${tmp#* }"
42452
42453  # Input might be given as Windows format, start by converting to
42454  # unix format.
42455  new_path="$path"
42456
42457  windows_path="$new_path"
42458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42459    unix_path=`$CYGPATH -u "$windows_path"`
42460    new_path="$unix_path"
42461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42463    new_path="$unix_path"
42464  fi
42465
42466
42467  # Now try to locate executable using which
42468  new_path=`$WHICH "$new_path" 2> /dev/null`
42469
42470  if test "x$new_path" = x; then
42471    # Oops. Which didn't find the executable.
42472    # The splitting of arguments from the executable at a space might have been incorrect,
42473    # since paths with space are more likely in Windows. Give it another try with the whole
42474    # argument.
42475    path="$complete"
42476    arguments="EOL"
42477    new_path="$path"
42478
42479  windows_path="$new_path"
42480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42481    unix_path=`$CYGPATH -u "$windows_path"`
42482    new_path="$unix_path"
42483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42485    new_path="$unix_path"
42486  fi
42487
42488
42489    new_path=`$WHICH "$new_path" 2> /dev/null`
42490    # bat and cmd files are not always considered executable in MSYS causing which
42491    # to not find them
42492    if test "x$new_path" = x \
42493        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42494        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42495      new_path="$path"
42496
42497  windows_path="$new_path"
42498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42499    unix_path=`$CYGPATH -u "$windows_path"`
42500    new_path="$unix_path"
42501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42503    new_path="$unix_path"
42504  fi
42505
42506    fi
42507
42508    if test "x$new_path" = x; then
42509      # It's still not found. Now this is an unrecoverable error.
42510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42511$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42512      has_space=`$ECHO "$complete" | $GREP " "`
42513      if test "x$has_space" != x; then
42514        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42515$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42516      fi
42517      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42518    fi
42519  fi
42520
42521  # Now new_path has a complete unix path to the binary
42522  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42523    # Keep paths in /bin as-is, but remove trailing .exe if any
42524    new_path="${new_path/%.exe/}"
42525    # Do not save /bin paths to all_fixpath_prefixes!
42526  else
42527    # Not in mixed or Windows style, start by that.
42528    new_path=`cmd //c echo $new_path`
42529
42530  input_path="$new_path"
42531  # Check if we need to convert this using DOS-style short mode. If the path
42532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42533  # take no chances and rewrite it.
42534  # Note: m4 eats our [], so we need to use [ and ] instead.
42535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42536  if test "x$has_forbidden_chars" != x; then
42537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42538    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42539  fi
42540
42541    # Output is in $new_path
42542
42543  windows_path="$new_path"
42544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42545    unix_path=`$CYGPATH -u "$windows_path"`
42546    new_path="$unix_path"
42547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42549    new_path="$unix_path"
42550  fi
42551
42552    # remove trailing .exe if any
42553    new_path="${new_path/%.exe/}"
42554
42555    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42556    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42557  fi
42558
42559    else
42560      # We're on a unix platform. Hooray! :)
42561      # First separate the path from the arguments. This will split at the first
42562      # space.
42563      complete="$OBJCOPY"
42564      path="${complete%% *}"
42565      tmp="$complete EOL"
42566      arguments="${tmp#* }"
42567
42568      # Cannot rely on the command "which" here since it doesn't always work.
42569      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42570      if test -z "$is_absolute_path"; then
42571        # Path to executable is not absolute. Find it.
42572        IFS_save="$IFS"
42573        IFS=:
42574        for p in $PATH; do
42575          if test -f "$p/$path" && test -x "$p/$path"; then
42576            new_path="$p/$path"
42577            break
42578          fi
42579        done
42580        IFS="$IFS_save"
42581      else
42582        # This is an absolute path, we can use it without further modifications.
42583        new_path="$path"
42584      fi
42585
42586      if test "x$new_path" = x; then
42587        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42588$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42589        has_space=`$ECHO "$complete" | $GREP " "`
42590        if test "x$has_space" != x; then
42591          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42592$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42593        fi
42594        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42595      fi
42596    fi
42597
42598    # Now join together the path and the arguments once again
42599    if test "x$arguments" != xEOL; then
42600      new_complete="$new_path ${arguments% *}"
42601    else
42602      new_complete="$new_path"
42603    fi
42604
42605    if test "x$complete" != "x$new_complete"; then
42606      OBJCOPY="$new_complete"
42607      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
42608$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
42609    fi
42610  fi
42611
42612      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
42613        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
42614        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
42615        # - version number is last blank separate word on first line
42616        # - version number formats that have been seen:
42617        #   - <major>.<minor>
42618        #   - <major>.<minor>.<micro>
42619        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
42620        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
42621         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
42622              -e 's/.* //' \
42623              -e '/^[01]\./b bad' \
42624              -e '/^2\./{' \
42625              -e '  s/^2\.//' \
42626              -e '  /^[0-9]$/b bad' \
42627              -e '  /^[0-9]\./b bad' \
42628              -e '  /^1[0-9]$/b bad' \
42629              -e '  /^1[0-9]\./b bad' \
42630              -e '  /^20\./b bad' \
42631              -e '  /^21\.0$/b bad' \
42632              -e '  /^21\.0\./b bad' \
42633              -e '}' \
42634              -e ':good' \
42635              -e 's/.*/VALID_VERSION/p' \
42636              -e 'q' \
42637              -e ':bad' \
42638              -e 's/.*/BAD_VERSION/p' \
42639              -e 'q'`
42640        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
42641          OBJCOPY=
42642          { $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
42643$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
42644          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
42645$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
42646          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
42647$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
42648          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
42649$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
42650          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
42651$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
42652        fi
42653      fi
42654    fi
42655  fi
42656
42657
42658
42659  # Publish this variable in the help.
42660
42661
42662  if [ -z "${OBJDUMP+x}" ]; then
42663    # The variable is not set by user, try to locate tool using the code snippet
42664    if test -n "$ac_tool_prefix"; then
42665  for ac_prog in gobjdump objdump
42666  do
42667    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42668set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42670$as_echo_n "checking for $ac_word... " >&6; }
42671if ${ac_cv_prog_OBJDUMP+:} false; then :
42672  $as_echo_n "(cached) " >&6
42673else
42674  if test -n "$OBJDUMP"; then
42675  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42676else
42677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42678for as_dir in $PATH
42679do
42680  IFS=$as_save_IFS
42681  test -z "$as_dir" && as_dir=.
42682    for ac_exec_ext in '' $ac_executable_extensions; do
42683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42684    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42686    break 2
42687  fi
42688done
42689  done
42690IFS=$as_save_IFS
42691
42692fi
42693fi
42694OBJDUMP=$ac_cv_prog_OBJDUMP
42695if test -n "$OBJDUMP"; then
42696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42697$as_echo "$OBJDUMP" >&6; }
42698else
42699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42700$as_echo "no" >&6; }
42701fi
42702
42703
42704    test -n "$OBJDUMP" && break
42705  done
42706fi
42707if test -z "$OBJDUMP"; then
42708  ac_ct_OBJDUMP=$OBJDUMP
42709  for ac_prog in gobjdump objdump
42710do
42711  # Extract the first word of "$ac_prog", so it can be a program name with args.
42712set dummy $ac_prog; ac_word=$2
42713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42714$as_echo_n "checking for $ac_word... " >&6; }
42715if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42716  $as_echo_n "(cached) " >&6
42717else
42718  if test -n "$ac_ct_OBJDUMP"; then
42719  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42720else
42721as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42722for as_dir in $PATH
42723do
42724  IFS=$as_save_IFS
42725  test -z "$as_dir" && as_dir=.
42726    for ac_exec_ext in '' $ac_executable_extensions; do
42727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42728    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42730    break 2
42731  fi
42732done
42733  done
42734IFS=$as_save_IFS
42735
42736fi
42737fi
42738ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42739if test -n "$ac_ct_OBJDUMP"; then
42740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42741$as_echo "$ac_ct_OBJDUMP" >&6; }
42742else
42743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42744$as_echo "no" >&6; }
42745fi
42746
42747
42748  test -n "$ac_ct_OBJDUMP" && break
42749done
42750
42751  if test "x$ac_ct_OBJDUMP" = x; then
42752    OBJDUMP=""
42753  else
42754    case $cross_compiling:$ac_tool_warned in
42755yes:)
42756{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42757$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42758ac_tool_warned=yes ;;
42759esac
42760    OBJDUMP=$ac_ct_OBJDUMP
42761  fi
42762fi
42763
42764  else
42765    # The variable is set, but is it from the command line or the environment?
42766
42767    # Try to remove the string !OBJDUMP! from our list.
42768    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
42769    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42770      # If it failed, the variable was not from the command line. Ignore it,
42771      # but warn the user (except for BASH, which is always set by the calling BASH).
42772      if test "xOBJDUMP" != xBASH; then
42773        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
42774$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
42775      fi
42776      # Try to locate tool using the code snippet
42777      if test -n "$ac_tool_prefix"; then
42778  for ac_prog in gobjdump objdump
42779  do
42780    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42781set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42783$as_echo_n "checking for $ac_word... " >&6; }
42784if ${ac_cv_prog_OBJDUMP+:} false; then :
42785  $as_echo_n "(cached) " >&6
42786else
42787  if test -n "$OBJDUMP"; then
42788  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42789else
42790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42791for as_dir in $PATH
42792do
42793  IFS=$as_save_IFS
42794  test -z "$as_dir" && as_dir=.
42795    for ac_exec_ext in '' $ac_executable_extensions; do
42796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42797    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42799    break 2
42800  fi
42801done
42802  done
42803IFS=$as_save_IFS
42804
42805fi
42806fi
42807OBJDUMP=$ac_cv_prog_OBJDUMP
42808if test -n "$OBJDUMP"; then
42809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42810$as_echo "$OBJDUMP" >&6; }
42811else
42812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42813$as_echo "no" >&6; }
42814fi
42815
42816
42817    test -n "$OBJDUMP" && break
42818  done
42819fi
42820if test -z "$OBJDUMP"; then
42821  ac_ct_OBJDUMP=$OBJDUMP
42822  for ac_prog in gobjdump objdump
42823do
42824  # Extract the first word of "$ac_prog", so it can be a program name with args.
42825set dummy $ac_prog; ac_word=$2
42826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42827$as_echo_n "checking for $ac_word... " >&6; }
42828if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42829  $as_echo_n "(cached) " >&6
42830else
42831  if test -n "$ac_ct_OBJDUMP"; then
42832  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42833else
42834as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42835for as_dir in $PATH
42836do
42837  IFS=$as_save_IFS
42838  test -z "$as_dir" && as_dir=.
42839    for ac_exec_ext in '' $ac_executable_extensions; do
42840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42841    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42843    break 2
42844  fi
42845done
42846  done
42847IFS=$as_save_IFS
42848
42849fi
42850fi
42851ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42852if test -n "$ac_ct_OBJDUMP"; then
42853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42854$as_echo "$ac_ct_OBJDUMP" >&6; }
42855else
42856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42857$as_echo "no" >&6; }
42858fi
42859
42860
42861  test -n "$ac_ct_OBJDUMP" && break
42862done
42863
42864  if test "x$ac_ct_OBJDUMP" = x; then
42865    OBJDUMP=""
42866  else
42867    case $cross_compiling:$ac_tool_warned in
42868yes:)
42869{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42870$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42871ac_tool_warned=yes ;;
42872esac
42873    OBJDUMP=$ac_ct_OBJDUMP
42874  fi
42875fi
42876
42877    else
42878      # If it succeeded, then it was overridden by the user. We will use it
42879      # for the tool.
42880
42881      # First remove it from the list of overridden variables, so we can test
42882      # for unknown variables in the end.
42883      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42884
42885      # Check if we try to supply an empty value
42886      if test "x$OBJDUMP" = x; then
42887        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42888$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42889        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42890$as_echo_n "checking for OBJDUMP... " >&6; }
42891        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42892$as_echo "disabled" >&6; }
42893      else
42894        # Check if the provided tool contains a complete path.
42895        tool_specified="$OBJDUMP"
42896        tool_basename="${tool_specified##*/}"
42897        if test "x$tool_basename" = "x$tool_specified"; then
42898          # A command without a complete path is provided, search $PATH.
42899          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42900$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42901          # Extract the first word of "$tool_basename", so it can be a program name with args.
42902set dummy $tool_basename; ac_word=$2
42903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42904$as_echo_n "checking for $ac_word... " >&6; }
42905if ${ac_cv_path_OBJDUMP+:} false; then :
42906  $as_echo_n "(cached) " >&6
42907else
42908  case $OBJDUMP in
42909  [\\/]* | ?:[\\/]*)
42910  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42911  ;;
42912  *)
42913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42914for as_dir in $PATH
42915do
42916  IFS=$as_save_IFS
42917  test -z "$as_dir" && as_dir=.
42918    for ac_exec_ext in '' $ac_executable_extensions; do
42919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42920    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42922    break 2
42923  fi
42924done
42925  done
42926IFS=$as_save_IFS
42927
42928  ;;
42929esac
42930fi
42931OBJDUMP=$ac_cv_path_OBJDUMP
42932if test -n "$OBJDUMP"; then
42933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42934$as_echo "$OBJDUMP" >&6; }
42935else
42936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42937$as_echo "no" >&6; }
42938fi
42939
42940
42941          if test "x$OBJDUMP" = x; then
42942            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42943          fi
42944        else
42945          # Otherwise we believe it is a complete path. Use it as it is.
42946          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42947$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42948          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42949$as_echo_n "checking for OBJDUMP... " >&6; }
42950          if test ! -x "$tool_specified"; then
42951            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42952$as_echo "not found" >&6; }
42953            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42954          fi
42955          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42956$as_echo "$tool_specified" >&6; }
42957        fi
42958      fi
42959    fi
42960
42961  fi
42962
42963
42964  if test "x$OBJDUMP" != x; then
42965    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42966    # bails if argument is missing.
42967
42968  # Only process if variable expands to non-empty
42969
42970  if test "x$OBJDUMP" != x; then
42971    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42972
42973  # First separate the path from the arguments. This will split at the first
42974  # space.
42975  complete="$OBJDUMP"
42976  path="${complete%% *}"
42977  tmp="$complete EOL"
42978  arguments="${tmp#* }"
42979
42980  # Input might be given as Windows format, start by converting to
42981  # unix format.
42982  new_path=`$CYGPATH -u "$path"`
42983
42984  # Now try to locate executable using which
42985  new_path=`$WHICH "$new_path" 2> /dev/null`
42986  # bat and cmd files are not always considered executable in cygwin causing which
42987  # to not find them
42988  if test "x$new_path" = x \
42989      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42990      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42991    new_path=`$CYGPATH -u "$path"`
42992  fi
42993  if test "x$new_path" = x; then
42994    # Oops. Which didn't find the executable.
42995    # The splitting of arguments from the executable at a space might have been incorrect,
42996    # since paths with space are more likely in Windows. Give it another try with the whole
42997    # argument.
42998    path="$complete"
42999    arguments="EOL"
43000    new_path=`$CYGPATH -u "$path"`
43001    new_path=`$WHICH "$new_path" 2> /dev/null`
43002    # bat and cmd files are not always considered executable in cygwin causing which
43003    # to not find them
43004    if test "x$new_path" = x \
43005        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43006        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43007      new_path=`$CYGPATH -u "$path"`
43008    fi
43009    if test "x$new_path" = x; then
43010      # It's still not found. Now this is an unrecoverable error.
43011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43012$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43013      has_space=`$ECHO "$complete" | $GREP " "`
43014      if test "x$has_space" != x; then
43015        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43016$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43017      fi
43018      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43019    fi
43020  fi
43021
43022  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43023  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43024  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43025  # "foo.exe" is OK but "foo" is an error.
43026  #
43027  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43028  # It is also a way to make sure we got the proper file name for the real test later on.
43029  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43030  if test "x$test_shortpath" = x; then
43031    # Short path failed, file does not exist as specified.
43032    # Try adding .exe or .cmd
43033    if test -f "${new_path}.exe"; then
43034      input_to_shortpath="${new_path}.exe"
43035    elif test -f "${new_path}.cmd"; then
43036      input_to_shortpath="${new_path}.cmd"
43037    else
43038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43039$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43040      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43041$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43042      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43043    fi
43044  else
43045    input_to_shortpath="$new_path"
43046  fi
43047
43048  # Call helper function which possibly converts this using DOS-style short mode.
43049  # If so, the updated path is stored in $new_path.
43050  new_path="$input_to_shortpath"
43051
43052  input_path="$input_to_shortpath"
43053  # Check if we need to convert this using DOS-style short mode. If the path
43054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43055  # take no chances and rewrite it.
43056  # Note: m4 eats our [], so we need to use [ and ] instead.
43057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43058  if test "x$has_forbidden_chars" != x; then
43059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43060    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43061    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43062    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43063      # Going to short mode and back again did indeed matter. Since short mode is
43064      # case insensitive, let's make it lowercase to improve readability.
43065      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43066      # Now convert it back to Unix-style (cygpath)
43067      input_path=`$CYGPATH -u "$shortmode_path"`
43068      new_path="$input_path"
43069    fi
43070  fi
43071
43072  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43073  if test "x$test_cygdrive_prefix" = x; then
43074    # As a simple fix, exclude /usr/bin since it's not a real path.
43075    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43076      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43077      # a path prefixed by /cygdrive for fixpath to work.
43078      new_path="$CYGWIN_ROOT_PATH$input_path"
43079    fi
43080  fi
43081
43082  # remove trailing .exe if any
43083  new_path="${new_path/%.exe/}"
43084
43085    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43086
43087  # First separate the path from the arguments. This will split at the first
43088  # space.
43089  complete="$OBJDUMP"
43090  path="${complete%% *}"
43091  tmp="$complete EOL"
43092  arguments="${tmp#* }"
43093
43094  # Input might be given as Windows format, start by converting to
43095  # unix format.
43096  new_path="$path"
43097
43098  windows_path="$new_path"
43099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43100    unix_path=`$CYGPATH -u "$windows_path"`
43101    new_path="$unix_path"
43102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43104    new_path="$unix_path"
43105  fi
43106
43107
43108  # Now try to locate executable using which
43109  new_path=`$WHICH "$new_path" 2> /dev/null`
43110
43111  if test "x$new_path" = x; then
43112    # Oops. Which didn't find the executable.
43113    # The splitting of arguments from the executable at a space might have been incorrect,
43114    # since paths with space are more likely in Windows. Give it another try with the whole
43115    # argument.
43116    path="$complete"
43117    arguments="EOL"
43118    new_path="$path"
43119
43120  windows_path="$new_path"
43121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43122    unix_path=`$CYGPATH -u "$windows_path"`
43123    new_path="$unix_path"
43124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43126    new_path="$unix_path"
43127  fi
43128
43129
43130    new_path=`$WHICH "$new_path" 2> /dev/null`
43131    # bat and cmd files are not always considered executable in MSYS causing which
43132    # to not find them
43133    if test "x$new_path" = x \
43134        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43135        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43136      new_path="$path"
43137
43138  windows_path="$new_path"
43139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43140    unix_path=`$CYGPATH -u "$windows_path"`
43141    new_path="$unix_path"
43142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43144    new_path="$unix_path"
43145  fi
43146
43147    fi
43148
43149    if test "x$new_path" = x; then
43150      # It's still not found. Now this is an unrecoverable error.
43151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43152$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43153      has_space=`$ECHO "$complete" | $GREP " "`
43154      if test "x$has_space" != x; then
43155        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43156$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43157      fi
43158      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43159    fi
43160  fi
43161
43162  # Now new_path has a complete unix path to the binary
43163  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43164    # Keep paths in /bin as-is, but remove trailing .exe if any
43165    new_path="${new_path/%.exe/}"
43166    # Do not save /bin paths to all_fixpath_prefixes!
43167  else
43168    # Not in mixed or Windows style, start by that.
43169    new_path=`cmd //c echo $new_path`
43170
43171  input_path="$new_path"
43172  # Check if we need to convert this using DOS-style short mode. If the path
43173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43174  # take no chances and rewrite it.
43175  # Note: m4 eats our [], so we need to use [ and ] instead.
43176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43177  if test "x$has_forbidden_chars" != x; then
43178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43179    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43180  fi
43181
43182    # Output is in $new_path
43183
43184  windows_path="$new_path"
43185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43186    unix_path=`$CYGPATH -u "$windows_path"`
43187    new_path="$unix_path"
43188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43190    new_path="$unix_path"
43191  fi
43192
43193    # remove trailing .exe if any
43194    new_path="${new_path/%.exe/}"
43195
43196    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43197    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43198  fi
43199
43200    else
43201      # We're on a unix platform. Hooray! :)
43202      # First separate the path from the arguments. This will split at the first
43203      # space.
43204      complete="$OBJDUMP"
43205      path="${complete%% *}"
43206      tmp="$complete EOL"
43207      arguments="${tmp#* }"
43208
43209      # Cannot rely on the command "which" here since it doesn't always work.
43210      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43211      if test -z "$is_absolute_path"; then
43212        # Path to executable is not absolute. Find it.
43213        IFS_save="$IFS"
43214        IFS=:
43215        for p in $PATH; do
43216          if test -f "$p/$path" && test -x "$p/$path"; then
43217            new_path="$p/$path"
43218            break
43219          fi
43220        done
43221        IFS="$IFS_save"
43222      else
43223        # This is an absolute path, we can use it without further modifications.
43224        new_path="$path"
43225      fi
43226
43227      if test "x$new_path" = x; then
43228        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43229$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43230        has_space=`$ECHO "$complete" | $GREP " "`
43231        if test "x$has_space" != x; then
43232          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43233$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43234        fi
43235        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43236      fi
43237    fi
43238
43239    # Now join together the path and the arguments once again
43240    if test "x$arguments" != xEOL; then
43241      new_complete="$new_path ${arguments% *}"
43242    else
43243      new_complete="$new_path"
43244    fi
43245
43246    if test "x$complete" != "x$new_complete"; then
43247      OBJDUMP="$new_complete"
43248      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43249$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43250    fi
43251  fi
43252
43253  fi
43254
43255
43256  # Restore old path.
43257  PATH="$OLD_PATH"
43258
43259  # Restore the flags to the user specified values.
43260  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43261  CFLAGS="$ORG_CFLAGS"
43262  CXXFLAGS="$ORG_CXXFLAGS"
43263
43264
43265# Finally do some processing after the detection phase
43266
43267  if test "x$COMPILE_TYPE" = "xcross"; then
43268    # Now we need to find a C/C++ compiler that can build executables for the
43269    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43270    # used once. Also, we need to do this without adding a tools dir to the
43271    # path, otherwise we might pick up cross-compilers which don't use standard
43272    # naming.
43273
43274    OLDPATH="$PATH"
43275
43276
43277# Check whether --with-build-devkit was given.
43278if test "${with_build_devkit+set}" = set; then :
43279  withval=$with_build_devkit;
43280fi
43281
43282    if test "x$with_build_devkit" = "xyes"; then
43283      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43284    elif test -n "$with_build_devkit"; then
43285      if test ! -d "$with_build_devkit"; then
43286        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43287      else
43288
43289  # Only process if variable expands to non-empty
43290
43291  if test "x$with_build_devkit" != x; then
43292    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43293
43294  # Input might be given as Windows format, start by converting to
43295  # unix format.
43296  path="$with_build_devkit"
43297  new_path=`$CYGPATH -u "$path"`
43298
43299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43302  # "foo.exe" is OK but "foo" is an error.
43303  #
43304  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43305  # It is also a way to make sure we got the proper file name for the real test later on.
43306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43307  if test "x$test_shortpath" = x; then
43308    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43309$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43310    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43311  fi
43312
43313  # Call helper function which possibly converts this using DOS-style short mode.
43314  # If so, the updated path is stored in $new_path.
43315
43316  input_path="$new_path"
43317  # Check if we need to convert this using DOS-style short mode. If the path
43318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43319  # take no chances and rewrite it.
43320  # Note: m4 eats our [], so we need to use [ and ] instead.
43321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43322  if test "x$has_forbidden_chars" != x; then
43323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43327      # Going to short mode and back again did indeed matter. Since short mode is
43328      # case insensitive, let's make it lowercase to improve readability.
43329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43330      # Now convert it back to Unix-style (cygpath)
43331      input_path=`$CYGPATH -u "$shortmode_path"`
43332      new_path="$input_path"
43333    fi
43334  fi
43335
43336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43337  if test "x$test_cygdrive_prefix" = x; then
43338    # As a simple fix, exclude /usr/bin since it's not a real path.
43339    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43341      # a path prefixed by /cygdrive for fixpath to work.
43342      new_path="$CYGWIN_ROOT_PATH$input_path"
43343    fi
43344  fi
43345
43346
43347  if test "x$path" != "x$new_path"; then
43348    with_build_devkit="$new_path"
43349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43350$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43351  fi
43352
43353    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43354
43355  path="$with_build_devkit"
43356  has_colon=`$ECHO $path | $GREP ^.:`
43357  new_path="$path"
43358  if test "x$has_colon" = x; then
43359    # Not in mixed or Windows style, start by that.
43360    new_path=`cmd //c echo $path`
43361  fi
43362
43363
43364  input_path="$new_path"
43365  # Check if we need to convert this using DOS-style short mode. If the path
43366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43367  # take no chances and rewrite it.
43368  # Note: m4 eats our [], so we need to use [ and ] instead.
43369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43370  if test "x$has_forbidden_chars" != x; then
43371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43372    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43373  fi
43374
43375
43376  windows_path="$new_path"
43377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43378    unix_path=`$CYGPATH -u "$windows_path"`
43379    new_path="$unix_path"
43380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43382    new_path="$unix_path"
43383  fi
43384
43385  if test "x$path" != "x$new_path"; then
43386    with_build_devkit="$new_path"
43387    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43388$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43389  fi
43390
43391  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43392  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43393
43394    else
43395      # We're on a unix platform. Hooray! :)
43396      path="$with_build_devkit"
43397      has_space=`$ECHO "$path" | $GREP " "`
43398      if test "x$has_space" != x; then
43399        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43400$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43401        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43402      fi
43403
43404      # Use eval to expand a potential ~
43405      eval path="$path"
43406      if test ! -f "$path" && test ! -d "$path"; then
43407        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43408      fi
43409
43410      if test -d "$path"; then
43411        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43412      else
43413        dir="`$DIRNAME "$path"`"
43414        base="`$BASENAME "$path"`"
43415        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43416      fi
43417    fi
43418  fi
43419
43420        BUILD_DEVKIT_ROOT="$with_build_devkit"
43421        # Check for a meta data info file in the root of the devkit
43422        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43423          # Process devkit.info so that existing devkit variables are not
43424          # modified by this
43425          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43426              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43427              -e "s/\$host/\$build/g" \
43428              $BUILD_DEVKIT_ROOT/devkit.info \
43429              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43430          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43431          # This potentially sets the following:
43432          # A descriptive name of the devkit
43433
43434  if test "x$BUILD_DEVKIT_NAME" = x; then
43435    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43436  fi
43437
43438          # Corresponds to --with-extra-path
43439
43440  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43441    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43442  fi
43443
43444          # Corresponds to --with-toolchain-path
43445
43446  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43447    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43448  fi
43449
43450          # Corresponds to --with-sysroot
43451
43452  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43453    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43454  fi
43455
43456          # Skip the Window specific parts
43457        fi
43458
43459        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43460$as_echo_n "checking for build platform devkit... " >&6; }
43461        if test "x$BUILD_DEVKIT_NAME" != x; then
43462          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43463$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43464        else
43465          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43466$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43467        fi
43468
43469        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43470
43471  if test "x$BUILD_SYSROOT" != "x"; then
43472    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43473      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43474        # Solaris Studio does not have a concept of sysroot. Instead we must
43475        # make sure the default include and lib dirs are appended to each
43476        # compile and link command line. Must also add -I-xbuiltin to enable
43477        # inlining of system functions and intrinsics.
43478        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43479        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43480            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43481            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43482      fi
43483    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43484      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43485      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43486    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43487      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43488      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43489    fi
43490    # Propagate the sysroot args to hotspot
43491    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43492    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43493    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43494    # The global CFLAGS and LDFLAGS variables need these for configure to function
43495    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43496    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43497    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43498    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43499  fi
43500
43501  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43502    # We also need -iframework<path>/System/Library/Frameworks
43503    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43504    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43505    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43506    # set this here so it doesn't have to be peppered throughout the forest
43507    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43508    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43509  fi
43510
43511
43512
43513
43514
43515         # Fallback default of just /bin if DEVKIT_PATH is not defined
43516        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43517          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43518        fi
43519        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43520      fi
43521    fi
43522
43523    # FIXME: we should list the discovered compilers as an exclude pattern!
43524    # If we do that, we can do this detection before POST_DETECTION, and still
43525    # find the build compilers in the tools dir, if needed.
43526
43527
43528
43529  # Publish this variable in the help.
43530
43531
43532  if [ -z "${BUILD_CC+x}" ]; then
43533    # The variable is not set by user, try to locate tool using the code snippet
43534    for ac_prog in cl cc gcc
43535do
43536  # Extract the first word of "$ac_prog", so it can be a program name with args.
43537set dummy $ac_prog; ac_word=$2
43538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43539$as_echo_n "checking for $ac_word... " >&6; }
43540if ${ac_cv_path_BUILD_CC+:} false; then :
43541  $as_echo_n "(cached) " >&6
43542else
43543  case $BUILD_CC in
43544  [\\/]* | ?:[\\/]*)
43545  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43546  ;;
43547  *)
43548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43549for as_dir in $PATH
43550do
43551  IFS=$as_save_IFS
43552  test -z "$as_dir" && as_dir=.
43553    for ac_exec_ext in '' $ac_executable_extensions; do
43554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43555    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43557    break 2
43558  fi
43559done
43560  done
43561IFS=$as_save_IFS
43562
43563  ;;
43564esac
43565fi
43566BUILD_CC=$ac_cv_path_BUILD_CC
43567if test -n "$BUILD_CC"; then
43568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43569$as_echo "$BUILD_CC" >&6; }
43570else
43571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43572$as_echo "no" >&6; }
43573fi
43574
43575
43576  test -n "$BUILD_CC" && break
43577done
43578
43579  else
43580    # The variable is set, but is it from the command line or the environment?
43581
43582    # Try to remove the string !BUILD_CC! from our list.
43583    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
43584    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43585      # If it failed, the variable was not from the command line. Ignore it,
43586      # but warn the user (except for BASH, which is always set by the calling BASH).
43587      if test "xBUILD_CC" != xBASH; then
43588        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
43589$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
43590      fi
43591      # Try to locate tool using the code snippet
43592      for ac_prog in cl cc gcc
43593do
43594  # Extract the first word of "$ac_prog", so it can be a program name with args.
43595set dummy $ac_prog; ac_word=$2
43596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43597$as_echo_n "checking for $ac_word... " >&6; }
43598if ${ac_cv_path_BUILD_CC+:} false; then :
43599  $as_echo_n "(cached) " >&6
43600else
43601  case $BUILD_CC in
43602  [\\/]* | ?:[\\/]*)
43603  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43604  ;;
43605  *)
43606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43607for as_dir in $PATH
43608do
43609  IFS=$as_save_IFS
43610  test -z "$as_dir" && as_dir=.
43611    for ac_exec_ext in '' $ac_executable_extensions; do
43612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43613    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43615    break 2
43616  fi
43617done
43618  done
43619IFS=$as_save_IFS
43620
43621  ;;
43622esac
43623fi
43624BUILD_CC=$ac_cv_path_BUILD_CC
43625if test -n "$BUILD_CC"; then
43626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43627$as_echo "$BUILD_CC" >&6; }
43628else
43629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43630$as_echo "no" >&6; }
43631fi
43632
43633
43634  test -n "$BUILD_CC" && break
43635done
43636
43637    else
43638      # If it succeeded, then it was overridden by the user. We will use it
43639      # for the tool.
43640
43641      # First remove it from the list of overridden variables, so we can test
43642      # for unknown variables in the end.
43643      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43644
43645      # Check if we try to supply an empty value
43646      if test "x$BUILD_CC" = x; then
43647        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
43648$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
43649        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43650$as_echo_n "checking for BUILD_CC... " >&6; }
43651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43652$as_echo "disabled" >&6; }
43653      else
43654        # Check if the provided tool contains a complete path.
43655        tool_specified="$BUILD_CC"
43656        tool_basename="${tool_specified##*/}"
43657        if test "x$tool_basename" = "x$tool_specified"; then
43658          # A command without a complete path is provided, search $PATH.
43659          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
43660$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
43661          # Extract the first word of "$tool_basename", so it can be a program name with args.
43662set dummy $tool_basename; ac_word=$2
43663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43664$as_echo_n "checking for $ac_word... " >&6; }
43665if ${ac_cv_path_BUILD_CC+:} false; then :
43666  $as_echo_n "(cached) " >&6
43667else
43668  case $BUILD_CC in
43669  [\\/]* | ?:[\\/]*)
43670  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43671  ;;
43672  *)
43673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43674for as_dir in $PATH
43675do
43676  IFS=$as_save_IFS
43677  test -z "$as_dir" && as_dir=.
43678    for ac_exec_ext in '' $ac_executable_extensions; do
43679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43680    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43682    break 2
43683  fi
43684done
43685  done
43686IFS=$as_save_IFS
43687
43688  ;;
43689esac
43690fi
43691BUILD_CC=$ac_cv_path_BUILD_CC
43692if test -n "$BUILD_CC"; then
43693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43694$as_echo "$BUILD_CC" >&6; }
43695else
43696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43697$as_echo "no" >&6; }
43698fi
43699
43700
43701          if test "x$BUILD_CC" = x; then
43702            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43703          fi
43704        else
43705          # Otherwise we believe it is a complete path. Use it as it is.
43706          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
43707$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
43708          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43709$as_echo_n "checking for BUILD_CC... " >&6; }
43710          if test ! -x "$tool_specified"; then
43711            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43712$as_echo "not found" >&6; }
43713            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
43714          fi
43715          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43716$as_echo "$tool_specified" >&6; }
43717        fi
43718      fi
43719    fi
43720
43721  fi
43722
43723
43724
43725  if test "x$BUILD_CC" = x; then
43726    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
43727  fi
43728
43729
43730
43731  # Only process if variable expands to non-empty
43732
43733  if test "x$BUILD_CC" != x; then
43734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43735
43736  # First separate the path from the arguments. This will split at the first
43737  # space.
43738  complete="$BUILD_CC"
43739  path="${complete%% *}"
43740  tmp="$complete EOL"
43741  arguments="${tmp#* }"
43742
43743  # Input might be given as Windows format, start by converting to
43744  # unix format.
43745  new_path=`$CYGPATH -u "$path"`
43746
43747  # Now try to locate executable using which
43748  new_path=`$WHICH "$new_path" 2> /dev/null`
43749  # bat and cmd files are not always considered executable in cygwin causing which
43750  # to not find them
43751  if test "x$new_path" = x \
43752      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43753      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43754    new_path=`$CYGPATH -u "$path"`
43755  fi
43756  if test "x$new_path" = x; then
43757    # Oops. Which didn't find the executable.
43758    # The splitting of arguments from the executable at a space might have been incorrect,
43759    # since paths with space are more likely in Windows. Give it another try with the whole
43760    # argument.
43761    path="$complete"
43762    arguments="EOL"
43763    new_path=`$CYGPATH -u "$path"`
43764    new_path=`$WHICH "$new_path" 2> /dev/null`
43765    # bat and cmd files are not always considered executable in cygwin causing which
43766    # to not find them
43767    if test "x$new_path" = x \
43768        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43769        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43770      new_path=`$CYGPATH -u "$path"`
43771    fi
43772    if test "x$new_path" = x; then
43773      # It's still not found. Now this is an unrecoverable error.
43774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43775$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43776      has_space=`$ECHO "$complete" | $GREP " "`
43777      if test "x$has_space" != x; then
43778        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43779$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43780      fi
43781      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43782    fi
43783  fi
43784
43785  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43786  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43787  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43788  # "foo.exe" is OK but "foo" is an error.
43789  #
43790  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43791  # It is also a way to make sure we got the proper file name for the real test later on.
43792  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43793  if test "x$test_shortpath" = x; then
43794    # Short path failed, file does not exist as specified.
43795    # Try adding .exe or .cmd
43796    if test -f "${new_path}.exe"; then
43797      input_to_shortpath="${new_path}.exe"
43798    elif test -f "${new_path}.cmd"; then
43799      input_to_shortpath="${new_path}.cmd"
43800    else
43801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
43802$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
43803      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43804$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43805      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43806    fi
43807  else
43808    input_to_shortpath="$new_path"
43809  fi
43810
43811  # Call helper function which possibly converts this using DOS-style short mode.
43812  # If so, the updated path is stored in $new_path.
43813  new_path="$input_to_shortpath"
43814
43815  input_path="$input_to_shortpath"
43816  # Check if we need to convert this using DOS-style short mode. If the path
43817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43818  # take no chances and rewrite it.
43819  # Note: m4 eats our [], so we need to use [ and ] instead.
43820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43821  if test "x$has_forbidden_chars" != x; then
43822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43826      # Going to short mode and back again did indeed matter. Since short mode is
43827      # case insensitive, let's make it lowercase to improve readability.
43828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43829      # Now convert it back to Unix-style (cygpath)
43830      input_path=`$CYGPATH -u "$shortmode_path"`
43831      new_path="$input_path"
43832    fi
43833  fi
43834
43835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43836  if test "x$test_cygdrive_prefix" = x; then
43837    # As a simple fix, exclude /usr/bin since it's not a real path.
43838    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43840      # a path prefixed by /cygdrive for fixpath to work.
43841      new_path="$CYGWIN_ROOT_PATH$input_path"
43842    fi
43843  fi
43844
43845  # remove trailing .exe if any
43846  new_path="${new_path/%.exe/}"
43847
43848    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43849
43850  # First separate the path from the arguments. This will split at the first
43851  # space.
43852  complete="$BUILD_CC"
43853  path="${complete%% *}"
43854  tmp="$complete EOL"
43855  arguments="${tmp#* }"
43856
43857  # Input might be given as Windows format, start by converting to
43858  # unix format.
43859  new_path="$path"
43860
43861  windows_path="$new_path"
43862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43863    unix_path=`$CYGPATH -u "$windows_path"`
43864    new_path="$unix_path"
43865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43867    new_path="$unix_path"
43868  fi
43869
43870
43871  # Now try to locate executable using which
43872  new_path=`$WHICH "$new_path" 2> /dev/null`
43873
43874  if test "x$new_path" = x; then
43875    # Oops. Which didn't find the executable.
43876    # The splitting of arguments from the executable at a space might have been incorrect,
43877    # since paths with space are more likely in Windows. Give it another try with the whole
43878    # argument.
43879    path="$complete"
43880    arguments="EOL"
43881    new_path="$path"
43882
43883  windows_path="$new_path"
43884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43885    unix_path=`$CYGPATH -u "$windows_path"`
43886    new_path="$unix_path"
43887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43889    new_path="$unix_path"
43890  fi
43891
43892
43893    new_path=`$WHICH "$new_path" 2> /dev/null`
43894    # bat and cmd files are not always considered executable in MSYS causing which
43895    # to not find them
43896    if test "x$new_path" = x \
43897        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43898        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43899      new_path="$path"
43900
43901  windows_path="$new_path"
43902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43903    unix_path=`$CYGPATH -u "$windows_path"`
43904    new_path="$unix_path"
43905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43907    new_path="$unix_path"
43908  fi
43909
43910    fi
43911
43912    if test "x$new_path" = x; then
43913      # It's still not found. Now this is an unrecoverable error.
43914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43915$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43916      has_space=`$ECHO "$complete" | $GREP " "`
43917      if test "x$has_space" != x; then
43918        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43919$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43920      fi
43921      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43922    fi
43923  fi
43924
43925  # Now new_path has a complete unix path to the binary
43926  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43927    # Keep paths in /bin as-is, but remove trailing .exe if any
43928    new_path="${new_path/%.exe/}"
43929    # Do not save /bin paths to all_fixpath_prefixes!
43930  else
43931    # Not in mixed or Windows style, start by that.
43932    new_path=`cmd //c echo $new_path`
43933
43934  input_path="$new_path"
43935  # Check if we need to convert this using DOS-style short mode. If the path
43936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43937  # take no chances and rewrite it.
43938  # Note: m4 eats our [], so we need to use [ and ] instead.
43939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43940  if test "x$has_forbidden_chars" != x; then
43941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43943  fi
43944
43945    # Output is in $new_path
43946
43947  windows_path="$new_path"
43948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43949    unix_path=`$CYGPATH -u "$windows_path"`
43950    new_path="$unix_path"
43951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43953    new_path="$unix_path"
43954  fi
43955
43956    # remove trailing .exe if any
43957    new_path="${new_path/%.exe/}"
43958
43959    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43960    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43961  fi
43962
43963    else
43964      # We're on a unix platform. Hooray! :)
43965      # First separate the path from the arguments. This will split at the first
43966      # space.
43967      complete="$BUILD_CC"
43968      path="${complete%% *}"
43969      tmp="$complete EOL"
43970      arguments="${tmp#* }"
43971
43972      # Cannot rely on the command "which" here since it doesn't always work.
43973      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43974      if test -z "$is_absolute_path"; then
43975        # Path to executable is not absolute. Find it.
43976        IFS_save="$IFS"
43977        IFS=:
43978        for p in $PATH; do
43979          if test -f "$p/$path" && test -x "$p/$path"; then
43980            new_path="$p/$path"
43981            break
43982          fi
43983        done
43984        IFS="$IFS_save"
43985      else
43986        # This is an absolute path, we can use it without further modifications.
43987        new_path="$path"
43988      fi
43989
43990      if test "x$new_path" = x; then
43991        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43992$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43993        has_space=`$ECHO "$complete" | $GREP " "`
43994        if test "x$has_space" != x; then
43995          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43996$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43997        fi
43998        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43999      fi
44000    fi
44001
44002    # Now join together the path and the arguments once again
44003    if test "x$arguments" != xEOL; then
44004      new_complete="$new_path ${arguments% *}"
44005    else
44006      new_complete="$new_path"
44007    fi
44008
44009    if test "x$complete" != "x$new_complete"; then
44010      BUILD_CC="$new_complete"
44011      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44012$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44013    fi
44014  fi
44015
44016
44017
44018
44019  # Publish this variable in the help.
44020
44021
44022  if [ -z "${BUILD_CXX+x}" ]; then
44023    # The variable is not set by user, try to locate tool using the code snippet
44024    for ac_prog in cl CC g++
44025do
44026  # Extract the first word of "$ac_prog", so it can be a program name with args.
44027set dummy $ac_prog; ac_word=$2
44028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44029$as_echo_n "checking for $ac_word... " >&6; }
44030if ${ac_cv_path_BUILD_CXX+:} false; then :
44031  $as_echo_n "(cached) " >&6
44032else
44033  case $BUILD_CXX in
44034  [\\/]* | ?:[\\/]*)
44035  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44036  ;;
44037  *)
44038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44039for as_dir in $PATH
44040do
44041  IFS=$as_save_IFS
44042  test -z "$as_dir" && as_dir=.
44043    for ac_exec_ext in '' $ac_executable_extensions; do
44044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44045    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44047    break 2
44048  fi
44049done
44050  done
44051IFS=$as_save_IFS
44052
44053  ;;
44054esac
44055fi
44056BUILD_CXX=$ac_cv_path_BUILD_CXX
44057if test -n "$BUILD_CXX"; then
44058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44059$as_echo "$BUILD_CXX" >&6; }
44060else
44061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44062$as_echo "no" >&6; }
44063fi
44064
44065
44066  test -n "$BUILD_CXX" && break
44067done
44068
44069  else
44070    # The variable is set, but is it from the command line or the environment?
44071
44072    # Try to remove the string !BUILD_CXX! from our list.
44073    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44074    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44075      # If it failed, the variable was not from the command line. Ignore it,
44076      # but warn the user (except for BASH, which is always set by the calling BASH).
44077      if test "xBUILD_CXX" != xBASH; then
44078        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44079$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44080      fi
44081      # Try to locate tool using the code snippet
44082      for ac_prog in cl CC g++
44083do
44084  # Extract the first word of "$ac_prog", so it can be a program name with args.
44085set dummy $ac_prog; ac_word=$2
44086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44087$as_echo_n "checking for $ac_word... " >&6; }
44088if ${ac_cv_path_BUILD_CXX+:} false; then :
44089  $as_echo_n "(cached) " >&6
44090else
44091  case $BUILD_CXX in
44092  [\\/]* | ?:[\\/]*)
44093  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44094  ;;
44095  *)
44096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44097for as_dir in $PATH
44098do
44099  IFS=$as_save_IFS
44100  test -z "$as_dir" && as_dir=.
44101    for ac_exec_ext in '' $ac_executable_extensions; do
44102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44103    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44105    break 2
44106  fi
44107done
44108  done
44109IFS=$as_save_IFS
44110
44111  ;;
44112esac
44113fi
44114BUILD_CXX=$ac_cv_path_BUILD_CXX
44115if test -n "$BUILD_CXX"; then
44116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44117$as_echo "$BUILD_CXX" >&6; }
44118else
44119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44120$as_echo "no" >&6; }
44121fi
44122
44123
44124  test -n "$BUILD_CXX" && break
44125done
44126
44127    else
44128      # If it succeeded, then it was overridden by the user. We will use it
44129      # for the tool.
44130
44131      # First remove it from the list of overridden variables, so we can test
44132      # for unknown variables in the end.
44133      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44134
44135      # Check if we try to supply an empty value
44136      if test "x$BUILD_CXX" = x; then
44137        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44138$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44139        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44140$as_echo_n "checking for BUILD_CXX... " >&6; }
44141        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44142$as_echo "disabled" >&6; }
44143      else
44144        # Check if the provided tool contains a complete path.
44145        tool_specified="$BUILD_CXX"
44146        tool_basename="${tool_specified##*/}"
44147        if test "x$tool_basename" = "x$tool_specified"; then
44148          # A command without a complete path is provided, search $PATH.
44149          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44150$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44151          # Extract the first word of "$tool_basename", so it can be a program name with args.
44152set dummy $tool_basename; ac_word=$2
44153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44154$as_echo_n "checking for $ac_word... " >&6; }
44155if ${ac_cv_path_BUILD_CXX+:} false; then :
44156  $as_echo_n "(cached) " >&6
44157else
44158  case $BUILD_CXX in
44159  [\\/]* | ?:[\\/]*)
44160  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44161  ;;
44162  *)
44163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44164for as_dir in $PATH
44165do
44166  IFS=$as_save_IFS
44167  test -z "$as_dir" && as_dir=.
44168    for ac_exec_ext in '' $ac_executable_extensions; do
44169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44170    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44172    break 2
44173  fi
44174done
44175  done
44176IFS=$as_save_IFS
44177
44178  ;;
44179esac
44180fi
44181BUILD_CXX=$ac_cv_path_BUILD_CXX
44182if test -n "$BUILD_CXX"; then
44183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44184$as_echo "$BUILD_CXX" >&6; }
44185else
44186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44187$as_echo "no" >&6; }
44188fi
44189
44190
44191          if test "x$BUILD_CXX" = x; then
44192            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44193          fi
44194        else
44195          # Otherwise we believe it is a complete path. Use it as it is.
44196          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44197$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44198          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44199$as_echo_n "checking for BUILD_CXX... " >&6; }
44200          if test ! -x "$tool_specified"; then
44201            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44202$as_echo "not found" >&6; }
44203            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44204          fi
44205          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44206$as_echo "$tool_specified" >&6; }
44207        fi
44208      fi
44209    fi
44210
44211  fi
44212
44213
44214
44215  if test "x$BUILD_CXX" = x; then
44216    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44217  fi
44218
44219
44220
44221  # Only process if variable expands to non-empty
44222
44223  if test "x$BUILD_CXX" != x; then
44224    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44225
44226  # First separate the path from the arguments. This will split at the first
44227  # space.
44228  complete="$BUILD_CXX"
44229  path="${complete%% *}"
44230  tmp="$complete EOL"
44231  arguments="${tmp#* }"
44232
44233  # Input might be given as Windows format, start by converting to
44234  # unix format.
44235  new_path=`$CYGPATH -u "$path"`
44236
44237  # Now try to locate executable using which
44238  new_path=`$WHICH "$new_path" 2> /dev/null`
44239  # bat and cmd files are not always considered executable in cygwin causing which
44240  # to not find them
44241  if test "x$new_path" = x \
44242      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44243      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44244    new_path=`$CYGPATH -u "$path"`
44245  fi
44246  if test "x$new_path" = x; then
44247    # Oops. Which didn't find the executable.
44248    # The splitting of arguments from the executable at a space might have been incorrect,
44249    # since paths with space are more likely in Windows. Give it another try with the whole
44250    # argument.
44251    path="$complete"
44252    arguments="EOL"
44253    new_path=`$CYGPATH -u "$path"`
44254    new_path=`$WHICH "$new_path" 2> /dev/null`
44255    # bat and cmd files are not always considered executable in cygwin causing which
44256    # to not find them
44257    if test "x$new_path" = x \
44258        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44259        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44260      new_path=`$CYGPATH -u "$path"`
44261    fi
44262    if test "x$new_path" = x; then
44263      # It's still not found. Now this is an unrecoverable error.
44264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44265$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44266      has_space=`$ECHO "$complete" | $GREP " "`
44267      if test "x$has_space" != x; then
44268        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44269$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44270      fi
44271      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44272    fi
44273  fi
44274
44275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44278  # "foo.exe" is OK but "foo" is an error.
44279  #
44280  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44281  # It is also a way to make sure we got the proper file name for the real test later on.
44282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44283  if test "x$test_shortpath" = x; then
44284    # Short path failed, file does not exist as specified.
44285    # Try adding .exe or .cmd
44286    if test -f "${new_path}.exe"; then
44287      input_to_shortpath="${new_path}.exe"
44288    elif test -f "${new_path}.cmd"; then
44289      input_to_shortpath="${new_path}.cmd"
44290    else
44291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44292$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44293      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44294$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44295      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44296    fi
44297  else
44298    input_to_shortpath="$new_path"
44299  fi
44300
44301  # Call helper function which possibly converts this using DOS-style short mode.
44302  # If so, the updated path is stored in $new_path.
44303  new_path="$input_to_shortpath"
44304
44305  input_path="$input_to_shortpath"
44306  # Check if we need to convert this using DOS-style short mode. If the path
44307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44308  # take no chances and rewrite it.
44309  # Note: m4 eats our [], so we need to use [ and ] instead.
44310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44311  if test "x$has_forbidden_chars" != x; then
44312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44313    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44314    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44315    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44316      # Going to short mode and back again did indeed matter. Since short mode is
44317      # case insensitive, let's make it lowercase to improve readability.
44318      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44319      # Now convert it back to Unix-style (cygpath)
44320      input_path=`$CYGPATH -u "$shortmode_path"`
44321      new_path="$input_path"
44322    fi
44323  fi
44324
44325  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44326  if test "x$test_cygdrive_prefix" = x; then
44327    # As a simple fix, exclude /usr/bin since it's not a real path.
44328    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44329      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44330      # a path prefixed by /cygdrive for fixpath to work.
44331      new_path="$CYGWIN_ROOT_PATH$input_path"
44332    fi
44333  fi
44334
44335  # remove trailing .exe if any
44336  new_path="${new_path/%.exe/}"
44337
44338    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44339
44340  # First separate the path from the arguments. This will split at the first
44341  # space.
44342  complete="$BUILD_CXX"
44343  path="${complete%% *}"
44344  tmp="$complete EOL"
44345  arguments="${tmp#* }"
44346
44347  # Input might be given as Windows format, start by converting to
44348  # unix format.
44349  new_path="$path"
44350
44351  windows_path="$new_path"
44352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44353    unix_path=`$CYGPATH -u "$windows_path"`
44354    new_path="$unix_path"
44355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44357    new_path="$unix_path"
44358  fi
44359
44360
44361  # Now try to locate executable using which
44362  new_path=`$WHICH "$new_path" 2> /dev/null`
44363
44364  if test "x$new_path" = x; then
44365    # Oops. Which didn't find the executable.
44366    # The splitting of arguments from the executable at a space might have been incorrect,
44367    # since paths with space are more likely in Windows. Give it another try with the whole
44368    # argument.
44369    path="$complete"
44370    arguments="EOL"
44371    new_path="$path"
44372
44373  windows_path="$new_path"
44374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44375    unix_path=`$CYGPATH -u "$windows_path"`
44376    new_path="$unix_path"
44377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44379    new_path="$unix_path"
44380  fi
44381
44382
44383    new_path=`$WHICH "$new_path" 2> /dev/null`
44384    # bat and cmd files are not always considered executable in MSYS causing which
44385    # to not find them
44386    if test "x$new_path" = x \
44387        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44388        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44389      new_path="$path"
44390
44391  windows_path="$new_path"
44392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44393    unix_path=`$CYGPATH -u "$windows_path"`
44394    new_path="$unix_path"
44395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44397    new_path="$unix_path"
44398  fi
44399
44400    fi
44401
44402    if test "x$new_path" = x; then
44403      # It's still not found. Now this is an unrecoverable error.
44404      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44405$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44406      has_space=`$ECHO "$complete" | $GREP " "`
44407      if test "x$has_space" != x; then
44408        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44409$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44410      fi
44411      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44412    fi
44413  fi
44414
44415  # Now new_path has a complete unix path to the binary
44416  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44417    # Keep paths in /bin as-is, but remove trailing .exe if any
44418    new_path="${new_path/%.exe/}"
44419    # Do not save /bin paths to all_fixpath_prefixes!
44420  else
44421    # Not in mixed or Windows style, start by that.
44422    new_path=`cmd //c echo $new_path`
44423
44424  input_path="$new_path"
44425  # Check if we need to convert this using DOS-style short mode. If the path
44426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44427  # take no chances and rewrite it.
44428  # Note: m4 eats our [], so we need to use [ and ] instead.
44429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44430  if test "x$has_forbidden_chars" != x; then
44431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44432    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44433  fi
44434
44435    # Output is in $new_path
44436
44437  windows_path="$new_path"
44438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44439    unix_path=`$CYGPATH -u "$windows_path"`
44440    new_path="$unix_path"
44441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44443    new_path="$unix_path"
44444  fi
44445
44446    # remove trailing .exe if any
44447    new_path="${new_path/%.exe/}"
44448
44449    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44450    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44451  fi
44452
44453    else
44454      # We're on a unix platform. Hooray! :)
44455      # First separate the path from the arguments. This will split at the first
44456      # space.
44457      complete="$BUILD_CXX"
44458      path="${complete%% *}"
44459      tmp="$complete EOL"
44460      arguments="${tmp#* }"
44461
44462      # Cannot rely on the command "which" here since it doesn't always work.
44463      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44464      if test -z "$is_absolute_path"; then
44465        # Path to executable is not absolute. Find it.
44466        IFS_save="$IFS"
44467        IFS=:
44468        for p in $PATH; do
44469          if test -f "$p/$path" && test -x "$p/$path"; then
44470            new_path="$p/$path"
44471            break
44472          fi
44473        done
44474        IFS="$IFS_save"
44475      else
44476        # This is an absolute path, we can use it without further modifications.
44477        new_path="$path"
44478      fi
44479
44480      if test "x$new_path" = x; then
44481        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44482$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44483        has_space=`$ECHO "$complete" | $GREP " "`
44484        if test "x$has_space" != x; then
44485          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44486$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44487        fi
44488        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44489      fi
44490    fi
44491
44492    # Now join together the path and the arguments once again
44493    if test "x$arguments" != xEOL; then
44494      new_complete="$new_path ${arguments% *}"
44495    else
44496      new_complete="$new_path"
44497    fi
44498
44499    if test "x$complete" != "x$new_complete"; then
44500      BUILD_CXX="$new_complete"
44501      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44502$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44503    fi
44504  fi
44505
44506
44507
44508  # Publish this variable in the help.
44509
44510
44511  if [ -z "${BUILD_NM+x}" ]; then
44512    # The variable is not set by user, try to locate tool using the code snippet
44513    for ac_prog in nm gcc-nm
44514do
44515  # Extract the first word of "$ac_prog", so it can be a program name with args.
44516set dummy $ac_prog; ac_word=$2
44517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44518$as_echo_n "checking for $ac_word... " >&6; }
44519if ${ac_cv_path_BUILD_NM+:} false; then :
44520  $as_echo_n "(cached) " >&6
44521else
44522  case $BUILD_NM in
44523  [\\/]* | ?:[\\/]*)
44524  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44525  ;;
44526  *)
44527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44528for as_dir in $PATH
44529do
44530  IFS=$as_save_IFS
44531  test -z "$as_dir" && as_dir=.
44532    for ac_exec_ext in '' $ac_executable_extensions; do
44533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44534    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44536    break 2
44537  fi
44538done
44539  done
44540IFS=$as_save_IFS
44541
44542  ;;
44543esac
44544fi
44545BUILD_NM=$ac_cv_path_BUILD_NM
44546if test -n "$BUILD_NM"; then
44547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44548$as_echo "$BUILD_NM" >&6; }
44549else
44550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44551$as_echo "no" >&6; }
44552fi
44553
44554
44555  test -n "$BUILD_NM" && break
44556done
44557
44558  else
44559    # The variable is set, but is it from the command line or the environment?
44560
44561    # Try to remove the string !BUILD_NM! from our list.
44562    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
44563    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44564      # If it failed, the variable was not from the command line. Ignore it,
44565      # but warn the user (except for BASH, which is always set by the calling BASH).
44566      if test "xBUILD_NM" != xBASH; then
44567        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
44568$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
44569      fi
44570      # Try to locate tool using the code snippet
44571      for ac_prog in nm gcc-nm
44572do
44573  # Extract the first word of "$ac_prog", so it can be a program name with args.
44574set dummy $ac_prog; ac_word=$2
44575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44576$as_echo_n "checking for $ac_word... " >&6; }
44577if ${ac_cv_path_BUILD_NM+:} false; then :
44578  $as_echo_n "(cached) " >&6
44579else
44580  case $BUILD_NM in
44581  [\\/]* | ?:[\\/]*)
44582  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44583  ;;
44584  *)
44585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44586for as_dir in $PATH
44587do
44588  IFS=$as_save_IFS
44589  test -z "$as_dir" && as_dir=.
44590    for ac_exec_ext in '' $ac_executable_extensions; do
44591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44592    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44594    break 2
44595  fi
44596done
44597  done
44598IFS=$as_save_IFS
44599
44600  ;;
44601esac
44602fi
44603BUILD_NM=$ac_cv_path_BUILD_NM
44604if test -n "$BUILD_NM"; then
44605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44606$as_echo "$BUILD_NM" >&6; }
44607else
44608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44609$as_echo "no" >&6; }
44610fi
44611
44612
44613  test -n "$BUILD_NM" && break
44614done
44615
44616    else
44617      # If it succeeded, then it was overridden by the user. We will use it
44618      # for the tool.
44619
44620      # First remove it from the list of overridden variables, so we can test
44621      # for unknown variables in the end.
44622      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44623
44624      # Check if we try to supply an empty value
44625      if test "x$BUILD_NM" = x; then
44626        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
44627$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
44628        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44629$as_echo_n "checking for BUILD_NM... " >&6; }
44630        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44631$as_echo "disabled" >&6; }
44632      else
44633        # Check if the provided tool contains a complete path.
44634        tool_specified="$BUILD_NM"
44635        tool_basename="${tool_specified##*/}"
44636        if test "x$tool_basename" = "x$tool_specified"; then
44637          # A command without a complete path is provided, search $PATH.
44638          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
44639$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
44640          # Extract the first word of "$tool_basename", so it can be a program name with args.
44641set dummy $tool_basename; ac_word=$2
44642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44643$as_echo_n "checking for $ac_word... " >&6; }
44644if ${ac_cv_path_BUILD_NM+:} false; then :
44645  $as_echo_n "(cached) " >&6
44646else
44647  case $BUILD_NM in
44648  [\\/]* | ?:[\\/]*)
44649  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44650  ;;
44651  *)
44652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44653for as_dir in $PATH
44654do
44655  IFS=$as_save_IFS
44656  test -z "$as_dir" && as_dir=.
44657    for ac_exec_ext in '' $ac_executable_extensions; do
44658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44659    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44661    break 2
44662  fi
44663done
44664  done
44665IFS=$as_save_IFS
44666
44667  ;;
44668esac
44669fi
44670BUILD_NM=$ac_cv_path_BUILD_NM
44671if test -n "$BUILD_NM"; then
44672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44673$as_echo "$BUILD_NM" >&6; }
44674else
44675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44676$as_echo "no" >&6; }
44677fi
44678
44679
44680          if test "x$BUILD_NM" = x; then
44681            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44682          fi
44683        else
44684          # Otherwise we believe it is a complete path. Use it as it is.
44685          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
44686$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
44687          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44688$as_echo_n "checking for BUILD_NM... " >&6; }
44689          if test ! -x "$tool_specified"; then
44690            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44691$as_echo "not found" >&6; }
44692            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44693          fi
44694          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44695$as_echo "$tool_specified" >&6; }
44696        fi
44697      fi
44698    fi
44699
44700  fi
44701
44702
44703
44704  # Only process if variable expands to non-empty
44705
44706  if test "x$BUILD_NM" != x; then
44707    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44708
44709  # First separate the path from the arguments. This will split at the first
44710  # space.
44711  complete="$BUILD_NM"
44712  path="${complete%% *}"
44713  tmp="$complete EOL"
44714  arguments="${tmp#* }"
44715
44716  # Input might be given as Windows format, start by converting to
44717  # unix format.
44718  new_path=`$CYGPATH -u "$path"`
44719
44720  # Now try to locate executable using which
44721  new_path=`$WHICH "$new_path" 2> /dev/null`
44722  # bat and cmd files are not always considered executable in cygwin causing which
44723  # to not find them
44724  if test "x$new_path" = x \
44725      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44726      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44727    new_path=`$CYGPATH -u "$path"`
44728  fi
44729  if test "x$new_path" = x; then
44730    # Oops. Which didn't find the executable.
44731    # The splitting of arguments from the executable at a space might have been incorrect,
44732    # since paths with space are more likely in Windows. Give it another try with the whole
44733    # argument.
44734    path="$complete"
44735    arguments="EOL"
44736    new_path=`$CYGPATH -u "$path"`
44737    new_path=`$WHICH "$new_path" 2> /dev/null`
44738    # bat and cmd files are not always considered executable in cygwin causing which
44739    # to not find them
44740    if test "x$new_path" = x \
44741        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44742        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44743      new_path=`$CYGPATH -u "$path"`
44744    fi
44745    if test "x$new_path" = x; then
44746      # It's still not found. Now this is an unrecoverable error.
44747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44748$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44749      has_space=`$ECHO "$complete" | $GREP " "`
44750      if test "x$has_space" != x; then
44751        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44752$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44753      fi
44754      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44755    fi
44756  fi
44757
44758  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44759  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44760  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44761  # "foo.exe" is OK but "foo" is an error.
44762  #
44763  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44764  # It is also a way to make sure we got the proper file name for the real test later on.
44765  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44766  if test "x$test_shortpath" = x; then
44767    # Short path failed, file does not exist as specified.
44768    # Try adding .exe or .cmd
44769    if test -f "${new_path}.exe"; then
44770      input_to_shortpath="${new_path}.exe"
44771    elif test -f "${new_path}.cmd"; then
44772      input_to_shortpath="${new_path}.cmd"
44773    else
44774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
44775$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
44776      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44777$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44778      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44779    fi
44780  else
44781    input_to_shortpath="$new_path"
44782  fi
44783
44784  # Call helper function which possibly converts this using DOS-style short mode.
44785  # If so, the updated path is stored in $new_path.
44786  new_path="$input_to_shortpath"
44787
44788  input_path="$input_to_shortpath"
44789  # Check if we need to convert this using DOS-style short mode. If the path
44790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44791  # take no chances and rewrite it.
44792  # Note: m4 eats our [], so we need to use [ and ] instead.
44793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44794  if test "x$has_forbidden_chars" != x; then
44795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44796    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44797    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44798    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44799      # Going to short mode and back again did indeed matter. Since short mode is
44800      # case insensitive, let's make it lowercase to improve readability.
44801      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44802      # Now convert it back to Unix-style (cygpath)
44803      input_path=`$CYGPATH -u "$shortmode_path"`
44804      new_path="$input_path"
44805    fi
44806  fi
44807
44808  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44809  if test "x$test_cygdrive_prefix" = x; then
44810    # As a simple fix, exclude /usr/bin since it's not a real path.
44811    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44812      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44813      # a path prefixed by /cygdrive for fixpath to work.
44814      new_path="$CYGWIN_ROOT_PATH$input_path"
44815    fi
44816  fi
44817
44818  # remove trailing .exe if any
44819  new_path="${new_path/%.exe/}"
44820
44821    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44822
44823  # First separate the path from the arguments. This will split at the first
44824  # space.
44825  complete="$BUILD_NM"
44826  path="${complete%% *}"
44827  tmp="$complete EOL"
44828  arguments="${tmp#* }"
44829
44830  # Input might be given as Windows format, start by converting to
44831  # unix format.
44832  new_path="$path"
44833
44834  windows_path="$new_path"
44835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44836    unix_path=`$CYGPATH -u "$windows_path"`
44837    new_path="$unix_path"
44838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44840    new_path="$unix_path"
44841  fi
44842
44843
44844  # Now try to locate executable using which
44845  new_path=`$WHICH "$new_path" 2> /dev/null`
44846
44847  if test "x$new_path" = x; then
44848    # Oops. Which didn't find the executable.
44849    # The splitting of arguments from the executable at a space might have been incorrect,
44850    # since paths with space are more likely in Windows. Give it another try with the whole
44851    # argument.
44852    path="$complete"
44853    arguments="EOL"
44854    new_path="$path"
44855
44856  windows_path="$new_path"
44857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44858    unix_path=`$CYGPATH -u "$windows_path"`
44859    new_path="$unix_path"
44860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44862    new_path="$unix_path"
44863  fi
44864
44865
44866    new_path=`$WHICH "$new_path" 2> /dev/null`
44867    # bat and cmd files are not always considered executable in MSYS causing which
44868    # to not find them
44869    if test "x$new_path" = x \
44870        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44871        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44872      new_path="$path"
44873
44874  windows_path="$new_path"
44875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44876    unix_path=`$CYGPATH -u "$windows_path"`
44877    new_path="$unix_path"
44878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44880    new_path="$unix_path"
44881  fi
44882
44883    fi
44884
44885    if test "x$new_path" = x; then
44886      # It's still not found. Now this is an unrecoverable error.
44887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44888$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44889      has_space=`$ECHO "$complete" | $GREP " "`
44890      if test "x$has_space" != x; then
44891        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44892$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44893      fi
44894      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44895    fi
44896  fi
44897
44898  # Now new_path has a complete unix path to the binary
44899  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44900    # Keep paths in /bin as-is, but remove trailing .exe if any
44901    new_path="${new_path/%.exe/}"
44902    # Do not save /bin paths to all_fixpath_prefixes!
44903  else
44904    # Not in mixed or Windows style, start by that.
44905    new_path=`cmd //c echo $new_path`
44906
44907  input_path="$new_path"
44908  # Check if we need to convert this using DOS-style short mode. If the path
44909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44910  # take no chances and rewrite it.
44911  # Note: m4 eats our [], so we need to use [ and ] instead.
44912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44913  if test "x$has_forbidden_chars" != x; then
44914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44915    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44916  fi
44917
44918    # Output is in $new_path
44919
44920  windows_path="$new_path"
44921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44922    unix_path=`$CYGPATH -u "$windows_path"`
44923    new_path="$unix_path"
44924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44926    new_path="$unix_path"
44927  fi
44928
44929    # remove trailing .exe if any
44930    new_path="${new_path/%.exe/}"
44931
44932    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44933    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44934  fi
44935
44936    else
44937      # We're on a unix platform. Hooray! :)
44938      # First separate the path from the arguments. This will split at the first
44939      # space.
44940      complete="$BUILD_NM"
44941      path="${complete%% *}"
44942      tmp="$complete EOL"
44943      arguments="${tmp#* }"
44944
44945      # Cannot rely on the command "which" here since it doesn't always work.
44946      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44947      if test -z "$is_absolute_path"; then
44948        # Path to executable is not absolute. Find it.
44949        IFS_save="$IFS"
44950        IFS=:
44951        for p in $PATH; do
44952          if test -f "$p/$path" && test -x "$p/$path"; then
44953            new_path="$p/$path"
44954            break
44955          fi
44956        done
44957        IFS="$IFS_save"
44958      else
44959        # This is an absolute path, we can use it without further modifications.
44960        new_path="$path"
44961      fi
44962
44963      if test "x$new_path" = x; then
44964        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44965$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44966        has_space=`$ECHO "$complete" | $GREP " "`
44967        if test "x$has_space" != x; then
44968          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44969$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44970        fi
44971        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44972      fi
44973    fi
44974
44975    # Now join together the path and the arguments once again
44976    if test "x$arguments" != xEOL; then
44977      new_complete="$new_path ${arguments% *}"
44978    else
44979      new_complete="$new_path"
44980    fi
44981
44982    if test "x$complete" != "x$new_complete"; then
44983      BUILD_NM="$new_complete"
44984      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
44985$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
44986    fi
44987  fi
44988
44989
44990
44991  # Publish this variable in the help.
44992
44993
44994  if [ -z "${BUILD_AR+x}" ]; then
44995    # The variable is not set by user, try to locate tool using the code snippet
44996    for ac_prog in ar gcc-ar
44997do
44998  # Extract the first word of "$ac_prog", so it can be a program name with args.
44999set dummy $ac_prog; ac_word=$2
45000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45001$as_echo_n "checking for $ac_word... " >&6; }
45002if ${ac_cv_path_BUILD_AR+:} false; then :
45003  $as_echo_n "(cached) " >&6
45004else
45005  case $BUILD_AR in
45006  [\\/]* | ?:[\\/]*)
45007  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45008  ;;
45009  *)
45010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45011for as_dir in $PATH
45012do
45013  IFS=$as_save_IFS
45014  test -z "$as_dir" && as_dir=.
45015    for ac_exec_ext in '' $ac_executable_extensions; do
45016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45017    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45019    break 2
45020  fi
45021done
45022  done
45023IFS=$as_save_IFS
45024
45025  ;;
45026esac
45027fi
45028BUILD_AR=$ac_cv_path_BUILD_AR
45029if test -n "$BUILD_AR"; then
45030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45031$as_echo "$BUILD_AR" >&6; }
45032else
45033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45034$as_echo "no" >&6; }
45035fi
45036
45037
45038  test -n "$BUILD_AR" && break
45039done
45040
45041  else
45042    # The variable is set, but is it from the command line or the environment?
45043
45044    # Try to remove the string !BUILD_AR! from our list.
45045    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45046    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45047      # If it failed, the variable was not from the command line. Ignore it,
45048      # but warn the user (except for BASH, which is always set by the calling BASH).
45049      if test "xBUILD_AR" != xBASH; then
45050        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45051$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45052      fi
45053      # Try to locate tool using the code snippet
45054      for ac_prog in ar gcc-ar
45055do
45056  # Extract the first word of "$ac_prog", so it can be a program name with args.
45057set dummy $ac_prog; ac_word=$2
45058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45059$as_echo_n "checking for $ac_word... " >&6; }
45060if ${ac_cv_path_BUILD_AR+:} false; then :
45061  $as_echo_n "(cached) " >&6
45062else
45063  case $BUILD_AR in
45064  [\\/]* | ?:[\\/]*)
45065  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45066  ;;
45067  *)
45068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45069for as_dir in $PATH
45070do
45071  IFS=$as_save_IFS
45072  test -z "$as_dir" && as_dir=.
45073    for ac_exec_ext in '' $ac_executable_extensions; do
45074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45075    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45077    break 2
45078  fi
45079done
45080  done
45081IFS=$as_save_IFS
45082
45083  ;;
45084esac
45085fi
45086BUILD_AR=$ac_cv_path_BUILD_AR
45087if test -n "$BUILD_AR"; then
45088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45089$as_echo "$BUILD_AR" >&6; }
45090else
45091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45092$as_echo "no" >&6; }
45093fi
45094
45095
45096  test -n "$BUILD_AR" && break
45097done
45098
45099    else
45100      # If it succeeded, then it was overridden by the user. We will use it
45101      # for the tool.
45102
45103      # First remove it from the list of overridden variables, so we can test
45104      # for unknown variables in the end.
45105      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45106
45107      # Check if we try to supply an empty value
45108      if test "x$BUILD_AR" = x; then
45109        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45110$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45111        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45112$as_echo_n "checking for BUILD_AR... " >&6; }
45113        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45114$as_echo "disabled" >&6; }
45115      else
45116        # Check if the provided tool contains a complete path.
45117        tool_specified="$BUILD_AR"
45118        tool_basename="${tool_specified##*/}"
45119        if test "x$tool_basename" = "x$tool_specified"; then
45120          # A command without a complete path is provided, search $PATH.
45121          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45122$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45123          # Extract the first word of "$tool_basename", so it can be a program name with args.
45124set dummy $tool_basename; ac_word=$2
45125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45126$as_echo_n "checking for $ac_word... " >&6; }
45127if ${ac_cv_path_BUILD_AR+:} false; then :
45128  $as_echo_n "(cached) " >&6
45129else
45130  case $BUILD_AR in
45131  [\\/]* | ?:[\\/]*)
45132  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45133  ;;
45134  *)
45135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45136for as_dir in $PATH
45137do
45138  IFS=$as_save_IFS
45139  test -z "$as_dir" && as_dir=.
45140    for ac_exec_ext in '' $ac_executable_extensions; do
45141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45142    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45144    break 2
45145  fi
45146done
45147  done
45148IFS=$as_save_IFS
45149
45150  ;;
45151esac
45152fi
45153BUILD_AR=$ac_cv_path_BUILD_AR
45154if test -n "$BUILD_AR"; then
45155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45156$as_echo "$BUILD_AR" >&6; }
45157else
45158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45159$as_echo "no" >&6; }
45160fi
45161
45162
45163          if test "x$BUILD_AR" = x; then
45164            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45165          fi
45166        else
45167          # Otherwise we believe it is a complete path. Use it as it is.
45168          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45169$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45170          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45171$as_echo_n "checking for BUILD_AR... " >&6; }
45172          if test ! -x "$tool_specified"; then
45173            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45174$as_echo "not found" >&6; }
45175            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45176          fi
45177          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45178$as_echo "$tool_specified" >&6; }
45179        fi
45180      fi
45181    fi
45182
45183  fi
45184
45185
45186
45187  # Only process if variable expands to non-empty
45188
45189  if test "x$BUILD_AR" != x; then
45190    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45191
45192  # First separate the path from the arguments. This will split at the first
45193  # space.
45194  complete="$BUILD_AR"
45195  path="${complete%% *}"
45196  tmp="$complete EOL"
45197  arguments="${tmp#* }"
45198
45199  # Input might be given as Windows format, start by converting to
45200  # unix format.
45201  new_path=`$CYGPATH -u "$path"`
45202
45203  # Now try to locate executable using which
45204  new_path=`$WHICH "$new_path" 2> /dev/null`
45205  # bat and cmd files are not always considered executable in cygwin causing which
45206  # to not find them
45207  if test "x$new_path" = x \
45208      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45209      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45210    new_path=`$CYGPATH -u "$path"`
45211  fi
45212  if test "x$new_path" = x; then
45213    # Oops. Which didn't find the executable.
45214    # The splitting of arguments from the executable at a space might have been incorrect,
45215    # since paths with space are more likely in Windows. Give it another try with the whole
45216    # argument.
45217    path="$complete"
45218    arguments="EOL"
45219    new_path=`$CYGPATH -u "$path"`
45220    new_path=`$WHICH "$new_path" 2> /dev/null`
45221    # bat and cmd files are not always considered executable in cygwin causing which
45222    # to not find them
45223    if test "x$new_path" = x \
45224        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45225        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45226      new_path=`$CYGPATH -u "$path"`
45227    fi
45228    if test "x$new_path" = x; then
45229      # It's still not found. Now this is an unrecoverable error.
45230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45231$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45232      has_space=`$ECHO "$complete" | $GREP " "`
45233      if test "x$has_space" != x; then
45234        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45235$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45236      fi
45237      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45238    fi
45239  fi
45240
45241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45244  # "foo.exe" is OK but "foo" is an error.
45245  #
45246  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45247  # It is also a way to make sure we got the proper file name for the real test later on.
45248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45249  if test "x$test_shortpath" = x; then
45250    # Short path failed, file does not exist as specified.
45251    # Try adding .exe or .cmd
45252    if test -f "${new_path}.exe"; then
45253      input_to_shortpath="${new_path}.exe"
45254    elif test -f "${new_path}.cmd"; then
45255      input_to_shortpath="${new_path}.cmd"
45256    else
45257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45258$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45259      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45260$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45261      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45262    fi
45263  else
45264    input_to_shortpath="$new_path"
45265  fi
45266
45267  # Call helper function which possibly converts this using DOS-style short mode.
45268  # If so, the updated path is stored in $new_path.
45269  new_path="$input_to_shortpath"
45270
45271  input_path="$input_to_shortpath"
45272  # Check if we need to convert this using DOS-style short mode. If the path
45273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45274  # take no chances and rewrite it.
45275  # Note: m4 eats our [], so we need to use [ and ] instead.
45276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45277  if test "x$has_forbidden_chars" != x; then
45278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45279    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45280    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45281    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45282      # Going to short mode and back again did indeed matter. Since short mode is
45283      # case insensitive, let's make it lowercase to improve readability.
45284      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45285      # Now convert it back to Unix-style (cygpath)
45286      input_path=`$CYGPATH -u "$shortmode_path"`
45287      new_path="$input_path"
45288    fi
45289  fi
45290
45291  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45292  if test "x$test_cygdrive_prefix" = x; then
45293    # As a simple fix, exclude /usr/bin since it's not a real path.
45294    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45295      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45296      # a path prefixed by /cygdrive for fixpath to work.
45297      new_path="$CYGWIN_ROOT_PATH$input_path"
45298    fi
45299  fi
45300
45301  # remove trailing .exe if any
45302  new_path="${new_path/%.exe/}"
45303
45304    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45305
45306  # First separate the path from the arguments. This will split at the first
45307  # space.
45308  complete="$BUILD_AR"
45309  path="${complete%% *}"
45310  tmp="$complete EOL"
45311  arguments="${tmp#* }"
45312
45313  # Input might be given as Windows format, start by converting to
45314  # unix format.
45315  new_path="$path"
45316
45317  windows_path="$new_path"
45318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45319    unix_path=`$CYGPATH -u "$windows_path"`
45320    new_path="$unix_path"
45321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45323    new_path="$unix_path"
45324  fi
45325
45326
45327  # Now try to locate executable using which
45328  new_path=`$WHICH "$new_path" 2> /dev/null`
45329
45330  if test "x$new_path" = x; then
45331    # Oops. Which didn't find the executable.
45332    # The splitting of arguments from the executable at a space might have been incorrect,
45333    # since paths with space are more likely in Windows. Give it another try with the whole
45334    # argument.
45335    path="$complete"
45336    arguments="EOL"
45337    new_path="$path"
45338
45339  windows_path="$new_path"
45340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45341    unix_path=`$CYGPATH -u "$windows_path"`
45342    new_path="$unix_path"
45343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45345    new_path="$unix_path"
45346  fi
45347
45348
45349    new_path=`$WHICH "$new_path" 2> /dev/null`
45350    # bat and cmd files are not always considered executable in MSYS causing which
45351    # to not find them
45352    if test "x$new_path" = x \
45353        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45354        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45355      new_path="$path"
45356
45357  windows_path="$new_path"
45358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45359    unix_path=`$CYGPATH -u "$windows_path"`
45360    new_path="$unix_path"
45361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45363    new_path="$unix_path"
45364  fi
45365
45366    fi
45367
45368    if test "x$new_path" = x; then
45369      # It's still not found. Now this is an unrecoverable error.
45370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45371$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45372      has_space=`$ECHO "$complete" | $GREP " "`
45373      if test "x$has_space" != x; then
45374        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45375$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45376      fi
45377      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45378    fi
45379  fi
45380
45381  # Now new_path has a complete unix path to the binary
45382  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45383    # Keep paths in /bin as-is, but remove trailing .exe if any
45384    new_path="${new_path/%.exe/}"
45385    # Do not save /bin paths to all_fixpath_prefixes!
45386  else
45387    # Not in mixed or Windows style, start by that.
45388    new_path=`cmd //c echo $new_path`
45389
45390  input_path="$new_path"
45391  # Check if we need to convert this using DOS-style short mode. If the path
45392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45393  # take no chances and rewrite it.
45394  # Note: m4 eats our [], so we need to use [ and ] instead.
45395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45396  if test "x$has_forbidden_chars" != x; then
45397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45399  fi
45400
45401    # Output is in $new_path
45402
45403  windows_path="$new_path"
45404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45405    unix_path=`$CYGPATH -u "$windows_path"`
45406    new_path="$unix_path"
45407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45409    new_path="$unix_path"
45410  fi
45411
45412    # remove trailing .exe if any
45413    new_path="${new_path/%.exe/}"
45414
45415    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45416    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45417  fi
45418
45419    else
45420      # We're on a unix platform. Hooray! :)
45421      # First separate the path from the arguments. This will split at the first
45422      # space.
45423      complete="$BUILD_AR"
45424      path="${complete%% *}"
45425      tmp="$complete EOL"
45426      arguments="${tmp#* }"
45427
45428      # Cannot rely on the command "which" here since it doesn't always work.
45429      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45430      if test -z "$is_absolute_path"; then
45431        # Path to executable is not absolute. Find it.
45432        IFS_save="$IFS"
45433        IFS=:
45434        for p in $PATH; do
45435          if test -f "$p/$path" && test -x "$p/$path"; then
45436            new_path="$p/$path"
45437            break
45438          fi
45439        done
45440        IFS="$IFS_save"
45441      else
45442        # This is an absolute path, we can use it without further modifications.
45443        new_path="$path"
45444      fi
45445
45446      if test "x$new_path" = x; then
45447        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45448$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45449        has_space=`$ECHO "$complete" | $GREP " "`
45450        if test "x$has_space" != x; then
45451          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45452$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45453        fi
45454        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45455      fi
45456    fi
45457
45458    # Now join together the path and the arguments once again
45459    if test "x$arguments" != xEOL; then
45460      new_complete="$new_path ${arguments% *}"
45461    else
45462      new_complete="$new_path"
45463    fi
45464
45465    if test "x$complete" != "x$new_complete"; then
45466      BUILD_AR="$new_complete"
45467      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45468$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45469    fi
45470  fi
45471
45472
45473
45474  # Publish this variable in the help.
45475
45476
45477  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45478    # The variable is not set by user, try to locate tool using the code snippet
45479    for ac_prog in objcopy
45480do
45481  # Extract the first word of "$ac_prog", so it can be a program name with args.
45482set dummy $ac_prog; ac_word=$2
45483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45484$as_echo_n "checking for $ac_word... " >&6; }
45485if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45486  $as_echo_n "(cached) " >&6
45487else
45488  case $BUILD_OBJCOPY in
45489  [\\/]* | ?:[\\/]*)
45490  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45491  ;;
45492  *)
45493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45494for as_dir in $PATH
45495do
45496  IFS=$as_save_IFS
45497  test -z "$as_dir" && as_dir=.
45498    for ac_exec_ext in '' $ac_executable_extensions; do
45499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45500    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45502    break 2
45503  fi
45504done
45505  done
45506IFS=$as_save_IFS
45507
45508  ;;
45509esac
45510fi
45511BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45512if test -n "$BUILD_OBJCOPY"; then
45513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45514$as_echo "$BUILD_OBJCOPY" >&6; }
45515else
45516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45517$as_echo "no" >&6; }
45518fi
45519
45520
45521  test -n "$BUILD_OBJCOPY" && break
45522done
45523
45524  else
45525    # The variable is set, but is it from the command line or the environment?
45526
45527    # Try to remove the string !BUILD_OBJCOPY! from our list.
45528    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
45529    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45530      # If it failed, the variable was not from the command line. Ignore it,
45531      # but warn the user (except for BASH, which is always set by the calling BASH).
45532      if test "xBUILD_OBJCOPY" != xBASH; then
45533        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
45534$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
45535      fi
45536      # Try to locate tool using the code snippet
45537      for ac_prog in objcopy
45538do
45539  # Extract the first word of "$ac_prog", so it can be a program name with args.
45540set dummy $ac_prog; ac_word=$2
45541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45542$as_echo_n "checking for $ac_word... " >&6; }
45543if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45544  $as_echo_n "(cached) " >&6
45545else
45546  case $BUILD_OBJCOPY in
45547  [\\/]* | ?:[\\/]*)
45548  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45549  ;;
45550  *)
45551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45552for as_dir in $PATH
45553do
45554  IFS=$as_save_IFS
45555  test -z "$as_dir" && as_dir=.
45556    for ac_exec_ext in '' $ac_executable_extensions; do
45557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45558    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45560    break 2
45561  fi
45562done
45563  done
45564IFS=$as_save_IFS
45565
45566  ;;
45567esac
45568fi
45569BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45570if test -n "$BUILD_OBJCOPY"; then
45571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45572$as_echo "$BUILD_OBJCOPY" >&6; }
45573else
45574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45575$as_echo "no" >&6; }
45576fi
45577
45578
45579  test -n "$BUILD_OBJCOPY" && break
45580done
45581
45582    else
45583      # If it succeeded, then it was overridden by the user. We will use it
45584      # for the tool.
45585
45586      # First remove it from the list of overridden variables, so we can test
45587      # for unknown variables in the end.
45588      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45589
45590      # Check if we try to supply an empty value
45591      if test "x$BUILD_OBJCOPY" = x; then
45592        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
45593$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
45594        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45595$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45596        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45597$as_echo "disabled" >&6; }
45598      else
45599        # Check if the provided tool contains a complete path.
45600        tool_specified="$BUILD_OBJCOPY"
45601        tool_basename="${tool_specified##*/}"
45602        if test "x$tool_basename" = "x$tool_specified"; then
45603          # A command without a complete path is provided, search $PATH.
45604          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
45605$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
45606          # Extract the first word of "$tool_basename", so it can be a program name with args.
45607set dummy $tool_basename; ac_word=$2
45608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45609$as_echo_n "checking for $ac_word... " >&6; }
45610if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45611  $as_echo_n "(cached) " >&6
45612else
45613  case $BUILD_OBJCOPY in
45614  [\\/]* | ?:[\\/]*)
45615  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45616  ;;
45617  *)
45618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45619for as_dir in $PATH
45620do
45621  IFS=$as_save_IFS
45622  test -z "$as_dir" && as_dir=.
45623    for ac_exec_ext in '' $ac_executable_extensions; do
45624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45625    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45627    break 2
45628  fi
45629done
45630  done
45631IFS=$as_save_IFS
45632
45633  ;;
45634esac
45635fi
45636BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45637if test -n "$BUILD_OBJCOPY"; then
45638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45639$as_echo "$BUILD_OBJCOPY" >&6; }
45640else
45641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45642$as_echo "no" >&6; }
45643fi
45644
45645
45646          if test "x$BUILD_OBJCOPY" = x; then
45647            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45648          fi
45649        else
45650          # Otherwise we believe it is a complete path. Use it as it is.
45651          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
45652$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
45653          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45654$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45655          if test ! -x "$tool_specified"; then
45656            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45657$as_echo "not found" >&6; }
45658            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
45659          fi
45660          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45661$as_echo "$tool_specified" >&6; }
45662        fi
45663      fi
45664    fi
45665
45666  fi
45667
45668
45669
45670  # Only process if variable expands to non-empty
45671
45672  if test "x$BUILD_OBJCOPY" != x; then
45673    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45674
45675  # First separate the path from the arguments. This will split at the first
45676  # space.
45677  complete="$BUILD_OBJCOPY"
45678  path="${complete%% *}"
45679  tmp="$complete EOL"
45680  arguments="${tmp#* }"
45681
45682  # Input might be given as Windows format, start by converting to
45683  # unix format.
45684  new_path=`$CYGPATH -u "$path"`
45685
45686  # Now try to locate executable using which
45687  new_path=`$WHICH "$new_path" 2> /dev/null`
45688  # bat and cmd files are not always considered executable in cygwin causing which
45689  # to not find them
45690  if test "x$new_path" = x \
45691      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45692      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45693    new_path=`$CYGPATH -u "$path"`
45694  fi
45695  if test "x$new_path" = x; then
45696    # Oops. Which didn't find the executable.
45697    # The splitting of arguments from the executable at a space might have been incorrect,
45698    # since paths with space are more likely in Windows. Give it another try with the whole
45699    # argument.
45700    path="$complete"
45701    arguments="EOL"
45702    new_path=`$CYGPATH -u "$path"`
45703    new_path=`$WHICH "$new_path" 2> /dev/null`
45704    # bat and cmd files are not always considered executable in cygwin causing which
45705    # to not find them
45706    if test "x$new_path" = x \
45707        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45708        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45709      new_path=`$CYGPATH -u "$path"`
45710    fi
45711    if test "x$new_path" = x; then
45712      # It's still not found. Now this is an unrecoverable error.
45713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45714$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45715      has_space=`$ECHO "$complete" | $GREP " "`
45716      if test "x$has_space" != x; then
45717        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45718$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45719      fi
45720      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45721    fi
45722  fi
45723
45724  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45725  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45726  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45727  # "foo.exe" is OK but "foo" is an error.
45728  #
45729  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45730  # It is also a way to make sure we got the proper file name for the real test later on.
45731  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45732  if test "x$test_shortpath" = x; then
45733    # Short path failed, file does not exist as specified.
45734    # Try adding .exe or .cmd
45735    if test -f "${new_path}.exe"; then
45736      input_to_shortpath="${new_path}.exe"
45737    elif test -f "${new_path}.cmd"; then
45738      input_to_shortpath="${new_path}.cmd"
45739    else
45740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
45741$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
45742      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45743$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45744      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45745    fi
45746  else
45747    input_to_shortpath="$new_path"
45748  fi
45749
45750  # Call helper function which possibly converts this using DOS-style short mode.
45751  # If so, the updated path is stored in $new_path.
45752  new_path="$input_to_shortpath"
45753
45754  input_path="$input_to_shortpath"
45755  # Check if we need to convert this using DOS-style short mode. If the path
45756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45757  # take no chances and rewrite it.
45758  # Note: m4 eats our [], so we need to use [ and ] instead.
45759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45760  if test "x$has_forbidden_chars" != x; then
45761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45762    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45763    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45764    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45765      # Going to short mode and back again did indeed matter. Since short mode is
45766      # case insensitive, let's make it lowercase to improve readability.
45767      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45768      # Now convert it back to Unix-style (cygpath)
45769      input_path=`$CYGPATH -u "$shortmode_path"`
45770      new_path="$input_path"
45771    fi
45772  fi
45773
45774  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45775  if test "x$test_cygdrive_prefix" = x; then
45776    # As a simple fix, exclude /usr/bin since it's not a real path.
45777    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45778      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45779      # a path prefixed by /cygdrive for fixpath to work.
45780      new_path="$CYGWIN_ROOT_PATH$input_path"
45781    fi
45782  fi
45783
45784  # remove trailing .exe if any
45785  new_path="${new_path/%.exe/}"
45786
45787    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45788
45789  # First separate the path from the arguments. This will split at the first
45790  # space.
45791  complete="$BUILD_OBJCOPY"
45792  path="${complete%% *}"
45793  tmp="$complete EOL"
45794  arguments="${tmp#* }"
45795
45796  # Input might be given as Windows format, start by converting to
45797  # unix format.
45798  new_path="$path"
45799
45800  windows_path="$new_path"
45801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45802    unix_path=`$CYGPATH -u "$windows_path"`
45803    new_path="$unix_path"
45804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45806    new_path="$unix_path"
45807  fi
45808
45809
45810  # Now try to locate executable using which
45811  new_path=`$WHICH "$new_path" 2> /dev/null`
45812
45813  if test "x$new_path" = x; then
45814    # Oops. Which didn't find the executable.
45815    # The splitting of arguments from the executable at a space might have been incorrect,
45816    # since paths with space are more likely in Windows. Give it another try with the whole
45817    # argument.
45818    path="$complete"
45819    arguments="EOL"
45820    new_path="$path"
45821
45822  windows_path="$new_path"
45823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45824    unix_path=`$CYGPATH -u "$windows_path"`
45825    new_path="$unix_path"
45826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45828    new_path="$unix_path"
45829  fi
45830
45831
45832    new_path=`$WHICH "$new_path" 2> /dev/null`
45833    # bat and cmd files are not always considered executable in MSYS causing which
45834    # to not find them
45835    if test "x$new_path" = x \
45836        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45837        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45838      new_path="$path"
45839
45840  windows_path="$new_path"
45841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45842    unix_path=`$CYGPATH -u "$windows_path"`
45843    new_path="$unix_path"
45844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45846    new_path="$unix_path"
45847  fi
45848
45849    fi
45850
45851    if test "x$new_path" = x; then
45852      # It's still not found. Now this is an unrecoverable error.
45853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45854$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45855      has_space=`$ECHO "$complete" | $GREP " "`
45856      if test "x$has_space" != x; then
45857        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45858$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45859      fi
45860      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45861    fi
45862  fi
45863
45864  # Now new_path has a complete unix path to the binary
45865  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45866    # Keep paths in /bin as-is, but remove trailing .exe if any
45867    new_path="${new_path/%.exe/}"
45868    # Do not save /bin paths to all_fixpath_prefixes!
45869  else
45870    # Not in mixed or Windows style, start by that.
45871    new_path=`cmd //c echo $new_path`
45872
45873  input_path="$new_path"
45874  # Check if we need to convert this using DOS-style short mode. If the path
45875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45876  # take no chances and rewrite it.
45877  # Note: m4 eats our [], so we need to use [ and ] instead.
45878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45879  if test "x$has_forbidden_chars" != x; then
45880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45881    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45882  fi
45883
45884    # Output is in $new_path
45885
45886  windows_path="$new_path"
45887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45888    unix_path=`$CYGPATH -u "$windows_path"`
45889    new_path="$unix_path"
45890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45892    new_path="$unix_path"
45893  fi
45894
45895    # remove trailing .exe if any
45896    new_path="${new_path/%.exe/}"
45897
45898    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45899    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45900  fi
45901
45902    else
45903      # We're on a unix platform. Hooray! :)
45904      # First separate the path from the arguments. This will split at the first
45905      # space.
45906      complete="$BUILD_OBJCOPY"
45907      path="${complete%% *}"
45908      tmp="$complete EOL"
45909      arguments="${tmp#* }"
45910
45911      # Cannot rely on the command "which" here since it doesn't always work.
45912      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45913      if test -z "$is_absolute_path"; then
45914        # Path to executable is not absolute. Find it.
45915        IFS_save="$IFS"
45916        IFS=:
45917        for p in $PATH; do
45918          if test -f "$p/$path" && test -x "$p/$path"; then
45919            new_path="$p/$path"
45920            break
45921          fi
45922        done
45923        IFS="$IFS_save"
45924      else
45925        # This is an absolute path, we can use it without further modifications.
45926        new_path="$path"
45927      fi
45928
45929      if test "x$new_path" = x; then
45930        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45931$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45932        has_space=`$ECHO "$complete" | $GREP " "`
45933        if test "x$has_space" != x; then
45934          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45935$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45936        fi
45937        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45938      fi
45939    fi
45940
45941    # Now join together the path and the arguments once again
45942    if test "x$arguments" != xEOL; then
45943      new_complete="$new_path ${arguments% *}"
45944    else
45945      new_complete="$new_path"
45946    fi
45947
45948    if test "x$complete" != "x$new_complete"; then
45949      BUILD_OBJCOPY="$new_complete"
45950      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
45951$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
45952    fi
45953  fi
45954
45955
45956
45957  # Publish this variable in the help.
45958
45959
45960  if [ -z "${BUILD_STRIP+x}" ]; then
45961    # The variable is not set by user, try to locate tool using the code snippet
45962    for ac_prog in strip
45963do
45964  # Extract the first word of "$ac_prog", so it can be a program name with args.
45965set dummy $ac_prog; ac_word=$2
45966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45967$as_echo_n "checking for $ac_word... " >&6; }
45968if ${ac_cv_path_BUILD_STRIP+:} false; then :
45969  $as_echo_n "(cached) " >&6
45970else
45971  case $BUILD_STRIP in
45972  [\\/]* | ?:[\\/]*)
45973  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
45974  ;;
45975  *)
45976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45977for as_dir in $PATH
45978do
45979  IFS=$as_save_IFS
45980  test -z "$as_dir" && as_dir=.
45981    for ac_exec_ext in '' $ac_executable_extensions; do
45982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45983    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
45984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45985    break 2
45986  fi
45987done
45988  done
45989IFS=$as_save_IFS
45990
45991  ;;
45992esac
45993fi
45994BUILD_STRIP=$ac_cv_path_BUILD_STRIP
45995if test -n "$BUILD_STRIP"; then
45996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
45997$as_echo "$BUILD_STRIP" >&6; }
45998else
45999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46000$as_echo "no" >&6; }
46001fi
46002
46003
46004  test -n "$BUILD_STRIP" && break
46005done
46006
46007  else
46008    # The variable is set, but is it from the command line or the environment?
46009
46010    # Try to remove the string !BUILD_STRIP! from our list.
46011    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46012    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46013      # If it failed, the variable was not from the command line. Ignore it,
46014      # but warn the user (except for BASH, which is always set by the calling BASH).
46015      if test "xBUILD_STRIP" != xBASH; then
46016        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46017$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46018      fi
46019      # Try to locate tool using the code snippet
46020      for ac_prog in strip
46021do
46022  # Extract the first word of "$ac_prog", so it can be a program name with args.
46023set dummy $ac_prog; ac_word=$2
46024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46025$as_echo_n "checking for $ac_word... " >&6; }
46026if ${ac_cv_path_BUILD_STRIP+:} false; then :
46027  $as_echo_n "(cached) " >&6
46028else
46029  case $BUILD_STRIP in
46030  [\\/]* | ?:[\\/]*)
46031  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46032  ;;
46033  *)
46034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46035for as_dir in $PATH
46036do
46037  IFS=$as_save_IFS
46038  test -z "$as_dir" && as_dir=.
46039    for ac_exec_ext in '' $ac_executable_extensions; do
46040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46041    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46043    break 2
46044  fi
46045done
46046  done
46047IFS=$as_save_IFS
46048
46049  ;;
46050esac
46051fi
46052BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46053if test -n "$BUILD_STRIP"; then
46054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46055$as_echo "$BUILD_STRIP" >&6; }
46056else
46057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46058$as_echo "no" >&6; }
46059fi
46060
46061
46062  test -n "$BUILD_STRIP" && break
46063done
46064
46065    else
46066      # If it succeeded, then it was overridden by the user. We will use it
46067      # for the tool.
46068
46069      # First remove it from the list of overridden variables, so we can test
46070      # for unknown variables in the end.
46071      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46072
46073      # Check if we try to supply an empty value
46074      if test "x$BUILD_STRIP" = x; then
46075        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46076$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46077        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46078$as_echo_n "checking for BUILD_STRIP... " >&6; }
46079        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46080$as_echo "disabled" >&6; }
46081      else
46082        # Check if the provided tool contains a complete path.
46083        tool_specified="$BUILD_STRIP"
46084        tool_basename="${tool_specified##*/}"
46085        if test "x$tool_basename" = "x$tool_specified"; then
46086          # A command without a complete path is provided, search $PATH.
46087          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46088$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46089          # Extract the first word of "$tool_basename", so it can be a program name with args.
46090set dummy $tool_basename; ac_word=$2
46091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46092$as_echo_n "checking for $ac_word... " >&6; }
46093if ${ac_cv_path_BUILD_STRIP+:} false; then :
46094  $as_echo_n "(cached) " >&6
46095else
46096  case $BUILD_STRIP in
46097  [\\/]* | ?:[\\/]*)
46098  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46099  ;;
46100  *)
46101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46102for as_dir in $PATH
46103do
46104  IFS=$as_save_IFS
46105  test -z "$as_dir" && as_dir=.
46106    for ac_exec_ext in '' $ac_executable_extensions; do
46107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46108    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46110    break 2
46111  fi
46112done
46113  done
46114IFS=$as_save_IFS
46115
46116  ;;
46117esac
46118fi
46119BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46120if test -n "$BUILD_STRIP"; then
46121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46122$as_echo "$BUILD_STRIP" >&6; }
46123else
46124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46125$as_echo "no" >&6; }
46126fi
46127
46128
46129          if test "x$BUILD_STRIP" = x; then
46130            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46131          fi
46132        else
46133          # Otherwise we believe it is a complete path. Use it as it is.
46134          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46135$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46136          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46137$as_echo_n "checking for BUILD_STRIP... " >&6; }
46138          if test ! -x "$tool_specified"; then
46139            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46140$as_echo "not found" >&6; }
46141            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46142          fi
46143          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46144$as_echo "$tool_specified" >&6; }
46145        fi
46146      fi
46147    fi
46148
46149  fi
46150
46151
46152
46153  # Only process if variable expands to non-empty
46154
46155  if test "x$BUILD_STRIP" != x; then
46156    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46157
46158  # First separate the path from the arguments. This will split at the first
46159  # space.
46160  complete="$BUILD_STRIP"
46161  path="${complete%% *}"
46162  tmp="$complete EOL"
46163  arguments="${tmp#* }"
46164
46165  # Input might be given as Windows format, start by converting to
46166  # unix format.
46167  new_path=`$CYGPATH -u "$path"`
46168
46169  # Now try to locate executable using which
46170  new_path=`$WHICH "$new_path" 2> /dev/null`
46171  # bat and cmd files are not always considered executable in cygwin causing which
46172  # to not find them
46173  if test "x$new_path" = x \
46174      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46175      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46176    new_path=`$CYGPATH -u "$path"`
46177  fi
46178  if test "x$new_path" = x; then
46179    # Oops. Which didn't find the executable.
46180    # The splitting of arguments from the executable at a space might have been incorrect,
46181    # since paths with space are more likely in Windows. Give it another try with the whole
46182    # argument.
46183    path="$complete"
46184    arguments="EOL"
46185    new_path=`$CYGPATH -u "$path"`
46186    new_path=`$WHICH "$new_path" 2> /dev/null`
46187    # bat and cmd files are not always considered executable in cygwin causing which
46188    # to not find them
46189    if test "x$new_path" = x \
46190        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46191        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46192      new_path=`$CYGPATH -u "$path"`
46193    fi
46194    if test "x$new_path" = x; then
46195      # It's still not found. Now this is an unrecoverable error.
46196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46197$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46198      has_space=`$ECHO "$complete" | $GREP " "`
46199      if test "x$has_space" != x; then
46200        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46201$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46202      fi
46203      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46204    fi
46205  fi
46206
46207  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46208  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46209  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46210  # "foo.exe" is OK but "foo" is an error.
46211  #
46212  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46213  # It is also a way to make sure we got the proper file name for the real test later on.
46214  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46215  if test "x$test_shortpath" = x; then
46216    # Short path failed, file does not exist as specified.
46217    # Try adding .exe or .cmd
46218    if test -f "${new_path}.exe"; then
46219      input_to_shortpath="${new_path}.exe"
46220    elif test -f "${new_path}.cmd"; then
46221      input_to_shortpath="${new_path}.cmd"
46222    else
46223      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46224$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46225      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46226$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46227      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46228    fi
46229  else
46230    input_to_shortpath="$new_path"
46231  fi
46232
46233  # Call helper function which possibly converts this using DOS-style short mode.
46234  # If so, the updated path is stored in $new_path.
46235  new_path="$input_to_shortpath"
46236
46237  input_path="$input_to_shortpath"
46238  # Check if we need to convert this using DOS-style short mode. If the path
46239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46240  # take no chances and rewrite it.
46241  # Note: m4 eats our [], so we need to use [ and ] instead.
46242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46243  if test "x$has_forbidden_chars" != x; then
46244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46245    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46246    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46247    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46248      # Going to short mode and back again did indeed matter. Since short mode is
46249      # case insensitive, let's make it lowercase to improve readability.
46250      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46251      # Now convert it back to Unix-style (cygpath)
46252      input_path=`$CYGPATH -u "$shortmode_path"`
46253      new_path="$input_path"
46254    fi
46255  fi
46256
46257  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46258  if test "x$test_cygdrive_prefix" = x; then
46259    # As a simple fix, exclude /usr/bin since it's not a real path.
46260    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46261      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46262      # a path prefixed by /cygdrive for fixpath to work.
46263      new_path="$CYGWIN_ROOT_PATH$input_path"
46264    fi
46265  fi
46266
46267  # remove trailing .exe if any
46268  new_path="${new_path/%.exe/}"
46269
46270    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46271
46272  # First separate the path from the arguments. This will split at the first
46273  # space.
46274  complete="$BUILD_STRIP"
46275  path="${complete%% *}"
46276  tmp="$complete EOL"
46277  arguments="${tmp#* }"
46278
46279  # Input might be given as Windows format, start by converting to
46280  # unix format.
46281  new_path="$path"
46282
46283  windows_path="$new_path"
46284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46285    unix_path=`$CYGPATH -u "$windows_path"`
46286    new_path="$unix_path"
46287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46289    new_path="$unix_path"
46290  fi
46291
46292
46293  # Now try to locate executable using which
46294  new_path=`$WHICH "$new_path" 2> /dev/null`
46295
46296  if test "x$new_path" = x; then
46297    # Oops. Which didn't find the executable.
46298    # The splitting of arguments from the executable at a space might have been incorrect,
46299    # since paths with space are more likely in Windows. Give it another try with the whole
46300    # argument.
46301    path="$complete"
46302    arguments="EOL"
46303    new_path="$path"
46304
46305  windows_path="$new_path"
46306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46307    unix_path=`$CYGPATH -u "$windows_path"`
46308    new_path="$unix_path"
46309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46311    new_path="$unix_path"
46312  fi
46313
46314
46315    new_path=`$WHICH "$new_path" 2> /dev/null`
46316    # bat and cmd files are not always considered executable in MSYS causing which
46317    # to not find them
46318    if test "x$new_path" = x \
46319        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46320        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46321      new_path="$path"
46322
46323  windows_path="$new_path"
46324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46325    unix_path=`$CYGPATH -u "$windows_path"`
46326    new_path="$unix_path"
46327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46329    new_path="$unix_path"
46330  fi
46331
46332    fi
46333
46334    if test "x$new_path" = x; then
46335      # It's still not found. Now this is an unrecoverable error.
46336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46337$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46338      has_space=`$ECHO "$complete" | $GREP " "`
46339      if test "x$has_space" != x; then
46340        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46341$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46342      fi
46343      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46344    fi
46345  fi
46346
46347  # Now new_path has a complete unix path to the binary
46348  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46349    # Keep paths in /bin as-is, but remove trailing .exe if any
46350    new_path="${new_path/%.exe/}"
46351    # Do not save /bin paths to all_fixpath_prefixes!
46352  else
46353    # Not in mixed or Windows style, start by that.
46354    new_path=`cmd //c echo $new_path`
46355
46356  input_path="$new_path"
46357  # Check if we need to convert this using DOS-style short mode. If the path
46358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46359  # take no chances and rewrite it.
46360  # Note: m4 eats our [], so we need to use [ and ] instead.
46361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46362  if test "x$has_forbidden_chars" != x; then
46363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46364    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46365  fi
46366
46367    # Output is in $new_path
46368
46369  windows_path="$new_path"
46370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46371    unix_path=`$CYGPATH -u "$windows_path"`
46372    new_path="$unix_path"
46373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46375    new_path="$unix_path"
46376  fi
46377
46378    # remove trailing .exe if any
46379    new_path="${new_path/%.exe/}"
46380
46381    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46382    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46383  fi
46384
46385    else
46386      # We're on a unix platform. Hooray! :)
46387      # First separate the path from the arguments. This will split at the first
46388      # space.
46389      complete="$BUILD_STRIP"
46390      path="${complete%% *}"
46391      tmp="$complete EOL"
46392      arguments="${tmp#* }"
46393
46394      # Cannot rely on the command "which" here since it doesn't always work.
46395      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46396      if test -z "$is_absolute_path"; then
46397        # Path to executable is not absolute. Find it.
46398        IFS_save="$IFS"
46399        IFS=:
46400        for p in $PATH; do
46401          if test -f "$p/$path" && test -x "$p/$path"; then
46402            new_path="$p/$path"
46403            break
46404          fi
46405        done
46406        IFS="$IFS_save"
46407      else
46408        # This is an absolute path, we can use it without further modifications.
46409        new_path="$path"
46410      fi
46411
46412      if test "x$new_path" = x; then
46413        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46414$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46415        has_space=`$ECHO "$complete" | $GREP " "`
46416        if test "x$has_space" != x; then
46417          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46418$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46419        fi
46420        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46421      fi
46422    fi
46423
46424    # Now join together the path and the arguments once again
46425    if test "x$arguments" != xEOL; then
46426      new_complete="$new_path ${arguments% *}"
46427    else
46428      new_complete="$new_path"
46429    fi
46430
46431    if test "x$complete" != "x$new_complete"; then
46432      BUILD_STRIP="$new_complete"
46433      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46434$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46435    fi
46436  fi
46437
46438    # Assume the C compiler is the assembler
46439    BUILD_AS="$BUILD_CC -c"
46440    # Just like for the target compiler, use the compiler as linker
46441    BUILD_LD="$BUILD_CC"
46442    BUILD_LDCXX="$BUILD_CXX"
46443
46444    PATH="$OLDPATH"
46445  else
46446    # If we are not cross compiling, use the normal target compilers for
46447    # building the build platform executables.
46448    BUILD_CC="$CC"
46449    BUILD_CXX="$CXX"
46450    BUILD_LD="$LD"
46451    BUILD_LDCXX="$LDCXX"
46452    BUILD_NM="$NM"
46453    BUILD_AS="$AS"
46454    BUILD_OBJCOPY="$OBJCOPY"
46455    BUILD_STRIP="$STRIP"
46456    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
46457    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
46458    BUILD_AR="$AR"
46459  fi
46460
46461
46462
46463
46464
46465
46466
46467
46468
46469
46470
46471
46472  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46473    # For hotspot, we need these in Windows mixed path,
46474    # so rewrite them all. Need added .exe suffix.
46475    HOTSPOT_CXX="$CXX.exe"
46476    HOTSPOT_LD="$LD.exe"
46477    HOTSPOT_MT="$MT.exe"
46478    HOTSPOT_RC="$RC.exe"
46479
46480  unix_path="$HOTSPOT_CXX"
46481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46482    windows_path=`$CYGPATH -m "$unix_path"`
46483    HOTSPOT_CXX="$windows_path"
46484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46485    windows_path=`cmd //c echo $unix_path`
46486    HOTSPOT_CXX="$windows_path"
46487  fi
46488
46489
46490  unix_path="$HOTSPOT_LD"
46491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46492    windows_path=`$CYGPATH -m "$unix_path"`
46493    HOTSPOT_LD="$windows_path"
46494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46495    windows_path=`cmd //c echo $unix_path`
46496    HOTSPOT_LD="$windows_path"
46497  fi
46498
46499
46500  unix_path="$HOTSPOT_MT"
46501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46502    windows_path=`$CYGPATH -m "$unix_path"`
46503    HOTSPOT_MT="$windows_path"
46504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46505    windows_path=`cmd //c echo $unix_path`
46506    HOTSPOT_MT="$windows_path"
46507  fi
46508
46509
46510  unix_path="$HOTSPOT_RC"
46511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46512    windows_path=`$CYGPATH -m "$unix_path"`
46513    HOTSPOT_RC="$windows_path"
46514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46515    windows_path=`cmd //c echo $unix_path`
46516    HOTSPOT_RC="$windows_path"
46517  fi
46518
46519
46520
46521  else
46522    HOTSPOT_CXX="$CXX"
46523    HOTSPOT_LD="$LD"
46524  fi
46525
46526
46527
46528  if test  "x$TOOLCHAIN_TYPE" = xclang; then
46529    USE_CLANG=true
46530  fi
46531
46532
46533
46534
46535
46536  # The package path is used only on macosx?
46537  # FIXME: clean this up, and/or move it elsewhere.
46538  PACKAGE_PATH=/opt/local
46539
46540
46541  # Check for extra potential brokenness.
46542  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46543    # On Windows, double-check that we got the right compiler.
46544    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46545    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
46546    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
46547      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
46548        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
46549      fi
46550    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
46551      if test "x$COMPILER_CPU_TEST" != "xx64"; then
46552        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
46553      fi
46554    fi
46555  fi
46556
46557  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46558    # If this is a --hash-style=gnu system, use --hash-style=both, why?
46559    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
46560    # This is later checked when setting flags.
46561
46562    # "-Og" suppported for GCC 4.8 and later
46563    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
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
46609
46610
46611    # Execute function body
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
46658
46659
46660    # Execute function body
46661
46662  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46663$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46664  supports=yes
46665
46666  saved_cflags="$CFLAGS"
46667  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
46668  ac_ext=c
46669ac_cpp='$CPP $CPPFLAGS'
46670ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46671ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46672ac_compiler_gnu=$ac_cv_c_compiler_gnu
46673
46674  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46675/* end confdefs.h.  */
46676int i;
46677_ACEOF
46678if ac_fn_c_try_compile "$LINENO"; then :
46679
46680else
46681  supports=no
46682fi
46683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46684  ac_ext=cpp
46685ac_cpp='$CXXCPP $CPPFLAGS'
46686ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46687ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46688ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46689
46690  CFLAGS="$saved_cflags"
46691
46692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46693$as_echo "$supports" >&6; }
46694  if test "x$supports" = "xyes" ; then
46695    :
46696    C_COMP_SUPPORTS="yes"
46697  else
46698    :
46699    C_COMP_SUPPORTS="no"
46700  fi
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
46758
46759
46760    # Execute function body
46761
46762  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46763$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46764  supports=yes
46765
46766  saved_cxxflags="$CXXFLAGS"
46767  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
46768  ac_ext=cpp
46769ac_cpp='$CXXCPP $CPPFLAGS'
46770ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46771ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46772ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46773
46774  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46775/* end confdefs.h.  */
46776int i;
46777_ACEOF
46778if ac_fn_cxx_try_compile "$LINENO"; then :
46779
46780else
46781  supports=no
46782fi
46783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46784  ac_ext=cpp
46785ac_cpp='$CXXCPP $CPPFLAGS'
46786ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46787ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46788ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46789
46790  CXXFLAGS="$saved_cxxflags"
46791
46792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46793$as_echo "$supports" >&6; }
46794  if test "x$supports" = "xyes" ; then
46795    :
46796    CXX_COMP_SUPPORTS="yes"
46797  else
46798    :
46799    CXX_COMP_SUPPORTS="no"
46800  fi
46801
46802
46803
46804
46805
46806
46807
46808
46809
46810
46811
46812
46813
46814  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46815$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46816  supports=no
46817  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
46818
46819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46820$as_echo "$supports" >&6; }
46821  if test "x$supports" = "xyes" ; then
46822    :
46823    HAS_CFLAG_OPTIMIZE_DEBUG=true
46824  else
46825    :
46826    HAS_CFLAG_OPTIMIZE_DEBUG=false
46827  fi
46828
46829
46830
46831
46832
46833
46834
46835    # "-z relro" supported in GNU binutils 2.17 and later
46836    LINKER_RELRO_FLAG="-Wl,-z,relro"
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
46882
46883
46884    # Execute function body
46885
46886  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
46887$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
46888  supports=yes
46889
46890  saved_ldflags="$LDFLAGS"
46891  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
46892  ac_ext=c
46893ac_cpp='$CPP $CPPFLAGS'
46894ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46895ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46896ac_compiler_gnu=$ac_cv_c_compiler_gnu
46897
46898  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46899/* end confdefs.h.  */
46900
46901int
46902main ()
46903{
46904
46905  ;
46906  return 0;
46907}
46908_ACEOF
46909if ac_fn_c_try_link "$LINENO"; then :
46910
46911else
46912  supports=no
46913fi
46914rm -f core conftest.err conftest.$ac_objext \
46915    conftest$ac_exeext conftest.$ac_ext
46916  ac_ext=cpp
46917ac_cpp='$CXXCPP $CPPFLAGS'
46918ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46919ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46920ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46921
46922  LDFLAGS="$saved_ldflags"
46923
46924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46925$as_echo "$supports" >&6; }
46926  if test "x$supports" = "xyes" ; then
46927    :
46928    HAS_LINKER_RELRO=true
46929  else
46930    :
46931    HAS_LINKER_RELRO=false
46932  fi
46933
46934
46935
46936
46937
46938
46939
46940
46941
46942
46943
46944
46945
46946    # "-z now" supported in GNU binutils 2.11 and later
46947    LINKER_NOW_FLAG="-Wl,-z,now"
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
46993
46994
46995    # Execute function body
46996
46997  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
46998$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
46999  supports=yes
47000
47001  saved_ldflags="$LDFLAGS"
47002  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47003  ac_ext=c
47004ac_cpp='$CPP $CPPFLAGS'
47005ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47006ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47007ac_compiler_gnu=$ac_cv_c_compiler_gnu
47008
47009  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47010/* end confdefs.h.  */
47011
47012int
47013main ()
47014{
47015
47016  ;
47017  return 0;
47018}
47019_ACEOF
47020if ac_fn_c_try_link "$LINENO"; then :
47021
47022else
47023  supports=no
47024fi
47025rm -f core conftest.err conftest.$ac_objext \
47026    conftest$ac_exeext conftest.$ac_ext
47027  ac_ext=cpp
47028ac_cpp='$CXXCPP $CPPFLAGS'
47029ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47030ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47031ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47032
47033  LDFLAGS="$saved_ldflags"
47034
47035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47036$as_echo "$supports" >&6; }
47037  if test "x$supports" = "xyes" ; then
47038    :
47039    HAS_LINKER_NOW=true
47040  else
47041    :
47042    HAS_LINKER_NOW=false
47043  fi
47044
47045
47046
47047
47048
47049
47050
47051
47052
47053
47054
47055
47056  fi
47057
47058  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47059  # in executable.'
47060  USING_BROKEN_SUSE_LD=no
47061  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47062    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47063$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47064    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47065    $ECHO "int main() { }" > main.c
47066    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47067      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47068$as_echo "no" >&6; }
47069      USING_BROKEN_SUSE_LD=no
47070    else
47071      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47072$as_echo "yes" >&6; }
47073      USING_BROKEN_SUSE_LD=yes
47074    fi
47075    rm -rf version-script.map main.c a.out
47076  fi
47077
47078
47079  # Setup hotspot lecagy names for toolchains
47080  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47081  if test "x$TOOLCHAIN_TYPE" = xclang; then
47082    HOTSPOT_TOOLCHAIN_TYPE=gcc
47083  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47084    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47085  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47086    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47087  fi
47088
47089
47090
47091# Setup the JTReg Regression Test Harness.
47092
47093
47094# Check whether --with-jtreg was given.
47095if test "${with_jtreg+set}" = set; then :
47096  withval=$with_jtreg;
47097else
47098  with_jtreg=no
47099fi
47100
47101
47102  if test "x$with_jtreg" = xno; then
47103    # jtreg disabled
47104    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47105$as_echo_n "checking for jtreg... " >&6; }
47106    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47107$as_echo "no" >&6; }
47108  else
47109    if test "x$with_jtreg" != xyes; then
47110      # with path specified.
47111      JT_HOME="$with_jtreg"
47112    fi
47113
47114    if test "x$JT_HOME" != x; then
47115      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47116$as_echo_n "checking for jtreg... " >&6; }
47117
47118      # use JT_HOME enviroment var.
47119
47120  # Only process if variable expands to non-empty
47121
47122  if test "x$JT_HOME" != x; then
47123    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47124
47125  # Input might be given as Windows format, start by converting to
47126  # unix format.
47127  path="$JT_HOME"
47128  new_path=`$CYGPATH -u "$path"`
47129
47130  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47131  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47132  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47133  # "foo.exe" is OK but "foo" is an error.
47134  #
47135  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47136  # It is also a way to make sure we got the proper file name for the real test later on.
47137  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47138  if test "x$test_shortpath" = x; then
47139    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47140$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47141    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47142  fi
47143
47144  # Call helper function which possibly converts this using DOS-style short mode.
47145  # If so, the updated path is stored in $new_path.
47146
47147  input_path="$new_path"
47148  # Check if we need to convert this using DOS-style short mode. If the path
47149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47150  # take no chances and rewrite it.
47151  # Note: m4 eats our [], so we need to use [ and ] instead.
47152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47153  if test "x$has_forbidden_chars" != x; then
47154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47155    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47156    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47157    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47158      # Going to short mode and back again did indeed matter. Since short mode is
47159      # case insensitive, let's make it lowercase to improve readability.
47160      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47161      # Now convert it back to Unix-style (cygpath)
47162      input_path=`$CYGPATH -u "$shortmode_path"`
47163      new_path="$input_path"
47164    fi
47165  fi
47166
47167  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47168  if test "x$test_cygdrive_prefix" = x; then
47169    # As a simple fix, exclude /usr/bin since it's not a real path.
47170    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47171      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47172      # a path prefixed by /cygdrive for fixpath to work.
47173      new_path="$CYGWIN_ROOT_PATH$input_path"
47174    fi
47175  fi
47176
47177
47178  if test "x$path" != "x$new_path"; then
47179    JT_HOME="$new_path"
47180    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47181$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47182  fi
47183
47184    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47185
47186  path="$JT_HOME"
47187  has_colon=`$ECHO $path | $GREP ^.:`
47188  new_path="$path"
47189  if test "x$has_colon" = x; then
47190    # Not in mixed or Windows style, start by that.
47191    new_path=`cmd //c echo $path`
47192  fi
47193
47194
47195  input_path="$new_path"
47196  # Check if we need to convert this using DOS-style short mode. If the path
47197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47198  # take no chances and rewrite it.
47199  # Note: m4 eats our [], so we need to use [ and ] instead.
47200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47201  if test "x$has_forbidden_chars" != x; then
47202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47203    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47204  fi
47205
47206
47207  windows_path="$new_path"
47208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47209    unix_path=`$CYGPATH -u "$windows_path"`
47210    new_path="$unix_path"
47211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47213    new_path="$unix_path"
47214  fi
47215
47216  if test "x$path" != "x$new_path"; then
47217    JT_HOME="$new_path"
47218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47219$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47220  fi
47221
47222  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47223  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47224
47225    else
47226      # We're on a unix platform. Hooray! :)
47227      path="$JT_HOME"
47228      has_space=`$ECHO "$path" | $GREP " "`
47229      if test "x$has_space" != x; then
47230        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47231$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47232        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47233      fi
47234
47235      # Use eval to expand a potential ~
47236      eval path="$path"
47237      if test ! -f "$path" && test ! -d "$path"; then
47238        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
47239      fi
47240
47241      if test -d "$path"; then
47242        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
47243      else
47244        dir="`$DIRNAME "$path"`"
47245        base="`$BASENAME "$path"`"
47246        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
47247      fi
47248    fi
47249  fi
47250
47251
47252      # jtreg win32 script works for everybody
47253      JTREGEXE="$JT_HOME/bin/jtreg"
47254
47255      if test ! -f "$JTREGEXE"; then
47256        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
47257      fi
47258
47259      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47260$as_echo "$JTREGEXE" >&6; }
47261    else
47262      # try to find jtreg on path
47263
47264
47265
47266  # Publish this variable in the help.
47267
47268
47269  if [ -z "${JTREGEXE+x}" ]; then
47270    # The variable is not set by user, try to locate tool using the code snippet
47271    for ac_prog in jtreg
47272do
47273  # Extract the first word of "$ac_prog", so it can be a program name with args.
47274set dummy $ac_prog; ac_word=$2
47275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47276$as_echo_n "checking for $ac_word... " >&6; }
47277if ${ac_cv_path_JTREGEXE+:} false; then :
47278  $as_echo_n "(cached) " >&6
47279else
47280  case $JTREGEXE in
47281  [\\/]* | ?:[\\/]*)
47282  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47283  ;;
47284  *)
47285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47286for as_dir in $PATH
47287do
47288  IFS=$as_save_IFS
47289  test -z "$as_dir" && as_dir=.
47290    for ac_exec_ext in '' $ac_executable_extensions; do
47291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47292    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47294    break 2
47295  fi
47296done
47297  done
47298IFS=$as_save_IFS
47299
47300  ;;
47301esac
47302fi
47303JTREGEXE=$ac_cv_path_JTREGEXE
47304if test -n "$JTREGEXE"; then
47305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47306$as_echo "$JTREGEXE" >&6; }
47307else
47308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47309$as_echo "no" >&6; }
47310fi
47311
47312
47313  test -n "$JTREGEXE" && break
47314done
47315
47316  else
47317    # The variable is set, but is it from the command line or the environment?
47318
47319    # Try to remove the string !JTREGEXE! from our list.
47320    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
47321    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47322      # If it failed, the variable was not from the command line. Ignore it,
47323      # but warn the user (except for BASH, which is always set by the calling BASH).
47324      if test "xJTREGEXE" != xBASH; then
47325        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
47326$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
47327      fi
47328      # Try to locate tool using the code snippet
47329      for ac_prog in jtreg
47330do
47331  # Extract the first word of "$ac_prog", so it can be a program name with args.
47332set dummy $ac_prog; ac_word=$2
47333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47334$as_echo_n "checking for $ac_word... " >&6; }
47335if ${ac_cv_path_JTREGEXE+:} false; then :
47336  $as_echo_n "(cached) " >&6
47337else
47338  case $JTREGEXE in
47339  [\\/]* | ?:[\\/]*)
47340  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47341  ;;
47342  *)
47343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47344for as_dir in $PATH
47345do
47346  IFS=$as_save_IFS
47347  test -z "$as_dir" && as_dir=.
47348    for ac_exec_ext in '' $ac_executable_extensions; do
47349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47350    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47352    break 2
47353  fi
47354done
47355  done
47356IFS=$as_save_IFS
47357
47358  ;;
47359esac
47360fi
47361JTREGEXE=$ac_cv_path_JTREGEXE
47362if test -n "$JTREGEXE"; then
47363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47364$as_echo "$JTREGEXE" >&6; }
47365else
47366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47367$as_echo "no" >&6; }
47368fi
47369
47370
47371  test -n "$JTREGEXE" && break
47372done
47373
47374    else
47375      # If it succeeded, then it was overridden by the user. We will use it
47376      # for the tool.
47377
47378      # First remove it from the list of overridden variables, so we can test
47379      # for unknown variables in the end.
47380      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47381
47382      # Check if we try to supply an empty value
47383      if test "x$JTREGEXE" = x; then
47384        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
47385$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
47386        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47387$as_echo_n "checking for JTREGEXE... " >&6; }
47388        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47389$as_echo "disabled" >&6; }
47390      else
47391        # Check if the provided tool contains a complete path.
47392        tool_specified="$JTREGEXE"
47393        tool_basename="${tool_specified##*/}"
47394        if test "x$tool_basename" = "x$tool_specified"; then
47395          # A command without a complete path is provided, search $PATH.
47396          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
47397$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
47398          # Extract the first word of "$tool_basename", so it can be a program name with args.
47399set dummy $tool_basename; ac_word=$2
47400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47401$as_echo_n "checking for $ac_word... " >&6; }
47402if ${ac_cv_path_JTREGEXE+:} false; then :
47403  $as_echo_n "(cached) " >&6
47404else
47405  case $JTREGEXE in
47406  [\\/]* | ?:[\\/]*)
47407  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47408  ;;
47409  *)
47410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47411for as_dir in $PATH
47412do
47413  IFS=$as_save_IFS
47414  test -z "$as_dir" && as_dir=.
47415    for ac_exec_ext in '' $ac_executable_extensions; do
47416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47417    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47419    break 2
47420  fi
47421done
47422  done
47423IFS=$as_save_IFS
47424
47425  ;;
47426esac
47427fi
47428JTREGEXE=$ac_cv_path_JTREGEXE
47429if test -n "$JTREGEXE"; then
47430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47431$as_echo "$JTREGEXE" >&6; }
47432else
47433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47434$as_echo "no" >&6; }
47435fi
47436
47437
47438          if test "x$JTREGEXE" = x; then
47439            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47440          fi
47441        else
47442          # Otherwise we believe it is a complete path. Use it as it is.
47443          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
47444$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
47445          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47446$as_echo_n "checking for JTREGEXE... " >&6; }
47447          if test ! -x "$tool_specified"; then
47448            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47449$as_echo "not found" >&6; }
47450            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
47451          fi
47452          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47453$as_echo "$tool_specified" >&6; }
47454        fi
47455      fi
47456    fi
47457
47458  fi
47459
47460
47461
47462  if test "x$JTREGEXE" = x; then
47463    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
47464  fi
47465
47466
47467      JT_HOME="`$DIRNAME $JTREGEXE`"
47468    fi
47469  fi
47470
47471
47472
47473
47474
47475
47476  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
47477  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
47478  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
47479  #                              commands produced by the link step (currently AIX only)
47480  if test "x$TOOLCHAIN_TYPE" = xxlc; then
47481    COMPILER_TARGET_BITS_FLAG="-q"
47482    COMPILER_COMMAND_FILE_FLAG="-f"
47483    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
47484  else
47485    COMPILER_TARGET_BITS_FLAG="-m"
47486    COMPILER_COMMAND_FILE_FLAG="@"
47487    COMPILER_BINDCMD_FILE_FLAG=""
47488
47489    # The solstudio linker does not support @-files.
47490    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47491      COMPILER_COMMAND_FILE_FLAG=
47492    fi
47493
47494    # Check if @file is supported by gcc
47495    if test "x$TOOLCHAIN_TYPE" = xgcc; then
47496      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
47497$as_echo_n "checking if @file is supported by gcc... " >&6; }
47498      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
47499      $ECHO "" "--version" > command.file
47500      if $CXX @command.file 2>&5 >&5; then
47501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47502$as_echo "yes" >&6; }
47503        COMPILER_COMMAND_FILE_FLAG="@"
47504      else
47505        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47506$as_echo "no" >&6; }
47507        COMPILER_COMMAND_FILE_FLAG=
47508      fi
47509      rm -rf command.file
47510    fi
47511  fi
47512
47513
47514
47515
47516  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
47517  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47518    ARFLAGS="-r"
47519  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47520    ARFLAGS="-X64"
47521  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
47522    # lib.exe is used as AR to create static libraries.
47523    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
47524  else
47525    ARFLAGS=""
47526  fi
47527
47528
47529  ## Setup strip.
47530  # FIXME: should this really be per platform, or should it be per toolchain type?
47531  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
47532  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
47533  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47534    STRIPFLAGS="-g"
47535  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
47536    STRIPFLAGS="-x"
47537  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
47538    STRIPFLAGS="-S"
47539  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47540    STRIPFLAGS="-X32_64"
47541  fi
47542
47543
47544
47545  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47546    CC_OUT_OPTION=-Fo
47547    EXE_OUT_OPTION=-out:
47548    LD_OUT_OPTION=-out:
47549    AR_OUT_OPTION=-out:
47550  else
47551    # The option used to specify the target .o,.a or .so file.
47552    # When compiling, how to specify the to be created object file.
47553    CC_OUT_OPTION='-o$(SPACE)'
47554    # When linking, how to specify the to be created executable.
47555    EXE_OUT_OPTION='-o$(SPACE)'
47556    # When linking, how to specify the to be created dynamically linkable library.
47557    LD_OUT_OPTION='-o$(SPACE)'
47558    # When archiving, how to specify the to be create static archive for object files.
47559    AR_OUT_OPTION='rcs$(SPACE)'
47560  fi
47561
47562
47563
47564
47565
47566  # On Windows, we need to set RC flags.
47567  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47568    RC_FLAGS="-nologo -l0x409"
47569    JVM_RCFLAGS="-nologo"
47570    if test "x$DEBUG_LEVEL" = xrelease; then
47571      RC_FLAGS="$RC_FLAGS -DNDEBUG"
47572      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
47573    fi
47574
47575    # The version variables used to create RC_FLAGS may be overridden
47576    # in a custom configure script, or possibly the command line.
47577    # Let those variables be expanded at make time in spec.gmk.
47578    # The \$ are escaped to the shell, and the $(...) variables
47579    # are evaluated by make.
47580    RC_FLAGS="$RC_FLAGS \
47581        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
47582        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
47583        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
47584        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
47585        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
47586        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
47587        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
47588
47589    JVM_RCFLAGS="$JVM_RCFLAGS \
47590        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
47591        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
47592        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
47593        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
47594        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
47595        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
47596        -D\"HS_FNAME=jvm.dll\" \
47597        -D\"HS_INTERNAL_NAME=jvm\""
47598  fi
47599
47600
47601
47602  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47603    # silence copyright notice and other headers.
47604    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
47605  fi
47606
47607
47608# Now we can test some aspects on the target using configure macros.
47609
47610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
47611$as_echo_n "checking for ANSI C header files... " >&6; }
47612if ${ac_cv_header_stdc+:} false; then :
47613  $as_echo_n "(cached) " >&6
47614else
47615  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47616/* end confdefs.h.  */
47617#include <stdlib.h>
47618#include <stdarg.h>
47619#include <string.h>
47620#include <float.h>
47621
47622int
47623main ()
47624{
47625
47626  ;
47627  return 0;
47628}
47629_ACEOF
47630if ac_fn_cxx_try_compile "$LINENO"; then :
47631  ac_cv_header_stdc=yes
47632else
47633  ac_cv_header_stdc=no
47634fi
47635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47636
47637if test $ac_cv_header_stdc = yes; then
47638  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
47639  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47640/* end confdefs.h.  */
47641#include <string.h>
47642
47643_ACEOF
47644if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47645  $EGREP "memchr" >/dev/null 2>&1; then :
47646
47647else
47648  ac_cv_header_stdc=no
47649fi
47650rm -f conftest*
47651
47652fi
47653
47654if test $ac_cv_header_stdc = yes; then
47655  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
47656  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47657/* end confdefs.h.  */
47658#include <stdlib.h>
47659
47660_ACEOF
47661if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47662  $EGREP "free" >/dev/null 2>&1; then :
47663
47664else
47665  ac_cv_header_stdc=no
47666fi
47667rm -f conftest*
47668
47669fi
47670
47671if test $ac_cv_header_stdc = yes; then
47672  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
47673  if test "$cross_compiling" = yes; then :
47674  :
47675else
47676  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47677/* end confdefs.h.  */
47678#include <ctype.h>
47679#include <stdlib.h>
47680#if ((' ' & 0x0FF) == 0x020)
47681# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
47682# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
47683#else
47684# define ISLOWER(c) \
47685		   (('a' <= (c) && (c) <= 'i') \
47686		     || ('j' <= (c) && (c) <= 'r') \
47687		     || ('s' <= (c) && (c) <= 'z'))
47688# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
47689#endif
47690
47691#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
47692int
47693main ()
47694{
47695  int i;
47696  for (i = 0; i < 256; i++)
47697    if (XOR (islower (i), ISLOWER (i))
47698	|| toupper (i) != TOUPPER (i))
47699      return 2;
47700  return 0;
47701}
47702_ACEOF
47703if ac_fn_cxx_try_run "$LINENO"; then :
47704
47705else
47706  ac_cv_header_stdc=no
47707fi
47708rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47709  conftest.$ac_objext conftest.beam conftest.$ac_ext
47710fi
47711
47712fi
47713fi
47714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
47715$as_echo "$ac_cv_header_stdc" >&6; }
47716if test $ac_cv_header_stdc = yes; then
47717
47718$as_echo "#define STDC_HEADERS 1" >>confdefs.h
47719
47720fi
47721
47722# On IRIX 5.3, sys/types and inttypes.h are conflicting.
47723for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
47724		  inttypes.h stdint.h unistd.h
47725do :
47726  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
47727ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
47728"
47729if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
47730  cat >>confdefs.h <<_ACEOF
47731#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
47732_ACEOF
47733
47734fi
47735
47736done
47737
47738
47739
47740  ###############################################################################
47741  #
47742  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
47743  # (The JVM can use 32 or 64 bit Java pointers but that decision
47744  # is made at runtime.)
47745  #
47746
47747  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
47748    # Always specify -m flag on Solaris
47749    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
47750
47751  # When we add flags to the "official" CFLAGS etc, we need to
47752  # keep track of these additions in ADDED_CFLAGS etc. These
47753  # will later be checked to make sure only controlled additions
47754  # have been made to CFLAGS etc.
47755  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47756  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47757  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47758
47759  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47760  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47761  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47762
47763  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47764  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47765  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47766
47767  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47768  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47769  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47770
47771  elif test "x$COMPILE_TYPE" = xreduced; then
47772    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
47773      # Specify -m if running reduced on unix platforms
47774
47775  # When we add flags to the "official" CFLAGS etc, we need to
47776  # keep track of these additions in ADDED_CFLAGS etc. These
47777  # will later be checked to make sure only controlled additions
47778  # have been made to CFLAGS etc.
47779  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47780  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47781  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47782
47783  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47784  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47785  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47786
47787  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47788  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47789  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47790
47791  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47792  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47793  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47794
47795    fi
47796  fi
47797  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47798    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47799    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47800    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47801  fi
47802
47803  # Make compilation sanity check
47804  for ac_header in stdio.h
47805do :
47806  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
47807if test "x$ac_cv_header_stdio_h" = xyes; then :
47808  cat >>confdefs.h <<_ACEOF
47809#define HAVE_STDIO_H 1
47810_ACEOF
47811
47812else
47813
47814    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
47815$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
47816    if test "x$COMPILE_TYPE" = xreduced; then
47817
47818  # Print a helpful message on how to acquire the necessary build dependency.
47819  # reduced is the help tag: freetype, cups, alsa etc
47820  MISSING_DEPENDENCY=reduced
47821
47822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47823    cygwin_help $MISSING_DEPENDENCY
47824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47825    msys_help $MISSING_DEPENDENCY
47826  else
47827    PKGHANDLER_COMMAND=
47828
47829    case $PKGHANDLER in
47830      apt-get)
47831        apt_help     $MISSING_DEPENDENCY ;;
47832      yum)
47833        yum_help     $MISSING_DEPENDENCY ;;
47834      port)
47835        port_help    $MISSING_DEPENDENCY ;;
47836      pkgutil)
47837        pkgutil_help $MISSING_DEPENDENCY ;;
47838      pkgadd)
47839        pkgadd_help  $MISSING_DEPENDENCY ;;
47840    esac
47841
47842    if test "x$PKGHANDLER_COMMAND" != x; then
47843      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47844    fi
47845  fi
47846
47847      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
47848$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
47849    elif test "x$COMPILE_TYPE" = xcross; then
47850      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
47851$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
47852    fi
47853    as_fn_error $? "Cannot continue." "$LINENO" 5
47854
47855fi
47856
47857done
47858
47859
47860  # The cast to long int works around a bug in the HP C Compiler
47861# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47862# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47863# This bug is HP SR number 8606223364.
47864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47865$as_echo_n "checking size of int *... " >&6; }
47866if ${ac_cv_sizeof_int_p+:} false; then :
47867  $as_echo_n "(cached) " >&6
47868else
47869  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47870
47871else
47872  if test "$ac_cv_type_int_p" = yes; then
47873     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47874$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47875as_fn_error 77 "cannot compute sizeof (int *)
47876See \`config.log' for more details" "$LINENO" 5; }
47877   else
47878     ac_cv_sizeof_int_p=0
47879   fi
47880fi
47881
47882fi
47883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47884$as_echo "$ac_cv_sizeof_int_p" >&6; }
47885
47886
47887
47888cat >>confdefs.h <<_ACEOF
47889#define SIZEOF_INT_P $ac_cv_sizeof_int_p
47890_ACEOF
47891
47892
47893
47894  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
47895  if test "x$ac_cv_sizeof_int_p" = x; then
47896    # The test failed, lets stick to the assumed value.
47897    { $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
47898$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
47899  else
47900    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
47901
47902    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
47903      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
47904      # Let's try to implicitely set the compilers target architecture and retry the test
47905      { $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
47906$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;}
47907      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
47908$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
47909
47910  # When we add flags to the "official" CFLAGS etc, we need to
47911  # keep track of these additions in ADDED_CFLAGS etc. These
47912  # will later be checked to make sure only controlled additions
47913  # have been made to CFLAGS etc.
47914  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47915  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47916  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47917
47918  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47919  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47920  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47921
47922  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47923  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47924  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47925
47926  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47927  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47928  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47929
47930
47931      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
47932      unset ac_cv_sizeof_int_p
47933      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
47934      cat >>confdefs.h <<_ACEOF
47935#undef SIZEOF_INT_P
47936_ACEOF
47937
47938      # The cast to long int works around a bug in the HP C Compiler
47939# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47940# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47941# This bug is HP SR number 8606223364.
47942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47943$as_echo_n "checking size of int *... " >&6; }
47944if ${ac_cv_sizeof_int_p+:} false; then :
47945  $as_echo_n "(cached) " >&6
47946else
47947  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47948
47949else
47950  if test "$ac_cv_type_int_p" = yes; then
47951     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47952$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47953as_fn_error 77 "cannot compute sizeof (int *)
47954See \`config.log' for more details" "$LINENO" 5; }
47955   else
47956     ac_cv_sizeof_int_p=0
47957   fi
47958fi
47959
47960fi
47961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47962$as_echo "$ac_cv_sizeof_int_p" >&6; }
47963
47964
47965
47966cat >>confdefs.h <<_ACEOF
47967#define SIZEOF_INT_P $ac_cv_sizeof_int_p
47968_ACEOF
47969
47970
47971
47972      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
47973
47974      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
47975        { $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
47976$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;}
47977        if test "x$COMPILE_TYPE" = xreduced; then
47978
47979  # Print a helpful message on how to acquire the necessary build dependency.
47980  # reduced is the help tag: freetype, cups, alsa etc
47981  MISSING_DEPENDENCY=reduced
47982
47983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47984    cygwin_help $MISSING_DEPENDENCY
47985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47986    msys_help $MISSING_DEPENDENCY
47987  else
47988    PKGHANDLER_COMMAND=
47989
47990    case $PKGHANDLER in
47991      apt-get)
47992        apt_help     $MISSING_DEPENDENCY ;;
47993      yum)
47994        yum_help     $MISSING_DEPENDENCY ;;
47995      port)
47996        port_help    $MISSING_DEPENDENCY ;;
47997      pkgutil)
47998        pkgutil_help $MISSING_DEPENDENCY ;;
47999      pkgadd)
48000        pkgadd_help  $MISSING_DEPENDENCY ;;
48001    esac
48002
48003    if test "x$PKGHANDLER_COMMAND" != x; then
48004      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48005    fi
48006  fi
48007
48008          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48009$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48010        elif test "x$COMPILE_TYPE" = xcross; then
48011          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48012$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48013        fi
48014        as_fn_error $? "Cannot continue." "$LINENO" 5
48015      fi
48016    fi
48017  fi
48018
48019  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48020$as_echo_n "checking for target address size... " >&6; }
48021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48022$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48023
48024
48025  ###############################################################################
48026  #
48027  # Is the target little of big endian?
48028  #
48029   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48030$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48031if ${ac_cv_c_bigendian+:} false; then :
48032  $as_echo_n "(cached) " >&6
48033else
48034  ac_cv_c_bigendian=unknown
48035    # See if we're dealing with a universal compiler.
48036    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48037/* end confdefs.h.  */
48038#ifndef __APPLE_CC__
48039	       not a universal capable compiler
48040	     #endif
48041	     typedef int dummy;
48042
48043_ACEOF
48044if ac_fn_cxx_try_compile "$LINENO"; then :
48045
48046	# Check for potential -arch flags.  It is not universal unless
48047	# there are at least two -arch flags with different values.
48048	ac_arch=
48049	ac_prev=
48050	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48051	 if test -n "$ac_prev"; then
48052	   case $ac_word in
48053	     i?86 | x86_64 | ppc | ppc64)
48054	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48055		 ac_arch=$ac_word
48056	       else
48057		 ac_cv_c_bigendian=universal
48058		 break
48059	       fi
48060	       ;;
48061	   esac
48062	   ac_prev=
48063	 elif test "x$ac_word" = "x-arch"; then
48064	   ac_prev=arch
48065	 fi
48066       done
48067fi
48068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48069    if test $ac_cv_c_bigendian = unknown; then
48070      # See if sys/param.h defines the BYTE_ORDER macro.
48071      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48072/* end confdefs.h.  */
48073#include <sys/types.h>
48074	     #include <sys/param.h>
48075
48076int
48077main ()
48078{
48079#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48080		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48081		     && LITTLE_ENDIAN)
48082	      bogus endian macros
48083	     #endif
48084
48085  ;
48086  return 0;
48087}
48088_ACEOF
48089if ac_fn_cxx_try_compile "$LINENO"; then :
48090  # It does; now see whether it defined to BIG_ENDIAN or not.
48091	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48092/* end confdefs.h.  */
48093#include <sys/types.h>
48094		#include <sys/param.h>
48095
48096int
48097main ()
48098{
48099#if BYTE_ORDER != BIG_ENDIAN
48100		 not big endian
48101		#endif
48102
48103  ;
48104  return 0;
48105}
48106_ACEOF
48107if ac_fn_cxx_try_compile "$LINENO"; then :
48108  ac_cv_c_bigendian=yes
48109else
48110  ac_cv_c_bigendian=no
48111fi
48112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48113fi
48114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48115    fi
48116    if test $ac_cv_c_bigendian = unknown; then
48117      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48118      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48119/* end confdefs.h.  */
48120#include <limits.h>
48121
48122int
48123main ()
48124{
48125#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48126	      bogus endian macros
48127	     #endif
48128
48129  ;
48130  return 0;
48131}
48132_ACEOF
48133if ac_fn_cxx_try_compile "$LINENO"; then :
48134  # It does; now see whether it defined to _BIG_ENDIAN or not.
48135	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48136/* end confdefs.h.  */
48137#include <limits.h>
48138
48139int
48140main ()
48141{
48142#ifndef _BIG_ENDIAN
48143		 not big endian
48144		#endif
48145
48146  ;
48147  return 0;
48148}
48149_ACEOF
48150if ac_fn_cxx_try_compile "$LINENO"; then :
48151  ac_cv_c_bigendian=yes
48152else
48153  ac_cv_c_bigendian=no
48154fi
48155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48156fi
48157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48158    fi
48159    if test $ac_cv_c_bigendian = unknown; then
48160      # Compile a test program.
48161      if test "$cross_compiling" = yes; then :
48162  # Try to guess by grepping values from an object file.
48163	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48164/* end confdefs.h.  */
48165short int ascii_mm[] =
48166		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48167		short int ascii_ii[] =
48168		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48169		int use_ascii (int i) {
48170		  return ascii_mm[i] + ascii_ii[i];
48171		}
48172		short int ebcdic_ii[] =
48173		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48174		short int ebcdic_mm[] =
48175		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48176		int use_ebcdic (int i) {
48177		  return ebcdic_mm[i] + ebcdic_ii[i];
48178		}
48179		extern int foo;
48180
48181int
48182main ()
48183{
48184return use_ascii (foo) == use_ebcdic (foo);
48185  ;
48186  return 0;
48187}
48188_ACEOF
48189if ac_fn_cxx_try_compile "$LINENO"; then :
48190  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48191	      ac_cv_c_bigendian=yes
48192	    fi
48193	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48194	      if test "$ac_cv_c_bigendian" = unknown; then
48195		ac_cv_c_bigendian=no
48196	      else
48197		# finding both strings is unlikely to happen, but who knows?
48198		ac_cv_c_bigendian=unknown
48199	      fi
48200	    fi
48201fi
48202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48203else
48204  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48205/* end confdefs.h.  */
48206$ac_includes_default
48207int
48208main ()
48209{
48210
48211	     /* Are we little or big endian?  From Harbison&Steele.  */
48212	     union
48213	     {
48214	       long int l;
48215	       char c[sizeof (long int)];
48216	     } u;
48217	     u.l = 1;
48218	     return u.c[sizeof (long int) - 1] == 1;
48219
48220  ;
48221  return 0;
48222}
48223_ACEOF
48224if ac_fn_cxx_try_run "$LINENO"; then :
48225  ac_cv_c_bigendian=no
48226else
48227  ac_cv_c_bigendian=yes
48228fi
48229rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48230  conftest.$ac_objext conftest.beam conftest.$ac_ext
48231fi
48232
48233    fi
48234fi
48235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
48236$as_echo "$ac_cv_c_bigendian" >&6; }
48237 case $ac_cv_c_bigendian in #(
48238   yes)
48239     ENDIAN="big";; #(
48240   no)
48241     ENDIAN="little" ;; #(
48242   universal)
48243     ENDIAN="universal_endianness"
48244     ;; #(
48245   *)
48246     ENDIAN="unknown" ;;
48247 esac
48248
48249
48250  if test "x$ENDIAN" = xuniversal_endianness; then
48251    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
48252  fi
48253  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
48254    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
48255  fi
48256
48257
48258# Configure flags for the tools
48259
48260  ###############################################################################
48261  #
48262  # How to compile shared libraries.
48263  #
48264
48265  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48266    PICFLAG="-fPIC"
48267    C_FLAG_REORDER=''
48268    CXX_FLAG_REORDER=''
48269
48270    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48271      # Linking is different on MacOSX
48272      if test "x$STATIC_BUILD" = xtrue; then
48273        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
48274      else
48275        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48276        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
48277      fi
48278      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48279      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48280      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48281      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48282    else
48283      # Default works for linux, might work on other platforms as well.
48284      SHARED_LIBRARY_FLAGS='-shared'
48285      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
48286      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
48287      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
48288      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
48289    fi
48290  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48291    C_FLAG_REORDER=''
48292    CXX_FLAG_REORDER=''
48293
48294    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48295      # Linking is different on MacOSX
48296      PICFLAG=''
48297      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48298      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48299      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48300      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48301      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48302
48303      if test "x$STATIC_BUILD" = xfalse; then
48304        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
48305      fi
48306    else
48307      # Default works for linux, might work on other platforms as well.
48308      PICFLAG='-fPIC'
48309      SHARED_LIBRARY_FLAGS='-shared'
48310      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
48311      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
48312      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
48313      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
48314    fi
48315  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48316    PICFLAG="-KPIC"
48317    C_FLAG_REORDER='-xF'
48318    CXX_FLAG_REORDER='-xF'
48319    SHARED_LIBRARY_FLAGS="-G"
48320    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
48321    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48322    SET_SHARED_LIBRARY_NAME='-h $1'
48323    SET_SHARED_LIBRARY_MAPFILE='-M$1'
48324  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48325    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
48326    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
48327    # will have to patch this single instruction with a call to some out-of-order code which
48328    # does the load from the TOC. This is of course slow. But in that case we also would have
48329    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
48330    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
48331    # can be patched directly by the linker and does not require a jump to out-of-order code.
48332    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
48333    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
48334    # loads for accessing a global variable). But there are rumors that this may be seen as a
48335    # 'performance feature' because of improved code locality of the symbols used in a
48336    # compilation unit.
48337    PICFLAG="-qpic"
48338    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
48339    C_FLAG_REORDER=''
48340    CXX_FLAG_REORDER=''
48341    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
48342    SET_EXECUTABLE_ORIGIN=""
48343    SET_SHARED_LIBRARY_ORIGIN=''
48344    SET_SHARED_LIBRARY_NAME=''
48345    SET_SHARED_LIBRARY_MAPFILE=''
48346  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48347    PICFLAG=""
48348    C_FLAG_REORDER=''
48349    CXX_FLAG_REORDER=''
48350    SHARED_LIBRARY_FLAGS="-dll"
48351    SET_EXECUTABLE_ORIGIN=''
48352    SET_SHARED_LIBRARY_ORIGIN=''
48353    SET_SHARED_LIBRARY_NAME=''
48354    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
48355  fi
48356
48357
48358
48359
48360
48361
48362
48363
48364
48365  # The (cross) compiler is now configured, we can now test capabilities
48366  # of the target platform.
48367
48368
48369
48370  ###############################################################################
48371  #
48372  # Setup the opt flags for different compilers
48373  # and different operating systems.
48374  #
48375
48376  # FIXME: this was indirectly the old default, but just inherited.
48377  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48378  #   C_FLAG_DEPS="-MMD -MF"
48379  # fi
48380
48381  # Generate make dependency files
48382  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48383    C_FLAG_DEPS="-MMD -MF"
48384  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48385    C_FLAG_DEPS="-MMD -MF"
48386  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48387    C_FLAG_DEPS="-xMMD -xMF"
48388  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48389    C_FLAG_DEPS="-qmakedep=gcc -MF"
48390  fi
48391  CXX_FLAG_DEPS="$C_FLAG_DEPS"
48392
48393
48394
48395  # Debug symbols
48396  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48397    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
48398      # reduce from default "-g2" option to save space
48399      CFLAGS_DEBUG_SYMBOLS="-g1"
48400      CXXFLAGS_DEBUG_SYMBOLS="-g1"
48401    else
48402      CFLAGS_DEBUG_SYMBOLS="-g"
48403      CXXFLAGS_DEBUG_SYMBOLS="-g"
48404    fi
48405  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48406    CFLAGS_DEBUG_SYMBOLS="-g"
48407    CXXFLAGS_DEBUG_SYMBOLS="-g"
48408  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48409    CFLAGS_DEBUG_SYMBOLS="-g -xs"
48410    # -g0 enables debug symbols without disabling inlining.
48411    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
48412  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48413    CFLAGS_DEBUG_SYMBOLS="-g"
48414    CXXFLAGS_DEBUG_SYMBOLS="-g"
48415  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48416    CFLAGS_DEBUG_SYMBOLS="-Zi"
48417    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
48418  fi
48419
48420
48421
48422  # Debug symbols for JVM_CFLAGS
48423  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48424    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
48425    if test "x$DEBUG_LEVEL" = xslowdebug; then
48426      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
48427    else
48428      # -g0 does not disable inlining, which -g does.
48429      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
48430    fi
48431  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48432    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
48433  else
48434    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
48435  fi
48436
48437
48438  # bounds, memory and behavior checking options
48439  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48440    case $DEBUG_LEVEL in
48441    release )
48442      # no adjustment
48443      ;;
48444    fastdebug )
48445      # no adjustment
48446      ;;
48447    slowdebug )
48448      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
48449      # get's added conditionally on whether we produce debug symbols or not.
48450      # This is most likely not really correct.
48451
48452      # Add runtime stack smashing and undefined behavior checks.
48453      # Not all versions of gcc support -fstack-protector
48454      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
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
48495
48496
48497    # Execute function body
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
48544
48545
48546    # Execute function body
48547
48548  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48549$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48550  supports=yes
48551
48552  saved_cflags="$CFLAGS"
48553  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
48554  ac_ext=c
48555ac_cpp='$CPP $CPPFLAGS'
48556ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48557ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48558ac_compiler_gnu=$ac_cv_c_compiler_gnu
48559
48560  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48561/* end confdefs.h.  */
48562int i;
48563_ACEOF
48564if ac_fn_c_try_compile "$LINENO"; then :
48565
48566else
48567  supports=no
48568fi
48569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48570  ac_ext=cpp
48571ac_cpp='$CXXCPP $CPPFLAGS'
48572ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48573ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48574ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48575
48576  CFLAGS="$saved_cflags"
48577
48578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48579$as_echo "$supports" >&6; }
48580  if test "x$supports" = "xyes" ; then
48581    :
48582    C_COMP_SUPPORTS="yes"
48583  else
48584    :
48585    C_COMP_SUPPORTS="no"
48586  fi
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
48644
48645
48646    # Execute function body
48647
48648  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48649$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48650  supports=yes
48651
48652  saved_cxxflags="$CXXFLAGS"
48653  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
48654  ac_ext=cpp
48655ac_cpp='$CXXCPP $CPPFLAGS'
48656ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48657ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48658ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48659
48660  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48661/* end confdefs.h.  */
48662int i;
48663_ACEOF
48664if ac_fn_cxx_try_compile "$LINENO"; then :
48665
48666else
48667  supports=no
48668fi
48669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48670  ac_ext=cpp
48671ac_cpp='$CXXCPP $CPPFLAGS'
48672ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48673ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48674ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48675
48676  CXXFLAGS="$saved_cxxflags"
48677
48678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48679$as_echo "$supports" >&6; }
48680  if test "x$supports" = "xyes" ; then
48681    :
48682    CXX_COMP_SUPPORTS="yes"
48683  else
48684    :
48685    CXX_COMP_SUPPORTS="no"
48686  fi
48687
48688
48689
48690
48691
48692
48693
48694
48695
48696
48697
48698
48699
48700  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48701$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48702  supports=no
48703  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48704
48705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48706$as_echo "$supports" >&6; }
48707  if test "x$supports" = "xyes" ; then
48708    :
48709
48710  else
48711    :
48712    STACK_PROTECTOR_CFLAG=""
48713  fi
48714
48715
48716
48717
48718
48719
48720
48721      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48722      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48723      if test "x$STACK_PROTECTOR_CFLAG" != x; then
48724        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48725      fi
48726      ;;
48727    esac
48728  fi
48729
48730  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48731    if test "x$DEBUG_LEVEL" != xrelease; then
48732      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
48733        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
48734      fi
48735    fi
48736  fi
48737
48738  # Optimization levels
48739  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48740    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
48741
48742    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
48743      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
48744      C_O_FLAG_HIGHEST_JVM="-xO4"
48745      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
48746      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
48747      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
48748      C_O_FLAG_DEBUG="-xregs=no%frameptr"
48749      C_O_FLAG_DEBUG_JVM=""
48750      C_O_FLAG_NONE="-xregs=no%frameptr"
48751      CXX_O_FLAG_HIGHEST_JVM="-xO4"
48752      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
48753      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
48754      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
48755      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
48756      CXX_O_FLAG_DEBUG_JVM=""
48757      CXX_O_FLAG_NONE="-xregs=no%frameptr"
48758      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
48759        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
48760        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
48761      fi
48762    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48763      C_O_FLAG_HIGHEST_JVM="-xO4"
48764      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
48765      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48766      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48767      C_O_FLAG_DEBUG=""
48768      C_O_FLAG_DEBUG_JVM=""
48769      C_O_FLAG_NONE=""
48770      CXX_O_FLAG_HIGHEST_JVM="-xO4"
48771      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
48772      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48773      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48774      CXX_O_FLAG_DEBUG=""
48775      CXX_O_FLAG_DEBUG_JVM=""
48776      CXX_O_FLAG_NONE=""
48777    fi
48778  else
48779    # The remaining toolchains share opt flags between CC and CXX;
48780    # setup for C and duplicate afterwards.
48781    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48782      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48783        # On MacOSX we optimize for size, something
48784        # we should do for all platforms?
48785        C_O_FLAG_HIGHEST_JVM="-Os"
48786        C_O_FLAG_HIGHEST="-Os"
48787        C_O_FLAG_HI="-Os"
48788        C_O_FLAG_NORM="-Os"
48789        C_O_FLAG_SIZE="-Os"
48790      else
48791        C_O_FLAG_HIGHEST_JVM="-O3"
48792        C_O_FLAG_HIGHEST="-O3"
48793        C_O_FLAG_HI="-O3"
48794        C_O_FLAG_NORM="-O2"
48795        C_O_FLAG_SIZE="-Os"
48796      fi
48797      C_O_FLAG_DEBUG="-O0"
48798      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48799        C_O_FLAG_DEBUG_JVM=""
48800      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
48801        C_O_FLAG_DEBUG_JVM="-O0"
48802      fi
48803      C_O_FLAG_NONE="-O0"
48804    elif test "x$TOOLCHAIN_TYPE" = xclang; then
48805      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48806        # On MacOSX we optimize for size, something
48807        # we should do for all platforms?
48808        C_O_FLAG_HIGHEST_JVM="-Os"
48809        C_O_FLAG_HIGHEST="-Os"
48810        C_O_FLAG_HI="-Os"
48811        C_O_FLAG_NORM="-Os"
48812        C_O_FLAG_SIZE="-Os"
48813      else
48814        C_O_FLAG_HIGHEST_JVM="-O3"
48815        C_O_FLAG_HIGHEST="-O3"
48816        C_O_FLAG_HI="-O3"
48817        C_O_FLAG_NORM="-O2"
48818        C_O_FLAG_SIZE="-Os"
48819      fi
48820      C_O_FLAG_DEBUG="-O0"
48821      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48822        C_O_FLAG_DEBUG_JVM=""
48823      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
48824        C_O_FLAG_DEBUG_JVM="-O0"
48825      fi
48826      C_O_FLAG_NONE="-O0"
48827    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48828      C_O_FLAG_HIGHEST_JVM="-O3"
48829      C_O_FLAG_HIGHEST="-O3"
48830      C_O_FLAG_HI="-O3 -qstrict"
48831      C_O_FLAG_NORM="-O2"
48832      C_O_FLAG_DEBUG="-qnoopt"
48833      # FIXME: Value below not verified.
48834      C_O_FLAG_DEBUG_JVM=""
48835      C_O_FLAG_NONE="-qnoopt"
48836    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48837      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
48838      C_O_FLAG_HIGHEST="-O2"
48839      C_O_FLAG_HI="-O1"
48840      C_O_FLAG_NORM="-O1"
48841      C_O_FLAG_DEBUG="-Od"
48842      C_O_FLAG_DEBUG_JVM=""
48843      C_O_FLAG_NONE="-Od"
48844      C_O_FLAG_SIZE="-Os"
48845    fi
48846    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
48847    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
48848    CXX_O_FLAG_HI="$C_O_FLAG_HI"
48849    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
48850    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
48851    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
48852    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
48853    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
48854  fi
48855
48856  # Adjust optimization flags according to debug level.
48857  case $DEBUG_LEVEL in
48858    release )
48859      # no adjustment
48860      ;;
48861    fastdebug )
48862      # Not quite so much optimization
48863      C_O_FLAG_HI="$C_O_FLAG_NORM"
48864      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
48865      ;;
48866    slowdebug )
48867      # Disable optimization
48868      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
48869      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
48870      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
48871      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
48872      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
48873      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
48874      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
48875      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
48876      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
48877      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
48878      ;;
48879  esac
48880
48881
48882
48883
48884
48885
48886
48887
48888
48889
48890
48891
48892
48893
48894
48895
48896
48897
48898
48899  # Special extras...
48900  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48901    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48902      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48903      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48904    fi
48905    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48906    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48907  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48908    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48909    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48910  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
48911    CXXSTD_CXXFLAG="-std=gnu++98"
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
48952
48953
48954    # Execute function body
48955
48956  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
48957$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
48958  supports=yes
48959
48960  saved_cxxflags="$CXXFLAGS"
48961  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
48962  ac_ext=cpp
48963ac_cpp='$CXXCPP $CPPFLAGS'
48964ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48965ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48966ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48967
48968  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48969/* end confdefs.h.  */
48970int i;
48971_ACEOF
48972if ac_fn_cxx_try_compile "$LINENO"; then :
48973
48974else
48975  supports=no
48976fi
48977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48978  ac_ext=cpp
48979ac_cpp='$CXXCPP $CPPFLAGS'
48980ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48981ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48982ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48983
48984  CXXFLAGS="$saved_cxxflags"
48985
48986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48987$as_echo "$supports" >&6; }
48988  if test "x$supports" = "xyes" ; then
48989    :
48990
48991  else
48992    :
48993    CXXSTD_CXXFLAG=""
48994  fi
48995
48996
48997
48998
48999
49000
49001
49002
49003
49004
49005
49006
49007    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49008
49009  fi
49010  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49011    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49012    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49013    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49014    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49015    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49016  fi
49017
49018  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49019    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49020    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49021    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49022  fi
49023
49024  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49025  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49026  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49027
49028  ###############################################################################
49029  #
49030  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49031  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49032  #
49033
49034  # Setup compiler/platform specific flags into
49035  #    CFLAGS_JDK    - C Compiler flags
49036  #    CXXFLAGS_JDK  - C++ Compiler flags
49037  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49038  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49039    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49040    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49041    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49042    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49043      # Force compatibility with i586 on 32 bit intel platforms.
49044      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49045      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49046    fi
49047    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49048        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49049    case $OPENJDK_TARGET_CPU_ARCH in
49050      arm )
49051        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49052        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49053        ;;
49054      ppc )
49055        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49056        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49057        ;;
49058      * )
49059        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49060        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49061        ;;
49062    esac
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
49103
49104
49105    # Execute function body
49106
49107  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49108  REFERENCE_VERSION=6
49109
49110  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49111    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49112  fi
49113
49114  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49115    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49116  fi
49117
49118  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49119  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49120
49121  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49122    :
49123
49124  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49125  # runs afoul of the more aggressive versions of these optimisations.
49126  # Notably, value range propagation now assumes that the this pointer of C++
49127  # member functions is non-null.
49128  NO_NULL_POINTER_CHECK_CFLAG="-fno-delete-null-pointer-checks"
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
49169
49170
49171    # Execute function body
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
49218
49219
49220    # Execute function body
49221
49222  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49223$as_echo_n "checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49224  supports=yes
49225
49226  saved_cflags="$CFLAGS"
49227  CFLAGS="$CFLAGS $NO_NULL_POINTER_CHECK_CFLAG -Werror"
49228  ac_ext=c
49229ac_cpp='$CPP $CPPFLAGS'
49230ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49231ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49232ac_compiler_gnu=$ac_cv_c_compiler_gnu
49233
49234  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49235/* end confdefs.h.  */
49236int i;
49237_ACEOF
49238if ac_fn_c_try_compile "$LINENO"; then :
49239
49240else
49241  supports=no
49242fi
49243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49244  ac_ext=cpp
49245ac_cpp='$CXXCPP $CPPFLAGS'
49246ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49247ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49248ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49249
49250  CFLAGS="$saved_cflags"
49251
49252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49253$as_echo "$supports" >&6; }
49254  if test "x$supports" = "xyes" ; then
49255    :
49256    C_COMP_SUPPORTS="yes"
49257  else
49258    :
49259    C_COMP_SUPPORTS="no"
49260  fi
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
49318
49319
49320    # Execute function body
49321
49322  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49323$as_echo_n "checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49324  supports=yes
49325
49326  saved_cxxflags="$CXXFLAGS"
49327  CXXFLAGS="$CXXFLAG $NO_NULL_POINTER_CHECK_CFLAG -Werror"
49328  ac_ext=cpp
49329ac_cpp='$CXXCPP $CPPFLAGS'
49330ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49331ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49332ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49333
49334  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49335/* end confdefs.h.  */
49336int i;
49337_ACEOF
49338if ac_fn_cxx_try_compile "$LINENO"; then :
49339
49340else
49341  supports=no
49342fi
49343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49344  ac_ext=cpp
49345ac_cpp='$CXXCPP $CPPFLAGS'
49346ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49347ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49348ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49349
49350  CXXFLAGS="$saved_cxxflags"
49351
49352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49353$as_echo "$supports" >&6; }
49354  if test "x$supports" = "xyes" ; then
49355    :
49356    CXX_COMP_SUPPORTS="yes"
49357  else
49358    :
49359    CXX_COMP_SUPPORTS="no"
49360  fi
49361
49362
49363
49364
49365
49366
49367
49368
49369
49370
49371
49372
49373
49374  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49375$as_echo_n "checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49376  supports=no
49377  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49378
49379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49380$as_echo "$supports" >&6; }
49381  if test "x$supports" = "xyes" ; then
49382    :
49383
49384  else
49385    :
49386    NO_NULL_POINTER_CHECK_CFLAG=""
49387  fi
49388
49389
49390
49391
49392
49393
49394
49395  NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49396
49397
49398
49399
49400
49401
49402
49403
49404
49405
49406
49407
49408
49409
49410
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434
49435
49436
49437
49438    # Execute function body
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
49485
49486
49487    # Execute function body
49488
49489  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49490$as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49491  supports=yes
49492
49493  saved_cflags="$CFLAGS"
49494  CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
49495  ac_ext=c
49496ac_cpp='$CPP $CPPFLAGS'
49497ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49498ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49499ac_compiler_gnu=$ac_cv_c_compiler_gnu
49500
49501  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49502/* end confdefs.h.  */
49503int i;
49504_ACEOF
49505if ac_fn_c_try_compile "$LINENO"; then :
49506
49507else
49508  supports=no
49509fi
49510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49511  ac_ext=cpp
49512ac_cpp='$CXXCPP $CPPFLAGS'
49513ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49514ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49515ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49516
49517  CFLAGS="$saved_cflags"
49518
49519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49520$as_echo "$supports" >&6; }
49521  if test "x$supports" = "xyes" ; then
49522    :
49523    C_COMP_SUPPORTS="yes"
49524  else
49525    :
49526    C_COMP_SUPPORTS="no"
49527  fi
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
49585
49586
49587    # Execute function body
49588
49589  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49590$as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49591  supports=yes
49592
49593  saved_cxxflags="$CXXFLAGS"
49594  CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
49595  ac_ext=cpp
49596ac_cpp='$CXXCPP $CPPFLAGS'
49597ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49598ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49599ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49600
49601  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49602/* end confdefs.h.  */
49603int i;
49604_ACEOF
49605if ac_fn_cxx_try_compile "$LINENO"; then :
49606
49607else
49608  supports=no
49609fi
49610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49611  ac_ext=cpp
49612ac_cpp='$CXXCPP $CPPFLAGS'
49613ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49614ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49615ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49616
49617  CXXFLAGS="$saved_cxxflags"
49618
49619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49620$as_echo "$supports" >&6; }
49621  if test "x$supports" = "xyes" ; then
49622    :
49623    CXX_COMP_SUPPORTS="yes"
49624  else
49625    :
49626    CXX_COMP_SUPPORTS="no"
49627  fi
49628
49629
49630
49631
49632
49633
49634
49635
49636
49637
49638
49639
49640
49641  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49642$as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49643  supports=no
49644  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49645
49646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49647$as_echo "$supports" >&6; }
49648  if test "x$supports" = "xyes" ; then
49649    :
49650
49651  else
49652    :
49653    NO_LIFETIME_DSE_CFLAG=""
49654  fi
49655
49656
49657
49658
49659
49660
49661  CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49662
49663
49664
49665  else
49666    :
49667
49668  fi
49669
49670
49671
49672
49673
49674
49675
49676
49677
49678
49679
49680
49681  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49682    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49683
49684    # Restrict the debug information created by Clang to avoid
49685    # too big object files and speed the build up a little bit
49686    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49687    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49688    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49689      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49690        # Force compatibility with i586 on 32 bit intel platforms.
49691        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49692        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49693      fi
49694      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49695      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49696          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49697      case $OPENJDK_TARGET_CPU_ARCH in
49698        ppc )
49699          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49700          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49701          ;;
49702        * )
49703          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49704          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49705          ;;
49706      esac
49707    fi
49708  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49709    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49710    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49711    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49712      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49713    fi
49714
49715    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49716    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49717  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49718    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49719    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49720    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49721  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49722    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49723        -MD -Zc:wchar_t- -W3 -wd4800 \
49724        -DWIN32_LEAN_AND_MEAN \
49725        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49726        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
49727        -DWIN32 -DIAL"
49728    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49729      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
49730    else
49731      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
49732    fi
49733    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
49734    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
49735    # studio.
49736    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
49737      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
49738      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
49739      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
49740    fi
49741  fi
49742
49743  ###############################################################################
49744
49745  # Adjust flags according to debug level.
49746  case $DEBUG_LEVEL in
49747    fastdebug | slowdebug )
49748      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
49749      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
49750      JAVAC_FLAGS="$JAVAC_FLAGS -g"
49751      ;;
49752    release )
49753      ;;
49754    * )
49755      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
49756      ;;
49757  esac
49758
49759  # Set some common defines. These works for all compilers, but assume
49760  # -D is universally accepted.
49761
49762  # Setup endianness
49763  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49764    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
49765    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
49766    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
49767    #   Note: -Dmacro         is the same as    #define macro 1
49768    #         -Dmacro=        is the same as    #define macro
49769    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49770      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
49771    else
49772      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
49773    fi
49774  else
49775    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
49776    # are defined in the system?
49777    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49778      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
49779    else
49780      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
49781    fi
49782  fi
49783
49784  # Setup target OS define. Use OS target name but in upper case.
49785  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
49786  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
49787
49788  # Setup target CPU
49789  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
49790      $OPENJDK_TARGET_ADD_LP64 \
49791      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
49792
49793  # Setup debug/release defines
49794  if test "x$DEBUG_LEVEL" = xrelease; then
49795    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
49796    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49797      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
49798    fi
49799  else
49800    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
49801  fi
49802
49803  # Set some additional per-OS defines.
49804  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49805    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
49806    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
49807        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
49808  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49809    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
49810    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
49811        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
49812  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49813    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
49814    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
49815    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
49816    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
49817        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
49818        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
49819        -fno-omit-frame-pointer"
49820  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49821    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
49822    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
49823    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
49824        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
49825        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
49826  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
49827    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
49828  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49829    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
49830    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
49831  fi
49832
49833  # Set some additional per-CPU defines.
49834  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
49835    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
49836  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49837    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
49838  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
49839    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49840      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
49841      # fixes `relocation truncated to fit' error for gcc 4.1.
49842      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
49843      # Use ppc64 instructions, but schedule for power5
49844      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
49845    elif test "x$OPENJDK_TARGET_OS" = xaix; then
49846      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
49847    fi
49848  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
49849    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49850      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
49851      # Little endian machine uses ELFv2 ABI.
49852      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
49853      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
49854      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
49855    fi
49856  fi
49857
49858  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49859    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
49860  fi
49861
49862  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49863    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
49864      # Solaris does not have _LP64=1 in the old build.
49865      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
49866      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
49867    fi
49868  fi
49869
49870  # Set JVM_CFLAGS warning handling
49871  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49872    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
49873        -Wunused-value -Woverloaded-virtual"
49874
49875    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49876
49877
49878
49879
49880
49881
49882
49883
49884
49885
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900
49901
49902
49903
49904
49905
49906
49907
49908
49909
49910
49911
49912
49913
49914
49915
49916
49917
49918    # Execute function body
49919
49920  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49921  REFERENCE_VERSION=4.8
49922
49923  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49924    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
49925  fi
49926
49927  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49928    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
49929  fi
49930
49931  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49932  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49933
49934  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49935    :
49936
49937            # These flags either do not work or give spurious warnings prior to gcc 4.8.
49938            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
49939
49940
49941  else
49942    :
49943
49944  fi
49945
49946
49947
49948
49949
49950
49951
49952
49953
49954
49955
49956
49957    fi
49958    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
49959      # Non-zero builds have stricter warnings
49960      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
49961    else
49962      if test "x$TOOLCHAIN_TYPE" = xclang; then
49963        # Some versions of llvm do not like -Wundef
49964        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
49965      fi
49966    fi
49967  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49968    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
49969        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
49970  fi
49971
49972  # Additional macosx handling
49973  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49974    # Setting these parameters makes it an error to link to macosx APIs that are
49975    # newer than the given OS version and makes the linked binaries compatible
49976    # even if built on a newer version of the OS.
49977    # The expected format is X.Y.Z
49978    MACOSX_VERSION_MIN=10.7.0
49979
49980
49981    # The macro takes the version with no dots, ex: 1070
49982    # Let the flags variables get resolved in make for easier override on make
49983    # command line.
49984    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
49985    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
49986  fi
49987
49988  # Setup some hard coded includes
49989  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
49990      -I${JDK_TOPDIR}/src/java.base/share/native/include \
49991      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
49992      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
49993      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
49994      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
49995
49996  # The shared libraries are compiled using the picflag.
49997  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
49998      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
49999  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50000      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50001
50002  # Executable flags
50003  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50004  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50005
50006
50007
50008
50009
50010
50011  # Setup LDFLAGS et al.
50012  #
50013
50014  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50015    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50016    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50017    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50018    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50019      LDFLAGS_SAFESH="-safeseh"
50020      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50021      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50022      # NOTE: Old build added -machine. Probably not needed.
50023      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50024    else
50025      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50026    fi
50027  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50028      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50029      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50030        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50031        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50032    fi
50033  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50034    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50035    # We have previously set HAS_GNU_HASH if this is the case
50036    if test -n "$HAS_GNU_HASH"; then
50037      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50038      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50039      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50040    fi
50041      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50042        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50043    fi
50044    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50045      # And since we now know that the linker is gnu, then add -z defs, to forbid
50046      # undefined symbols in object files.
50047      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50048      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50049      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50050      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50051      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50052      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50053        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50054      fi
50055      case $DEBUG_LEVEL in
50056        release )
50057          # tell linker to optimize libraries.
50058          # Should this be supplied to the OSS linker as well?
50059          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50060          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50061          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50062          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50063            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50064          fi
50065          ;;
50066        slowdebug )
50067          # Hotspot always let the linker optimize
50068          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50069          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50070            # do relocations at load
50071            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50072            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50073            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50074          fi
50075          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50076            # mark relocations read only
50077            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50078            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50079            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50080          fi
50081          ;;
50082        fastdebug )
50083          # Hotspot always let the linker optimize
50084          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50085          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50086            # mark relocations read only
50087            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50088            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50089            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50090          fi
50091          ;;
50092        * )
50093          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50094          ;;
50095        esac
50096    fi
50097  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50098    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50099    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50100    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50101    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50102    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50103    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50104      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50105    fi
50106  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50107    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50108    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50109    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50110  fi
50111
50112  # Customize LDFLAGS for executables
50113
50114  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50115
50116  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50117    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50118      LDFLAGS_STACK_SIZE=1048576
50119    else
50120      LDFLAGS_STACK_SIZE=327680
50121    fi
50122    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50123  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50124    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50125  fi
50126
50127  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50128
50129  # Customize LDFLAGS for libs
50130  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50131
50132  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50133  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50134    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50135        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50136    JDKLIB_LIBS=""
50137  else
50138    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50139        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50140
50141    if test "xTARGET" = "xTARGET"; then
50142    # On some platforms (mac) the linker warns about non existing -L dirs.
50143    # Add server first if available. Linking aginst client does not always produce the same results.
50144      # Only add client/minimal dir if client/minimal is being built.
50145    # Default to server for other variants.
50146      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50147        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50148      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50149        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50150      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50151        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50152    else
50153        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50154    fi
50155    elif test "xTARGET" = "xBUILD"; then
50156      # When building a buildjdk, it's always only the server variant
50157      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50158          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50159    fi
50160
50161    JDKLIB_LIBS="-ljava -ljvm"
50162    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50163      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50164    fi
50165
50166  fi
50167
50168  # Set JVM_LIBS (per os)
50169  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50170    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50171  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50172    # FIXME: This hard-coded path is not really proper.
50173    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50174      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50175    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50176      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50177    fi
50178    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50179        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50180  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50181    JVM_LIBS="$JVM_LIBS -lm"
50182  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50183    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50184  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50185    JVM_LIBS="$JVM_LIBS -lm"
50186  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50187    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50188        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50189        wsock32.lib winmm.lib version.lib psapi.lib"
50190    fi
50191
50192  # Set JVM_ASFLAGS
50193  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50194    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50195      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50196    fi
50197  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50198    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50199  fi
50200
50201  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50202
50203
50204
50205
50206
50207
50208
50209
50210
50211
50212
50213
50214
50215
50216
50217  # Special extras...
50218  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50219    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50220      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50221      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50222    fi
50223    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50224    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50225  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50226    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50227    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50228  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50229    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
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
50270
50271
50272    # Execute function body
50273
50274  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50275$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50276  supports=yes
50277
50278  saved_cxxflags="$CXXFLAGS"
50279  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50280  ac_ext=cpp
50281ac_cpp='$CXXCPP $CPPFLAGS'
50282ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50283ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50284ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50285
50286  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50287/* end confdefs.h.  */
50288int i;
50289_ACEOF
50290if ac_fn_cxx_try_compile "$LINENO"; then :
50291
50292else
50293  supports=no
50294fi
50295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50296  ac_ext=cpp
50297ac_cpp='$CXXCPP $CPPFLAGS'
50298ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50299ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50300ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50301
50302  CXXFLAGS="$saved_cxxflags"
50303
50304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50305$as_echo "$supports" >&6; }
50306  if test "x$supports" = "xyes" ; then
50307    :
50308
50309  else
50310    :
50311    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50312  fi
50313
50314
50315
50316
50317
50318
50319
50320
50321
50322
50323
50324
50325    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50326
50327  fi
50328  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50329    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50330    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50331    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
50332    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50333    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50334  fi
50335
50336  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50337    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50338    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50339    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
50340  fi
50341
50342  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50343  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50344  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50345
50346  ###############################################################################
50347  #
50348  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50349  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50350  #
50351
50352  # Setup compiler/platform specific flags into
50353  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50354  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50355  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50356  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50357    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50358    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50359    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50360    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50361      # Force compatibility with i586 on 32 bit intel platforms.
50362      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50363      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50364    fi
50365    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50366        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50367    case $OPENJDK_BUILD_CPU_ARCH in
50368      arm )
50369        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50370        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50371        ;;
50372      ppc )
50373        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50374        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50375        ;;
50376      * )
50377        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50378        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50379        ;;
50380    esac
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
50421
50422
50423    # Execute function body
50424
50425  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50426  REFERENCE_VERSION=6
50427
50428  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50429    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50430  fi
50431
50432  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50433    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50434  fi
50435
50436  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50437  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50438
50439  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50440    :
50441
50442  else
50443    :
50444
50445  fi
50446
50447
50448
50449
50450
50451
50452
50453
50454
50455
50456
50457
50458  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50459    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50460
50461    # Restrict the debug information created by Clang to avoid
50462    # too big object files and speed the build up a little bit
50463    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50464    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50465    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50466      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50467        # Force compatibility with i586 on 32 bit intel platforms.
50468        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50469        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50470      fi
50471      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50472      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50473          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50474      case $OPENJDK_BUILD_CPU_ARCH in
50475        ppc )
50476          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50477          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50478          ;;
50479        * )
50480          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50481          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50482          ;;
50483      esac
50484    fi
50485  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50486    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50487    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50488    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50489      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50490    fi
50491
50492    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50493    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50494  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50495    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50496    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50497    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50498  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50499    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50500        -MD -Zc:wchar_t- -W3 -wd4800 \
50501        -DWIN32_LEAN_AND_MEAN \
50502        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50503        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50504        -DWIN32 -DIAL"
50505    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50506      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50507    else
50508      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50509    fi
50510    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50511    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50512    # studio.
50513    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50514      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50515      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50516      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50517    fi
50518  fi
50519
50520  ###############################################################################
50521
50522  # Adjust flags according to debug level.
50523  case $DEBUG_LEVEL in
50524    fastdebug | slowdebug )
50525      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50526      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50527      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50528      ;;
50529    release )
50530      ;;
50531    * )
50532      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50533      ;;
50534  esac
50535
50536  # Set some common defines. These works for all compilers, but assume
50537  # -D is universally accepted.
50538
50539  # Setup endianness
50540  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50541    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50542    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50543    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50544    #   Note: -Dmacro         is the same as    #define macro 1
50545    #         -Dmacro=        is the same as    #define macro
50546    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50547      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50548    else
50549      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50550    fi
50551  else
50552    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50553    # are defined in the system?
50554    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50555      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50556    else
50557      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50558    fi
50559  fi
50560
50561  # Setup target OS define. Use OS target name but in upper case.
50562  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50563  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50564
50565  # Setup target CPU
50566  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50567      $OPENJDK_BUILD_ADD_LP64 \
50568      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50569
50570  # Setup debug/release defines
50571  if test "x$DEBUG_LEVEL" = xrelease; then
50572    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50573    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50574      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50575    fi
50576  else
50577    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50578  fi
50579
50580  # Set some additional per-OS defines.
50581  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50582    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50583    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50584        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50585  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50586    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50587    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50588        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50589  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50590    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50591    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50592    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50593    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50594        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50595        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50596        -fno-omit-frame-pointer"
50597  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50598    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50599    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50600    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
50601        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50602        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50603  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50604    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50605  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50606    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50607    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50608  fi
50609
50610  # Set some additional per-CPU defines.
50611  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50612    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50613  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50614    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50615  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50616    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50617      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50618      # fixes `relocation truncated to fit' error for gcc 4.1.
50619      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50620      # Use ppc64 instructions, but schedule for power5
50621      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50622    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50623      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50624    fi
50625  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50626    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50627      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50628      # Little endian machine uses ELFv2 ABI.
50629      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50630      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50631      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
50632    fi
50633  fi
50634
50635  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50636    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50637  fi
50638
50639  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50640    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50641      # Solaris does not have _LP64=1 in the old build.
50642      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50643      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50644    fi
50645  fi
50646
50647  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50648  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50649    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50650        -Wunused-value -Woverloaded-virtual"
50651
50652    if test "x$TOOLCHAIN_TYPE" = xgcc; then
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
50693
50694
50695    # Execute function body
50696
50697  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50698  REFERENCE_VERSION=4.8
50699
50700  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50701    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50702  fi
50703
50704  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50705    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50706  fi
50707
50708  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50709  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50710
50711  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50712    :
50713
50714            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50715            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50716
50717
50718  else
50719    :
50720
50721  fi
50722
50723
50724
50725
50726
50727
50728
50729
50730
50731
50732
50733
50734    fi
50735    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50736      # Non-zero builds have stricter warnings
50737      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50738    else
50739      if test "x$TOOLCHAIN_TYPE" = xclang; then
50740        # Some versions of llvm do not like -Wundef
50741        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
50742      fi
50743    fi
50744  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50745    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50746        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50747  fi
50748
50749  # Additional macosx handling
50750  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50751    # Setting these parameters makes it an error to link to macosx APIs that are
50752    # newer than the given OS version and makes the linked binaries compatible
50753    # even if built on a newer version of the OS.
50754    # The expected format is X.Y.Z
50755    MACOSX_VERSION_MIN=10.7.0
50756
50757
50758    # The macro takes the version with no dots, ex: 1070
50759    # Let the flags variables get resolved in make for easier override on make
50760    # command line.
50761    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)"
50762    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50763  fi
50764
50765  # Setup some hard coded includes
50766  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50767      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50768      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
50769      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
50770      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50771      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
50772
50773  # The shared libraries are compiled using the picflag.
50774  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50775      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
50776  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50777      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
50778
50779  # Executable flags
50780  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
50781  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
50782
50783
50784
50785
50786
50787
50788  # Setup LDFLAGS et al.
50789  #
50790
50791  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50792    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50793    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50794    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50795    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
50796      LDFLAGS_SAFESH="-safeseh"
50797      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
50798      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
50799      # NOTE: Old build added -machine. Probably not needed.
50800      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
50801    else
50802      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
50803    fi
50804  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50805      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50806      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50807        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50808        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50809    fi
50810  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50811    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50812    # We have previously set HAS_GNU_HASH if this is the case
50813    if test -n "$HAS_GNU_HASH"; then
50814      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50815      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
50816      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
50817    fi
50818      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50819        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50820    fi
50821    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50822      # And since we now know that the linker is gnu, then add -z defs, to forbid
50823      # undefined symbols in object files.
50824      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50825      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50826      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50827      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50828      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50829      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50830        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
50831      fi
50832      case $DEBUG_LEVEL in
50833        release )
50834          # tell linker to optimize libraries.
50835          # Should this be supplied to the OSS linker as well?
50836          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50837          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50838          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50839          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50840            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50841          fi
50842          ;;
50843        slowdebug )
50844          # Hotspot always let the linker optimize
50845          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
50846          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50847            # do relocations at load
50848            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
50849            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50850            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
50851          fi
50852          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50853            # mark relocations read only
50854            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
50855            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50856            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50857          fi
50858          ;;
50859        fastdebug )
50860          # Hotspot always let the linker optimize
50861          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
50862          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50863            # mark relocations read only
50864            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
50865            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50866            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50867          fi
50868          ;;
50869        * )
50870          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50871          ;;
50872        esac
50873    fi
50874  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50875    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50876    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50877    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50878    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50879    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50880    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50881      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
50882    fi
50883  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50884    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50885    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
50886    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
50887  fi
50888
50889  # Customize LDFLAGS for executables
50890
50891  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
50892
50893  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50894    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
50895      LDFLAGS_STACK_SIZE=1048576
50896    else
50897      LDFLAGS_STACK_SIZE=327680
50898    fi
50899    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50900  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
50901    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50902  fi
50903
50904  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
50905
50906  # Customize LDFLAGS for libs
50907  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
50908
50909  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50910  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50911    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50912        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50913    OPENJDK_BUILD_JDKLIB_LIBS=""
50914  else
50915    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50916        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
50917
50918    if test "xBUILD" = "xTARGET"; then
50919    # On some platforms (mac) the linker warns about non existing -L dirs.
50920    # Add server first if available. Linking aginst client does not always produce the same results.
50921      # Only add client/minimal dir if client/minimal is being built.
50922    # Default to server for other variants.
50923      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50924        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50925      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50926        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
50927      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50928        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
50929    else
50930        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50931    fi
50932    elif test "xBUILD" = "xBUILD"; then
50933      # When building a buildjdk, it's always only the server variant
50934      OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50935          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50936    fi
50937
50938    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
50939    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50940      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
50941    fi
50942
50943  fi
50944
50945  # Set OPENJDK_BUILD_JVM_LIBS (per os)
50946  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50947    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
50948  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50949    # FIXME: This hard-coded path is not really proper.
50950    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50951      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50952    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50953      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50954    fi
50955    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50956        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50957  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50958    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
50959  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50960    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50961  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50962    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
50963  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50964    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50965        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50966        wsock32.lib winmm.lib version.lib psapi.lib"
50967    fi
50968
50969  # Set OPENJDK_BUILD_JVM_ASFLAGS
50970  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50971    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50972      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
50973    fi
50974  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50975    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50976  fi
50977
50978  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
50979
50980
50981
50982
50983
50984
50985
50986
50987
50988
50989
50990
50991
50992
50993
50994  # Tests are only ever compiled for TARGET
50995  # Flags for compiling test libraries
50996  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50997  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50998
50999  # Flags for compiling test executables
51000  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51001  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51002
51003
51004
51005
51006
51007
51008  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51009  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
51010
51011
51012
51013
51014
51015
51016  # Some Zero and Shark settings.
51017  # ZERO_ARCHFLAG tells the compiler which mode to build for
51018  case "${OPENJDK_TARGET_CPU}" in
51019    s390)
51020      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51021      ;;
51022    *)
51023      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51024  esac
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
51065
51066
51067    # Execute function body
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
51114
51115
51116    # Execute function body
51117
51118  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51119$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51120  supports=yes
51121
51122  saved_cflags="$CFLAGS"
51123  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51124  ac_ext=c
51125ac_cpp='$CPP $CPPFLAGS'
51126ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51127ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51128ac_compiler_gnu=$ac_cv_c_compiler_gnu
51129
51130  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51131/* end confdefs.h.  */
51132int i;
51133_ACEOF
51134if ac_fn_c_try_compile "$LINENO"; then :
51135
51136else
51137  supports=no
51138fi
51139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51140  ac_ext=cpp
51141ac_cpp='$CXXCPP $CPPFLAGS'
51142ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51143ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51144ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51145
51146  CFLAGS="$saved_cflags"
51147
51148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51149$as_echo "$supports" >&6; }
51150  if test "x$supports" = "xyes" ; then
51151    :
51152    C_COMP_SUPPORTS="yes"
51153  else
51154    :
51155    C_COMP_SUPPORTS="no"
51156  fi
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
51214
51215
51216    # Execute function body
51217
51218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51219$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51220  supports=yes
51221
51222  saved_cxxflags="$CXXFLAGS"
51223  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51224  ac_ext=cpp
51225ac_cpp='$CXXCPP $CPPFLAGS'
51226ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51227ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51228ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51229
51230  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51231/* end confdefs.h.  */
51232int i;
51233_ACEOF
51234if ac_fn_cxx_try_compile "$LINENO"; then :
51235
51236else
51237  supports=no
51238fi
51239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51240  ac_ext=cpp
51241ac_cpp='$CXXCPP $CPPFLAGS'
51242ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51243ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51244ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51245
51246  CXXFLAGS="$saved_cxxflags"
51247
51248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51249$as_echo "$supports" >&6; }
51250  if test "x$supports" = "xyes" ; then
51251    :
51252    CXX_COMP_SUPPORTS="yes"
51253  else
51254    :
51255    CXX_COMP_SUPPORTS="no"
51256  fi
51257
51258
51259
51260
51261
51262
51263
51264
51265
51266
51267
51268
51269
51270  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51271$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51272  supports=no
51273  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51274
51275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51276$as_echo "$supports" >&6; }
51277  if test "x$supports" = "xyes" ; then
51278    :
51279
51280  else
51281    :
51282    ZERO_ARCHFLAG=""
51283  fi
51284
51285
51286
51287
51288
51289
51290
51291
51292  # Check that the compiler supports -mX (or -qX on AIX) flags
51293  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
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
51339
51340
51341    # Execute function body
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
51388
51389
51390    # Execute function body
51391
51392  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51393$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51394  supports=yes
51395
51396  saved_cflags="$CFLAGS"
51397  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51398  ac_ext=c
51399ac_cpp='$CPP $CPPFLAGS'
51400ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51401ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51402ac_compiler_gnu=$ac_cv_c_compiler_gnu
51403
51404  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51405/* end confdefs.h.  */
51406int i;
51407_ACEOF
51408if ac_fn_c_try_compile "$LINENO"; then :
51409
51410else
51411  supports=no
51412fi
51413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51414  ac_ext=cpp
51415ac_cpp='$CXXCPP $CPPFLAGS'
51416ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51417ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51418ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51419
51420  CFLAGS="$saved_cflags"
51421
51422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51423$as_echo "$supports" >&6; }
51424  if test "x$supports" = "xyes" ; then
51425    :
51426    C_COMP_SUPPORTS="yes"
51427  else
51428    :
51429    C_COMP_SUPPORTS="no"
51430  fi
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
51488
51489
51490    # Execute function body
51491
51492  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51493$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51494  supports=yes
51495
51496  saved_cxxflags="$CXXFLAGS"
51497  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51498  ac_ext=cpp
51499ac_cpp='$CXXCPP $CPPFLAGS'
51500ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51501ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51502ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51503
51504  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51505/* end confdefs.h.  */
51506int i;
51507_ACEOF
51508if ac_fn_cxx_try_compile "$LINENO"; then :
51509
51510else
51511  supports=no
51512fi
51513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51514  ac_ext=cpp
51515ac_cpp='$CXXCPP $CPPFLAGS'
51516ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51517ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51518ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51519
51520  CXXFLAGS="$saved_cxxflags"
51521
51522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51523$as_echo "$supports" >&6; }
51524  if test "x$supports" = "xyes" ; then
51525    :
51526    CXX_COMP_SUPPORTS="yes"
51527  else
51528    :
51529    CXX_COMP_SUPPORTS="no"
51530  fi
51531
51532
51533
51534
51535
51536
51537
51538
51539
51540
51541
51542
51543
51544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51545$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51546  supports=no
51547  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51548
51549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51550$as_echo "$supports" >&6; }
51551  if test "x$supports" = "xyes" ; then
51552    :
51553    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51554  else
51555    :
51556    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51557  fi
51558
51559
51560
51561
51562
51563
51564
51565
51566  # Check whether --enable-warnings-as-errors was given.
51567if test "${enable_warnings_as_errors+set}" = set; then :
51568  enableval=$enable_warnings_as_errors;
51569fi
51570
51571
51572  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51573$as_echo_n "checking if native warnings are errors... " >&6; }
51574  if test "x$enable_warnings_as_errors" = "xyes"; then
51575    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51576$as_echo "yes (explicitely set)" >&6; }
51577    WARNINGS_AS_ERRORS=true
51578  elif test "x$enable_warnings_as_errors" = "xno"; then
51579    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51580$as_echo "no" >&6; }
51581    WARNINGS_AS_ERRORS=false
51582  elif test "x$enable_warnings_as_errors" = "x"; then
51583    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51584$as_echo "yes (default)" >&6; }
51585    WARNINGS_AS_ERRORS=true
51586  else
51587    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51588  fi
51589
51590  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51591    # Set legacy hotspot variable
51592    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51593  else
51594    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51595  fi
51596
51597
51598
51599
51600  case "${TOOLCHAIN_TYPE}" in
51601    microsoft)
51602      DISABLE_WARNING_PREFIX="-wd"
51603      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51604      ;;
51605    solstudio)
51606      DISABLE_WARNING_PREFIX="-erroff="
51607      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51608      ;;
51609    gcc)
51610      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
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
51656
51657
51658    # Execute function body
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
51705
51706
51707    # Execute function body
51708
51709  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51710$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51711  supports=yes
51712
51713  saved_cflags="$CFLAGS"
51714  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
51715  ac_ext=c
51716ac_cpp='$CPP $CPPFLAGS'
51717ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51718ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51719ac_compiler_gnu=$ac_cv_c_compiler_gnu
51720
51721  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51722/* end confdefs.h.  */
51723int i;
51724_ACEOF
51725if ac_fn_c_try_compile "$LINENO"; then :
51726
51727else
51728  supports=no
51729fi
51730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51731  ac_ext=cpp
51732ac_cpp='$CXXCPP $CPPFLAGS'
51733ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51734ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51735ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51736
51737  CFLAGS="$saved_cflags"
51738
51739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51740$as_echo "$supports" >&6; }
51741  if test "x$supports" = "xyes" ; then
51742    :
51743    C_COMP_SUPPORTS="yes"
51744  else
51745    :
51746    C_COMP_SUPPORTS="no"
51747  fi
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
51805
51806
51807    # Execute function body
51808
51809  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51810$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51811  supports=yes
51812
51813  saved_cxxflags="$CXXFLAGS"
51814  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
51815  ac_ext=cpp
51816ac_cpp='$CXXCPP $CPPFLAGS'
51817ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51818ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51819ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51820
51821  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51822/* end confdefs.h.  */
51823int i;
51824_ACEOF
51825if ac_fn_cxx_try_compile "$LINENO"; then :
51826
51827else
51828  supports=no
51829fi
51830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51831  ac_ext=cpp
51832ac_cpp='$CXXCPP $CPPFLAGS'
51833ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51834ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51835ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51836
51837  CXXFLAGS="$saved_cxxflags"
51838
51839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51840$as_echo "$supports" >&6; }
51841  if test "x$supports" = "xyes" ; then
51842    :
51843    CXX_COMP_SUPPORTS="yes"
51844  else
51845    :
51846    CXX_COMP_SUPPORTS="no"
51847  fi
51848
51849
51850
51851
51852
51853
51854
51855
51856
51857
51858
51859
51860
51861  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51862$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51863  supports=no
51864  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51865
51866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51867$as_echo "$supports" >&6; }
51868  if test "x$supports" = "xyes" ; then
51869    :
51870    GCC_CAN_DISABLE_WARNINGS=true
51871  else
51872    :
51873    GCC_CAN_DISABLE_WARNINGS=false
51874
51875  fi
51876
51877
51878
51879
51880
51881
51882      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
51883        DISABLE_WARNING_PREFIX="-Wno-"
51884      else
51885        DISABLE_WARNING_PREFIX=
51886      fi
51887      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
51888      # Repeate the check for the BUILD_CC
51889      CC_OLD="$CC"
51890      CC="$BUILD_CC"
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
51936
51937
51938    # Execute function body
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
51985
51986
51987    # Execute function body
51988
51989  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51990$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51991  supports=yes
51992
51993  saved_cflags="$CFLAGS"
51994  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
51995  ac_ext=c
51996ac_cpp='$CPP $CPPFLAGS'
51997ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51998ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51999ac_compiler_gnu=$ac_cv_c_compiler_gnu
52000
52001  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52002/* end confdefs.h.  */
52003int i;
52004_ACEOF
52005if ac_fn_c_try_compile "$LINENO"; then :
52006
52007else
52008  supports=no
52009fi
52010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52011  ac_ext=cpp
52012ac_cpp='$CXXCPP $CPPFLAGS'
52013ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52014ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52015ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52016
52017  CFLAGS="$saved_cflags"
52018
52019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52020$as_echo "$supports" >&6; }
52021  if test "x$supports" = "xyes" ; then
52022    :
52023    C_COMP_SUPPORTS="yes"
52024  else
52025    :
52026    C_COMP_SUPPORTS="no"
52027  fi
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
52085
52086
52087    # Execute function body
52088
52089  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52090$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52091  supports=yes
52092
52093  saved_cxxflags="$CXXFLAGS"
52094  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52095  ac_ext=cpp
52096ac_cpp='$CXXCPP $CPPFLAGS'
52097ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52098ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52099ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52100
52101  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52102/* end confdefs.h.  */
52103int i;
52104_ACEOF
52105if ac_fn_cxx_try_compile "$LINENO"; then :
52106
52107else
52108  supports=no
52109fi
52110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52111  ac_ext=cpp
52112ac_cpp='$CXXCPP $CPPFLAGS'
52113ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52114ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52115ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52116
52117  CXXFLAGS="$saved_cxxflags"
52118
52119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52120$as_echo "$supports" >&6; }
52121  if test "x$supports" = "xyes" ; then
52122    :
52123    CXX_COMP_SUPPORTS="yes"
52124  else
52125    :
52126    CXX_COMP_SUPPORTS="no"
52127  fi
52128
52129
52130
52131
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52142$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52143  supports=no
52144  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52145
52146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52147$as_echo "$supports" >&6; }
52148  if test "x$supports" = "xyes" ; then
52149    :
52150    BUILD_CC_CAN_DISABLE_WARNINGS=true
52151  else
52152    :
52153    BUILD_CC_CAN_DISABLE_WARNINGS=false
52154
52155  fi
52156
52157
52158
52159
52160
52161
52162      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52163        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52164      else
52165        BUILD_CC_DISABLE_WARNING_PREFIX=
52166      fi
52167      CC="$CC_OLD"
52168      ;;
52169    clang)
52170      DISABLE_WARNING_PREFIX="-Wno-"
52171      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52172      ;;
52173    xlc)
52174      DISABLE_WARNING_PREFIX="-qsuppress="
52175      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52176      ;;
52177  esac
52178
52179
52180
52181
52182
52183# Setup debug symbols (need objcopy from the toolchain for that)
52184
52185  #
52186  # NATIVE_DEBUG_SYMBOLS
52187  # This must be done after the toolchain is setup, since we're looking at objcopy.
52188  #
52189  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52190$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52191
52192# Check whether --with-native-debug-symbols was given.
52193if test "${with_native_debug_symbols+set}" = set; then :
52194  withval=$with_native_debug_symbols;
52195        if test "x$OPENJDK_TARGET_OS" = xaix; then
52196          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52197            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52198          fi
52199        fi
52200
52201else
52202
52203        if test "x$OPENJDK_TARGET_OS" = xaix; then
52204          # AIX doesn't support 'zipped' so use 'internal' as default
52205          with_native_debug_symbols="internal"
52206        else
52207          if test "x$STATIC_BUILD" = xtrue; then
52208            with_native_debug_symbols="none"
52209          else
52210            with_native_debug_symbols="zipped"
52211          fi
52212        fi
52213
52214fi
52215
52216  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52218$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52219
52220  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52221
52222    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52223      if test "x$OBJCOPY" = x; then
52224        # enabling of enable-debug-symbols and can't find objcopy
52225        # this is an error
52226        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52227      fi
52228    fi
52229
52230    COMPILE_WITH_DEBUG_SYMBOLS=true
52231    COPY_DEBUG_SYMBOLS=true
52232    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52233
52234    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52235    DEBUG_BINARIES=false
52236    STRIP_POLICY=min_strip
52237
52238  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52239    COMPILE_WITH_DEBUG_SYMBOLS=false
52240    COPY_DEBUG_SYMBOLS=false
52241    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52242
52243    DEBUG_BINARIES=false
52244    STRIP_POLICY=no_strip
52245  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52246    COMPILE_WITH_DEBUG_SYMBOLS=true
52247    COPY_DEBUG_SYMBOLS=false
52248    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52249
52250    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52251    DEBUG_BINARIES=true
52252    STRIP_POLICY=no_strip
52253    STRIP=""
52254
52255  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52256
52257    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52258      if test "x$OBJCOPY" = x; then
52259        # enabling of enable-debug-symbols and can't find objcopy
52260        # this is an error
52261        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52262      fi
52263    fi
52264
52265    COMPILE_WITH_DEBUG_SYMBOLS=true
52266    COPY_DEBUG_SYMBOLS=true
52267    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52268
52269    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52270    DEBUG_BINARIES=false
52271    STRIP_POLICY=min_strip
52272  else
52273    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52274  fi
52275
52276  # --enable-debug-symbols is deprecated.
52277  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52278
52279  # Check whether --enable-debug-symbols was given.
52280if test "${enable_debug_symbols+set}" = set; then :
52281  enableval=$enable_debug_symbols;
52282fi
52283
52284  if test "x$enable_debug_symbols" != x; then
52285    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52286$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52287
52288    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52289      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52290$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52291    fi
52292
52293  fi
52294
52295
52296  # --enable-zip-debug-info is deprecated.
52297  # Please use --with-native-debug-symbols=zipped .
52298
52299  # Check whether --enable-zip-debug-info was given.
52300if test "${enable_zip_debug_info+set}" = set; then :
52301  enableval=$enable_zip_debug_info;
52302fi
52303
52304  if test "x$enable_zip_debug_info" != x; then
52305    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52306$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52307
52308    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52309      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52310$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52311    fi
52312
52313  fi
52314
52315
52316
52317
52318
52319
52320  # Legacy values
52321
52322
52323
52324
52325  # Check whether --enable-native-coverage was given.
52326if test "${enable_native_coverage+set}" = set; then :
52327  enableval=$enable_native_coverage;
52328fi
52329
52330  GCOV_ENABLED="false"
52331  if test "x$enable_native_coverage" = "xyes"; then
52332    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52333      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52334$as_echo_n "checking if native coverage is enabled... " >&6; }
52335      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52336$as_echo "yes" >&6; }
52337      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52338      GCOV_LDFLAGS="-fprofile-arcs"
52339      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52340      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52341      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52342      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52343      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52344      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52345      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52346      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52347      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52348      GCOV_ENABLED="true"
52349    else
52350      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52351    fi
52352  elif test "x$enable_native_coverage" = "xno"; then
52353    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52354$as_echo_n "checking if native coverage is enabled... " >&6; }
52355    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52356$as_echo "no" >&6; }
52357  elif test "x$enable_native_coverage" != "x"; then
52358    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52359  fi
52360
52361
52362
52363
52364# Need toolchain to setup dtrace
52365
52366  # Test for dtrace dependencies
52367  # Check whether --enable-dtrace was given.
52368if test "${enable_dtrace+set}" = set; then :
52369  enableval=$enable_dtrace;
52370fi
52371
52372
52373  DTRACE_DEP_MISSING=false
52374
52375  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52376$as_echo_n "checking for dtrace tool... " >&6; }
52377  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52378    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52379$as_echo "$DTRACE" >&6; }
52380  else
52381    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52382$as_echo "not found, cannot build dtrace" >&6; }
52383    DTRACE_DEP_MISSING=true
52384  fi
52385
52386  for ac_header in sys/sdt.h
52387do :
52388  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52389if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52390  cat >>confdefs.h <<_ACEOF
52391#define HAVE_SYS_SDT_H 1
52392_ACEOF
52393 DTRACE_HEADERS_OK=yes
52394else
52395  DTRACE_HEADERS_OK=no
52396fi
52397
52398done
52399
52400  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52401    DTRACE_DEP_MISSING=true
52402  fi
52403
52404  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52405$as_echo_n "checking if dtrace should be built... " >&6; }
52406  if test "x$enable_dtrace" = "xyes"; then
52407    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52408      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52409$as_echo "no, missing dependencies" >&6; }
52410
52411  # Print a helpful message on how to acquire the necessary build dependency.
52412  # dtrace is the help tag: freetype, cups, alsa etc
52413  MISSING_DEPENDENCY=dtrace
52414
52415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52416    cygwin_help $MISSING_DEPENDENCY
52417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52418    msys_help $MISSING_DEPENDENCY
52419  else
52420    PKGHANDLER_COMMAND=
52421
52422    case $PKGHANDLER in
52423      apt-get)
52424        apt_help     $MISSING_DEPENDENCY ;;
52425      yum)
52426        yum_help     $MISSING_DEPENDENCY ;;
52427      port)
52428        port_help    $MISSING_DEPENDENCY ;;
52429      pkgutil)
52430        pkgutil_help $MISSING_DEPENDENCY ;;
52431      pkgadd)
52432        pkgadd_help  $MISSING_DEPENDENCY ;;
52433    esac
52434
52435    if test "x$PKGHANDLER_COMMAND" != x; then
52436      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52437    fi
52438  fi
52439
52440      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52441    else
52442      INCLUDE_DTRACE=true
52443      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52444$as_echo "yes, forced" >&6; }
52445    fi
52446  elif test "x$enable_dtrace" = "xno"; then
52447    INCLUDE_DTRACE=false
52448    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52449$as_echo "no, forced" >&6; }
52450  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52451    if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK" != "xtrue"; then
52452      INCLUDE_DTRACE=false
52453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, non-open linux build" >&5
52454$as_echo "no, non-open linux build" >&6; }
52455    elif test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52456      INCLUDE_DTRACE=false
52457      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52458$as_echo "no, missing dependencies" >&6; }
52459    else
52460      INCLUDE_DTRACE=true
52461      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52462$as_echo "yes, dependencies present" >&6; }
52463    fi
52464  else
52465    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52466  fi
52467
52468
52469
52470  # The user can in some cases supply additional jvm features. For the custom
52471  # variant, this defines the entire variant.
52472
52473# Check whether --with-jvm-features was given.
52474if test "${with_jvm_features+set}" = set; then :
52475  withval=$with_jvm_features;
52476fi
52477
52478  if test "x$with_jvm_features" != x; then
52479    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52480$as_echo_n "checking additional JVM features... " >&6; }
52481    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52482    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52483$as_echo "$JVM_FEATURES" >&6; }
52484  fi
52485
52486  # Verify that dependencies are met for explicitly set features.
52487  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52488    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52489  fi
52490
52491  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52492    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52493  fi
52494
52495  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && !   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ; then
52496    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2'" "$LINENO" 5
52497  fi
52498
52499  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52500    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52501  fi
52502
52503  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52504    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52505  fi
52506
52507  # Turn on additional features based on other parts of configure
52508  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52509    JVM_FEATURES="$JVM_FEATURES dtrace"
52510  else
52511    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52512      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52513    fi
52514  fi
52515
52516  if test "x$STATIC_BUILD" = "xtrue"; then
52517    JVM_FEATURES="$JVM_FEATURES static-build"
52518  else
52519    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52520      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52521    fi
52522  fi
52523
52524  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52525    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52526      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52527    fi
52528  fi
52529
52530  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52531    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52532      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52533    fi
52534  fi
52535
52536  # Only enable jvmci on x86_64, sparcv9 and aarch64, and only on server.
52537  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52538      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52539      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52540    JVM_FEATURES_jvmci="jvmci"
52541  else
52542    JVM_FEATURES_jvmci=""
52543  fi
52544
52545  # All variants but minimal (and custom) get these features
52546  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52547
52548  # Enable features depending on variant.
52549  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52550  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"
52551  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52552  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52553  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52554  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52555  JVM_FEATURES_custom="$JVM_FEATURES"
52556
52557
52558
52559
52560
52561
52562
52563
52564
52565  # Used for verification of Makefiles by check-jvm-feature
52566
52567
52568  # We don't support --with-jvm-interpreter anymore, use zero instead.
52569
52570
52571# Check whether --with-jvm-interpreter was given.
52572if test "${with_jvm_interpreter+set}" = set; then :
52573  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52574$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52575fi
52576
52577
52578
52579
52580###############################################################################
52581#
52582# Check dependencies for external and internal libraries.
52583#
52584###############################################################################
52585
52586# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52587
52588  # When using cygwin or msys, we need a wrapper binary that renames
52589  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52590  # @files and rewrites these too! This wrapper binary is
52591  # called fixpath.
52592  FIXPATH=
52593  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52594    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52595$as_echo_n "checking if fixpath can be created... " >&6; }
52596    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52597    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52598    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52599    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52600      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52601      FIXPATH="$FIXPATH_BIN -c"
52602    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52603      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52604      # @ was chosen as separator to minimize risk of other tools messing around with it
52605      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52606          | tr ' ' '\n' | grep '^/./' | sort | uniq`
52607      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52608      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52609    fi
52610    FIXPATH_SRC_W="$FIXPATH_SRC"
52611    FIXPATH_BIN_W="$FIXPATH_BIN"
52612
52613  unix_path="$FIXPATH_SRC_W"
52614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52615    windows_path=`$CYGPATH -m "$unix_path"`
52616    FIXPATH_SRC_W="$windows_path"
52617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52618    windows_path=`cmd //c echo $unix_path`
52619    FIXPATH_SRC_W="$windows_path"
52620  fi
52621
52622
52623  unix_path="$FIXPATH_BIN_W"
52624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52625    windows_path=`$CYGPATH -m "$unix_path"`
52626    FIXPATH_BIN_W="$windows_path"
52627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52628    windows_path=`cmd //c echo $unix_path`
52629    FIXPATH_BIN_W="$windows_path"
52630  fi
52631
52632    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
52633    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
52634    cd $FIXPATH_DIR
52635    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
52636    cd $CURDIR
52637
52638    if test ! -x $FIXPATH_BIN; then
52639      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52640$as_echo "no" >&6; }
52641      cat $FIXPATH_DIR/fixpath1.log
52642      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
52643    fi
52644    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52645$as_echo "yes" >&6; }
52646    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
52647$as_echo_n "checking if fixpath.exe works... " >&6; }
52648    cd $FIXPATH_DIR
52649    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
52650        > $FIXPATH_DIR/fixpath2.log 2>&1
52651    cd $CURDIR
52652    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
52653      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52654$as_echo "no" >&6; }
52655      cat $FIXPATH_DIR/fixpath2.log
52656      as_fn_error $? "fixpath did not work!" "$LINENO" 5
52657    fi
52658    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52659$as_echo "yes" >&6; }
52660
52661    FIXPATH_DETACH_FLAG="--detach"
52662  fi
52663
52664
52665
52666
52667
52668
52669  # Check if X11 is needed
52670  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
52671    # No X11 support on windows or macosx
52672    NEEDS_LIB_X11=false
52673  else
52674    if test "x$SUPPORT_HEADFUL" = xno; then
52675      # No X11 support if building headless-only
52676      NEEDS_LIB_X11=false
52677    else
52678      # All other instances need X11
52679      NEEDS_LIB_X11=true
52680    fi
52681  fi
52682
52683  # Check if cups is needed
52684  if test "x$OPENJDK_TARGET_OS" = xwindows; then
52685    # Windows have a separate print system
52686    NEEDS_LIB_CUPS=false
52687  else
52688    NEEDS_LIB_CUPS=true
52689  fi
52690
52691  # Check if freetype is needed
52692  if test "x$OPENJDK" = "xtrue"; then
52693    NEEDS_LIB_FREETYPE=true
52694  else
52695    NEEDS_LIB_FREETYPE=false
52696  fi
52697
52698  # Check if alsa is needed
52699  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52700    NEEDS_LIB_ALSA=true
52701  else
52702    NEEDS_LIB_ALSA=false
52703  fi
52704
52705  # Check if ffi is needed
52706  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52707    NEEDS_LIB_FFI=true
52708  else
52709    NEEDS_LIB_FFI=false
52710  fi
52711
52712
52713  # statically link libstdc++ before C++ ABI is stablized on Linux unless
52714  # dynamic build is configured on command line.
52715
52716# Check whether --with-stdc++lib was given.
52717if test "${with_stdc__lib+set}" = set; then :
52718  withval=$with_stdc__lib;
52719        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
52720                && test "x$with_stdc__lib" != xdefault; then
52721          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
52722        fi
52723
52724else
52725  with_stdc__lib=default
52726
52727fi
52728
52729
52730  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52731    # Test if -lstdc++ works.
52732    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
52733$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
52734    ac_ext=cpp
52735ac_cpp='$CXXCPP $CPPFLAGS'
52736ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52737ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52738ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52739
52740    OLD_CXXFLAGS="$CXXFLAGS"
52741    CXXFLAGS="$CXXFLAGS -lstdc++"
52742    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52743/* end confdefs.h.  */
52744
52745int
52746main ()
52747{
52748return 0;
52749  ;
52750  return 0;
52751}
52752_ACEOF
52753if ac_fn_cxx_try_link "$LINENO"; then :
52754  has_dynamic_libstdcxx=yes
52755else
52756  has_dynamic_libstdcxx=no
52757fi
52758rm -f core conftest.err conftest.$ac_objext \
52759    conftest$ac_exeext conftest.$ac_ext
52760    CXXFLAGS="$OLD_CXXFLAGS"
52761    ac_ext=cpp
52762ac_cpp='$CXXCPP $CPPFLAGS'
52763ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52764ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52765ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52766
52767    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
52768$as_echo "$has_dynamic_libstdcxx" >&6; }
52769
52770    # Test if stdc++ can be linked statically.
52771    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
52772$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
52773    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
52774    ac_ext=cpp
52775ac_cpp='$CXXCPP $CPPFLAGS'
52776ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52777ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52778ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52779
52780    OLD_LIBS="$LIBS"
52781    OLD_CXX="$CXX"
52782    LIBS="$STATIC_STDCXX_FLAGS"
52783    CXX="$CC"
52784    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52785/* end confdefs.h.  */
52786
52787int
52788main ()
52789{
52790return 0;
52791  ;
52792  return 0;
52793}
52794_ACEOF
52795if ac_fn_cxx_try_link "$LINENO"; then :
52796  has_static_libstdcxx=yes
52797else
52798  has_static_libstdcxx=no
52799fi
52800rm -f core conftest.err conftest.$ac_objext \
52801    conftest$ac_exeext conftest.$ac_ext
52802    LIBS="$OLD_LIBS"
52803    CXX="$OLD_CXX"
52804    ac_ext=cpp
52805ac_cpp='$CXXCPP $CPPFLAGS'
52806ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52807ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52808ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52809
52810    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
52811$as_echo "$has_static_libstdcxx" >&6; }
52812
52813    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
52814      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
52815    fi
52816
52817    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
52818      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
52819    fi
52820
52821    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
52822      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
52823    fi
52824
52825    # If dynamic was requested, it's available since it would fail above otherwise.
52826    # If dynamic wasn't requested, go with static unless it isn't available.
52827    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
52828$as_echo_n "checking how to link with libstdc++... " >&6; }
52829    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52830      LIBCXX="$LIBCXX -lstdc++"
52831      # To help comparisons with old build, put stdc++ first in JVM_LIBS
52832      JVM_LIBS="-lstdc++ $JVM_LIBS"
52833      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
52834      # just use the same setting as for the TARGET toolchain.
52835      OPENJDK_BUILD_JVM_LIBS="-lstdc++ $OPENJDK_BUILD_JVM_LIBS"
52836      LDCXX="$CXX"
52837      STATIC_CXX_SETTING="STATIC_CXX=false"
52838      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
52839$as_echo "dynamic" >&6; }
52840    else
52841      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
52842      JVM_LDFLAGS="$JVM_LDFLAGS -static-libgcc"
52843      # To help comparisons with old build, put stdc++ first in JVM_LIBS
52844      JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $JVM_LIBS"
52845      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
52846      # just use the same setting as for the TARGET toolchain.
52847      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -static-libgcc"
52848      OPENJDK_BUILD_JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $OPENJDK_BUILD_JVM_LIBS"
52849      LDCXX="$CC"
52850      STATIC_CXX_SETTING="STATIC_CXX=true"
52851      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
52852$as_echo "static" >&6; }
52853    fi
52854  fi
52855
52856
52857  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
52858  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
52859    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
52860  fi
52861
52862  # TODO better (platform agnostic) test
52863  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
52864    LIBCXX="-lstdc++"
52865  fi
52866
52867
52868  # Setup Windows runtime dlls
52869  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52870
52871
52872# Check whether --with-msvcr-dll was given.
52873if test "${with_msvcr_dll+set}" = set; then :
52874  withval=$with_msvcr_dll;
52875fi
52876
52877
52878  if test "x$with_msvcr_dll" != x; then
52879    # If given explicitely by user, do not probe. If not present, fail directly.
52880
52881  DLL_NAME="$MSVCR_NAME"
52882  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
52883  METHOD="--with-msvcr-dll"
52884  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52885    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52886$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52887
52888    # Need to check if the found msvcr is correct architecture
52889    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52890$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52891    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52892    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52893      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52894      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52895      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52896        CORRECT_MSVCR_ARCH="PE32 executable"
52897      else
52898        CORRECT_MSVCR_ARCH="PE32+ executable"
52899      fi
52900    else
52901      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52902        CORRECT_MSVCR_ARCH=386
52903      else
52904        CORRECT_MSVCR_ARCH=x86-64
52905      fi
52906    fi
52907    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52908      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52909$as_echo "ok" >&6; }
52910      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52911
52912  # Only process if variable expands to non-empty
52913
52914  if test "x$MSVC_DLL" != x; then
52915    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52916
52917  # Input might be given as Windows format, start by converting to
52918  # unix format.
52919  path="$MSVC_DLL"
52920  new_path=`$CYGPATH -u "$path"`
52921
52922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52925  # "foo.exe" is OK but "foo" is an error.
52926  #
52927  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52928  # It is also a way to make sure we got the proper file name for the real test later on.
52929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52930  if test "x$test_shortpath" = x; then
52931    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52932$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52933    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52934  fi
52935
52936  # Call helper function which possibly converts this using DOS-style short mode.
52937  # If so, the updated path is stored in $new_path.
52938
52939  input_path="$new_path"
52940  # Check if we need to convert this using DOS-style short mode. If the path
52941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52942  # take no chances and rewrite it.
52943  # Note: m4 eats our [], so we need to use [ and ] instead.
52944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52945  if test "x$has_forbidden_chars" != x; then
52946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52950      # Going to short mode and back again did indeed matter. Since short mode is
52951      # case insensitive, let's make it lowercase to improve readability.
52952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52953      # Now convert it back to Unix-style (cygpath)
52954      input_path=`$CYGPATH -u "$shortmode_path"`
52955      new_path="$input_path"
52956    fi
52957  fi
52958
52959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52960  if test "x$test_cygdrive_prefix" = x; then
52961    # As a simple fix, exclude /usr/bin since it's not a real path.
52962    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52964      # a path prefixed by /cygdrive for fixpath to work.
52965      new_path="$CYGWIN_ROOT_PATH$input_path"
52966    fi
52967  fi
52968
52969
52970  if test "x$path" != "x$new_path"; then
52971    MSVC_DLL="$new_path"
52972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52973$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52974  fi
52975
52976    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52977
52978  path="$MSVC_DLL"
52979  has_colon=`$ECHO $path | $GREP ^.:`
52980  new_path="$path"
52981  if test "x$has_colon" = x; then
52982    # Not in mixed or Windows style, start by that.
52983    new_path=`cmd //c echo $path`
52984  fi
52985
52986
52987  input_path="$new_path"
52988  # Check if we need to convert this using DOS-style short mode. If the path
52989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52990  # take no chances and rewrite it.
52991  # Note: m4 eats our [], so we need to use [ and ] instead.
52992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52993  if test "x$has_forbidden_chars" != x; then
52994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52996  fi
52997
52998
52999  windows_path="$new_path"
53000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53001    unix_path=`$CYGPATH -u "$windows_path"`
53002    new_path="$unix_path"
53003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53005    new_path="$unix_path"
53006  fi
53007
53008  if test "x$path" != "x$new_path"; then
53009    MSVC_DLL="$new_path"
53010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53011$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53012  fi
53013
53014  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53015  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53016
53017    else
53018      # We're on a unix platform. Hooray! :)
53019      path="$MSVC_DLL"
53020      has_space=`$ECHO "$path" | $GREP " "`
53021      if test "x$has_space" != x; then
53022        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53023$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53024        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53025      fi
53026
53027      # Use eval to expand a potential ~
53028      eval path="$path"
53029      if test ! -f "$path" && test ! -d "$path"; then
53030        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53031      fi
53032
53033      if test -d "$path"; then
53034        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53035      else
53036        dir="`$DIRNAME "$path"`"
53037        base="`$BASENAME "$path"`"
53038        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53039      fi
53040    fi
53041  fi
53042
53043      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53044$as_echo_n "checking for $DLL_NAME... " >&6; }
53045      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53046$as_echo "$MSVC_DLL" >&6; }
53047    else
53048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53049$as_echo "incorrect, ignoring" >&6; }
53050      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53051$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53052    fi
53053  fi
53054
53055    if test "x$MSVC_DLL" = x; then
53056      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53057    fi
53058    MSVCR_DLL="$MSVC_DLL"
53059  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53060
53061  DLL_NAME="$MSVCR_NAME"
53062  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53063  METHOD="devkit"
53064  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53065    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53066$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53067
53068    # Need to check if the found msvcr is correct architecture
53069    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53070$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53071    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53072    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53073      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53074      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53075      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53076        CORRECT_MSVCR_ARCH="PE32 executable"
53077      else
53078        CORRECT_MSVCR_ARCH="PE32+ executable"
53079      fi
53080    else
53081      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53082        CORRECT_MSVCR_ARCH=386
53083      else
53084        CORRECT_MSVCR_ARCH=x86-64
53085      fi
53086    fi
53087    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53088      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53089$as_echo "ok" >&6; }
53090      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53091
53092  # Only process if variable expands to non-empty
53093
53094  if test "x$MSVC_DLL" != x; then
53095    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53096
53097  # Input might be given as Windows format, start by converting to
53098  # unix format.
53099  path="$MSVC_DLL"
53100  new_path=`$CYGPATH -u "$path"`
53101
53102  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53103  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53104  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53105  # "foo.exe" is OK but "foo" is an error.
53106  #
53107  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53108  # It is also a way to make sure we got the proper file name for the real test later on.
53109  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53110  if test "x$test_shortpath" = x; then
53111    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53112$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53113    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53114  fi
53115
53116  # Call helper function which possibly converts this using DOS-style short mode.
53117  # If so, the updated path is stored in $new_path.
53118
53119  input_path="$new_path"
53120  # Check if we need to convert this using DOS-style short mode. If the path
53121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53122  # take no chances and rewrite it.
53123  # Note: m4 eats our [], so we need to use [ and ] instead.
53124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53125  if test "x$has_forbidden_chars" != x; then
53126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53127    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53128    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53129    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53130      # Going to short mode and back again did indeed matter. Since short mode is
53131      # case insensitive, let's make it lowercase to improve readability.
53132      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53133      # Now convert it back to Unix-style (cygpath)
53134      input_path=`$CYGPATH -u "$shortmode_path"`
53135      new_path="$input_path"
53136    fi
53137  fi
53138
53139  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53140  if test "x$test_cygdrive_prefix" = x; then
53141    # As a simple fix, exclude /usr/bin since it's not a real path.
53142    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53143      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53144      # a path prefixed by /cygdrive for fixpath to work.
53145      new_path="$CYGWIN_ROOT_PATH$input_path"
53146    fi
53147  fi
53148
53149
53150  if test "x$path" != "x$new_path"; then
53151    MSVC_DLL="$new_path"
53152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53153$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53154  fi
53155
53156    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53157
53158  path="$MSVC_DLL"
53159  has_colon=`$ECHO $path | $GREP ^.:`
53160  new_path="$path"
53161  if test "x$has_colon" = x; then
53162    # Not in mixed or Windows style, start by that.
53163    new_path=`cmd //c echo $path`
53164  fi
53165
53166
53167  input_path="$new_path"
53168  # Check if we need to convert this using DOS-style short mode. If the path
53169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53170  # take no chances and rewrite it.
53171  # Note: m4 eats our [], so we need to use [ and ] instead.
53172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53173  if test "x$has_forbidden_chars" != x; then
53174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53176  fi
53177
53178
53179  windows_path="$new_path"
53180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53181    unix_path=`$CYGPATH -u "$windows_path"`
53182    new_path="$unix_path"
53183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53185    new_path="$unix_path"
53186  fi
53187
53188  if test "x$path" != "x$new_path"; then
53189    MSVC_DLL="$new_path"
53190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53191$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53192  fi
53193
53194  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53195  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53196
53197    else
53198      # We're on a unix platform. Hooray! :)
53199      path="$MSVC_DLL"
53200      has_space=`$ECHO "$path" | $GREP " "`
53201      if test "x$has_space" != x; then
53202        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53203$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53204        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53205      fi
53206
53207      # Use eval to expand a potential ~
53208      eval path="$path"
53209      if test ! -f "$path" && test ! -d "$path"; then
53210        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53211      fi
53212
53213      if test -d "$path"; then
53214        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53215      else
53216        dir="`$DIRNAME "$path"`"
53217        base="`$BASENAME "$path"`"
53218        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53219      fi
53220    fi
53221  fi
53222
53223      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53224$as_echo_n "checking for $DLL_NAME... " >&6; }
53225      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53226$as_echo "$MSVC_DLL" >&6; }
53227    else
53228      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53229$as_echo "incorrect, ignoring" >&6; }
53230      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53231$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53232    fi
53233  fi
53234
53235    if test "x$MSVC_DLL" = x; then
53236      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53237    fi
53238    MSVCR_DLL="$MSVC_DLL"
53239  else
53240
53241  DLL_NAME="${MSVCR_NAME}"
53242  MSVC_DLL=
53243
53244  if test "x$MSVC_DLL" = x; then
53245    # Probe: Using well-known location from Visual Studio 10.0
53246    if test "x$VCINSTALLDIR" != x; then
53247      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53248
53249  windows_path="$CYGWIN_VC_INSTALL_DIR"
53250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53251    unix_path=`$CYGPATH -u "$windows_path"`
53252    CYGWIN_VC_INSTALL_DIR="$unix_path"
53253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53255    CYGWIN_VC_INSTALL_DIR="$unix_path"
53256  fi
53257
53258      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53259        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53260      else
53261        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53262      fi
53263      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53264
53265  DLL_NAME="$DLL_NAME"
53266  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53267  METHOD="well-known location in VCINSTALLDIR"
53268  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53269    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53270$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53271
53272    # Need to check if the found msvcr is correct architecture
53273    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53274$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53275    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53276    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53277      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53278      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53279      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53280        CORRECT_MSVCR_ARCH="PE32 executable"
53281      else
53282        CORRECT_MSVCR_ARCH="PE32+ executable"
53283      fi
53284    else
53285      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53286        CORRECT_MSVCR_ARCH=386
53287      else
53288        CORRECT_MSVCR_ARCH=x86-64
53289      fi
53290    fi
53291    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53292      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53293$as_echo "ok" >&6; }
53294      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53295
53296  # Only process if variable expands to non-empty
53297
53298  if test "x$MSVC_DLL" != x; then
53299    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53300
53301  # Input might be given as Windows format, start by converting to
53302  # unix format.
53303  path="$MSVC_DLL"
53304  new_path=`$CYGPATH -u "$path"`
53305
53306  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53307  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53308  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53309  # "foo.exe" is OK but "foo" is an error.
53310  #
53311  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53312  # It is also a way to make sure we got the proper file name for the real test later on.
53313  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53314  if test "x$test_shortpath" = x; then
53315    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53316$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53317    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53318  fi
53319
53320  # Call helper function which possibly converts this using DOS-style short mode.
53321  # If so, the updated path is stored in $new_path.
53322
53323  input_path="$new_path"
53324  # Check if we need to convert this using DOS-style short mode. If the path
53325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53326  # take no chances and rewrite it.
53327  # Note: m4 eats our [], so we need to use [ and ] instead.
53328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53329  if test "x$has_forbidden_chars" != x; then
53330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53334      # Going to short mode and back again did indeed matter. Since short mode is
53335      # case insensitive, let's make it lowercase to improve readability.
53336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53337      # Now convert it back to Unix-style (cygpath)
53338      input_path=`$CYGPATH -u "$shortmode_path"`
53339      new_path="$input_path"
53340    fi
53341  fi
53342
53343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53344  if test "x$test_cygdrive_prefix" = x; then
53345    # As a simple fix, exclude /usr/bin since it's not a real path.
53346    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53348      # a path prefixed by /cygdrive for fixpath to work.
53349      new_path="$CYGWIN_ROOT_PATH$input_path"
53350    fi
53351  fi
53352
53353
53354  if test "x$path" != "x$new_path"; then
53355    MSVC_DLL="$new_path"
53356    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53357$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53358  fi
53359
53360    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53361
53362  path="$MSVC_DLL"
53363  has_colon=`$ECHO $path | $GREP ^.:`
53364  new_path="$path"
53365  if test "x$has_colon" = x; then
53366    # Not in mixed or Windows style, start by that.
53367    new_path=`cmd //c echo $path`
53368  fi
53369
53370
53371  input_path="$new_path"
53372  # Check if we need to convert this using DOS-style short mode. If the path
53373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53374  # take no chances and rewrite it.
53375  # Note: m4 eats our [], so we need to use [ and ] instead.
53376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53377  if test "x$has_forbidden_chars" != x; then
53378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53379    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53380  fi
53381
53382
53383  windows_path="$new_path"
53384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53385    unix_path=`$CYGPATH -u "$windows_path"`
53386    new_path="$unix_path"
53387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53389    new_path="$unix_path"
53390  fi
53391
53392  if test "x$path" != "x$new_path"; then
53393    MSVC_DLL="$new_path"
53394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53395$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53396  fi
53397
53398  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53399  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53400
53401    else
53402      # We're on a unix platform. Hooray! :)
53403      path="$MSVC_DLL"
53404      has_space=`$ECHO "$path" | $GREP " "`
53405      if test "x$has_space" != x; then
53406        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53407$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53408        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53409      fi
53410
53411      # Use eval to expand a potential ~
53412      eval path="$path"
53413      if test ! -f "$path" && test ! -d "$path"; then
53414        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53415      fi
53416
53417      if test -d "$path"; then
53418        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53419      else
53420        dir="`$DIRNAME "$path"`"
53421        base="`$BASENAME "$path"`"
53422        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53423      fi
53424    fi
53425  fi
53426
53427      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53428$as_echo_n "checking for $DLL_NAME... " >&6; }
53429      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53430$as_echo "$MSVC_DLL" >&6; }
53431    else
53432      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53433$as_echo "incorrect, ignoring" >&6; }
53434      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53435$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53436    fi
53437  fi
53438
53439    fi
53440  fi
53441
53442  if test "x$MSVC_DLL" = x; then
53443    # Probe: Check in the Boot JDK directory.
53444    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53445
53446  DLL_NAME="$DLL_NAME"
53447  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53448  METHOD="well-known location in Boot JDK"
53449  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53450    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53451$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53452
53453    # Need to check if the found msvcr is correct architecture
53454    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53455$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53456    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53457    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53458      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53459      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53460      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53461        CORRECT_MSVCR_ARCH="PE32 executable"
53462      else
53463        CORRECT_MSVCR_ARCH="PE32+ executable"
53464      fi
53465    else
53466      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53467        CORRECT_MSVCR_ARCH=386
53468      else
53469        CORRECT_MSVCR_ARCH=x86-64
53470      fi
53471    fi
53472    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53473      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53474$as_echo "ok" >&6; }
53475      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53476
53477  # Only process if variable expands to non-empty
53478
53479  if test "x$MSVC_DLL" != x; then
53480    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53481
53482  # Input might be given as Windows format, start by converting to
53483  # unix format.
53484  path="$MSVC_DLL"
53485  new_path=`$CYGPATH -u "$path"`
53486
53487  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53488  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53489  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53490  # "foo.exe" is OK but "foo" is an error.
53491  #
53492  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53493  # It is also a way to make sure we got the proper file name for the real test later on.
53494  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53495  if test "x$test_shortpath" = x; then
53496    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53497$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53498    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53499  fi
53500
53501  # Call helper function which possibly converts this using DOS-style short mode.
53502  # If so, the updated path is stored in $new_path.
53503
53504  input_path="$new_path"
53505  # Check if we need to convert this using DOS-style short mode. If the path
53506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53507  # take no chances and rewrite it.
53508  # Note: m4 eats our [], so we need to use [ and ] instead.
53509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53510  if test "x$has_forbidden_chars" != x; then
53511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53512    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53513    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53514    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53515      # Going to short mode and back again did indeed matter. Since short mode is
53516      # case insensitive, let's make it lowercase to improve readability.
53517      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53518      # Now convert it back to Unix-style (cygpath)
53519      input_path=`$CYGPATH -u "$shortmode_path"`
53520      new_path="$input_path"
53521    fi
53522  fi
53523
53524  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53525  if test "x$test_cygdrive_prefix" = x; then
53526    # As a simple fix, exclude /usr/bin since it's not a real path.
53527    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53528      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53529      # a path prefixed by /cygdrive for fixpath to work.
53530      new_path="$CYGWIN_ROOT_PATH$input_path"
53531    fi
53532  fi
53533
53534
53535  if test "x$path" != "x$new_path"; then
53536    MSVC_DLL="$new_path"
53537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53538$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53539  fi
53540
53541    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53542
53543  path="$MSVC_DLL"
53544  has_colon=`$ECHO $path | $GREP ^.:`
53545  new_path="$path"
53546  if test "x$has_colon" = x; then
53547    # Not in mixed or Windows style, start by that.
53548    new_path=`cmd //c echo $path`
53549  fi
53550
53551
53552  input_path="$new_path"
53553  # Check if we need to convert this using DOS-style short mode. If the path
53554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53555  # take no chances and rewrite it.
53556  # Note: m4 eats our [], so we need to use [ and ] instead.
53557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53558  if test "x$has_forbidden_chars" != x; then
53559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53561  fi
53562
53563
53564  windows_path="$new_path"
53565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53566    unix_path=`$CYGPATH -u "$windows_path"`
53567    new_path="$unix_path"
53568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53570    new_path="$unix_path"
53571  fi
53572
53573  if test "x$path" != "x$new_path"; then
53574    MSVC_DLL="$new_path"
53575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53576$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53577  fi
53578
53579  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53580  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53581
53582    else
53583      # We're on a unix platform. Hooray! :)
53584      path="$MSVC_DLL"
53585      has_space=`$ECHO "$path" | $GREP " "`
53586      if test "x$has_space" != x; then
53587        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53588$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53589        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53590      fi
53591
53592      # Use eval to expand a potential ~
53593      eval path="$path"
53594      if test ! -f "$path" && test ! -d "$path"; then
53595        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53596      fi
53597
53598      if test -d "$path"; then
53599        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53600      else
53601        dir="`$DIRNAME "$path"`"
53602        base="`$BASENAME "$path"`"
53603        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53604      fi
53605    fi
53606  fi
53607
53608      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53609$as_echo_n "checking for $DLL_NAME... " >&6; }
53610      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53611$as_echo "$MSVC_DLL" >&6; }
53612    else
53613      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53614$as_echo "incorrect, ignoring" >&6; }
53615      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53616$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53617    fi
53618  fi
53619
53620  fi
53621
53622  if test "x$MSVC_DLL" = x; then
53623    # Probe: Look in the Windows system32 directory
53624    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53625
53626  windows_path="$CYGWIN_SYSTEMROOT"
53627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53628    unix_path=`$CYGPATH -u "$windows_path"`
53629    CYGWIN_SYSTEMROOT="$unix_path"
53630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53632    CYGWIN_SYSTEMROOT="$unix_path"
53633  fi
53634
53635    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53636
53637  DLL_NAME="$DLL_NAME"
53638  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53639  METHOD="well-known location in SYSTEMROOT"
53640  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53641    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53642$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53643
53644    # Need to check if the found msvcr is correct architecture
53645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53646$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53647    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53648    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53649      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53650      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53651      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53652        CORRECT_MSVCR_ARCH="PE32 executable"
53653      else
53654        CORRECT_MSVCR_ARCH="PE32+ executable"
53655      fi
53656    else
53657      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53658        CORRECT_MSVCR_ARCH=386
53659      else
53660        CORRECT_MSVCR_ARCH=x86-64
53661      fi
53662    fi
53663    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53664      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53665$as_echo "ok" >&6; }
53666      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53667
53668  # Only process if variable expands to non-empty
53669
53670  if test "x$MSVC_DLL" != x; then
53671    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53672
53673  # Input might be given as Windows format, start by converting to
53674  # unix format.
53675  path="$MSVC_DLL"
53676  new_path=`$CYGPATH -u "$path"`
53677
53678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53681  # "foo.exe" is OK but "foo" is an error.
53682  #
53683  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53684  # It is also a way to make sure we got the proper file name for the real test later on.
53685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53686  if test "x$test_shortpath" = x; then
53687    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53688$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53689    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53690  fi
53691
53692  # Call helper function which possibly converts this using DOS-style short mode.
53693  # If so, the updated path is stored in $new_path.
53694
53695  input_path="$new_path"
53696  # Check if we need to convert this using DOS-style short mode. If the path
53697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53698  # take no chances and rewrite it.
53699  # Note: m4 eats our [], so we need to use [ and ] instead.
53700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53701  if test "x$has_forbidden_chars" != x; then
53702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53706      # Going to short mode and back again did indeed matter. Since short mode is
53707      # case insensitive, let's make it lowercase to improve readability.
53708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53709      # Now convert it back to Unix-style (cygpath)
53710      input_path=`$CYGPATH -u "$shortmode_path"`
53711      new_path="$input_path"
53712    fi
53713  fi
53714
53715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53716  if test "x$test_cygdrive_prefix" = x; then
53717    # As a simple fix, exclude /usr/bin since it's not a real path.
53718    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53720      # a path prefixed by /cygdrive for fixpath to work.
53721      new_path="$CYGWIN_ROOT_PATH$input_path"
53722    fi
53723  fi
53724
53725
53726  if test "x$path" != "x$new_path"; then
53727    MSVC_DLL="$new_path"
53728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53729$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53730  fi
53731
53732    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53733
53734  path="$MSVC_DLL"
53735  has_colon=`$ECHO $path | $GREP ^.:`
53736  new_path="$path"
53737  if test "x$has_colon" = x; then
53738    # Not in mixed or Windows style, start by that.
53739    new_path=`cmd //c echo $path`
53740  fi
53741
53742
53743  input_path="$new_path"
53744  # Check if we need to convert this using DOS-style short mode. If the path
53745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53746  # take no chances and rewrite it.
53747  # Note: m4 eats our [], so we need to use [ and ] instead.
53748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53749  if test "x$has_forbidden_chars" != x; then
53750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53751    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53752  fi
53753
53754
53755  windows_path="$new_path"
53756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53757    unix_path=`$CYGPATH -u "$windows_path"`
53758    new_path="$unix_path"
53759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53761    new_path="$unix_path"
53762  fi
53763
53764  if test "x$path" != "x$new_path"; then
53765    MSVC_DLL="$new_path"
53766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53767$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53768  fi
53769
53770  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53771  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53772
53773    else
53774      # We're on a unix platform. Hooray! :)
53775      path="$MSVC_DLL"
53776      has_space=`$ECHO "$path" | $GREP " "`
53777      if test "x$has_space" != x; then
53778        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53779$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53780        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53781      fi
53782
53783      # Use eval to expand a potential ~
53784      eval path="$path"
53785      if test ! -f "$path" && test ! -d "$path"; then
53786        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53787      fi
53788
53789      if test -d "$path"; then
53790        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53791      else
53792        dir="`$DIRNAME "$path"`"
53793        base="`$BASENAME "$path"`"
53794        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53795      fi
53796    fi
53797  fi
53798
53799      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53800$as_echo_n "checking for $DLL_NAME... " >&6; }
53801      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53802$as_echo "$MSVC_DLL" >&6; }
53803    else
53804      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53805$as_echo "incorrect, ignoring" >&6; }
53806      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53807$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53808    fi
53809  fi
53810
53811  fi
53812
53813  if test "x$MSVC_DLL" = x; then
53814    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
53815    if test "x$VS100COMNTOOLS" != x; then
53816      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
53817
53818  windows_path="$CYGWIN_VS_TOOLS_DIR"
53819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53820    unix_path=`$CYGPATH -u "$windows_path"`
53821    CYGWIN_VS_TOOLS_DIR="$unix_path"
53822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53824    CYGWIN_VS_TOOLS_DIR="$unix_path"
53825  fi
53826
53827      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53828        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53829	    | $GREP -i /x64/ | $HEAD --lines 1`
53830      else
53831        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53832	    | $GREP -i /x86/ | $HEAD --lines 1`
53833      fi
53834
53835  DLL_NAME="$DLL_NAME"
53836  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53837  METHOD="search of VS100COMNTOOLS"
53838  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53839    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53840$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53841
53842    # Need to check if the found msvcr is correct architecture
53843    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53844$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53845    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53846    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53847      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53848      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53849      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53850        CORRECT_MSVCR_ARCH="PE32 executable"
53851      else
53852        CORRECT_MSVCR_ARCH="PE32+ executable"
53853      fi
53854    else
53855      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53856        CORRECT_MSVCR_ARCH=386
53857      else
53858        CORRECT_MSVCR_ARCH=x86-64
53859      fi
53860    fi
53861    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53862      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53863$as_echo "ok" >&6; }
53864      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53865
53866  # Only process if variable expands to non-empty
53867
53868  if test "x$MSVC_DLL" != x; then
53869    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53870
53871  # Input might be given as Windows format, start by converting to
53872  # unix format.
53873  path="$MSVC_DLL"
53874  new_path=`$CYGPATH -u "$path"`
53875
53876  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53877  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53878  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53879  # "foo.exe" is OK but "foo" is an error.
53880  #
53881  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53882  # It is also a way to make sure we got the proper file name for the real test later on.
53883  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53884  if test "x$test_shortpath" = x; then
53885    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53886$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53887    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53888  fi
53889
53890  # Call helper function which possibly converts this using DOS-style short mode.
53891  # If so, the updated path is stored in $new_path.
53892
53893  input_path="$new_path"
53894  # Check if we need to convert this using DOS-style short mode. If the path
53895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53896  # take no chances and rewrite it.
53897  # Note: m4 eats our [], so we need to use [ and ] instead.
53898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53899  if test "x$has_forbidden_chars" != x; then
53900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53901    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53902    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53903    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53904      # Going to short mode and back again did indeed matter. Since short mode is
53905      # case insensitive, let's make it lowercase to improve readability.
53906      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53907      # Now convert it back to Unix-style (cygpath)
53908      input_path=`$CYGPATH -u "$shortmode_path"`
53909      new_path="$input_path"
53910    fi
53911  fi
53912
53913  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53914  if test "x$test_cygdrive_prefix" = x; then
53915    # As a simple fix, exclude /usr/bin since it's not a real path.
53916    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53917      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53918      # a path prefixed by /cygdrive for fixpath to work.
53919      new_path="$CYGWIN_ROOT_PATH$input_path"
53920    fi
53921  fi
53922
53923
53924  if test "x$path" != "x$new_path"; then
53925    MSVC_DLL="$new_path"
53926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53927$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53928  fi
53929
53930    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53931
53932  path="$MSVC_DLL"
53933  has_colon=`$ECHO $path | $GREP ^.:`
53934  new_path="$path"
53935  if test "x$has_colon" = x; then
53936    # Not in mixed or Windows style, start by that.
53937    new_path=`cmd //c echo $path`
53938  fi
53939
53940
53941  input_path="$new_path"
53942  # Check if we need to convert this using DOS-style short mode. If the path
53943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53944  # take no chances and rewrite it.
53945  # Note: m4 eats our [], so we need to use [ and ] instead.
53946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53947  if test "x$has_forbidden_chars" != x; then
53948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53949    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53950  fi
53951
53952
53953  windows_path="$new_path"
53954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53955    unix_path=`$CYGPATH -u "$windows_path"`
53956    new_path="$unix_path"
53957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53959    new_path="$unix_path"
53960  fi
53961
53962  if test "x$path" != "x$new_path"; then
53963    MSVC_DLL="$new_path"
53964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53965$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53966  fi
53967
53968  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53969  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53970
53971    else
53972      # We're on a unix platform. Hooray! :)
53973      path="$MSVC_DLL"
53974      has_space=`$ECHO "$path" | $GREP " "`
53975      if test "x$has_space" != x; then
53976        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53977$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53978        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53979      fi
53980
53981      # Use eval to expand a potential ~
53982      eval path="$path"
53983      if test ! -f "$path" && test ! -d "$path"; then
53984        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53985      fi
53986
53987      if test -d "$path"; then
53988        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53989      else
53990        dir="`$DIRNAME "$path"`"
53991        base="`$BASENAME "$path"`"
53992        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53993      fi
53994    fi
53995  fi
53996
53997      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53998$as_echo_n "checking for $DLL_NAME... " >&6; }
53999      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54000$as_echo "$MSVC_DLL" >&6; }
54001    else
54002      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54003$as_echo "incorrect, ignoring" >&6; }
54004      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54005$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54006    fi
54007  fi
54008
54009    fi
54010  fi
54011
54012  if test "x$MSVC_DLL" = x; then
54013    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54014    # (This was the original behaviour; kept since it might turn something up)
54015    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54016      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54017        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54018	    | $GREP x64 | $HEAD --lines 1`
54019      else
54020        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54021	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54022        if test "x$POSSIBLE_MSVC_DLL" = x; then
54023          # We're grasping at straws now...
54024          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54025	      | $HEAD --lines 1`
54026        fi
54027      fi
54028
54029
54030  DLL_NAME="$DLL_NAME"
54031  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54032  METHOD="search of VCINSTALLDIR"
54033  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54034    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54035$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54036
54037    # Need to check if the found msvcr is correct architecture
54038    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54039$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54040    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54041    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54042      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54043      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54044      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54045        CORRECT_MSVCR_ARCH="PE32 executable"
54046      else
54047        CORRECT_MSVCR_ARCH="PE32+ executable"
54048      fi
54049    else
54050      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54051        CORRECT_MSVCR_ARCH=386
54052      else
54053        CORRECT_MSVCR_ARCH=x86-64
54054      fi
54055    fi
54056    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54057      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54058$as_echo "ok" >&6; }
54059      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54060
54061  # Only process if variable expands to non-empty
54062
54063  if test "x$MSVC_DLL" != x; then
54064    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54065
54066  # Input might be given as Windows format, start by converting to
54067  # unix format.
54068  path="$MSVC_DLL"
54069  new_path=`$CYGPATH -u "$path"`
54070
54071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54074  # "foo.exe" is OK but "foo" is an error.
54075  #
54076  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54077  # It is also a way to make sure we got the proper file name for the real test later on.
54078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54079  if test "x$test_shortpath" = x; then
54080    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54081$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54082    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54083  fi
54084
54085  # Call helper function which possibly converts this using DOS-style short mode.
54086  # If so, the updated path is stored in $new_path.
54087
54088  input_path="$new_path"
54089  # Check if we need to convert this using DOS-style short mode. If the path
54090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54091  # take no chances and rewrite it.
54092  # Note: m4 eats our [], so we need to use [ and ] instead.
54093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54094  if test "x$has_forbidden_chars" != x; then
54095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54096    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54097    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54098    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54099      # Going to short mode and back again did indeed matter. Since short mode is
54100      # case insensitive, let's make it lowercase to improve readability.
54101      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54102      # Now convert it back to Unix-style (cygpath)
54103      input_path=`$CYGPATH -u "$shortmode_path"`
54104      new_path="$input_path"
54105    fi
54106  fi
54107
54108  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54109  if test "x$test_cygdrive_prefix" = x; then
54110    # As a simple fix, exclude /usr/bin since it's not a real path.
54111    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54112      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54113      # a path prefixed by /cygdrive for fixpath to work.
54114      new_path="$CYGWIN_ROOT_PATH$input_path"
54115    fi
54116  fi
54117
54118
54119  if test "x$path" != "x$new_path"; then
54120    MSVC_DLL="$new_path"
54121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54122$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54123  fi
54124
54125    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54126
54127  path="$MSVC_DLL"
54128  has_colon=`$ECHO $path | $GREP ^.:`
54129  new_path="$path"
54130  if test "x$has_colon" = x; then
54131    # Not in mixed or Windows style, start by that.
54132    new_path=`cmd //c echo $path`
54133  fi
54134
54135
54136  input_path="$new_path"
54137  # Check if we need to convert this using DOS-style short mode. If the path
54138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54139  # take no chances and rewrite it.
54140  # Note: m4 eats our [], so we need to use [ and ] instead.
54141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54142  if test "x$has_forbidden_chars" != x; then
54143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54144    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54145  fi
54146
54147
54148  windows_path="$new_path"
54149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54150    unix_path=`$CYGPATH -u "$windows_path"`
54151    new_path="$unix_path"
54152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54154    new_path="$unix_path"
54155  fi
54156
54157  if test "x$path" != "x$new_path"; then
54158    MSVC_DLL="$new_path"
54159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54160$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54161  fi
54162
54163  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54164  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54165
54166    else
54167      # We're on a unix platform. Hooray! :)
54168      path="$MSVC_DLL"
54169      has_space=`$ECHO "$path" | $GREP " "`
54170      if test "x$has_space" != x; then
54171        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54172$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54173        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54174      fi
54175
54176      # Use eval to expand a potential ~
54177      eval path="$path"
54178      if test ! -f "$path" && test ! -d "$path"; then
54179        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54180      fi
54181
54182      if test -d "$path"; then
54183        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54184      else
54185        dir="`$DIRNAME "$path"`"
54186        base="`$BASENAME "$path"`"
54187        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54188      fi
54189    fi
54190  fi
54191
54192      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54193$as_echo_n "checking for $DLL_NAME... " >&6; }
54194      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54195$as_echo "$MSVC_DLL" >&6; }
54196    else
54197      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54198$as_echo "incorrect, ignoring" >&6; }
54199      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54200$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54201    fi
54202  fi
54203
54204    fi
54205  fi
54206
54207  if test "x$MSVC_DLL" = x; then
54208    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54209$as_echo_n "checking for $DLL_NAME... " >&6; }
54210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54211$as_echo "no" >&6; }
54212    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54213  fi
54214
54215    MSVCR_DLL="$MSVC_DLL"
54216  fi
54217
54218
54219
54220# Check whether --with-msvcp-dll was given.
54221if test "${with_msvcp_dll+set}" = set; then :
54222  withval=$with_msvcp_dll;
54223fi
54224
54225
54226  if test "x$MSVCP_NAME" != "x"; then
54227    if test "x$with_msvcp_dll" != x; then
54228      # If given explicitely by user, do not probe. If not present, fail directly.
54229
54230  DLL_NAME="$MSVCP_NAME"
54231  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54232  METHOD="--with-msvcp-dll"
54233  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54234    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54235$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54236
54237    # Need to check if the found msvcr is correct architecture
54238    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54239$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54240    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54241    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54242      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54243      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54244      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54245        CORRECT_MSVCR_ARCH="PE32 executable"
54246      else
54247        CORRECT_MSVCR_ARCH="PE32+ executable"
54248      fi
54249    else
54250      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54251        CORRECT_MSVCR_ARCH=386
54252      else
54253        CORRECT_MSVCR_ARCH=x86-64
54254      fi
54255    fi
54256    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54257      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54258$as_echo "ok" >&6; }
54259      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54260
54261  # Only process if variable expands to non-empty
54262
54263  if test "x$MSVC_DLL" != x; then
54264    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54265
54266  # Input might be given as Windows format, start by converting to
54267  # unix format.
54268  path="$MSVC_DLL"
54269  new_path=`$CYGPATH -u "$path"`
54270
54271  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54272  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54273  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54274  # "foo.exe" is OK but "foo" is an error.
54275  #
54276  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54277  # It is also a way to make sure we got the proper file name for the real test later on.
54278  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54279  if test "x$test_shortpath" = x; then
54280    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54281$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54282    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54283  fi
54284
54285  # Call helper function which possibly converts this using DOS-style short mode.
54286  # If so, the updated path is stored in $new_path.
54287
54288  input_path="$new_path"
54289  # Check if we need to convert this using DOS-style short mode. If the path
54290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54291  # take no chances and rewrite it.
54292  # Note: m4 eats our [], so we need to use [ and ] instead.
54293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54294  if test "x$has_forbidden_chars" != x; then
54295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54296    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54297    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54298    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54299      # Going to short mode and back again did indeed matter. Since short mode is
54300      # case insensitive, let's make it lowercase to improve readability.
54301      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54302      # Now convert it back to Unix-style (cygpath)
54303      input_path=`$CYGPATH -u "$shortmode_path"`
54304      new_path="$input_path"
54305    fi
54306  fi
54307
54308  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54309  if test "x$test_cygdrive_prefix" = x; then
54310    # As a simple fix, exclude /usr/bin since it's not a real path.
54311    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54312      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54313      # a path prefixed by /cygdrive for fixpath to work.
54314      new_path="$CYGWIN_ROOT_PATH$input_path"
54315    fi
54316  fi
54317
54318
54319  if test "x$path" != "x$new_path"; then
54320    MSVC_DLL="$new_path"
54321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54322$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54323  fi
54324
54325    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54326
54327  path="$MSVC_DLL"
54328  has_colon=`$ECHO $path | $GREP ^.:`
54329  new_path="$path"
54330  if test "x$has_colon" = x; then
54331    # Not in mixed or Windows style, start by that.
54332    new_path=`cmd //c echo $path`
54333  fi
54334
54335
54336  input_path="$new_path"
54337  # Check if we need to convert this using DOS-style short mode. If the path
54338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54339  # take no chances and rewrite it.
54340  # Note: m4 eats our [], so we need to use [ and ] instead.
54341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54342  if test "x$has_forbidden_chars" != x; then
54343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54344    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54345  fi
54346
54347
54348  windows_path="$new_path"
54349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54350    unix_path=`$CYGPATH -u "$windows_path"`
54351    new_path="$unix_path"
54352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54354    new_path="$unix_path"
54355  fi
54356
54357  if test "x$path" != "x$new_path"; then
54358    MSVC_DLL="$new_path"
54359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54360$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54361  fi
54362
54363  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54364  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54365
54366    else
54367      # We're on a unix platform. Hooray! :)
54368      path="$MSVC_DLL"
54369      has_space=`$ECHO "$path" | $GREP " "`
54370      if test "x$has_space" != x; then
54371        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54372$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54373        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54374      fi
54375
54376      # Use eval to expand a potential ~
54377      eval path="$path"
54378      if test ! -f "$path" && test ! -d "$path"; then
54379        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54380      fi
54381
54382      if test -d "$path"; then
54383        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54384      else
54385        dir="`$DIRNAME "$path"`"
54386        base="`$BASENAME "$path"`"
54387        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54388      fi
54389    fi
54390  fi
54391
54392      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54393$as_echo_n "checking for $DLL_NAME... " >&6; }
54394      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54395$as_echo "$MSVC_DLL" >&6; }
54396    else
54397      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54398$as_echo "incorrect, ignoring" >&6; }
54399      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54400$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54401    fi
54402  fi
54403
54404      if test "x$MSVC_DLL" = x; then
54405        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54406      fi
54407      MSVCP_DLL="$MSVC_DLL"
54408    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54409
54410  DLL_NAME="$MSVCP_NAME"
54411  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54412  METHOD="devkit"
54413  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54414    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54415$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54416
54417    # Need to check if the found msvcr is correct architecture
54418    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54419$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54420    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54421    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54422      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54423      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54424      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54425        CORRECT_MSVCR_ARCH="PE32 executable"
54426      else
54427        CORRECT_MSVCR_ARCH="PE32+ executable"
54428      fi
54429    else
54430      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54431        CORRECT_MSVCR_ARCH=386
54432      else
54433        CORRECT_MSVCR_ARCH=x86-64
54434      fi
54435    fi
54436    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54437      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54438$as_echo "ok" >&6; }
54439      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54440
54441  # Only process if variable expands to non-empty
54442
54443  if test "x$MSVC_DLL" != x; then
54444    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54445
54446  # Input might be given as Windows format, start by converting to
54447  # unix format.
54448  path="$MSVC_DLL"
54449  new_path=`$CYGPATH -u "$path"`
54450
54451  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54452  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54453  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54454  # "foo.exe" is OK but "foo" is an error.
54455  #
54456  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54457  # It is also a way to make sure we got the proper file name for the real test later on.
54458  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54459  if test "x$test_shortpath" = x; then
54460    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54461$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54462    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54463  fi
54464
54465  # Call helper function which possibly converts this using DOS-style short mode.
54466  # If so, the updated path is stored in $new_path.
54467
54468  input_path="$new_path"
54469  # Check if we need to convert this using DOS-style short mode. If the path
54470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54471  # take no chances and rewrite it.
54472  # Note: m4 eats our [], so we need to use [ and ] instead.
54473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54474  if test "x$has_forbidden_chars" != x; then
54475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54476    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54477    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54478    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54479      # Going to short mode and back again did indeed matter. Since short mode is
54480      # case insensitive, let's make it lowercase to improve readability.
54481      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54482      # Now convert it back to Unix-style (cygpath)
54483      input_path=`$CYGPATH -u "$shortmode_path"`
54484      new_path="$input_path"
54485    fi
54486  fi
54487
54488  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54489  if test "x$test_cygdrive_prefix" = x; then
54490    # As a simple fix, exclude /usr/bin since it's not a real path.
54491    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54492      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54493      # a path prefixed by /cygdrive for fixpath to work.
54494      new_path="$CYGWIN_ROOT_PATH$input_path"
54495    fi
54496  fi
54497
54498
54499  if test "x$path" != "x$new_path"; then
54500    MSVC_DLL="$new_path"
54501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54502$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54503  fi
54504
54505    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54506
54507  path="$MSVC_DLL"
54508  has_colon=`$ECHO $path | $GREP ^.:`
54509  new_path="$path"
54510  if test "x$has_colon" = x; then
54511    # Not in mixed or Windows style, start by that.
54512    new_path=`cmd //c echo $path`
54513  fi
54514
54515
54516  input_path="$new_path"
54517  # Check if we need to convert this using DOS-style short mode. If the path
54518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54519  # take no chances and rewrite it.
54520  # Note: m4 eats our [], so we need to use [ and ] instead.
54521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54522  if test "x$has_forbidden_chars" != x; then
54523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54524    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54525  fi
54526
54527
54528  windows_path="$new_path"
54529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54530    unix_path=`$CYGPATH -u "$windows_path"`
54531    new_path="$unix_path"
54532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54534    new_path="$unix_path"
54535  fi
54536
54537  if test "x$path" != "x$new_path"; then
54538    MSVC_DLL="$new_path"
54539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54540$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54541  fi
54542
54543  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54544  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54545
54546    else
54547      # We're on a unix platform. Hooray! :)
54548      path="$MSVC_DLL"
54549      has_space=`$ECHO "$path" | $GREP " "`
54550      if test "x$has_space" != x; then
54551        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54552$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54553        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54554      fi
54555
54556      # Use eval to expand a potential ~
54557      eval path="$path"
54558      if test ! -f "$path" && test ! -d "$path"; then
54559        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54560      fi
54561
54562      if test -d "$path"; then
54563        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54564      else
54565        dir="`$DIRNAME "$path"`"
54566        base="`$BASENAME "$path"`"
54567        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54568      fi
54569    fi
54570  fi
54571
54572      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54573$as_echo_n "checking for $DLL_NAME... " >&6; }
54574      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54575$as_echo "$MSVC_DLL" >&6; }
54576    else
54577      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54578$as_echo "incorrect, ignoring" >&6; }
54579      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54580$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54581    fi
54582  fi
54583
54584      if test "x$MSVC_DLL" = x; then
54585        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54586      fi
54587      MSVCP_DLL="$MSVC_DLL"
54588    else
54589
54590  DLL_NAME="${MSVCP_NAME}"
54591  MSVC_DLL=
54592
54593  if test "x$MSVC_DLL" = x; then
54594    # Probe: Using well-known location from Visual Studio 10.0
54595    if test "x$VCINSTALLDIR" != x; then
54596      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54597
54598  windows_path="$CYGWIN_VC_INSTALL_DIR"
54599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54600    unix_path=`$CYGPATH -u "$windows_path"`
54601    CYGWIN_VC_INSTALL_DIR="$unix_path"
54602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54604    CYGWIN_VC_INSTALL_DIR="$unix_path"
54605  fi
54606
54607      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54608        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54609      else
54610        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54611      fi
54612      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54613
54614  DLL_NAME="$DLL_NAME"
54615  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54616  METHOD="well-known location in VCINSTALLDIR"
54617  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54618    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54619$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54620
54621    # Need to check if the found msvcr is correct architecture
54622    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54623$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54624    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54625    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54626      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54627      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54628      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54629        CORRECT_MSVCR_ARCH="PE32 executable"
54630      else
54631        CORRECT_MSVCR_ARCH="PE32+ executable"
54632      fi
54633    else
54634      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54635        CORRECT_MSVCR_ARCH=386
54636      else
54637        CORRECT_MSVCR_ARCH=x86-64
54638      fi
54639    fi
54640    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54641      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54642$as_echo "ok" >&6; }
54643      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54644
54645  # Only process if variable expands to non-empty
54646
54647  if test "x$MSVC_DLL" != x; then
54648    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54649
54650  # Input might be given as Windows format, start by converting to
54651  # unix format.
54652  path="$MSVC_DLL"
54653  new_path=`$CYGPATH -u "$path"`
54654
54655  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54656  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54657  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54658  # "foo.exe" is OK but "foo" is an error.
54659  #
54660  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54661  # It is also a way to make sure we got the proper file name for the real test later on.
54662  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54663  if test "x$test_shortpath" = x; then
54664    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54665$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54666    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54667  fi
54668
54669  # Call helper function which possibly converts this using DOS-style short mode.
54670  # If so, the updated path is stored in $new_path.
54671
54672  input_path="$new_path"
54673  # Check if we need to convert this using DOS-style short mode. If the path
54674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54675  # take no chances and rewrite it.
54676  # Note: m4 eats our [], so we need to use [ and ] instead.
54677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54678  if test "x$has_forbidden_chars" != x; then
54679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54680    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54681    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54682    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54683      # Going to short mode and back again did indeed matter. Since short mode is
54684      # case insensitive, let's make it lowercase to improve readability.
54685      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54686      # Now convert it back to Unix-style (cygpath)
54687      input_path=`$CYGPATH -u "$shortmode_path"`
54688      new_path="$input_path"
54689    fi
54690  fi
54691
54692  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54693  if test "x$test_cygdrive_prefix" = x; then
54694    # As a simple fix, exclude /usr/bin since it's not a real path.
54695    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54696      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54697      # a path prefixed by /cygdrive for fixpath to work.
54698      new_path="$CYGWIN_ROOT_PATH$input_path"
54699    fi
54700  fi
54701
54702
54703  if test "x$path" != "x$new_path"; then
54704    MSVC_DLL="$new_path"
54705    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54706$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54707  fi
54708
54709    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54710
54711  path="$MSVC_DLL"
54712  has_colon=`$ECHO $path | $GREP ^.:`
54713  new_path="$path"
54714  if test "x$has_colon" = x; then
54715    # Not in mixed or Windows style, start by that.
54716    new_path=`cmd //c echo $path`
54717  fi
54718
54719
54720  input_path="$new_path"
54721  # Check if we need to convert this using DOS-style short mode. If the path
54722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54723  # take no chances and rewrite it.
54724  # Note: m4 eats our [], so we need to use [ and ] instead.
54725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54726  if test "x$has_forbidden_chars" != x; then
54727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54728    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54729  fi
54730
54731
54732  windows_path="$new_path"
54733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54734    unix_path=`$CYGPATH -u "$windows_path"`
54735    new_path="$unix_path"
54736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54738    new_path="$unix_path"
54739  fi
54740
54741  if test "x$path" != "x$new_path"; then
54742    MSVC_DLL="$new_path"
54743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54744$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54745  fi
54746
54747  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54748  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54749
54750    else
54751      # We're on a unix platform. Hooray! :)
54752      path="$MSVC_DLL"
54753      has_space=`$ECHO "$path" | $GREP " "`
54754      if test "x$has_space" != x; then
54755        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54756$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54757        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54758      fi
54759
54760      # Use eval to expand a potential ~
54761      eval path="$path"
54762      if test ! -f "$path" && test ! -d "$path"; then
54763        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54764      fi
54765
54766      if test -d "$path"; then
54767        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54768      else
54769        dir="`$DIRNAME "$path"`"
54770        base="`$BASENAME "$path"`"
54771        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54772      fi
54773    fi
54774  fi
54775
54776      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54777$as_echo_n "checking for $DLL_NAME... " >&6; }
54778      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54779$as_echo "$MSVC_DLL" >&6; }
54780    else
54781      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54782$as_echo "incorrect, ignoring" >&6; }
54783      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54784$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54785    fi
54786  fi
54787
54788    fi
54789  fi
54790
54791  if test "x$MSVC_DLL" = x; then
54792    # Probe: Check in the Boot JDK directory.
54793    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54794
54795  DLL_NAME="$DLL_NAME"
54796  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54797  METHOD="well-known location in Boot JDK"
54798  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54799    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54800$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54801
54802    # Need to check if the found msvcr is correct architecture
54803    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54804$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54805    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54806    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54807      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54808      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54809      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54810        CORRECT_MSVCR_ARCH="PE32 executable"
54811      else
54812        CORRECT_MSVCR_ARCH="PE32+ executable"
54813      fi
54814    else
54815      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54816        CORRECT_MSVCR_ARCH=386
54817      else
54818        CORRECT_MSVCR_ARCH=x86-64
54819      fi
54820    fi
54821    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54822      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54823$as_echo "ok" >&6; }
54824      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54825
54826  # Only process if variable expands to non-empty
54827
54828  if test "x$MSVC_DLL" != x; then
54829    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54830
54831  # Input might be given as Windows format, start by converting to
54832  # unix format.
54833  path="$MSVC_DLL"
54834  new_path=`$CYGPATH -u "$path"`
54835
54836  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54837  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54838  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54839  # "foo.exe" is OK but "foo" is an error.
54840  #
54841  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54842  # It is also a way to make sure we got the proper file name for the real test later on.
54843  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54844  if test "x$test_shortpath" = x; then
54845    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54846$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54847    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54848  fi
54849
54850  # Call helper function which possibly converts this using DOS-style short mode.
54851  # If so, the updated path is stored in $new_path.
54852
54853  input_path="$new_path"
54854  # Check if we need to convert this using DOS-style short mode. If the path
54855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54856  # take no chances and rewrite it.
54857  # Note: m4 eats our [], so we need to use [ and ] instead.
54858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54859  if test "x$has_forbidden_chars" != x; then
54860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54861    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54862    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54863    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54864      # Going to short mode and back again did indeed matter. Since short mode is
54865      # case insensitive, let's make it lowercase to improve readability.
54866      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54867      # Now convert it back to Unix-style (cygpath)
54868      input_path=`$CYGPATH -u "$shortmode_path"`
54869      new_path="$input_path"
54870    fi
54871  fi
54872
54873  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54874  if test "x$test_cygdrive_prefix" = x; then
54875    # As a simple fix, exclude /usr/bin since it's not a real path.
54876    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54877      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54878      # a path prefixed by /cygdrive for fixpath to work.
54879      new_path="$CYGWIN_ROOT_PATH$input_path"
54880    fi
54881  fi
54882
54883
54884  if test "x$path" != "x$new_path"; then
54885    MSVC_DLL="$new_path"
54886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54887$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54888  fi
54889
54890    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54891
54892  path="$MSVC_DLL"
54893  has_colon=`$ECHO $path | $GREP ^.:`
54894  new_path="$path"
54895  if test "x$has_colon" = x; then
54896    # Not in mixed or Windows style, start by that.
54897    new_path=`cmd //c echo $path`
54898  fi
54899
54900
54901  input_path="$new_path"
54902  # Check if we need to convert this using DOS-style short mode. If the path
54903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54904  # take no chances and rewrite it.
54905  # Note: m4 eats our [], so we need to use [ and ] instead.
54906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54907  if test "x$has_forbidden_chars" != x; then
54908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54909    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54910  fi
54911
54912
54913  windows_path="$new_path"
54914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54915    unix_path=`$CYGPATH -u "$windows_path"`
54916    new_path="$unix_path"
54917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54919    new_path="$unix_path"
54920  fi
54921
54922  if test "x$path" != "x$new_path"; then
54923    MSVC_DLL="$new_path"
54924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54925$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54926  fi
54927
54928  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54929  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54930
54931    else
54932      # We're on a unix platform. Hooray! :)
54933      path="$MSVC_DLL"
54934      has_space=`$ECHO "$path" | $GREP " "`
54935      if test "x$has_space" != x; then
54936        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54937$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54938        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54939      fi
54940
54941      # Use eval to expand a potential ~
54942      eval path="$path"
54943      if test ! -f "$path" && test ! -d "$path"; then
54944        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54945      fi
54946
54947      if test -d "$path"; then
54948        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54949      else
54950        dir="`$DIRNAME "$path"`"
54951        base="`$BASENAME "$path"`"
54952        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54953      fi
54954    fi
54955  fi
54956
54957      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54958$as_echo_n "checking for $DLL_NAME... " >&6; }
54959      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54960$as_echo "$MSVC_DLL" >&6; }
54961    else
54962      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54963$as_echo "incorrect, ignoring" >&6; }
54964      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54965$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54966    fi
54967  fi
54968
54969  fi
54970
54971  if test "x$MSVC_DLL" = x; then
54972    # Probe: Look in the Windows system32 directory
54973    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54974
54975  windows_path="$CYGWIN_SYSTEMROOT"
54976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54977    unix_path=`$CYGPATH -u "$windows_path"`
54978    CYGWIN_SYSTEMROOT="$unix_path"
54979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54981    CYGWIN_SYSTEMROOT="$unix_path"
54982  fi
54983
54984    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54985
54986  DLL_NAME="$DLL_NAME"
54987  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54988  METHOD="well-known location in SYSTEMROOT"
54989  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54990    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54991$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54992
54993    # Need to check if the found msvcr is correct architecture
54994    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54995$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54996    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54997    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54998      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54999      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55000      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55001        CORRECT_MSVCR_ARCH="PE32 executable"
55002      else
55003        CORRECT_MSVCR_ARCH="PE32+ executable"
55004      fi
55005    else
55006      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55007        CORRECT_MSVCR_ARCH=386
55008      else
55009        CORRECT_MSVCR_ARCH=x86-64
55010      fi
55011    fi
55012    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55013      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55014$as_echo "ok" >&6; }
55015      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55016
55017  # Only process if variable expands to non-empty
55018
55019  if test "x$MSVC_DLL" != x; then
55020    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55021
55022  # Input might be given as Windows format, start by converting to
55023  # unix format.
55024  path="$MSVC_DLL"
55025  new_path=`$CYGPATH -u "$path"`
55026
55027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55030  # "foo.exe" is OK but "foo" is an error.
55031  #
55032  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55033  # It is also a way to make sure we got the proper file name for the real test later on.
55034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55035  if test "x$test_shortpath" = x; then
55036    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55037$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55038    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55039  fi
55040
55041  # Call helper function which possibly converts this using DOS-style short mode.
55042  # If so, the updated path is stored in $new_path.
55043
55044  input_path="$new_path"
55045  # Check if we need to convert this using DOS-style short mode. If the path
55046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55047  # take no chances and rewrite it.
55048  # Note: m4 eats our [], so we need to use [ and ] instead.
55049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55050  if test "x$has_forbidden_chars" != x; then
55051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55055      # Going to short mode and back again did indeed matter. Since short mode is
55056      # case insensitive, let's make it lowercase to improve readability.
55057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55058      # Now convert it back to Unix-style (cygpath)
55059      input_path=`$CYGPATH -u "$shortmode_path"`
55060      new_path="$input_path"
55061    fi
55062  fi
55063
55064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55065  if test "x$test_cygdrive_prefix" = x; then
55066    # As a simple fix, exclude /usr/bin since it's not a real path.
55067    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55069      # a path prefixed by /cygdrive for fixpath to work.
55070      new_path="$CYGWIN_ROOT_PATH$input_path"
55071    fi
55072  fi
55073
55074
55075  if test "x$path" != "x$new_path"; then
55076    MSVC_DLL="$new_path"
55077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55078$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55079  fi
55080
55081    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55082
55083  path="$MSVC_DLL"
55084  has_colon=`$ECHO $path | $GREP ^.:`
55085  new_path="$path"
55086  if test "x$has_colon" = x; then
55087    # Not in mixed or Windows style, start by that.
55088    new_path=`cmd //c echo $path`
55089  fi
55090
55091
55092  input_path="$new_path"
55093  # Check if we need to convert this using DOS-style short mode. If the path
55094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55095  # take no chances and rewrite it.
55096  # Note: m4 eats our [], so we need to use [ and ] instead.
55097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55098  if test "x$has_forbidden_chars" != x; then
55099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55100    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55101  fi
55102
55103
55104  windows_path="$new_path"
55105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55106    unix_path=`$CYGPATH -u "$windows_path"`
55107    new_path="$unix_path"
55108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55110    new_path="$unix_path"
55111  fi
55112
55113  if test "x$path" != "x$new_path"; then
55114    MSVC_DLL="$new_path"
55115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55116$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55117  fi
55118
55119  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55120  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55121
55122    else
55123      # We're on a unix platform. Hooray! :)
55124      path="$MSVC_DLL"
55125      has_space=`$ECHO "$path" | $GREP " "`
55126      if test "x$has_space" != x; then
55127        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55128$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55129        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55130      fi
55131
55132      # Use eval to expand a potential ~
55133      eval path="$path"
55134      if test ! -f "$path" && test ! -d "$path"; then
55135        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55136      fi
55137
55138      if test -d "$path"; then
55139        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55140      else
55141        dir="`$DIRNAME "$path"`"
55142        base="`$BASENAME "$path"`"
55143        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55144      fi
55145    fi
55146  fi
55147
55148      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55149$as_echo_n "checking for $DLL_NAME... " >&6; }
55150      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55151$as_echo "$MSVC_DLL" >&6; }
55152    else
55153      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55154$as_echo "incorrect, ignoring" >&6; }
55155      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55156$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55157    fi
55158  fi
55159
55160  fi
55161
55162  if test "x$MSVC_DLL" = x; then
55163    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55164    if test "x$VS100COMNTOOLS" != x; then
55165      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55166
55167  windows_path="$CYGWIN_VS_TOOLS_DIR"
55168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55169    unix_path=`$CYGPATH -u "$windows_path"`
55170    CYGWIN_VS_TOOLS_DIR="$unix_path"
55171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55173    CYGWIN_VS_TOOLS_DIR="$unix_path"
55174  fi
55175
55176      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55177        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55178	    | $GREP -i /x64/ | $HEAD --lines 1`
55179      else
55180        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55181	    | $GREP -i /x86/ | $HEAD --lines 1`
55182      fi
55183
55184  DLL_NAME="$DLL_NAME"
55185  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55186  METHOD="search of VS100COMNTOOLS"
55187  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55188    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55189$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55190
55191    # Need to check if the found msvcr is correct architecture
55192    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55193$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55194    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55195    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55196      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55197      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55198      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55199        CORRECT_MSVCR_ARCH="PE32 executable"
55200      else
55201        CORRECT_MSVCR_ARCH="PE32+ executable"
55202      fi
55203    else
55204      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55205        CORRECT_MSVCR_ARCH=386
55206      else
55207        CORRECT_MSVCR_ARCH=x86-64
55208      fi
55209    fi
55210    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55211      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55212$as_echo "ok" >&6; }
55213      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55214
55215  # Only process if variable expands to non-empty
55216
55217  if test "x$MSVC_DLL" != x; then
55218    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55219
55220  # Input might be given as Windows format, start by converting to
55221  # unix format.
55222  path="$MSVC_DLL"
55223  new_path=`$CYGPATH -u "$path"`
55224
55225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55228  # "foo.exe" is OK but "foo" is an error.
55229  #
55230  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55231  # It is also a way to make sure we got the proper file name for the real test later on.
55232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55233  if test "x$test_shortpath" = x; then
55234    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55235$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55236    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55237  fi
55238
55239  # Call helper function which possibly converts this using DOS-style short mode.
55240  # If so, the updated path is stored in $new_path.
55241
55242  input_path="$new_path"
55243  # Check if we need to convert this using DOS-style short mode. If the path
55244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55245  # take no chances and rewrite it.
55246  # Note: m4 eats our [], so we need to use [ and ] instead.
55247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55248  if test "x$has_forbidden_chars" != x; then
55249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55250    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55251    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55252    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55253      # Going to short mode and back again did indeed matter. Since short mode is
55254      # case insensitive, let's make it lowercase to improve readability.
55255      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55256      # Now convert it back to Unix-style (cygpath)
55257      input_path=`$CYGPATH -u "$shortmode_path"`
55258      new_path="$input_path"
55259    fi
55260  fi
55261
55262  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55263  if test "x$test_cygdrive_prefix" = x; then
55264    # As a simple fix, exclude /usr/bin since it's not a real path.
55265    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55266      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55267      # a path prefixed by /cygdrive for fixpath to work.
55268      new_path="$CYGWIN_ROOT_PATH$input_path"
55269    fi
55270  fi
55271
55272
55273  if test "x$path" != "x$new_path"; then
55274    MSVC_DLL="$new_path"
55275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55276$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55277  fi
55278
55279    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55280
55281  path="$MSVC_DLL"
55282  has_colon=`$ECHO $path | $GREP ^.:`
55283  new_path="$path"
55284  if test "x$has_colon" = x; then
55285    # Not in mixed or Windows style, start by that.
55286    new_path=`cmd //c echo $path`
55287  fi
55288
55289
55290  input_path="$new_path"
55291  # Check if we need to convert this using DOS-style short mode. If the path
55292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55293  # take no chances and rewrite it.
55294  # Note: m4 eats our [], so we need to use [ and ] instead.
55295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55296  if test "x$has_forbidden_chars" != x; then
55297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55298    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55299  fi
55300
55301
55302  windows_path="$new_path"
55303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55304    unix_path=`$CYGPATH -u "$windows_path"`
55305    new_path="$unix_path"
55306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55308    new_path="$unix_path"
55309  fi
55310
55311  if test "x$path" != "x$new_path"; then
55312    MSVC_DLL="$new_path"
55313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55314$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55315  fi
55316
55317  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55318  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55319
55320    else
55321      # We're on a unix platform. Hooray! :)
55322      path="$MSVC_DLL"
55323      has_space=`$ECHO "$path" | $GREP " "`
55324      if test "x$has_space" != x; then
55325        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55326$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55327        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55328      fi
55329
55330      # Use eval to expand a potential ~
55331      eval path="$path"
55332      if test ! -f "$path" && test ! -d "$path"; then
55333        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55334      fi
55335
55336      if test -d "$path"; then
55337        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55338      else
55339        dir="`$DIRNAME "$path"`"
55340        base="`$BASENAME "$path"`"
55341        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55342      fi
55343    fi
55344  fi
55345
55346      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55347$as_echo_n "checking for $DLL_NAME... " >&6; }
55348      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55349$as_echo "$MSVC_DLL" >&6; }
55350    else
55351      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55352$as_echo "incorrect, ignoring" >&6; }
55353      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55354$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55355    fi
55356  fi
55357
55358    fi
55359  fi
55360
55361  if test "x$MSVC_DLL" = x; then
55362    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55363    # (This was the original behaviour; kept since it might turn something up)
55364    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55365      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55366        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55367	    | $GREP x64 | $HEAD --lines 1`
55368      else
55369        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55370	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55371        if test "x$POSSIBLE_MSVC_DLL" = x; then
55372          # We're grasping at straws now...
55373          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55374	      | $HEAD --lines 1`
55375        fi
55376      fi
55377
55378
55379  DLL_NAME="$DLL_NAME"
55380  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55381  METHOD="search of VCINSTALLDIR"
55382  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55383    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55384$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55385
55386    # Need to check if the found msvcr is correct architecture
55387    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55388$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55389    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55390    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55391      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55392      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55393      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55394        CORRECT_MSVCR_ARCH="PE32 executable"
55395      else
55396        CORRECT_MSVCR_ARCH="PE32+ executable"
55397      fi
55398    else
55399      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55400        CORRECT_MSVCR_ARCH=386
55401      else
55402        CORRECT_MSVCR_ARCH=x86-64
55403      fi
55404    fi
55405    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55406      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55407$as_echo "ok" >&6; }
55408      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55409
55410  # Only process if variable expands to non-empty
55411
55412  if test "x$MSVC_DLL" != x; then
55413    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55414
55415  # Input might be given as Windows format, start by converting to
55416  # unix format.
55417  path="$MSVC_DLL"
55418  new_path=`$CYGPATH -u "$path"`
55419
55420  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55421  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55422  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55423  # "foo.exe" is OK but "foo" is an error.
55424  #
55425  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55426  # It is also a way to make sure we got the proper file name for the real test later on.
55427  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55428  if test "x$test_shortpath" = x; then
55429    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55430$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55431    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55432  fi
55433
55434  # Call helper function which possibly converts this using DOS-style short mode.
55435  # If so, the updated path is stored in $new_path.
55436
55437  input_path="$new_path"
55438  # Check if we need to convert this using DOS-style short mode. If the path
55439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55440  # take no chances and rewrite it.
55441  # Note: m4 eats our [], so we need to use [ and ] instead.
55442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55443  if test "x$has_forbidden_chars" != x; then
55444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55445    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55446    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55447    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55448      # Going to short mode and back again did indeed matter. Since short mode is
55449      # case insensitive, let's make it lowercase to improve readability.
55450      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55451      # Now convert it back to Unix-style (cygpath)
55452      input_path=`$CYGPATH -u "$shortmode_path"`
55453      new_path="$input_path"
55454    fi
55455  fi
55456
55457  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55458  if test "x$test_cygdrive_prefix" = x; then
55459    # As a simple fix, exclude /usr/bin since it's not a real path.
55460    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55461      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55462      # a path prefixed by /cygdrive for fixpath to work.
55463      new_path="$CYGWIN_ROOT_PATH$input_path"
55464    fi
55465  fi
55466
55467
55468  if test "x$path" != "x$new_path"; then
55469    MSVC_DLL="$new_path"
55470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55471$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55472  fi
55473
55474    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55475
55476  path="$MSVC_DLL"
55477  has_colon=`$ECHO $path | $GREP ^.:`
55478  new_path="$path"
55479  if test "x$has_colon" = x; then
55480    # Not in mixed or Windows style, start by that.
55481    new_path=`cmd //c echo $path`
55482  fi
55483
55484
55485  input_path="$new_path"
55486  # Check if we need to convert this using DOS-style short mode. If the path
55487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55488  # take no chances and rewrite it.
55489  # Note: m4 eats our [], so we need to use [ and ] instead.
55490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55491  if test "x$has_forbidden_chars" != x; then
55492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55493    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55494  fi
55495
55496
55497  windows_path="$new_path"
55498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55499    unix_path=`$CYGPATH -u "$windows_path"`
55500    new_path="$unix_path"
55501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55503    new_path="$unix_path"
55504  fi
55505
55506  if test "x$path" != "x$new_path"; then
55507    MSVC_DLL="$new_path"
55508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55509$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55510  fi
55511
55512  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55513  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55514
55515    else
55516      # We're on a unix platform. Hooray! :)
55517      path="$MSVC_DLL"
55518      has_space=`$ECHO "$path" | $GREP " "`
55519      if test "x$has_space" != x; then
55520        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55521$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55522        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55523      fi
55524
55525      # Use eval to expand a potential ~
55526      eval path="$path"
55527      if test ! -f "$path" && test ! -d "$path"; then
55528        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55529      fi
55530
55531      if test -d "$path"; then
55532        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55533      else
55534        dir="`$DIRNAME "$path"`"
55535        base="`$BASENAME "$path"`"
55536        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55537      fi
55538    fi
55539  fi
55540
55541      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55542$as_echo_n "checking for $DLL_NAME... " >&6; }
55543      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55544$as_echo "$MSVC_DLL" >&6; }
55545    else
55546      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55547$as_echo "incorrect, ignoring" >&6; }
55548      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55549$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55550    fi
55551  fi
55552
55553    fi
55554  fi
55555
55556  if test "x$MSVC_DLL" = x; then
55557    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55558$as_echo_n "checking for $DLL_NAME... " >&6; }
55559    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55560$as_echo "no" >&6; }
55561    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55562  fi
55563
55564      MSVCP_DLL="$MSVC_DLL"
55565    fi
55566
55567  fi
55568
55569  fi
55570
55571
55572  if test "x$NEEDS_LIB_X11" = xfalse; then
55573    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55574      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55575$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55576    fi
55577    X_CFLAGS=
55578    X_LIBS=
55579  else
55580
55581    if test "x${with_x}" = xno; then
55582      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55583    fi
55584
55585    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55586      # The user has specified a X11 base directory. Use it for includes and
55587      # libraries, unless explicitely overridden.
55588      if test "x$x_includes" = xNONE; then
55589        x_includes="${with_x}/include"
55590      fi
55591      if test "x$x_libraries" = xNONE; then
55592        x_libraries="${with_x}/lib"
55593      fi
55594    else
55595      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55596      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55597      # --x-libraries for the sysroot, if that seems to be correct.
55598      if test "x$SYSROOT" != "x"; then
55599        if test "x$x_includes" = xNONE; then
55600          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55601            x_includes="$SYSROOT/usr/X11R6/include"
55602          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55603            x_includes="$SYSROOT/usr/include"
55604          fi
55605        fi
55606        if test "x$x_libraries" = xNONE; then
55607          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55608            x_libraries="$SYSROOT/usr/X11R6/lib"
55609          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55610            x_libraries="$SYSROOT/usr/lib64"
55611          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55612            x_libraries="$SYSROOT/usr/lib"
55613          fi
55614        fi
55615      fi
55616    fi
55617
55618    # Now let autoconf do it's magic
55619    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55620$as_echo_n "checking for X... " >&6; }
55621
55622
55623# Check whether --with-x was given.
55624if test "${with_x+set}" = set; then :
55625  withval=$with_x;
55626fi
55627
55628# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55629if test "x$with_x" = xno; then
55630  # The user explicitly disabled X.
55631  have_x=disabled
55632else
55633  case $x_includes,$x_libraries in #(
55634    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55635    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55636  $as_echo_n "(cached) " >&6
55637else
55638  # One or both of the vars are not set, and there is no cached value.
55639ac_x_includes=no ac_x_libraries=no
55640rm -f -r conftest.dir
55641if mkdir conftest.dir; then
55642  cd conftest.dir
55643  cat >Imakefile <<'_ACEOF'
55644incroot:
55645	@echo incroot='${INCROOT}'
55646usrlibdir:
55647	@echo usrlibdir='${USRLIBDIR}'
55648libdir:
55649	@echo libdir='${LIBDIR}'
55650_ACEOF
55651  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55652    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55653    for ac_var in incroot usrlibdir libdir; do
55654      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55655    done
55656    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55657    for ac_extension in a so sl dylib la dll; do
55658      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55659	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55660	ac_im_usrlibdir=$ac_im_libdir; break
55661      fi
55662    done
55663    # Screen out bogus values from the imake configuration.  They are
55664    # bogus both because they are the default anyway, and because
55665    # using them would break gcc on systems where it needs fixed includes.
55666    case $ac_im_incroot in
55667	/usr/include) ac_x_includes= ;;
55668	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55669    esac
55670    case $ac_im_usrlibdir in
55671	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55672	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55673    esac
55674  fi
55675  cd ..
55676  rm -f -r conftest.dir
55677fi
55678
55679# Standard set of common directories for X headers.
55680# Check X11 before X11Rn because it is often a symlink to the current release.
55681ac_x_header_dirs='
55682/usr/X11/include
55683/usr/X11R7/include
55684/usr/X11R6/include
55685/usr/X11R5/include
55686/usr/X11R4/include
55687
55688/usr/include/X11
55689/usr/include/X11R7
55690/usr/include/X11R6
55691/usr/include/X11R5
55692/usr/include/X11R4
55693
55694/usr/local/X11/include
55695/usr/local/X11R7/include
55696/usr/local/X11R6/include
55697/usr/local/X11R5/include
55698/usr/local/X11R4/include
55699
55700/usr/local/include/X11
55701/usr/local/include/X11R7
55702/usr/local/include/X11R6
55703/usr/local/include/X11R5
55704/usr/local/include/X11R4
55705
55706/usr/X386/include
55707/usr/x386/include
55708/usr/XFree86/include/X11
55709
55710/usr/include
55711/usr/local/include
55712/usr/unsupported/include
55713/usr/athena/include
55714/usr/local/x11r5/include
55715/usr/lpp/Xamples/include
55716
55717/usr/openwin/include
55718/usr/openwin/share/include'
55719
55720if test "$ac_x_includes" = no; then
55721  # Guess where to find include files, by looking for Xlib.h.
55722  # First, try using that file with no special directory specified.
55723  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55724/* end confdefs.h.  */
55725#include <X11/Xlib.h>
55726_ACEOF
55727if ac_fn_cxx_try_cpp "$LINENO"; then :
55728  # We can compile using X headers with no special include directory.
55729ac_x_includes=
55730else
55731  for ac_dir in $ac_x_header_dirs; do
55732  if test -r "$ac_dir/X11/Xlib.h"; then
55733    ac_x_includes=$ac_dir
55734    break
55735  fi
55736done
55737fi
55738rm -f conftest.err conftest.i conftest.$ac_ext
55739fi # $ac_x_includes = no
55740
55741if test "$ac_x_libraries" = no; then
55742  # Check for the libraries.
55743  # See if we find them without any special options.
55744  # Don't add to $LIBS permanently.
55745  ac_save_LIBS=$LIBS
55746  LIBS="-lX11 $LIBS"
55747  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55748/* end confdefs.h.  */
55749#include <X11/Xlib.h>
55750int
55751main ()
55752{
55753XrmInitialize ()
55754  ;
55755  return 0;
55756}
55757_ACEOF
55758if ac_fn_cxx_try_link "$LINENO"; then :
55759  LIBS=$ac_save_LIBS
55760# We can link X programs with no special library path.
55761ac_x_libraries=
55762else
55763  LIBS=$ac_save_LIBS
55764for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
55765do
55766  # Don't even attempt the hair of trying to link an X program!
55767  for ac_extension in a so sl dylib la dll; do
55768    if test -r "$ac_dir/libX11.$ac_extension"; then
55769      ac_x_libraries=$ac_dir
55770      break 2
55771    fi
55772  done
55773done
55774fi
55775rm -f core conftest.err conftest.$ac_objext \
55776    conftest$ac_exeext conftest.$ac_ext
55777fi # $ac_x_libraries = no
55778
55779case $ac_x_includes,$ac_x_libraries in #(
55780  no,* | *,no | *\'*)
55781    # Didn't find X, or a directory has "'" in its name.
55782    ac_cv_have_x="have_x=no";; #(
55783  *)
55784    # Record where we found X for the cache.
55785    ac_cv_have_x="have_x=yes\
55786	ac_x_includes='$ac_x_includes'\
55787	ac_x_libraries='$ac_x_libraries'"
55788esac
55789fi
55790;; #(
55791    *) have_x=yes;;
55792  esac
55793  eval "$ac_cv_have_x"
55794fi # $with_x != no
55795
55796if test "$have_x" != yes; then
55797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
55798$as_echo "$have_x" >&6; }
55799  no_x=yes
55800else
55801  # If each of the values was on the command line, it overrides each guess.
55802  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
55803  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
55804  # Update the cache value to reflect the command line values.
55805  ac_cv_have_x="have_x=yes\
55806	ac_x_includes='$x_includes'\
55807	ac_x_libraries='$x_libraries'"
55808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
55809$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
55810fi
55811
55812    if test "$no_x" = yes; then
55813  # Not all programs may use this symbol, but it does not hurt to define it.
55814
55815$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
55816
55817  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
55818else
55819  if test -n "$x_includes"; then
55820    X_CFLAGS="$X_CFLAGS -I$x_includes"
55821  fi
55822
55823  # It would also be nice to do this for all -L options, not just this one.
55824  if test -n "$x_libraries"; then
55825    X_LIBS="$X_LIBS -L$x_libraries"
55826    # For Solaris; some versions of Sun CC require a space after -R and
55827    # others require no space.  Words are not sufficient . . . .
55828    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
55829$as_echo_n "checking whether -R must be followed by a space... " >&6; }
55830    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
55831    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
55832    ac_cxx_werror_flag=yes
55833    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55834/* end confdefs.h.  */
55835
55836int
55837main ()
55838{
55839
55840  ;
55841  return 0;
55842}
55843_ACEOF
55844if ac_fn_cxx_try_link "$LINENO"; then :
55845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55846$as_echo "no" >&6; }
55847       X_LIBS="$X_LIBS -R$x_libraries"
55848else
55849  LIBS="$ac_xsave_LIBS -R $x_libraries"
55850       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55851/* end confdefs.h.  */
55852
55853int
55854main ()
55855{
55856
55857  ;
55858  return 0;
55859}
55860_ACEOF
55861if ac_fn_cxx_try_link "$LINENO"; then :
55862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55863$as_echo "yes" >&6; }
55864	  X_LIBS="$X_LIBS -R $x_libraries"
55865else
55866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
55867$as_echo "neither works" >&6; }
55868fi
55869rm -f core conftest.err conftest.$ac_objext \
55870    conftest$ac_exeext conftest.$ac_ext
55871fi
55872rm -f core conftest.err conftest.$ac_objext \
55873    conftest$ac_exeext conftest.$ac_ext
55874    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
55875    LIBS=$ac_xsave_LIBS
55876  fi
55877
55878  # Check for system-dependent libraries X programs must link with.
55879  # Do this before checking for the system-independent R6 libraries
55880  # (-lICE), since we may need -lsocket or whatever for X linking.
55881
55882  if test "$ISC" = yes; then
55883    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
55884  else
55885    # Martyn Johnson says this is needed for Ultrix, if the X
55886    # libraries were built with DECnet support.  And Karl Berry says
55887    # the Alpha needs dnet_stub (dnet does not exist).
55888    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
55889    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55890/* end confdefs.h.  */
55891
55892/* Override any GCC internal prototype to avoid an error.
55893   Use char because int might match the return type of a GCC
55894   builtin and then its argument prototype would still apply.  */
55895#ifdef __cplusplus
55896extern "C"
55897#endif
55898char XOpenDisplay ();
55899int
55900main ()
55901{
55902return XOpenDisplay ();
55903  ;
55904  return 0;
55905}
55906_ACEOF
55907if ac_fn_cxx_try_link "$LINENO"; then :
55908
55909else
55910  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
55911$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
55912if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
55913  $as_echo_n "(cached) " >&6
55914else
55915  ac_check_lib_save_LIBS=$LIBS
55916LIBS="-ldnet  $LIBS"
55917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55918/* end confdefs.h.  */
55919
55920/* Override any GCC internal prototype to avoid an error.
55921   Use char because int might match the return type of a GCC
55922   builtin and then its argument prototype would still apply.  */
55923#ifdef __cplusplus
55924extern "C"
55925#endif
55926char dnet_ntoa ();
55927int
55928main ()
55929{
55930return dnet_ntoa ();
55931  ;
55932  return 0;
55933}
55934_ACEOF
55935if ac_fn_cxx_try_link "$LINENO"; then :
55936  ac_cv_lib_dnet_dnet_ntoa=yes
55937else
55938  ac_cv_lib_dnet_dnet_ntoa=no
55939fi
55940rm -f core conftest.err conftest.$ac_objext \
55941    conftest$ac_exeext conftest.$ac_ext
55942LIBS=$ac_check_lib_save_LIBS
55943fi
55944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
55945$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
55946if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
55947  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
55948fi
55949
55950    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
55951      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
55952$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
55953if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
55954  $as_echo_n "(cached) " >&6
55955else
55956  ac_check_lib_save_LIBS=$LIBS
55957LIBS="-ldnet_stub  $LIBS"
55958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55959/* end confdefs.h.  */
55960
55961/* Override any GCC internal prototype to avoid an error.
55962   Use char because int might match the return type of a GCC
55963   builtin and then its argument prototype would still apply.  */
55964#ifdef __cplusplus
55965extern "C"
55966#endif
55967char dnet_ntoa ();
55968int
55969main ()
55970{
55971return dnet_ntoa ();
55972  ;
55973  return 0;
55974}
55975_ACEOF
55976if ac_fn_cxx_try_link "$LINENO"; then :
55977  ac_cv_lib_dnet_stub_dnet_ntoa=yes
55978else
55979  ac_cv_lib_dnet_stub_dnet_ntoa=no
55980fi
55981rm -f core conftest.err conftest.$ac_objext \
55982    conftest$ac_exeext conftest.$ac_ext
55983LIBS=$ac_check_lib_save_LIBS
55984fi
55985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
55986$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
55987if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
55988  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
55989fi
55990
55991    fi
55992fi
55993rm -f core conftest.err conftest.$ac_objext \
55994    conftest$ac_exeext conftest.$ac_ext
55995    LIBS="$ac_xsave_LIBS"
55996
55997    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
55998    # to get the SysV transport functions.
55999    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56000    # needs -lnsl.
56001    # The nsl library prevents programs from opening the X display
56002    # on Irix 5.2, according to T.E. Dickey.
56003    # The functions gethostbyname, getservbyname, and inet_addr are
56004    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56005    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56006if test "x$ac_cv_func_gethostbyname" = xyes; then :
56007
56008fi
56009
56010    if test $ac_cv_func_gethostbyname = no; then
56011      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56012$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56013if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56014  $as_echo_n "(cached) " >&6
56015else
56016  ac_check_lib_save_LIBS=$LIBS
56017LIBS="-lnsl  $LIBS"
56018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56019/* end confdefs.h.  */
56020
56021/* Override any GCC internal prototype to avoid an error.
56022   Use char because int might match the return type of a GCC
56023   builtin and then its argument prototype would still apply.  */
56024#ifdef __cplusplus
56025extern "C"
56026#endif
56027char gethostbyname ();
56028int
56029main ()
56030{
56031return gethostbyname ();
56032  ;
56033  return 0;
56034}
56035_ACEOF
56036if ac_fn_cxx_try_link "$LINENO"; then :
56037  ac_cv_lib_nsl_gethostbyname=yes
56038else
56039  ac_cv_lib_nsl_gethostbyname=no
56040fi
56041rm -f core conftest.err conftest.$ac_objext \
56042    conftest$ac_exeext conftest.$ac_ext
56043LIBS=$ac_check_lib_save_LIBS
56044fi
56045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56046$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56047if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56048  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56049fi
56050
56051      if test $ac_cv_lib_nsl_gethostbyname = no; then
56052	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56053$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56054if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56055  $as_echo_n "(cached) " >&6
56056else
56057  ac_check_lib_save_LIBS=$LIBS
56058LIBS="-lbsd  $LIBS"
56059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56060/* end confdefs.h.  */
56061
56062/* Override any GCC internal prototype to avoid an error.
56063   Use char because int might match the return type of a GCC
56064   builtin and then its argument prototype would still apply.  */
56065#ifdef __cplusplus
56066extern "C"
56067#endif
56068char gethostbyname ();
56069int
56070main ()
56071{
56072return gethostbyname ();
56073  ;
56074  return 0;
56075}
56076_ACEOF
56077if ac_fn_cxx_try_link "$LINENO"; then :
56078  ac_cv_lib_bsd_gethostbyname=yes
56079else
56080  ac_cv_lib_bsd_gethostbyname=no
56081fi
56082rm -f core conftest.err conftest.$ac_objext \
56083    conftest$ac_exeext conftest.$ac_ext
56084LIBS=$ac_check_lib_save_LIBS
56085fi
56086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56087$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56088if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56089  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56090fi
56091
56092      fi
56093    fi
56094
56095    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56096    # socket/setsockopt and other routines are undefined under SCO ODT
56097    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56098    # on later versions), says Simon Leinen: it contains gethostby*
56099    # variants that don't use the name server (or something).  -lsocket
56100    # must be given before -lnsl if both are needed.  We assume that
56101    # if connect needs -lnsl, so does gethostbyname.
56102    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56103if test "x$ac_cv_func_connect" = xyes; then :
56104
56105fi
56106
56107    if test $ac_cv_func_connect = no; then
56108      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56109$as_echo_n "checking for connect in -lsocket... " >&6; }
56110if ${ac_cv_lib_socket_connect+:} false; then :
56111  $as_echo_n "(cached) " >&6
56112else
56113  ac_check_lib_save_LIBS=$LIBS
56114LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56116/* end confdefs.h.  */
56117
56118/* Override any GCC internal prototype to avoid an error.
56119   Use char because int might match the return type of a GCC
56120   builtin and then its argument prototype would still apply.  */
56121#ifdef __cplusplus
56122extern "C"
56123#endif
56124char connect ();
56125int
56126main ()
56127{
56128return connect ();
56129  ;
56130  return 0;
56131}
56132_ACEOF
56133if ac_fn_cxx_try_link "$LINENO"; then :
56134  ac_cv_lib_socket_connect=yes
56135else
56136  ac_cv_lib_socket_connect=no
56137fi
56138rm -f core conftest.err conftest.$ac_objext \
56139    conftest$ac_exeext conftest.$ac_ext
56140LIBS=$ac_check_lib_save_LIBS
56141fi
56142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56143$as_echo "$ac_cv_lib_socket_connect" >&6; }
56144if test "x$ac_cv_lib_socket_connect" = xyes; then :
56145  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56146fi
56147
56148    fi
56149
56150    # Guillermo Gomez says -lposix is necessary on A/UX.
56151    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56152if test "x$ac_cv_func_remove" = xyes; then :
56153
56154fi
56155
56156    if test $ac_cv_func_remove = no; then
56157      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56158$as_echo_n "checking for remove in -lposix... " >&6; }
56159if ${ac_cv_lib_posix_remove+:} false; then :
56160  $as_echo_n "(cached) " >&6
56161else
56162  ac_check_lib_save_LIBS=$LIBS
56163LIBS="-lposix  $LIBS"
56164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56165/* end confdefs.h.  */
56166
56167/* Override any GCC internal prototype to avoid an error.
56168   Use char because int might match the return type of a GCC
56169   builtin and then its argument prototype would still apply.  */
56170#ifdef __cplusplus
56171extern "C"
56172#endif
56173char remove ();
56174int
56175main ()
56176{
56177return remove ();
56178  ;
56179  return 0;
56180}
56181_ACEOF
56182if ac_fn_cxx_try_link "$LINENO"; then :
56183  ac_cv_lib_posix_remove=yes
56184else
56185  ac_cv_lib_posix_remove=no
56186fi
56187rm -f core conftest.err conftest.$ac_objext \
56188    conftest$ac_exeext conftest.$ac_ext
56189LIBS=$ac_check_lib_save_LIBS
56190fi
56191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56192$as_echo "$ac_cv_lib_posix_remove" >&6; }
56193if test "x$ac_cv_lib_posix_remove" = xyes; then :
56194  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56195fi
56196
56197    fi
56198
56199    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56200    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56201if test "x$ac_cv_func_shmat" = xyes; then :
56202
56203fi
56204
56205    if test $ac_cv_func_shmat = no; then
56206      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56207$as_echo_n "checking for shmat in -lipc... " >&6; }
56208if ${ac_cv_lib_ipc_shmat+:} false; then :
56209  $as_echo_n "(cached) " >&6
56210else
56211  ac_check_lib_save_LIBS=$LIBS
56212LIBS="-lipc  $LIBS"
56213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56214/* end confdefs.h.  */
56215
56216/* Override any GCC internal prototype to avoid an error.
56217   Use char because int might match the return type of a GCC
56218   builtin and then its argument prototype would still apply.  */
56219#ifdef __cplusplus
56220extern "C"
56221#endif
56222char shmat ();
56223int
56224main ()
56225{
56226return shmat ();
56227  ;
56228  return 0;
56229}
56230_ACEOF
56231if ac_fn_cxx_try_link "$LINENO"; then :
56232  ac_cv_lib_ipc_shmat=yes
56233else
56234  ac_cv_lib_ipc_shmat=no
56235fi
56236rm -f core conftest.err conftest.$ac_objext \
56237    conftest$ac_exeext conftest.$ac_ext
56238LIBS=$ac_check_lib_save_LIBS
56239fi
56240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56241$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56242if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56243  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56244fi
56245
56246    fi
56247  fi
56248
56249  # Check for libraries that X11R6 Xt/Xaw programs need.
56250  ac_save_LDFLAGS=$LDFLAGS
56251  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56252  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56253  # check for ICE first), but we must link in the order -lSM -lICE or
56254  # we get undefined symbols.  So assume we have SM if we have ICE.
56255  # These have to be linked with before -lX11, unlike the other
56256  # libraries we check for below, so use a different variable.
56257  # John Interrante, Karl Berry
56258  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56259$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56260if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56261  $as_echo_n "(cached) " >&6
56262else
56263  ac_check_lib_save_LIBS=$LIBS
56264LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56266/* end confdefs.h.  */
56267
56268/* Override any GCC internal prototype to avoid an error.
56269   Use char because int might match the return type of a GCC
56270   builtin and then its argument prototype would still apply.  */
56271#ifdef __cplusplus
56272extern "C"
56273#endif
56274char IceConnectionNumber ();
56275int
56276main ()
56277{
56278return IceConnectionNumber ();
56279  ;
56280  return 0;
56281}
56282_ACEOF
56283if ac_fn_cxx_try_link "$LINENO"; then :
56284  ac_cv_lib_ICE_IceConnectionNumber=yes
56285else
56286  ac_cv_lib_ICE_IceConnectionNumber=no
56287fi
56288rm -f core conftest.err conftest.$ac_objext \
56289    conftest$ac_exeext conftest.$ac_ext
56290LIBS=$ac_check_lib_save_LIBS
56291fi
56292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56293$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56294if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56295  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56296fi
56297
56298  LDFLAGS=$ac_save_LDFLAGS
56299
56300fi
56301
56302
56303    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56304    # this doesn't make sense so we remove it.
56305    if test "x$COMPILE_TYPE" = xcross; then
56306      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56307    fi
56308
56309    if test "x$no_x" = xyes; then
56310
56311  # Print a helpful message on how to acquire the necessary build dependency.
56312  # x11 is the help tag: freetype, cups, alsa etc
56313  MISSING_DEPENDENCY=x11
56314
56315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56316    cygwin_help $MISSING_DEPENDENCY
56317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56318    msys_help $MISSING_DEPENDENCY
56319  else
56320    PKGHANDLER_COMMAND=
56321
56322    case $PKGHANDLER in
56323      apt-get)
56324        apt_help     $MISSING_DEPENDENCY ;;
56325      yum)
56326        yum_help     $MISSING_DEPENDENCY ;;
56327      port)
56328        port_help    $MISSING_DEPENDENCY ;;
56329      pkgutil)
56330        pkgutil_help $MISSING_DEPENDENCY ;;
56331      pkgadd)
56332        pkgadd_help  $MISSING_DEPENDENCY ;;
56333    esac
56334
56335    if test "x$PKGHANDLER_COMMAND" != x; then
56336      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56337    fi
56338  fi
56339
56340      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56341    fi
56342
56343    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56344      OPENWIN_HOME="/usr/openwin"
56345      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56346      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56347          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56348          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56349          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56350    fi
56351
56352    ac_ext=c
56353ac_cpp='$CPP $CPPFLAGS'
56354ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56355ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56356ac_compiler_gnu=$ac_cv_c_compiler_gnu
56357
56358    OLD_CFLAGS="$CFLAGS"
56359    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56360
56361    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56362    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56363do :
56364  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56365ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56366          # include <X11/Xlib.h>
56367          # include <X11/Xutil.h>
56368
56369
56370"
56371if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56372  cat >>confdefs.h <<_ACEOF
56373#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56374_ACEOF
56375 X11_HEADERS_OK=yes
56376else
56377  X11_HEADERS_OK=no; break
56378fi
56379
56380done
56381
56382
56383    if test "x$X11_HEADERS_OK" = xno; then
56384
56385  # Print a helpful message on how to acquire the necessary build dependency.
56386  # x11 is the help tag: freetype, cups, alsa etc
56387  MISSING_DEPENDENCY=x11
56388
56389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56390    cygwin_help $MISSING_DEPENDENCY
56391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56392    msys_help $MISSING_DEPENDENCY
56393  else
56394    PKGHANDLER_COMMAND=
56395
56396    case $PKGHANDLER in
56397      apt-get)
56398        apt_help     $MISSING_DEPENDENCY ;;
56399      yum)
56400        yum_help     $MISSING_DEPENDENCY ;;
56401      port)
56402        port_help    $MISSING_DEPENDENCY ;;
56403      pkgutil)
56404        pkgutil_help $MISSING_DEPENDENCY ;;
56405      pkgadd)
56406        pkgadd_help  $MISSING_DEPENDENCY ;;
56407    esac
56408
56409    if test "x$PKGHANDLER_COMMAND" != x; then
56410      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56411    fi
56412  fi
56413
56414      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56415    fi
56416
56417    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56418    # defined in libawt_xawt.
56419    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56420$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56421    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56422/* end confdefs.h.  */
56423#include <X11/extensions/Xrender.h>
56424int
56425main ()
56426{
56427XLinearGradient x;
56428  ;
56429  return 0;
56430}
56431_ACEOF
56432if ac_fn_c_try_compile "$LINENO"; then :
56433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56434$as_echo "yes" >&6; }
56435else
56436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56437$as_echo "no" >&6; }
56438         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56439fi
56440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56441
56442    CFLAGS="$OLD_CFLAGS"
56443    ac_ext=cpp
56444ac_cpp='$CXXCPP $CPPFLAGS'
56445ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56446ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56447ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56448
56449  fi # NEEDS_LIB_X11
56450
56451
56452
56453
56454
56455
56456# Check whether --with-cups was given.
56457if test "${with_cups+set}" = set; then :
56458  withval=$with_cups;
56459fi
56460
56461
56462# Check whether --with-cups-include was given.
56463if test "${with_cups_include+set}" = set; then :
56464  withval=$with_cups_include;
56465fi
56466
56467
56468  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56469    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56470        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56471      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56472$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56473    fi
56474    CUPS_CFLAGS=
56475  else
56476    CUPS_FOUND=no
56477
56478    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56479      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56480    fi
56481
56482    if test "x${with_cups}" != x; then
56483      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56484$as_echo_n "checking for cups headers... " >&6; }
56485      if test -s "${with_cups}/include/cups/cups.h"; then
56486        CUPS_CFLAGS="-I${with_cups}/include"
56487        CUPS_FOUND=yes
56488        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56489$as_echo "$CUPS_FOUND" >&6; }
56490      else
56491        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56492      fi
56493    fi
56494    if test "x${with_cups_include}" != x; then
56495      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56496$as_echo_n "checking for cups headers... " >&6; }
56497      if test -s "${with_cups_include}/cups/cups.h"; then
56498        CUPS_CFLAGS="-I${with_cups_include}"
56499        CUPS_FOUND=yes
56500        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56501$as_echo "$CUPS_FOUND" >&6; }
56502      else
56503        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56504      fi
56505    fi
56506    if test "x$CUPS_FOUND" = xno; then
56507      # Are the cups headers installed in the default /usr/include location?
56508      for ac_header in cups/cups.h cups/ppd.h
56509do :
56510  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56511ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56512if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56513  cat >>confdefs.h <<_ACEOF
56514#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56515_ACEOF
56516
56517          CUPS_FOUND=yes
56518          CUPS_CFLAGS=
56519          DEFAULT_CUPS=yes
56520
56521fi
56522
56523done
56524
56525    fi
56526    if test "x$CUPS_FOUND" = xno; then
56527      # Getting nervous now? Lets poke around for standard Solaris third-party
56528      # package installation locations.
56529      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56530$as_echo_n "checking for cups headers... " >&6; }
56531      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
56532        # An SFW package seems to be installed!
56533        CUPS_FOUND=yes
56534        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
56535      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
56536        # A CSW package seems to be installed!
56537        CUPS_FOUND=yes
56538        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
56539      fi
56540      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56541$as_echo "$CUPS_FOUND" >&6; }
56542    fi
56543    if test "x$CUPS_FOUND" = xno; then
56544
56545  # Print a helpful message on how to acquire the necessary build dependency.
56546  # cups is the help tag: freetype, cups, alsa etc
56547  MISSING_DEPENDENCY=cups
56548
56549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56550    cygwin_help $MISSING_DEPENDENCY
56551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56552    msys_help $MISSING_DEPENDENCY
56553  else
56554    PKGHANDLER_COMMAND=
56555
56556    case $PKGHANDLER in
56557      apt-get)
56558        apt_help     $MISSING_DEPENDENCY ;;
56559      yum)
56560        yum_help     $MISSING_DEPENDENCY ;;
56561      port)
56562        port_help    $MISSING_DEPENDENCY ;;
56563      pkgutil)
56564        pkgutil_help $MISSING_DEPENDENCY ;;
56565      pkgadd)
56566        pkgadd_help  $MISSING_DEPENDENCY ;;
56567    esac
56568
56569    if test "x$PKGHANDLER_COMMAND" != x; then
56570      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56571    fi
56572  fi
56573
56574      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56575    fi
56576  fi
56577
56578
56579
56580
56581
56582# Check whether --with-freetype was given.
56583if test "${with_freetype+set}" = set; then :
56584  withval=$with_freetype;
56585fi
56586
56587
56588# Check whether --with-freetype-include was given.
56589if test "${with_freetype_include+set}" = set; then :
56590  withval=$with_freetype_include;
56591fi
56592
56593
56594# Check whether --with-freetype-lib was given.
56595if test "${with_freetype_lib+set}" = set; then :
56596  withval=$with_freetype_lib;
56597fi
56598
56599
56600# Check whether --with-freetype-src was given.
56601if test "${with_freetype_src+set}" = set; then :
56602  withval=$with_freetype_src;
56603fi
56604
56605  # Check whether --enable-freetype-bundling was given.
56606if test "${enable_freetype_bundling+set}" = set; then :
56607  enableval=$enable_freetype_bundling;
56608fi
56609
56610
56611  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56612  FREETYPE_BASE_NAME=freetype
56613  FREETYPE_CFLAGS=
56614  FREETYPE_LIBS=
56615  FREETYPE_BUNDLE_LIB_PATH=
56616
56617  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56618    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56619        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56620        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56621        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56622      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56623$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56624    fi
56625    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56626      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56627$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56628    fi
56629  else
56630    # freetype is needed to build; go get it!
56631
56632    BUNDLE_FREETYPE="$enable_freetype_bundling"
56633
56634    if  test "x$with_freetype_src" != x; then
56635      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56636        # Try to build freetype if --with-freetype-src was given on Windows
56637
56638  FREETYPE_SRC_PATH="$with_freetype_src"
56639  BUILD_FREETYPE=yes
56640
56641  # Check if the freetype sources are acessible..
56642  if ! test -d $FREETYPE_SRC_PATH; then
56643    { $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
56644$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56645    BUILD_FREETYPE=no
56646  fi
56647  # ..and contain a vc2010 project file
56648  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56649  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56650    { $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
56651$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56652    BUILD_FREETYPE=no
56653  fi
56654  # Now check if configure found a version of 'msbuild.exe'
56655  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56656    { $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
56657$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;}
56658    BUILD_FREETYPE=no
56659  fi
56660
56661  # Ready to go..
56662  if test "x$BUILD_FREETYPE" = xyes; then
56663    # msbuild requires trailing slashes for output directories
56664    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56665    freetype_lib_path_unix="$freetype_lib_path"
56666    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56667
56668  unix_path="$vcxproj_path"
56669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56670    windows_path=`$CYGPATH -m "$unix_path"`
56671    vcxproj_path="$windows_path"
56672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56673    windows_path=`cmd //c echo $unix_path`
56674    vcxproj_path="$windows_path"
56675  fi
56676
56677
56678  unix_path="$freetype_lib_path"
56679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56680    windows_path=`$CYGPATH -m "$unix_path"`
56681    freetype_lib_path="$windows_path"
56682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56683    windows_path=`cmd //c echo $unix_path`
56684    freetype_lib_path="$windows_path"
56685  fi
56686
56687
56688  unix_path="$freetype_obj_path"
56689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56690    windows_path=`$CYGPATH -m "$unix_path"`
56691    freetype_obj_path="$windows_path"
56692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56693    windows_path=`cmd //c echo $unix_path`
56694    freetype_obj_path="$windows_path"
56695  fi
56696
56697    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56698      freetype_platform=x64
56699    else
56700      freetype_platform=win32
56701    fi
56702
56703    # The original freetype project file is for VS 2010 (i.e. 'v100'),
56704    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56705    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56706    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56707    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56708$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
56709
56710    # First we try to build the freetype.dll
56711    $ECHO -e "@echo off\n"\
56712        "$MSBUILD $vcxproj_path "\
56713        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56714        "/p:Configuration=\"Release Multithreaded\" "\
56715        "/p:Platform=$freetype_platform "\
56716        "/p:ConfigurationType=DynamicLibrary "\
56717        "/p:TargetName=freetype "\
56718        "/p:OutDir=\"$freetype_lib_path\" "\
56719        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
56720    cmd /c freetype.bat
56721
56722    if test -s "$freetype_lib_path_unix/freetype.dll"; then
56723      # If that succeeds we also build freetype.lib
56724      $ECHO -e "@echo off\n"\
56725          "$MSBUILD $vcxproj_path "\
56726          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56727          "/p:Configuration=\"Release Multithreaded\" "\
56728          "/p:Platform=$freetype_platform "\
56729          "/p:ConfigurationType=StaticLibrary "\
56730          "/p:TargetName=freetype "\
56731          "/p:OutDir=\"$freetype_lib_path\" "\
56732          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
56733      cmd /c freetype.bat
56734
56735      if test -s "$freetype_lib_path_unix/freetype.lib"; then
56736        # Once we build both, lib and dll, set freetype lib and include path appropriately
56737        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
56738        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
56739        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
56740$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
56741      else
56742        BUILD_FREETYPE=no
56743      fi
56744    else
56745      BUILD_FREETYPE=no
56746    fi
56747  fi
56748
56749        if test "x$BUILD_FREETYPE" = xyes; then
56750          # Okay, we built it. Check that it works.
56751
56752  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56753  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56754  METHOD="--with-freetype-src"
56755
56756  # Let's start with an optimistic view of the world :-)
56757  FOUND_FREETYPE=yes
56758
56759  # First look for the canonical freetype main include file ft2build.h.
56760  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56761    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56762    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56763    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56764      # Fail.
56765      FOUND_FREETYPE=no
56766    fi
56767  fi
56768
56769  if test "x$FOUND_FREETYPE" = xyes; then
56770    # Include file found, let's continue the sanity check.
56771    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56772$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56773
56774    # Reset to default value
56775    FREETYPE_BASE_NAME=freetype
56776    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56777    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56778      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56779          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56780        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56781        # for the .6 version explicitly.
56782        FREETYPE_BASE_NAME=freetype.6
56783        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56784        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56785$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56786      else
56787        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56788$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56789        FOUND_FREETYPE=no
56790      fi
56791    else
56792      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56793        # On Windows, we will need both .lib and .dll file.
56794        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56795          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56796$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56797          FOUND_FREETYPE=no
56798        fi
56799      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56800          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56801        # Found lib in isa dir, use that instead.
56802        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56803        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56804$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56805      fi
56806    fi
56807  fi
56808
56809  if test "x$FOUND_FREETYPE" = xyes; then
56810
56811  # Only process if variable expands to non-empty
56812
56813  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56814    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56815
56816  # Input might be given as Windows format, start by converting to
56817  # unix format.
56818  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56819  new_path=`$CYGPATH -u "$path"`
56820
56821  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56822  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56823  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56824  # "foo.exe" is OK but "foo" is an error.
56825  #
56826  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56827  # It is also a way to make sure we got the proper file name for the real test later on.
56828  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56829  if test "x$test_shortpath" = x; then
56830    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56831$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56832    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56833  fi
56834
56835  # Call helper function which possibly converts this using DOS-style short mode.
56836  # If so, the updated path is stored in $new_path.
56837
56838  input_path="$new_path"
56839  # Check if we need to convert this using DOS-style short mode. If the path
56840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56841  # take no chances and rewrite it.
56842  # Note: m4 eats our [], so we need to use [ and ] instead.
56843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56844  if test "x$has_forbidden_chars" != x; then
56845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56846    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56847    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56848    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56849      # Going to short mode and back again did indeed matter. Since short mode is
56850      # case insensitive, let's make it lowercase to improve readability.
56851      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56852      # Now convert it back to Unix-style (cygpath)
56853      input_path=`$CYGPATH -u "$shortmode_path"`
56854      new_path="$input_path"
56855    fi
56856  fi
56857
56858  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56859  if test "x$test_cygdrive_prefix" = x; then
56860    # As a simple fix, exclude /usr/bin since it's not a real path.
56861    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56862      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56863      # a path prefixed by /cygdrive for fixpath to work.
56864      new_path="$CYGWIN_ROOT_PATH$input_path"
56865    fi
56866  fi
56867
56868
56869  if test "x$path" != "x$new_path"; then
56870    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56872$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56873  fi
56874
56875    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56876
56877  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56878  has_colon=`$ECHO $path | $GREP ^.:`
56879  new_path="$path"
56880  if test "x$has_colon" = x; then
56881    # Not in mixed or Windows style, start by that.
56882    new_path=`cmd //c echo $path`
56883  fi
56884
56885
56886  input_path="$new_path"
56887  # Check if we need to convert this using DOS-style short mode. If the path
56888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56889  # take no chances and rewrite it.
56890  # Note: m4 eats our [], so we need to use [ and ] instead.
56891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56892  if test "x$has_forbidden_chars" != x; then
56893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56894    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56895  fi
56896
56897
56898  windows_path="$new_path"
56899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56900    unix_path=`$CYGPATH -u "$windows_path"`
56901    new_path="$unix_path"
56902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56904    new_path="$unix_path"
56905  fi
56906
56907  if test "x$path" != "x$new_path"; then
56908    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56910$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56911  fi
56912
56913  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56914  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56915
56916    else
56917      # We're on a unix platform. Hooray! :)
56918      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56919      has_space=`$ECHO "$path" | $GREP " "`
56920      if test "x$has_space" != x; then
56921        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56922$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56923        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56924      fi
56925
56926      # Use eval to expand a potential ~
56927      eval path="$path"
56928      if test ! -f "$path" && test ! -d "$path"; then
56929        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56930      fi
56931
56932      if test -d "$path"; then
56933        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56934      else
56935        dir="`$DIRNAME "$path"`"
56936        base="`$BASENAME "$path"`"
56937        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56938      fi
56939    fi
56940  fi
56941
56942
56943  # Only process if variable expands to non-empty
56944
56945  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56946    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56947
56948  # Input might be given as Windows format, start by converting to
56949  # unix format.
56950  path="$POTENTIAL_FREETYPE_LIB_PATH"
56951  new_path=`$CYGPATH -u "$path"`
56952
56953  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56954  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56955  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56956  # "foo.exe" is OK but "foo" is an error.
56957  #
56958  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56959  # It is also a way to make sure we got the proper file name for the real test later on.
56960  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56961  if test "x$test_shortpath" = x; then
56962    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56963$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56964    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56965  fi
56966
56967  # Call helper function which possibly converts this using DOS-style short mode.
56968  # If so, the updated path is stored in $new_path.
56969
56970  input_path="$new_path"
56971  # Check if we need to convert this using DOS-style short mode. If the path
56972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56973  # take no chances and rewrite it.
56974  # Note: m4 eats our [], so we need to use [ and ] instead.
56975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56976  if test "x$has_forbidden_chars" != x; then
56977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56978    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56979    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56980    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56981      # Going to short mode and back again did indeed matter. Since short mode is
56982      # case insensitive, let's make it lowercase to improve readability.
56983      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56984      # Now convert it back to Unix-style (cygpath)
56985      input_path=`$CYGPATH -u "$shortmode_path"`
56986      new_path="$input_path"
56987    fi
56988  fi
56989
56990  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56991  if test "x$test_cygdrive_prefix" = x; then
56992    # As a simple fix, exclude /usr/bin since it's not a real path.
56993    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56994      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56995      # a path prefixed by /cygdrive for fixpath to work.
56996      new_path="$CYGWIN_ROOT_PATH$input_path"
56997    fi
56998  fi
56999
57000
57001  if test "x$path" != "x$new_path"; then
57002    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57003    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57004$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57005  fi
57006
57007    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57008
57009  path="$POTENTIAL_FREETYPE_LIB_PATH"
57010  has_colon=`$ECHO $path | $GREP ^.:`
57011  new_path="$path"
57012  if test "x$has_colon" = x; then
57013    # Not in mixed or Windows style, start by that.
57014    new_path=`cmd //c echo $path`
57015  fi
57016
57017
57018  input_path="$new_path"
57019  # Check if we need to convert this using DOS-style short mode. If the path
57020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57021  # take no chances and rewrite it.
57022  # Note: m4 eats our [], so we need to use [ and ] instead.
57023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57024  if test "x$has_forbidden_chars" != x; then
57025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57026    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57027  fi
57028
57029
57030  windows_path="$new_path"
57031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57032    unix_path=`$CYGPATH -u "$windows_path"`
57033    new_path="$unix_path"
57034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57036    new_path="$unix_path"
57037  fi
57038
57039  if test "x$path" != "x$new_path"; then
57040    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57041    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57042$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57043  fi
57044
57045  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57046  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57047
57048    else
57049      # We're on a unix platform. Hooray! :)
57050      path="$POTENTIAL_FREETYPE_LIB_PATH"
57051      has_space=`$ECHO "$path" | $GREP " "`
57052      if test "x$has_space" != x; then
57053        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57054$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57055        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57056      fi
57057
57058      # Use eval to expand a potential ~
57059      eval path="$path"
57060      if test ! -f "$path" && test ! -d "$path"; then
57061        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57062      fi
57063
57064      if test -d "$path"; then
57065        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57066      else
57067        dir="`$DIRNAME "$path"`"
57068        base="`$BASENAME "$path"`"
57069        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57070      fi
57071    fi
57072  fi
57073
57074
57075    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57076    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57077$as_echo_n "checking for freetype includes... " >&6; }
57078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57079$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57080    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57081    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57082$as_echo_n "checking for freetype libraries... " >&6; }
57083    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57084$as_echo "$FREETYPE_LIB_PATH" >&6; }
57085  fi
57086
57087          if test "x$FOUND_FREETYPE" != xyes; then
57088            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57089          fi
57090        else
57091          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57092$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57093          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57094        fi
57095      else
57096        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57097$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57098      fi
57099    fi
57100
57101    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57102      # User has specified settings
57103
57104      if test "x$BUNDLE_FREETYPE" = x; then
57105        # If not specified, default is to bundle freetype
57106        BUNDLE_FREETYPE=yes
57107      fi
57108
57109      if test "x$with_freetype" != x; then
57110        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57111        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57112      fi
57113
57114      # Allow --with-freetype-lib and --with-freetype-include to override
57115      if test "x$with_freetype_include" != x; then
57116        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57117      fi
57118      if test "x$with_freetype_lib" != x; then
57119        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57120      fi
57121
57122      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57123        # Okay, we got it. Check that it works.
57124
57125  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57126  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57127  METHOD="--with-freetype"
57128
57129  # Let's start with an optimistic view of the world :-)
57130  FOUND_FREETYPE=yes
57131
57132  # First look for the canonical freetype main include file ft2build.h.
57133  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57134    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57135    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57136    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57137      # Fail.
57138      FOUND_FREETYPE=no
57139    fi
57140  fi
57141
57142  if test "x$FOUND_FREETYPE" = xyes; then
57143    # Include file found, let's continue the sanity check.
57144    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57145$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57146
57147    # Reset to default value
57148    FREETYPE_BASE_NAME=freetype
57149    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57150    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57151      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57152          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57153        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57154        # for the .6 version explicitly.
57155        FREETYPE_BASE_NAME=freetype.6
57156        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57157        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57158$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57159      else
57160        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57161$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57162        FOUND_FREETYPE=no
57163      fi
57164    else
57165      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57166        # On Windows, we will need both .lib and .dll file.
57167        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57168          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57169$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57170          FOUND_FREETYPE=no
57171        fi
57172      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57173          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57174        # Found lib in isa dir, use that instead.
57175        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57176        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57177$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57178      fi
57179    fi
57180  fi
57181
57182  if test "x$FOUND_FREETYPE" = xyes; then
57183
57184  # Only process if variable expands to non-empty
57185
57186  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57187    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57188
57189  # Input might be given as Windows format, start by converting to
57190  # unix format.
57191  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57192  new_path=`$CYGPATH -u "$path"`
57193
57194  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57195  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57196  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57197  # "foo.exe" is OK but "foo" is an error.
57198  #
57199  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57200  # It is also a way to make sure we got the proper file name for the real test later on.
57201  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57202  if test "x$test_shortpath" = x; then
57203    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57204$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57205    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57206  fi
57207
57208  # Call helper function which possibly converts this using DOS-style short mode.
57209  # If so, the updated path is stored in $new_path.
57210
57211  input_path="$new_path"
57212  # Check if we need to convert this using DOS-style short mode. If the path
57213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57214  # take no chances and rewrite it.
57215  # Note: m4 eats our [], so we need to use [ and ] instead.
57216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57217  if test "x$has_forbidden_chars" != x; then
57218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57219    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57220    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57221    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57222      # Going to short mode and back again did indeed matter. Since short mode is
57223      # case insensitive, let's make it lowercase to improve readability.
57224      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57225      # Now convert it back to Unix-style (cygpath)
57226      input_path=`$CYGPATH -u "$shortmode_path"`
57227      new_path="$input_path"
57228    fi
57229  fi
57230
57231  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57232  if test "x$test_cygdrive_prefix" = x; then
57233    # As a simple fix, exclude /usr/bin since it's not a real path.
57234    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57235      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57236      # a path prefixed by /cygdrive for fixpath to work.
57237      new_path="$CYGWIN_ROOT_PATH$input_path"
57238    fi
57239  fi
57240
57241
57242  if test "x$path" != "x$new_path"; then
57243    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57245$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57246  fi
57247
57248    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57249
57250  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57251  has_colon=`$ECHO $path | $GREP ^.:`
57252  new_path="$path"
57253  if test "x$has_colon" = x; then
57254    # Not in mixed or Windows style, start by that.
57255    new_path=`cmd //c echo $path`
57256  fi
57257
57258
57259  input_path="$new_path"
57260  # Check if we need to convert this using DOS-style short mode. If the path
57261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57262  # take no chances and rewrite it.
57263  # Note: m4 eats our [], so we need to use [ and ] instead.
57264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57265  if test "x$has_forbidden_chars" != x; then
57266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57267    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57268  fi
57269
57270
57271  windows_path="$new_path"
57272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57273    unix_path=`$CYGPATH -u "$windows_path"`
57274    new_path="$unix_path"
57275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57277    new_path="$unix_path"
57278  fi
57279
57280  if test "x$path" != "x$new_path"; then
57281    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57283$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57284  fi
57285
57286  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57287  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57288
57289    else
57290      # We're on a unix platform. Hooray! :)
57291      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57292      has_space=`$ECHO "$path" | $GREP " "`
57293      if test "x$has_space" != x; then
57294        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57295$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57296        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57297      fi
57298
57299      # Use eval to expand a potential ~
57300      eval path="$path"
57301      if test ! -f "$path" && test ! -d "$path"; then
57302        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57303      fi
57304
57305      if test -d "$path"; then
57306        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57307      else
57308        dir="`$DIRNAME "$path"`"
57309        base="`$BASENAME "$path"`"
57310        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57311      fi
57312    fi
57313  fi
57314
57315
57316  # Only process if variable expands to non-empty
57317
57318  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57319    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57320
57321  # Input might be given as Windows format, start by converting to
57322  # unix format.
57323  path="$POTENTIAL_FREETYPE_LIB_PATH"
57324  new_path=`$CYGPATH -u "$path"`
57325
57326  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57327  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57328  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57329  # "foo.exe" is OK but "foo" is an error.
57330  #
57331  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57332  # It is also a way to make sure we got the proper file name for the real test later on.
57333  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57334  if test "x$test_shortpath" = x; then
57335    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57336$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57337    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57338  fi
57339
57340  # Call helper function which possibly converts this using DOS-style short mode.
57341  # If so, the updated path is stored in $new_path.
57342
57343  input_path="$new_path"
57344  # Check if we need to convert this using DOS-style short mode. If the path
57345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57346  # take no chances and rewrite it.
57347  # Note: m4 eats our [], so we need to use [ and ] instead.
57348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57349  if test "x$has_forbidden_chars" != x; then
57350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57354      # Going to short mode and back again did indeed matter. Since short mode is
57355      # case insensitive, let's make it lowercase to improve readability.
57356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57357      # Now convert it back to Unix-style (cygpath)
57358      input_path=`$CYGPATH -u "$shortmode_path"`
57359      new_path="$input_path"
57360    fi
57361  fi
57362
57363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57364  if test "x$test_cygdrive_prefix" = x; then
57365    # As a simple fix, exclude /usr/bin since it's not a real path.
57366    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57368      # a path prefixed by /cygdrive for fixpath to work.
57369      new_path="$CYGWIN_ROOT_PATH$input_path"
57370    fi
57371  fi
57372
57373
57374  if test "x$path" != "x$new_path"; then
57375    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57377$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57378  fi
57379
57380    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57381
57382  path="$POTENTIAL_FREETYPE_LIB_PATH"
57383  has_colon=`$ECHO $path | $GREP ^.:`
57384  new_path="$path"
57385  if test "x$has_colon" = x; then
57386    # Not in mixed or Windows style, start by that.
57387    new_path=`cmd //c echo $path`
57388  fi
57389
57390
57391  input_path="$new_path"
57392  # Check if we need to convert this using DOS-style short mode. If the path
57393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57394  # take no chances and rewrite it.
57395  # Note: m4 eats our [], so we need to use [ and ] instead.
57396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57397  if test "x$has_forbidden_chars" != x; then
57398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57400  fi
57401
57402
57403  windows_path="$new_path"
57404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57405    unix_path=`$CYGPATH -u "$windows_path"`
57406    new_path="$unix_path"
57407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57409    new_path="$unix_path"
57410  fi
57411
57412  if test "x$path" != "x$new_path"; then
57413    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57415$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57416  fi
57417
57418  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57419  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57420
57421    else
57422      # We're on a unix platform. Hooray! :)
57423      path="$POTENTIAL_FREETYPE_LIB_PATH"
57424      has_space=`$ECHO "$path" | $GREP " "`
57425      if test "x$has_space" != x; then
57426        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57427$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57428        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57429      fi
57430
57431      # Use eval to expand a potential ~
57432      eval path="$path"
57433      if test ! -f "$path" && test ! -d "$path"; then
57434        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57435      fi
57436
57437      if test -d "$path"; then
57438        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57439      else
57440        dir="`$DIRNAME "$path"`"
57441        base="`$BASENAME "$path"`"
57442        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57443      fi
57444    fi
57445  fi
57446
57447
57448    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57449    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57450$as_echo_n "checking for freetype includes... " >&6; }
57451    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57452$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57453    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57454    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57455$as_echo_n "checking for freetype libraries... " >&6; }
57456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57457$as_echo "$FREETYPE_LIB_PATH" >&6; }
57458  fi
57459
57460        if test "x$FOUND_FREETYPE" != xyes; then
57461          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57462        fi
57463      else
57464        # User specified only one of lib or include. This is an error.
57465        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57466          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57467$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57468          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57469        else
57470          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57471$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57472          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57473        fi
57474      fi
57475    else
57476      # User did not specify settings, but we need freetype. Try to locate it.
57477
57478      if test "x$BUNDLE_FREETYPE" = x; then
57479        # If not specified, default is to bundle freetype only on windows
57480        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57481          BUNDLE_FREETYPE=yes
57482        else
57483          BUNDLE_FREETYPE=no
57484        fi
57485      fi
57486
57487      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57488      if test "x$SYSROOT" = x; then
57489        if test "x$FOUND_FREETYPE" != xyes; then
57490          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57491          if test "x$PKG_CONFIG" != x; then
57492
57493pkg_failed=no
57494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57495$as_echo_n "checking for FREETYPE... " >&6; }
57496
57497if test -n "$FREETYPE_CFLAGS"; then
57498    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57499 elif test -n "$PKG_CONFIG"; then
57500    if test -n "$PKG_CONFIG" && \
57501    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57502  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57503  ac_status=$?
57504  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57505  test $ac_status = 0; }; then
57506  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57507else
57508  pkg_failed=yes
57509fi
57510 else
57511    pkg_failed=untried
57512fi
57513if test -n "$FREETYPE_LIBS"; then
57514    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57515 elif test -n "$PKG_CONFIG"; then
57516    if test -n "$PKG_CONFIG" && \
57517    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57518  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57519  ac_status=$?
57520  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57521  test $ac_status = 0; }; then
57522  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57523else
57524  pkg_failed=yes
57525fi
57526 else
57527    pkg_failed=untried
57528fi
57529
57530
57531
57532if test $pkg_failed = yes; then
57533
57534if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57535        _pkg_short_errors_supported=yes
57536else
57537        _pkg_short_errors_supported=no
57538fi
57539        if test $_pkg_short_errors_supported = yes; then
57540	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57541        else
57542	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57543        fi
57544	# Put the nasty error message in config.log where it belongs
57545	echo "$FREETYPE_PKG_ERRORS" >&5
57546
57547	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57548$as_echo "no" >&6; }
57549                FOUND_FREETYPE=no
57550elif test $pkg_failed = untried; then
57551	FOUND_FREETYPE=no
57552else
57553	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57554	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57555        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57556$as_echo "yes" >&6; }
57557	FOUND_FREETYPE=yes
57558fi
57559            if test "x$FOUND_FREETYPE" = xyes; then
57560              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57561              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57562              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57563              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57564                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57565              fi
57566              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57567              if test "x$BUNDLE_FREETYPE" = xyes; then
57568                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57569$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57570                FOUND_FREETYPE=no
57571              else
57572                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57573$as_echo_n "checking for freetype... " >&6; }
57574                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57575$as_echo "yes (using pkg-config)" >&6; }
57576              fi
57577            fi
57578          fi
57579        fi
57580      fi
57581
57582      if test "x$FOUND_FREETYPE" != xyes; then
57583        # Check in well-known locations
57584        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57585          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57586
57587  windows_path="$FREETYPE_BASE_DIR"
57588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57589    unix_path=`$CYGPATH -u "$windows_path"`
57590    FREETYPE_BASE_DIR="$unix_path"
57591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57593    FREETYPE_BASE_DIR="$unix_path"
57594  fi
57595
57596
57597  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57598  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57599  METHOD="well-known location"
57600
57601  # Let's start with an optimistic view of the world :-)
57602  FOUND_FREETYPE=yes
57603
57604  # First look for the canonical freetype main include file ft2build.h.
57605  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57606    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57607    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57608    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57609      # Fail.
57610      FOUND_FREETYPE=no
57611    fi
57612  fi
57613
57614  if test "x$FOUND_FREETYPE" = xyes; then
57615    # Include file found, let's continue the sanity check.
57616    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57617$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57618
57619    # Reset to default value
57620    FREETYPE_BASE_NAME=freetype
57621    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57622    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57623      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57624          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57625        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57626        # for the .6 version explicitly.
57627        FREETYPE_BASE_NAME=freetype.6
57628        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57629        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57630$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57631      else
57632        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57633$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57634        FOUND_FREETYPE=no
57635      fi
57636    else
57637      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57638        # On Windows, we will need both .lib and .dll file.
57639        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57640          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57641$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57642          FOUND_FREETYPE=no
57643        fi
57644      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57645          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57646        # Found lib in isa dir, use that instead.
57647        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57648        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57649$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57650      fi
57651    fi
57652  fi
57653
57654  if test "x$FOUND_FREETYPE" = xyes; then
57655
57656  # Only process if variable expands to non-empty
57657
57658  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57659    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57660
57661  # Input might be given as Windows format, start by converting to
57662  # unix format.
57663  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57664  new_path=`$CYGPATH -u "$path"`
57665
57666  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57667  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57668  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57669  # "foo.exe" is OK but "foo" is an error.
57670  #
57671  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57672  # It is also a way to make sure we got the proper file name for the real test later on.
57673  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57674  if test "x$test_shortpath" = x; then
57675    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57676$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57677    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57678  fi
57679
57680  # Call helper function which possibly converts this using DOS-style short mode.
57681  # If so, the updated path is stored in $new_path.
57682
57683  input_path="$new_path"
57684  # Check if we need to convert this using DOS-style short mode. If the path
57685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57686  # take no chances and rewrite it.
57687  # Note: m4 eats our [], so we need to use [ and ] instead.
57688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57689  if test "x$has_forbidden_chars" != x; then
57690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57691    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57692    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57693    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57694      # Going to short mode and back again did indeed matter. Since short mode is
57695      # case insensitive, let's make it lowercase to improve readability.
57696      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57697      # Now convert it back to Unix-style (cygpath)
57698      input_path=`$CYGPATH -u "$shortmode_path"`
57699      new_path="$input_path"
57700    fi
57701  fi
57702
57703  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57704  if test "x$test_cygdrive_prefix" = x; then
57705    # As a simple fix, exclude /usr/bin since it's not a real path.
57706    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57707      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57708      # a path prefixed by /cygdrive for fixpath to work.
57709      new_path="$CYGWIN_ROOT_PATH$input_path"
57710    fi
57711  fi
57712
57713
57714  if test "x$path" != "x$new_path"; then
57715    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57716    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57717$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57718  fi
57719
57720    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57721
57722  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57723  has_colon=`$ECHO $path | $GREP ^.:`
57724  new_path="$path"
57725  if test "x$has_colon" = x; then
57726    # Not in mixed or Windows style, start by that.
57727    new_path=`cmd //c echo $path`
57728  fi
57729
57730
57731  input_path="$new_path"
57732  # Check if we need to convert this using DOS-style short mode. If the path
57733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57734  # take no chances and rewrite it.
57735  # Note: m4 eats our [], so we need to use [ and ] instead.
57736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57737  if test "x$has_forbidden_chars" != x; then
57738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57739    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57740  fi
57741
57742
57743  windows_path="$new_path"
57744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57745    unix_path=`$CYGPATH -u "$windows_path"`
57746    new_path="$unix_path"
57747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57749    new_path="$unix_path"
57750  fi
57751
57752  if test "x$path" != "x$new_path"; then
57753    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57754    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57755$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57756  fi
57757
57758  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57759  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57760
57761    else
57762      # We're on a unix platform. Hooray! :)
57763      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57764      has_space=`$ECHO "$path" | $GREP " "`
57765      if test "x$has_space" != x; then
57766        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57767$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57768        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57769      fi
57770
57771      # Use eval to expand a potential ~
57772      eval path="$path"
57773      if test ! -f "$path" && test ! -d "$path"; then
57774        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57775      fi
57776
57777      if test -d "$path"; then
57778        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57779      else
57780        dir="`$DIRNAME "$path"`"
57781        base="`$BASENAME "$path"`"
57782        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57783      fi
57784    fi
57785  fi
57786
57787
57788  # Only process if variable expands to non-empty
57789
57790  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57791    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57792
57793  # Input might be given as Windows format, start by converting to
57794  # unix format.
57795  path="$POTENTIAL_FREETYPE_LIB_PATH"
57796  new_path=`$CYGPATH -u "$path"`
57797
57798  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57799  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57800  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57801  # "foo.exe" is OK but "foo" is an error.
57802  #
57803  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57804  # It is also a way to make sure we got the proper file name for the real test later on.
57805  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57806  if test "x$test_shortpath" = x; then
57807    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57808$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57809    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57810  fi
57811
57812  # Call helper function which possibly converts this using DOS-style short mode.
57813  # If so, the updated path is stored in $new_path.
57814
57815  input_path="$new_path"
57816  # Check if we need to convert this using DOS-style short mode. If the path
57817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57818  # take no chances and rewrite it.
57819  # Note: m4 eats our [], so we need to use [ and ] instead.
57820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57821  if test "x$has_forbidden_chars" != x; then
57822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57826      # Going to short mode and back again did indeed matter. Since short mode is
57827      # case insensitive, let's make it lowercase to improve readability.
57828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57829      # Now convert it back to Unix-style (cygpath)
57830      input_path=`$CYGPATH -u "$shortmode_path"`
57831      new_path="$input_path"
57832    fi
57833  fi
57834
57835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57836  if test "x$test_cygdrive_prefix" = x; then
57837    # As a simple fix, exclude /usr/bin since it's not a real path.
57838    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57840      # a path prefixed by /cygdrive for fixpath to work.
57841      new_path="$CYGWIN_ROOT_PATH$input_path"
57842    fi
57843  fi
57844
57845
57846  if test "x$path" != "x$new_path"; then
57847    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57849$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57850  fi
57851
57852    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57853
57854  path="$POTENTIAL_FREETYPE_LIB_PATH"
57855  has_colon=`$ECHO $path | $GREP ^.:`
57856  new_path="$path"
57857  if test "x$has_colon" = x; then
57858    # Not in mixed or Windows style, start by that.
57859    new_path=`cmd //c echo $path`
57860  fi
57861
57862
57863  input_path="$new_path"
57864  # Check if we need to convert this using DOS-style short mode. If the path
57865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57866  # take no chances and rewrite it.
57867  # Note: m4 eats our [], so we need to use [ and ] instead.
57868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57869  if test "x$has_forbidden_chars" != x; then
57870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57872  fi
57873
57874
57875  windows_path="$new_path"
57876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57877    unix_path=`$CYGPATH -u "$windows_path"`
57878    new_path="$unix_path"
57879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57881    new_path="$unix_path"
57882  fi
57883
57884  if test "x$path" != "x$new_path"; then
57885    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57887$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57888  fi
57889
57890  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57891  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57892
57893    else
57894      # We're on a unix platform. Hooray! :)
57895      path="$POTENTIAL_FREETYPE_LIB_PATH"
57896      has_space=`$ECHO "$path" | $GREP " "`
57897      if test "x$has_space" != x; then
57898        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57899$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57900        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57901      fi
57902
57903      # Use eval to expand a potential ~
57904      eval path="$path"
57905      if test ! -f "$path" && test ! -d "$path"; then
57906        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57907      fi
57908
57909      if test -d "$path"; then
57910        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57911      else
57912        dir="`$DIRNAME "$path"`"
57913        base="`$BASENAME "$path"`"
57914        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57915      fi
57916    fi
57917  fi
57918
57919
57920    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57921    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57922$as_echo_n "checking for freetype includes... " >&6; }
57923    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57924$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57925    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57926    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57927$as_echo_n "checking for freetype libraries... " >&6; }
57928    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57929$as_echo "$FREETYPE_LIB_PATH" >&6; }
57930  fi
57931
57932          if test "x$FOUND_FREETYPE" != xyes; then
57933            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
57934
57935  windows_path="$FREETYPE_BASE_DIR"
57936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57937    unix_path=`$CYGPATH -u "$windows_path"`
57938    FREETYPE_BASE_DIR="$unix_path"
57939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57941    FREETYPE_BASE_DIR="$unix_path"
57942  fi
57943
57944
57945  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57946  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57947  METHOD="well-known location"
57948
57949  # Let's start with an optimistic view of the world :-)
57950  FOUND_FREETYPE=yes
57951
57952  # First look for the canonical freetype main include file ft2build.h.
57953  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57954    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57955    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57956    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57957      # Fail.
57958      FOUND_FREETYPE=no
57959    fi
57960  fi
57961
57962  if test "x$FOUND_FREETYPE" = xyes; then
57963    # Include file found, let's continue the sanity check.
57964    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57965$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57966
57967    # Reset to default value
57968    FREETYPE_BASE_NAME=freetype
57969    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57970    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57971      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57972          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57973        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57974        # for the .6 version explicitly.
57975        FREETYPE_BASE_NAME=freetype.6
57976        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57977        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57978$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57979      else
57980        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57981$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57982        FOUND_FREETYPE=no
57983      fi
57984    else
57985      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57986        # On Windows, we will need both .lib and .dll file.
57987        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57988          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57989$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57990          FOUND_FREETYPE=no
57991        fi
57992      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57993          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57994        # Found lib in isa dir, use that instead.
57995        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57996        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57997$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57998      fi
57999    fi
58000  fi
58001
58002  if test "x$FOUND_FREETYPE" = xyes; then
58003
58004  # Only process if variable expands to non-empty
58005
58006  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58007    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58008
58009  # Input might be given as Windows format, start by converting to
58010  # unix format.
58011  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58012  new_path=`$CYGPATH -u "$path"`
58013
58014  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58015  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58016  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58017  # "foo.exe" is OK but "foo" is an error.
58018  #
58019  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58020  # It is also a way to make sure we got the proper file name for the real test later on.
58021  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58022  if test "x$test_shortpath" = x; then
58023    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58024$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58025    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58026  fi
58027
58028  # Call helper function which possibly converts this using DOS-style short mode.
58029  # If so, the updated path is stored in $new_path.
58030
58031  input_path="$new_path"
58032  # Check if we need to convert this using DOS-style short mode. If the path
58033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58034  # take no chances and rewrite it.
58035  # Note: m4 eats our [], so we need to use [ and ] instead.
58036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58037  if test "x$has_forbidden_chars" != x; then
58038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58039    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58040    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58041    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58042      # Going to short mode and back again did indeed matter. Since short mode is
58043      # case insensitive, let's make it lowercase to improve readability.
58044      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58045      # Now convert it back to Unix-style (cygpath)
58046      input_path=`$CYGPATH -u "$shortmode_path"`
58047      new_path="$input_path"
58048    fi
58049  fi
58050
58051  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58052  if test "x$test_cygdrive_prefix" = x; then
58053    # As a simple fix, exclude /usr/bin since it's not a real path.
58054    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58055      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58056      # a path prefixed by /cygdrive for fixpath to work.
58057      new_path="$CYGWIN_ROOT_PATH$input_path"
58058    fi
58059  fi
58060
58061
58062  if test "x$path" != "x$new_path"; then
58063    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58064    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58065$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58066  fi
58067
58068    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58069
58070  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58071  has_colon=`$ECHO $path | $GREP ^.:`
58072  new_path="$path"
58073  if test "x$has_colon" = x; then
58074    # Not in mixed or Windows style, start by that.
58075    new_path=`cmd //c echo $path`
58076  fi
58077
58078
58079  input_path="$new_path"
58080  # Check if we need to convert this using DOS-style short mode. If the path
58081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58082  # take no chances and rewrite it.
58083  # Note: m4 eats our [], so we need to use [ and ] instead.
58084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58085  if test "x$has_forbidden_chars" != x; then
58086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58087    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58088  fi
58089
58090
58091  windows_path="$new_path"
58092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58093    unix_path=`$CYGPATH -u "$windows_path"`
58094    new_path="$unix_path"
58095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58097    new_path="$unix_path"
58098  fi
58099
58100  if test "x$path" != "x$new_path"; then
58101    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58103$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58104  fi
58105
58106  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58107  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58108
58109    else
58110      # We're on a unix platform. Hooray! :)
58111      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58112      has_space=`$ECHO "$path" | $GREP " "`
58113      if test "x$has_space" != x; then
58114        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58115$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58116        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58117      fi
58118
58119      # Use eval to expand a potential ~
58120      eval path="$path"
58121      if test ! -f "$path" && test ! -d "$path"; then
58122        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58123      fi
58124
58125      if test -d "$path"; then
58126        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58127      else
58128        dir="`$DIRNAME "$path"`"
58129        base="`$BASENAME "$path"`"
58130        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58131      fi
58132    fi
58133  fi
58134
58135
58136  # Only process if variable expands to non-empty
58137
58138  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58139    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58140
58141  # Input might be given as Windows format, start by converting to
58142  # unix format.
58143  path="$POTENTIAL_FREETYPE_LIB_PATH"
58144  new_path=`$CYGPATH -u "$path"`
58145
58146  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58147  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58148  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58149  # "foo.exe" is OK but "foo" is an error.
58150  #
58151  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58152  # It is also a way to make sure we got the proper file name for the real test later on.
58153  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58154  if test "x$test_shortpath" = x; then
58155    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58156$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58157    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58158  fi
58159
58160  # Call helper function which possibly converts this using DOS-style short mode.
58161  # If so, the updated path is stored in $new_path.
58162
58163  input_path="$new_path"
58164  # Check if we need to convert this using DOS-style short mode. If the path
58165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58166  # take no chances and rewrite it.
58167  # Note: m4 eats our [], so we need to use [ and ] instead.
58168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58169  if test "x$has_forbidden_chars" != x; then
58170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58171    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58172    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58173    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58174      # Going to short mode and back again did indeed matter. Since short mode is
58175      # case insensitive, let's make it lowercase to improve readability.
58176      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58177      # Now convert it back to Unix-style (cygpath)
58178      input_path=`$CYGPATH -u "$shortmode_path"`
58179      new_path="$input_path"
58180    fi
58181  fi
58182
58183  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58184  if test "x$test_cygdrive_prefix" = x; then
58185    # As a simple fix, exclude /usr/bin since it's not a real path.
58186    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58187      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58188      # a path prefixed by /cygdrive for fixpath to work.
58189      new_path="$CYGWIN_ROOT_PATH$input_path"
58190    fi
58191  fi
58192
58193
58194  if test "x$path" != "x$new_path"; then
58195    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58196    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58197$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58198  fi
58199
58200    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58201
58202  path="$POTENTIAL_FREETYPE_LIB_PATH"
58203  has_colon=`$ECHO $path | $GREP ^.:`
58204  new_path="$path"
58205  if test "x$has_colon" = x; then
58206    # Not in mixed or Windows style, start by that.
58207    new_path=`cmd //c echo $path`
58208  fi
58209
58210
58211  input_path="$new_path"
58212  # Check if we need to convert this using DOS-style short mode. If the path
58213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58214  # take no chances and rewrite it.
58215  # Note: m4 eats our [], so we need to use [ and ] instead.
58216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58217  if test "x$has_forbidden_chars" != x; then
58218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58219    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58220  fi
58221
58222
58223  windows_path="$new_path"
58224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58225    unix_path=`$CYGPATH -u "$windows_path"`
58226    new_path="$unix_path"
58227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58229    new_path="$unix_path"
58230  fi
58231
58232  if test "x$path" != "x$new_path"; then
58233    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58235$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58236  fi
58237
58238  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58239  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58240
58241    else
58242      # We're on a unix platform. Hooray! :)
58243      path="$POTENTIAL_FREETYPE_LIB_PATH"
58244      has_space=`$ECHO "$path" | $GREP " "`
58245      if test "x$has_space" != x; then
58246        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58247$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58248        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58249      fi
58250
58251      # Use eval to expand a potential ~
58252      eval path="$path"
58253      if test ! -f "$path" && test ! -d "$path"; then
58254        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58255      fi
58256
58257      if test -d "$path"; then
58258        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58259      else
58260        dir="`$DIRNAME "$path"`"
58261        base="`$BASENAME "$path"`"
58262        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58263      fi
58264    fi
58265  fi
58266
58267
58268    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58269    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58270$as_echo_n "checking for freetype includes... " >&6; }
58271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58272$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58273    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58274    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58275$as_echo_n "checking for freetype libraries... " >&6; }
58276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58277$as_echo "$FREETYPE_LIB_PATH" >&6; }
58278  fi
58279
58280          fi
58281          if test "x$FOUND_FREETYPE" != xyes; then
58282            FREETYPE_BASE_DIR="$HOME/freetype"
58283
58284  windows_path="$FREETYPE_BASE_DIR"
58285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58286    unix_path=`$CYGPATH -u "$windows_path"`
58287    FREETYPE_BASE_DIR="$unix_path"
58288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58290    FREETYPE_BASE_DIR="$unix_path"
58291  fi
58292
58293            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58294
58295  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58296  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58297  METHOD="well-known location"
58298
58299  # Let's start with an optimistic view of the world :-)
58300  FOUND_FREETYPE=yes
58301
58302  # First look for the canonical freetype main include file ft2build.h.
58303  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58304    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58305    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58306    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58307      # Fail.
58308      FOUND_FREETYPE=no
58309    fi
58310  fi
58311
58312  if test "x$FOUND_FREETYPE" = xyes; then
58313    # Include file found, let's continue the sanity check.
58314    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58315$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58316
58317    # Reset to default value
58318    FREETYPE_BASE_NAME=freetype
58319    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58320    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58321      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58322          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58323        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58324        # for the .6 version explicitly.
58325        FREETYPE_BASE_NAME=freetype.6
58326        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58327        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58328$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58329      else
58330        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58331$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58332        FOUND_FREETYPE=no
58333      fi
58334    else
58335      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58336        # On Windows, we will need both .lib and .dll file.
58337        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58338          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58339$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58340          FOUND_FREETYPE=no
58341        fi
58342      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58343          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58344        # Found lib in isa dir, use that instead.
58345        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58346        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58347$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58348      fi
58349    fi
58350  fi
58351
58352  if test "x$FOUND_FREETYPE" = xyes; then
58353
58354  # Only process if variable expands to non-empty
58355
58356  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58357    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58358
58359  # Input might be given as Windows format, start by converting to
58360  # unix format.
58361  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58362  new_path=`$CYGPATH -u "$path"`
58363
58364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58367  # "foo.exe" is OK but "foo" is an error.
58368  #
58369  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58370  # It is also a way to make sure we got the proper file name for the real test later on.
58371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58372  if test "x$test_shortpath" = x; then
58373    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58374$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58375    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58376  fi
58377
58378  # Call helper function which possibly converts this using DOS-style short mode.
58379  # If so, the updated path is stored in $new_path.
58380
58381  input_path="$new_path"
58382  # Check if we need to convert this using DOS-style short mode. If the path
58383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58384  # take no chances and rewrite it.
58385  # Note: m4 eats our [], so we need to use [ and ] instead.
58386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58387  if test "x$has_forbidden_chars" != x; then
58388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58392      # Going to short mode and back again did indeed matter. Since short mode is
58393      # case insensitive, let's make it lowercase to improve readability.
58394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58395      # Now convert it back to Unix-style (cygpath)
58396      input_path=`$CYGPATH -u "$shortmode_path"`
58397      new_path="$input_path"
58398    fi
58399  fi
58400
58401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58402  if test "x$test_cygdrive_prefix" = x; then
58403    # As a simple fix, exclude /usr/bin since it's not a real path.
58404    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58406      # a path prefixed by /cygdrive for fixpath to work.
58407      new_path="$CYGWIN_ROOT_PATH$input_path"
58408    fi
58409  fi
58410
58411
58412  if test "x$path" != "x$new_path"; then
58413    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58415$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58416  fi
58417
58418    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58419
58420  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58421  has_colon=`$ECHO $path | $GREP ^.:`
58422  new_path="$path"
58423  if test "x$has_colon" = x; then
58424    # Not in mixed or Windows style, start by that.
58425    new_path=`cmd //c echo $path`
58426  fi
58427
58428
58429  input_path="$new_path"
58430  # Check if we need to convert this using DOS-style short mode. If the path
58431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58432  # take no chances and rewrite it.
58433  # Note: m4 eats our [], so we need to use [ and ] instead.
58434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58435  if test "x$has_forbidden_chars" != x; then
58436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58438  fi
58439
58440
58441  windows_path="$new_path"
58442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58443    unix_path=`$CYGPATH -u "$windows_path"`
58444    new_path="$unix_path"
58445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58447    new_path="$unix_path"
58448  fi
58449
58450  if test "x$path" != "x$new_path"; then
58451    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58453$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58454  fi
58455
58456  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58457  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58458
58459    else
58460      # We're on a unix platform. Hooray! :)
58461      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58462      has_space=`$ECHO "$path" | $GREP " "`
58463      if test "x$has_space" != x; then
58464        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58465$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58466        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58467      fi
58468
58469      # Use eval to expand a potential ~
58470      eval path="$path"
58471      if test ! -f "$path" && test ! -d "$path"; then
58472        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58473      fi
58474
58475      if test -d "$path"; then
58476        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58477      else
58478        dir="`$DIRNAME "$path"`"
58479        base="`$BASENAME "$path"`"
58480        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58481      fi
58482    fi
58483  fi
58484
58485
58486  # Only process if variable expands to non-empty
58487
58488  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58489    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58490
58491  # Input might be given as Windows format, start by converting to
58492  # unix format.
58493  path="$POTENTIAL_FREETYPE_LIB_PATH"
58494  new_path=`$CYGPATH -u "$path"`
58495
58496  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58497  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58498  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58499  # "foo.exe" is OK but "foo" is an error.
58500  #
58501  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58502  # It is also a way to make sure we got the proper file name for the real test later on.
58503  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58504  if test "x$test_shortpath" = x; then
58505    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58506$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58507    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58508  fi
58509
58510  # Call helper function which possibly converts this using DOS-style short mode.
58511  # If so, the updated path is stored in $new_path.
58512
58513  input_path="$new_path"
58514  # Check if we need to convert this using DOS-style short mode. If the path
58515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58516  # take no chances and rewrite it.
58517  # Note: m4 eats our [], so we need to use [ and ] instead.
58518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58519  if test "x$has_forbidden_chars" != x; then
58520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58524      # Going to short mode and back again did indeed matter. Since short mode is
58525      # case insensitive, let's make it lowercase to improve readability.
58526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58527      # Now convert it back to Unix-style (cygpath)
58528      input_path=`$CYGPATH -u "$shortmode_path"`
58529      new_path="$input_path"
58530    fi
58531  fi
58532
58533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58534  if test "x$test_cygdrive_prefix" = x; then
58535    # As a simple fix, exclude /usr/bin since it's not a real path.
58536    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58538      # a path prefixed by /cygdrive for fixpath to work.
58539      new_path="$CYGWIN_ROOT_PATH$input_path"
58540    fi
58541  fi
58542
58543
58544  if test "x$path" != "x$new_path"; then
58545    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58547$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58548  fi
58549
58550    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58551
58552  path="$POTENTIAL_FREETYPE_LIB_PATH"
58553  has_colon=`$ECHO $path | $GREP ^.:`
58554  new_path="$path"
58555  if test "x$has_colon" = x; then
58556    # Not in mixed or Windows style, start by that.
58557    new_path=`cmd //c echo $path`
58558  fi
58559
58560
58561  input_path="$new_path"
58562  # Check if we need to convert this using DOS-style short mode. If the path
58563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58564  # take no chances and rewrite it.
58565  # Note: m4 eats our [], so we need to use [ and ] instead.
58566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58567  if test "x$has_forbidden_chars" != x; then
58568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58569    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58570  fi
58571
58572
58573  windows_path="$new_path"
58574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58575    unix_path=`$CYGPATH -u "$windows_path"`
58576    new_path="$unix_path"
58577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58579    new_path="$unix_path"
58580  fi
58581
58582  if test "x$path" != "x$new_path"; then
58583    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58585$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58586  fi
58587
58588  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58589  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58590
58591    else
58592      # We're on a unix platform. Hooray! :)
58593      path="$POTENTIAL_FREETYPE_LIB_PATH"
58594      has_space=`$ECHO "$path" | $GREP " "`
58595      if test "x$has_space" != x; then
58596        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58597$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58598        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58599      fi
58600
58601      # Use eval to expand a potential ~
58602      eval path="$path"
58603      if test ! -f "$path" && test ! -d "$path"; then
58604        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58605      fi
58606
58607      if test -d "$path"; then
58608        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58609      else
58610        dir="`$DIRNAME "$path"`"
58611        base="`$BASENAME "$path"`"
58612        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58613      fi
58614    fi
58615  fi
58616
58617
58618    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58619    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58620$as_echo_n "checking for freetype includes... " >&6; }
58621    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58622$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58623    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58624    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58625$as_echo_n "checking for freetype libraries... " >&6; }
58626    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58627$as_echo "$FREETYPE_LIB_PATH" >&6; }
58628  fi
58629
58630            else
58631
58632  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58633  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58634  METHOD="well-known location"
58635
58636  # Let's start with an optimistic view of the world :-)
58637  FOUND_FREETYPE=yes
58638
58639  # First look for the canonical freetype main include file ft2build.h.
58640  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58641    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58642    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58643    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58644      # Fail.
58645      FOUND_FREETYPE=no
58646    fi
58647  fi
58648
58649  if test "x$FOUND_FREETYPE" = xyes; then
58650    # Include file found, let's continue the sanity check.
58651    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58652$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58653
58654    # Reset to default value
58655    FREETYPE_BASE_NAME=freetype
58656    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58657    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58658      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58659          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58660        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58661        # for the .6 version explicitly.
58662        FREETYPE_BASE_NAME=freetype.6
58663        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58664        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58665$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58666      else
58667        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58668$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58669        FOUND_FREETYPE=no
58670      fi
58671    else
58672      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58673        # On Windows, we will need both .lib and .dll file.
58674        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58675          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58676$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58677          FOUND_FREETYPE=no
58678        fi
58679      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58680          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58681        # Found lib in isa dir, use that instead.
58682        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58683        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58684$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58685      fi
58686    fi
58687  fi
58688
58689  if test "x$FOUND_FREETYPE" = xyes; then
58690
58691  # Only process if variable expands to non-empty
58692
58693  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58694    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58695
58696  # Input might be given as Windows format, start by converting to
58697  # unix format.
58698  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58699  new_path=`$CYGPATH -u "$path"`
58700
58701  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58702  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58703  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58704  # "foo.exe" is OK but "foo" is an error.
58705  #
58706  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58707  # It is also a way to make sure we got the proper file name for the real test later on.
58708  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58709  if test "x$test_shortpath" = x; then
58710    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58711$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58712    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58713  fi
58714
58715  # Call helper function which possibly converts this using DOS-style short mode.
58716  # If so, the updated path is stored in $new_path.
58717
58718  input_path="$new_path"
58719  # Check if we need to convert this using DOS-style short mode. If the path
58720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58721  # take no chances and rewrite it.
58722  # Note: m4 eats our [], so we need to use [ and ] instead.
58723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58724  if test "x$has_forbidden_chars" != x; then
58725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58726    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58727    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58728    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58729      # Going to short mode and back again did indeed matter. Since short mode is
58730      # case insensitive, let's make it lowercase to improve readability.
58731      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58732      # Now convert it back to Unix-style (cygpath)
58733      input_path=`$CYGPATH -u "$shortmode_path"`
58734      new_path="$input_path"
58735    fi
58736  fi
58737
58738  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58739  if test "x$test_cygdrive_prefix" = x; then
58740    # As a simple fix, exclude /usr/bin since it's not a real path.
58741    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58742      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58743      # a path prefixed by /cygdrive for fixpath to work.
58744      new_path="$CYGWIN_ROOT_PATH$input_path"
58745    fi
58746  fi
58747
58748
58749  if test "x$path" != "x$new_path"; then
58750    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58752$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58753  fi
58754
58755    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58756
58757  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58758  has_colon=`$ECHO $path | $GREP ^.:`
58759  new_path="$path"
58760  if test "x$has_colon" = x; then
58761    # Not in mixed or Windows style, start by that.
58762    new_path=`cmd //c echo $path`
58763  fi
58764
58765
58766  input_path="$new_path"
58767  # Check if we need to convert this using DOS-style short mode. If the path
58768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58769  # take no chances and rewrite it.
58770  # Note: m4 eats our [], so we need to use [ and ] instead.
58771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58772  if test "x$has_forbidden_chars" != x; then
58773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58774    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58775  fi
58776
58777
58778  windows_path="$new_path"
58779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58780    unix_path=`$CYGPATH -u "$windows_path"`
58781    new_path="$unix_path"
58782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58784    new_path="$unix_path"
58785  fi
58786
58787  if test "x$path" != "x$new_path"; then
58788    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58789    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58790$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58791  fi
58792
58793  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58794  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58795
58796    else
58797      # We're on a unix platform. Hooray! :)
58798      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58799      has_space=`$ECHO "$path" | $GREP " "`
58800      if test "x$has_space" != x; then
58801        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58802$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58803        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58804      fi
58805
58806      # Use eval to expand a potential ~
58807      eval path="$path"
58808      if test ! -f "$path" && test ! -d "$path"; then
58809        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58810      fi
58811
58812      if test -d "$path"; then
58813        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58814      else
58815        dir="`$DIRNAME "$path"`"
58816        base="`$BASENAME "$path"`"
58817        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58818      fi
58819    fi
58820  fi
58821
58822
58823  # Only process if variable expands to non-empty
58824
58825  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58826    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58827
58828  # Input might be given as Windows format, start by converting to
58829  # unix format.
58830  path="$POTENTIAL_FREETYPE_LIB_PATH"
58831  new_path=`$CYGPATH -u "$path"`
58832
58833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58836  # "foo.exe" is OK but "foo" is an error.
58837  #
58838  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58839  # It is also a way to make sure we got the proper file name for the real test later on.
58840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58841  if test "x$test_shortpath" = x; then
58842    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58843$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58844    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58845  fi
58846
58847  # Call helper function which possibly converts this using DOS-style short mode.
58848  # If so, the updated path is stored in $new_path.
58849
58850  input_path="$new_path"
58851  # Check if we need to convert this using DOS-style short mode. If the path
58852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58853  # take no chances and rewrite it.
58854  # Note: m4 eats our [], so we need to use [ and ] instead.
58855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58856  if test "x$has_forbidden_chars" != x; then
58857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58861      # Going to short mode and back again did indeed matter. Since short mode is
58862      # case insensitive, let's make it lowercase to improve readability.
58863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58864      # Now convert it back to Unix-style (cygpath)
58865      input_path=`$CYGPATH -u "$shortmode_path"`
58866      new_path="$input_path"
58867    fi
58868  fi
58869
58870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58871  if test "x$test_cygdrive_prefix" = x; then
58872    # As a simple fix, exclude /usr/bin since it's not a real path.
58873    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58875      # a path prefixed by /cygdrive for fixpath to work.
58876      new_path="$CYGWIN_ROOT_PATH$input_path"
58877    fi
58878  fi
58879
58880
58881  if test "x$path" != "x$new_path"; then
58882    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58884$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58885  fi
58886
58887    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58888
58889  path="$POTENTIAL_FREETYPE_LIB_PATH"
58890  has_colon=`$ECHO $path | $GREP ^.:`
58891  new_path="$path"
58892  if test "x$has_colon" = x; then
58893    # Not in mixed or Windows style, start by that.
58894    new_path=`cmd //c echo $path`
58895  fi
58896
58897
58898  input_path="$new_path"
58899  # Check if we need to convert this using DOS-style short mode. If the path
58900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58901  # take no chances and rewrite it.
58902  # Note: m4 eats our [], so we need to use [ and ] instead.
58903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58904  if test "x$has_forbidden_chars" != x; then
58905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58907  fi
58908
58909
58910  windows_path="$new_path"
58911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58912    unix_path=`$CYGPATH -u "$windows_path"`
58913    new_path="$unix_path"
58914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58916    new_path="$unix_path"
58917  fi
58918
58919  if test "x$path" != "x$new_path"; then
58920    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58922$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58923  fi
58924
58925  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58926  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58927
58928    else
58929      # We're on a unix platform. Hooray! :)
58930      path="$POTENTIAL_FREETYPE_LIB_PATH"
58931      has_space=`$ECHO "$path" | $GREP " "`
58932      if test "x$has_space" != x; then
58933        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58934$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58935        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58936      fi
58937
58938      # Use eval to expand a potential ~
58939      eval path="$path"
58940      if test ! -f "$path" && test ! -d "$path"; then
58941        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58942      fi
58943
58944      if test -d "$path"; then
58945        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58946      else
58947        dir="`$DIRNAME "$path"`"
58948        base="`$BASENAME "$path"`"
58949        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58950      fi
58951    fi
58952  fi
58953
58954
58955    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58956    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58957$as_echo_n "checking for freetype includes... " >&6; }
58958    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58959$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58960    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58961    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58962$as_echo_n "checking for freetype libraries... " >&6; }
58963    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58964$as_echo "$FREETYPE_LIB_PATH" >&6; }
58965  fi
58966
58967            fi
58968            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
58969                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
58970              # Source is available, as a last resort try to build freetype in default location
58971
58972  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
58973  BUILD_FREETYPE=yes
58974
58975  # Check if the freetype sources are acessible..
58976  if ! test -d $FREETYPE_SRC_PATH; then
58977    { $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
58978$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
58979    BUILD_FREETYPE=no
58980  fi
58981  # ..and contain a vc2010 project file
58982  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
58983  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
58984    { $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
58985$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
58986    BUILD_FREETYPE=no
58987  fi
58988  # Now check if configure found a version of 'msbuild.exe'
58989  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
58990    { $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
58991$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;}
58992    BUILD_FREETYPE=no
58993  fi
58994
58995  # Ready to go..
58996  if test "x$BUILD_FREETYPE" = xyes; then
58997    # msbuild requires trailing slashes for output directories
58998    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
58999    freetype_lib_path_unix="$freetype_lib_path"
59000    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59001
59002  unix_path="$vcxproj_path"
59003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59004    windows_path=`$CYGPATH -m "$unix_path"`
59005    vcxproj_path="$windows_path"
59006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59007    windows_path=`cmd //c echo $unix_path`
59008    vcxproj_path="$windows_path"
59009  fi
59010
59011
59012  unix_path="$freetype_lib_path"
59013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59014    windows_path=`$CYGPATH -m "$unix_path"`
59015    freetype_lib_path="$windows_path"
59016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59017    windows_path=`cmd //c echo $unix_path`
59018    freetype_lib_path="$windows_path"
59019  fi
59020
59021
59022  unix_path="$freetype_obj_path"
59023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59024    windows_path=`$CYGPATH -m "$unix_path"`
59025    freetype_obj_path="$windows_path"
59026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59027    windows_path=`cmd //c echo $unix_path`
59028    freetype_obj_path="$windows_path"
59029  fi
59030
59031    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59032      freetype_platform=x64
59033    else
59034      freetype_platform=win32
59035    fi
59036
59037    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59038    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59039    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59040    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59041    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59042$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59043
59044    # First we try to build the freetype.dll
59045    $ECHO -e "@echo off\n"\
59046        "$MSBUILD $vcxproj_path "\
59047        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59048        "/p:Configuration=\"Release Multithreaded\" "\
59049        "/p:Platform=$freetype_platform "\
59050        "/p:ConfigurationType=DynamicLibrary "\
59051        "/p:TargetName=freetype "\
59052        "/p:OutDir=\"$freetype_lib_path\" "\
59053        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59054    cmd /c freetype.bat
59055
59056    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59057      # If that succeeds we also build freetype.lib
59058      $ECHO -e "@echo off\n"\
59059          "$MSBUILD $vcxproj_path "\
59060          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59061          "/p:Configuration=\"Release Multithreaded\" "\
59062          "/p:Platform=$freetype_platform "\
59063          "/p:ConfigurationType=StaticLibrary "\
59064          "/p:TargetName=freetype "\
59065          "/p:OutDir=\"$freetype_lib_path\" "\
59066          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59067      cmd /c freetype.bat
59068
59069      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59070        # Once we build both, lib and dll, set freetype lib and include path appropriately
59071        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59072        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59073        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59074$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59075      else
59076        BUILD_FREETYPE=no
59077      fi
59078    else
59079      BUILD_FREETYPE=no
59080    fi
59081  fi
59082
59083              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59084
59085  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59086  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59087  METHOD="well-known location"
59088
59089  # Let's start with an optimistic view of the world :-)
59090  FOUND_FREETYPE=yes
59091
59092  # First look for the canonical freetype main include file ft2build.h.
59093  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59094    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59095    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59096    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59097      # Fail.
59098      FOUND_FREETYPE=no
59099    fi
59100  fi
59101
59102  if test "x$FOUND_FREETYPE" = xyes; then
59103    # Include file found, let's continue the sanity check.
59104    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59105$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59106
59107    # Reset to default value
59108    FREETYPE_BASE_NAME=freetype
59109    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59110    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59111      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59112          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59113        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59114        # for the .6 version explicitly.
59115        FREETYPE_BASE_NAME=freetype.6
59116        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59117        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59118$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59119      else
59120        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59121$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59122        FOUND_FREETYPE=no
59123      fi
59124    else
59125      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59126        # On Windows, we will need both .lib and .dll file.
59127        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59128          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59129$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59130          FOUND_FREETYPE=no
59131        fi
59132      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59133          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59134        # Found lib in isa dir, use that instead.
59135        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59136        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59137$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59138      fi
59139    fi
59140  fi
59141
59142  if test "x$FOUND_FREETYPE" = xyes; then
59143
59144  # Only process if variable expands to non-empty
59145
59146  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59147    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59148
59149  # Input might be given as Windows format, start by converting to
59150  # unix format.
59151  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59152  new_path=`$CYGPATH -u "$path"`
59153
59154  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59155  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59156  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59157  # "foo.exe" is OK but "foo" is an error.
59158  #
59159  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59160  # It is also a way to make sure we got the proper file name for the real test later on.
59161  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59162  if test "x$test_shortpath" = x; then
59163    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59164$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59165    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59166  fi
59167
59168  # Call helper function which possibly converts this using DOS-style short mode.
59169  # If so, the updated path is stored in $new_path.
59170
59171  input_path="$new_path"
59172  # Check if we need to convert this using DOS-style short mode. If the path
59173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59174  # take no chances and rewrite it.
59175  # Note: m4 eats our [], so we need to use [ and ] instead.
59176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59177  if test "x$has_forbidden_chars" != x; then
59178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59179    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59180    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59181    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59182      # Going to short mode and back again did indeed matter. Since short mode is
59183      # case insensitive, let's make it lowercase to improve readability.
59184      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59185      # Now convert it back to Unix-style (cygpath)
59186      input_path=`$CYGPATH -u "$shortmode_path"`
59187      new_path="$input_path"
59188    fi
59189  fi
59190
59191  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59192  if test "x$test_cygdrive_prefix" = x; then
59193    # As a simple fix, exclude /usr/bin since it's not a real path.
59194    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59195      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59196      # a path prefixed by /cygdrive for fixpath to work.
59197      new_path="$CYGWIN_ROOT_PATH$input_path"
59198    fi
59199  fi
59200
59201
59202  if test "x$path" != "x$new_path"; then
59203    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59204    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59205$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59206  fi
59207
59208    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59209
59210  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59211  has_colon=`$ECHO $path | $GREP ^.:`
59212  new_path="$path"
59213  if test "x$has_colon" = x; then
59214    # Not in mixed or Windows style, start by that.
59215    new_path=`cmd //c echo $path`
59216  fi
59217
59218
59219  input_path="$new_path"
59220  # Check if we need to convert this using DOS-style short mode. If the path
59221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59222  # take no chances and rewrite it.
59223  # Note: m4 eats our [], so we need to use [ and ] instead.
59224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59225  if test "x$has_forbidden_chars" != x; then
59226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59228  fi
59229
59230
59231  windows_path="$new_path"
59232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59233    unix_path=`$CYGPATH -u "$windows_path"`
59234    new_path="$unix_path"
59235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59237    new_path="$unix_path"
59238  fi
59239
59240  if test "x$path" != "x$new_path"; then
59241    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59243$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59244  fi
59245
59246  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59247  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59248
59249    else
59250      # We're on a unix platform. Hooray! :)
59251      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59252      has_space=`$ECHO "$path" | $GREP " "`
59253      if test "x$has_space" != x; then
59254        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59255$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59256        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59257      fi
59258
59259      # Use eval to expand a potential ~
59260      eval path="$path"
59261      if test ! -f "$path" && test ! -d "$path"; then
59262        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59263      fi
59264
59265      if test -d "$path"; then
59266        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59267      else
59268        dir="`$DIRNAME "$path"`"
59269        base="`$BASENAME "$path"`"
59270        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59271      fi
59272    fi
59273  fi
59274
59275
59276  # Only process if variable expands to non-empty
59277
59278  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59279    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59280
59281  # Input might be given as Windows format, start by converting to
59282  # unix format.
59283  path="$POTENTIAL_FREETYPE_LIB_PATH"
59284  new_path=`$CYGPATH -u "$path"`
59285
59286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59289  # "foo.exe" is OK but "foo" is an error.
59290  #
59291  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59292  # It is also a way to make sure we got the proper file name for the real test later on.
59293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59294  if test "x$test_shortpath" = x; then
59295    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59296$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59297    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59298  fi
59299
59300  # Call helper function which possibly converts this using DOS-style short mode.
59301  # If so, the updated path is stored in $new_path.
59302
59303  input_path="$new_path"
59304  # Check if we need to convert this using DOS-style short mode. If the path
59305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59306  # take no chances and rewrite it.
59307  # Note: m4 eats our [], so we need to use [ and ] instead.
59308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59309  if test "x$has_forbidden_chars" != x; then
59310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59311    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59312    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59313    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59314      # Going to short mode and back again did indeed matter. Since short mode is
59315      # case insensitive, let's make it lowercase to improve readability.
59316      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59317      # Now convert it back to Unix-style (cygpath)
59318      input_path=`$CYGPATH -u "$shortmode_path"`
59319      new_path="$input_path"
59320    fi
59321  fi
59322
59323  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59324  if test "x$test_cygdrive_prefix" = x; then
59325    # As a simple fix, exclude /usr/bin since it's not a real path.
59326    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59327      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59328      # a path prefixed by /cygdrive for fixpath to work.
59329      new_path="$CYGWIN_ROOT_PATH$input_path"
59330    fi
59331  fi
59332
59333
59334  if test "x$path" != "x$new_path"; then
59335    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59336    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59337$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59338  fi
59339
59340    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59341
59342  path="$POTENTIAL_FREETYPE_LIB_PATH"
59343  has_colon=`$ECHO $path | $GREP ^.:`
59344  new_path="$path"
59345  if test "x$has_colon" = x; then
59346    # Not in mixed or Windows style, start by that.
59347    new_path=`cmd //c echo $path`
59348  fi
59349
59350
59351  input_path="$new_path"
59352  # Check if we need to convert this using DOS-style short mode. If the path
59353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59354  # take no chances and rewrite it.
59355  # Note: m4 eats our [], so we need to use [ and ] instead.
59356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59357  if test "x$has_forbidden_chars" != x; then
59358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59359    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59360  fi
59361
59362
59363  windows_path="$new_path"
59364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59365    unix_path=`$CYGPATH -u "$windows_path"`
59366    new_path="$unix_path"
59367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59369    new_path="$unix_path"
59370  fi
59371
59372  if test "x$path" != "x$new_path"; then
59373    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59375$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59376  fi
59377
59378  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59379  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59380
59381    else
59382      # We're on a unix platform. Hooray! :)
59383      path="$POTENTIAL_FREETYPE_LIB_PATH"
59384      has_space=`$ECHO "$path" | $GREP " "`
59385      if test "x$has_space" != x; then
59386        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59387$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59388        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59389      fi
59390
59391      # Use eval to expand a potential ~
59392      eval path="$path"
59393      if test ! -f "$path" && test ! -d "$path"; then
59394        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59395      fi
59396
59397      if test -d "$path"; then
59398        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59399      else
59400        dir="`$DIRNAME "$path"`"
59401        base="`$BASENAME "$path"`"
59402        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59403      fi
59404    fi
59405  fi
59406
59407
59408    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59409    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59410$as_echo_n "checking for freetype includes... " >&6; }
59411    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59412$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59413    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59414    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59415$as_echo_n "checking for freetype libraries... " >&6; }
59416    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59417$as_echo "$FREETYPE_LIB_PATH" >&6; }
59418  fi
59419
59420              else
59421
59422  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59423  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59424  METHOD="well-known location"
59425
59426  # Let's start with an optimistic view of the world :-)
59427  FOUND_FREETYPE=yes
59428
59429  # First look for the canonical freetype main include file ft2build.h.
59430  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59431    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59432    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59433    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59434      # Fail.
59435      FOUND_FREETYPE=no
59436    fi
59437  fi
59438
59439  if test "x$FOUND_FREETYPE" = xyes; then
59440    # Include file found, let's continue the sanity check.
59441    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59442$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59443
59444    # Reset to default value
59445    FREETYPE_BASE_NAME=freetype
59446    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59447    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59448      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59449          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59450        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59451        # for the .6 version explicitly.
59452        FREETYPE_BASE_NAME=freetype.6
59453        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59454        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59455$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59456      else
59457        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59458$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59459        FOUND_FREETYPE=no
59460      fi
59461    else
59462      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59463        # On Windows, we will need both .lib and .dll file.
59464        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59465          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59466$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59467          FOUND_FREETYPE=no
59468        fi
59469      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59470          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59471        # Found lib in isa dir, use that instead.
59472        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59473        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59474$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59475      fi
59476    fi
59477  fi
59478
59479  if test "x$FOUND_FREETYPE" = xyes; then
59480
59481  # Only process if variable expands to non-empty
59482
59483  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59484    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59485
59486  # Input might be given as Windows format, start by converting to
59487  # unix format.
59488  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59489  new_path=`$CYGPATH -u "$path"`
59490
59491  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59492  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59493  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59494  # "foo.exe" is OK but "foo" is an error.
59495  #
59496  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59497  # It is also a way to make sure we got the proper file name for the real test later on.
59498  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59499  if test "x$test_shortpath" = x; then
59500    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59501$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59502    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59503  fi
59504
59505  # Call helper function which possibly converts this using DOS-style short mode.
59506  # If so, the updated path is stored in $new_path.
59507
59508  input_path="$new_path"
59509  # Check if we need to convert this using DOS-style short mode. If the path
59510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59511  # take no chances and rewrite it.
59512  # Note: m4 eats our [], so we need to use [ and ] instead.
59513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59514  if test "x$has_forbidden_chars" != x; then
59515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59516    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59517    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59518    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59519      # Going to short mode and back again did indeed matter. Since short mode is
59520      # case insensitive, let's make it lowercase to improve readability.
59521      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59522      # Now convert it back to Unix-style (cygpath)
59523      input_path=`$CYGPATH -u "$shortmode_path"`
59524      new_path="$input_path"
59525    fi
59526  fi
59527
59528  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59529  if test "x$test_cygdrive_prefix" = x; then
59530    # As a simple fix, exclude /usr/bin since it's not a real path.
59531    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59532      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59533      # a path prefixed by /cygdrive for fixpath to work.
59534      new_path="$CYGWIN_ROOT_PATH$input_path"
59535    fi
59536  fi
59537
59538
59539  if test "x$path" != "x$new_path"; then
59540    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59541    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59542$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59543  fi
59544
59545    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59546
59547  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59548  has_colon=`$ECHO $path | $GREP ^.:`
59549  new_path="$path"
59550  if test "x$has_colon" = x; then
59551    # Not in mixed or Windows style, start by that.
59552    new_path=`cmd //c echo $path`
59553  fi
59554
59555
59556  input_path="$new_path"
59557  # Check if we need to convert this using DOS-style short mode. If the path
59558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59559  # take no chances and rewrite it.
59560  # Note: m4 eats our [], so we need to use [ and ] instead.
59561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59562  if test "x$has_forbidden_chars" != x; then
59563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59564    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59565  fi
59566
59567
59568  windows_path="$new_path"
59569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59570    unix_path=`$CYGPATH -u "$windows_path"`
59571    new_path="$unix_path"
59572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59574    new_path="$unix_path"
59575  fi
59576
59577  if test "x$path" != "x$new_path"; then
59578    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59579    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59580$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59581  fi
59582
59583  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59584  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59585
59586    else
59587      # We're on a unix platform. Hooray! :)
59588      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59589      has_space=`$ECHO "$path" | $GREP " "`
59590      if test "x$has_space" != x; then
59591        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59592$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59593        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59594      fi
59595
59596      # Use eval to expand a potential ~
59597      eval path="$path"
59598      if test ! -f "$path" && test ! -d "$path"; then
59599        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59600      fi
59601
59602      if test -d "$path"; then
59603        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59604      else
59605        dir="`$DIRNAME "$path"`"
59606        base="`$BASENAME "$path"`"
59607        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59608      fi
59609    fi
59610  fi
59611
59612
59613  # Only process if variable expands to non-empty
59614
59615  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59616    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59617
59618  # Input might be given as Windows format, start by converting to
59619  # unix format.
59620  path="$POTENTIAL_FREETYPE_LIB_PATH"
59621  new_path=`$CYGPATH -u "$path"`
59622
59623  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59624  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59625  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59626  # "foo.exe" is OK but "foo" is an error.
59627  #
59628  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59629  # It is also a way to make sure we got the proper file name for the real test later on.
59630  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59631  if test "x$test_shortpath" = x; then
59632    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59633$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59634    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59635  fi
59636
59637  # Call helper function which possibly converts this using DOS-style short mode.
59638  # If so, the updated path is stored in $new_path.
59639
59640  input_path="$new_path"
59641  # Check if we need to convert this using DOS-style short mode. If the path
59642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59643  # take no chances and rewrite it.
59644  # Note: m4 eats our [], so we need to use [ and ] instead.
59645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59646  if test "x$has_forbidden_chars" != x; then
59647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59648    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59649    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59650    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59651      # Going to short mode and back again did indeed matter. Since short mode is
59652      # case insensitive, let's make it lowercase to improve readability.
59653      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59654      # Now convert it back to Unix-style (cygpath)
59655      input_path=`$CYGPATH -u "$shortmode_path"`
59656      new_path="$input_path"
59657    fi
59658  fi
59659
59660  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59661  if test "x$test_cygdrive_prefix" = x; then
59662    # As a simple fix, exclude /usr/bin since it's not a real path.
59663    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59664      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59665      # a path prefixed by /cygdrive for fixpath to work.
59666      new_path="$CYGWIN_ROOT_PATH$input_path"
59667    fi
59668  fi
59669
59670
59671  if test "x$path" != "x$new_path"; then
59672    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59674$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59675  fi
59676
59677    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59678
59679  path="$POTENTIAL_FREETYPE_LIB_PATH"
59680  has_colon=`$ECHO $path | $GREP ^.:`
59681  new_path="$path"
59682  if test "x$has_colon" = x; then
59683    # Not in mixed or Windows style, start by that.
59684    new_path=`cmd //c echo $path`
59685  fi
59686
59687
59688  input_path="$new_path"
59689  # Check if we need to convert this using DOS-style short mode. If the path
59690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59691  # take no chances and rewrite it.
59692  # Note: m4 eats our [], so we need to use [ and ] instead.
59693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59694  if test "x$has_forbidden_chars" != x; then
59695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59696    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59697  fi
59698
59699
59700  windows_path="$new_path"
59701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59702    unix_path=`$CYGPATH -u "$windows_path"`
59703    new_path="$unix_path"
59704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59706    new_path="$unix_path"
59707  fi
59708
59709  if test "x$path" != "x$new_path"; then
59710    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59711    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59712$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59713  fi
59714
59715  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59716  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59717
59718    else
59719      # We're on a unix platform. Hooray! :)
59720      path="$POTENTIAL_FREETYPE_LIB_PATH"
59721      has_space=`$ECHO "$path" | $GREP " "`
59722      if test "x$has_space" != x; then
59723        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59724$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59725        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59726      fi
59727
59728      # Use eval to expand a potential ~
59729      eval path="$path"
59730      if test ! -f "$path" && test ! -d "$path"; then
59731        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59732      fi
59733
59734      if test -d "$path"; then
59735        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59736      else
59737        dir="`$DIRNAME "$path"`"
59738        base="`$BASENAME "$path"`"
59739        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59740      fi
59741    fi
59742  fi
59743
59744
59745    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59746    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59747$as_echo_n "checking for freetype includes... " >&6; }
59748    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59749$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59750    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59751    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59752$as_echo_n "checking for freetype libraries... " >&6; }
59753    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59754$as_echo "$FREETYPE_LIB_PATH" >&6; }
59755  fi
59756
59757              fi
59758            fi
59759          fi
59760        else
59761          FREETYPE_BASE_DIR="$SYSROOT/usr"
59762
59763  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59764  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59765  METHOD="well-known location"
59766
59767  # Let's start with an optimistic view of the world :-)
59768  FOUND_FREETYPE=yes
59769
59770  # First look for the canonical freetype main include file ft2build.h.
59771  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59772    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59773    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59774    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59775      # Fail.
59776      FOUND_FREETYPE=no
59777    fi
59778  fi
59779
59780  if test "x$FOUND_FREETYPE" = xyes; then
59781    # Include file found, let's continue the sanity check.
59782    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59783$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59784
59785    # Reset to default value
59786    FREETYPE_BASE_NAME=freetype
59787    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59788    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59789      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59790          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59791        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59792        # for the .6 version explicitly.
59793        FREETYPE_BASE_NAME=freetype.6
59794        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59795        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59796$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59797      else
59798        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59799$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59800        FOUND_FREETYPE=no
59801      fi
59802    else
59803      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59804        # On Windows, we will need both .lib and .dll file.
59805        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59806          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59807$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59808          FOUND_FREETYPE=no
59809        fi
59810      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59811          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59812        # Found lib in isa dir, use that instead.
59813        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59814        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59815$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59816      fi
59817    fi
59818  fi
59819
59820  if test "x$FOUND_FREETYPE" = xyes; then
59821
59822  # Only process if variable expands to non-empty
59823
59824  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59825    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59826
59827  # Input might be given as Windows format, start by converting to
59828  # unix format.
59829  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59830  new_path=`$CYGPATH -u "$path"`
59831
59832  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59833  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59834  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59835  # "foo.exe" is OK but "foo" is an error.
59836  #
59837  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59838  # It is also a way to make sure we got the proper file name for the real test later on.
59839  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59840  if test "x$test_shortpath" = x; then
59841    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59842$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59843    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59844  fi
59845
59846  # Call helper function which possibly converts this using DOS-style short mode.
59847  # If so, the updated path is stored in $new_path.
59848
59849  input_path="$new_path"
59850  # Check if we need to convert this using DOS-style short mode. If the path
59851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59852  # take no chances and rewrite it.
59853  # Note: m4 eats our [], so we need to use [ and ] instead.
59854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59855  if test "x$has_forbidden_chars" != x; then
59856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59857    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59858    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59859    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59860      # Going to short mode and back again did indeed matter. Since short mode is
59861      # case insensitive, let's make it lowercase to improve readability.
59862      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59863      # Now convert it back to Unix-style (cygpath)
59864      input_path=`$CYGPATH -u "$shortmode_path"`
59865      new_path="$input_path"
59866    fi
59867  fi
59868
59869  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59870  if test "x$test_cygdrive_prefix" = x; then
59871    # As a simple fix, exclude /usr/bin since it's not a real path.
59872    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59873      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59874      # a path prefixed by /cygdrive for fixpath to work.
59875      new_path="$CYGWIN_ROOT_PATH$input_path"
59876    fi
59877  fi
59878
59879
59880  if test "x$path" != "x$new_path"; then
59881    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59882    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59883$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59884  fi
59885
59886    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59887
59888  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59889  has_colon=`$ECHO $path | $GREP ^.:`
59890  new_path="$path"
59891  if test "x$has_colon" = x; then
59892    # Not in mixed or Windows style, start by that.
59893    new_path=`cmd //c echo $path`
59894  fi
59895
59896
59897  input_path="$new_path"
59898  # Check if we need to convert this using DOS-style short mode. If the path
59899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59900  # take no chances and rewrite it.
59901  # Note: m4 eats our [], so we need to use [ and ] instead.
59902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59903  if test "x$has_forbidden_chars" != x; then
59904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59905    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59906  fi
59907
59908
59909  windows_path="$new_path"
59910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59911    unix_path=`$CYGPATH -u "$windows_path"`
59912    new_path="$unix_path"
59913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59915    new_path="$unix_path"
59916  fi
59917
59918  if test "x$path" != "x$new_path"; then
59919    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59920    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59921$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59922  fi
59923
59924  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59925  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59926
59927    else
59928      # We're on a unix platform. Hooray! :)
59929      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59930      has_space=`$ECHO "$path" | $GREP " "`
59931      if test "x$has_space" != x; then
59932        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59933$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59934        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59935      fi
59936
59937      # Use eval to expand a potential ~
59938      eval path="$path"
59939      if test ! -f "$path" && test ! -d "$path"; then
59940        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59941      fi
59942
59943      if test -d "$path"; then
59944        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59945      else
59946        dir="`$DIRNAME "$path"`"
59947        base="`$BASENAME "$path"`"
59948        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59949      fi
59950    fi
59951  fi
59952
59953
59954  # Only process if variable expands to non-empty
59955
59956  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59957    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59958
59959  # Input might be given as Windows format, start by converting to
59960  # unix format.
59961  path="$POTENTIAL_FREETYPE_LIB_PATH"
59962  new_path=`$CYGPATH -u "$path"`
59963
59964  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59965  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59966  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59967  # "foo.exe" is OK but "foo" is an error.
59968  #
59969  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59970  # It is also a way to make sure we got the proper file name for the real test later on.
59971  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59972  if test "x$test_shortpath" = x; then
59973    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59974$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59975    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59976  fi
59977
59978  # Call helper function which possibly converts this using DOS-style short mode.
59979  # If so, the updated path is stored in $new_path.
59980
59981  input_path="$new_path"
59982  # Check if we need to convert this using DOS-style short mode. If the path
59983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59984  # take no chances and rewrite it.
59985  # Note: m4 eats our [], so we need to use [ and ] instead.
59986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59987  if test "x$has_forbidden_chars" != x; then
59988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59989    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59990    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59991    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59992      # Going to short mode and back again did indeed matter. Since short mode is
59993      # case insensitive, let's make it lowercase to improve readability.
59994      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59995      # Now convert it back to Unix-style (cygpath)
59996      input_path=`$CYGPATH -u "$shortmode_path"`
59997      new_path="$input_path"
59998    fi
59999  fi
60000
60001  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60002  if test "x$test_cygdrive_prefix" = x; then
60003    # As a simple fix, exclude /usr/bin since it's not a real path.
60004    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60005      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60006      # a path prefixed by /cygdrive for fixpath to work.
60007      new_path="$CYGWIN_ROOT_PATH$input_path"
60008    fi
60009  fi
60010
60011
60012  if test "x$path" != "x$new_path"; then
60013    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60014    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60015$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60016  fi
60017
60018    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60019
60020  path="$POTENTIAL_FREETYPE_LIB_PATH"
60021  has_colon=`$ECHO $path | $GREP ^.:`
60022  new_path="$path"
60023  if test "x$has_colon" = x; then
60024    # Not in mixed or Windows style, start by that.
60025    new_path=`cmd //c echo $path`
60026  fi
60027
60028
60029  input_path="$new_path"
60030  # Check if we need to convert this using DOS-style short mode. If the path
60031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60032  # take no chances and rewrite it.
60033  # Note: m4 eats our [], so we need to use [ and ] instead.
60034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60035  if test "x$has_forbidden_chars" != x; then
60036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60037    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60038  fi
60039
60040
60041  windows_path="$new_path"
60042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60043    unix_path=`$CYGPATH -u "$windows_path"`
60044    new_path="$unix_path"
60045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60047    new_path="$unix_path"
60048  fi
60049
60050  if test "x$path" != "x$new_path"; then
60051    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60052    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60053$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60054  fi
60055
60056  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60057  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60058
60059    else
60060      # We're on a unix platform. Hooray! :)
60061      path="$POTENTIAL_FREETYPE_LIB_PATH"
60062      has_space=`$ECHO "$path" | $GREP " "`
60063      if test "x$has_space" != x; then
60064        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60065$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60066        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60067      fi
60068
60069      # Use eval to expand a potential ~
60070      eval path="$path"
60071      if test ! -f "$path" && test ! -d "$path"; then
60072        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60073      fi
60074
60075      if test -d "$path"; then
60076        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60077      else
60078        dir="`$DIRNAME "$path"`"
60079        base="`$BASENAME "$path"`"
60080        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60081      fi
60082    fi
60083  fi
60084
60085
60086    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60088$as_echo_n "checking for freetype includes... " >&6; }
60089    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60090$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60091    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60092    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60093$as_echo_n "checking for freetype libraries... " >&6; }
60094    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60095$as_echo "$FREETYPE_LIB_PATH" >&6; }
60096  fi
60097
60098
60099          if test "x$FOUND_FREETYPE" != xyes; then
60100            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60101
60102  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60103  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60104  METHOD="well-known location"
60105
60106  # Let's start with an optimistic view of the world :-)
60107  FOUND_FREETYPE=yes
60108
60109  # First look for the canonical freetype main include file ft2build.h.
60110  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60111    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60112    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60113    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60114      # Fail.
60115      FOUND_FREETYPE=no
60116    fi
60117  fi
60118
60119  if test "x$FOUND_FREETYPE" = xyes; then
60120    # Include file found, let's continue the sanity check.
60121    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60122$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60123
60124    # Reset to default value
60125    FREETYPE_BASE_NAME=freetype
60126    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60127    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60128      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60129          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60130        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60131        # for the .6 version explicitly.
60132        FREETYPE_BASE_NAME=freetype.6
60133        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60134        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60135$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60136      else
60137        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60138$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60139        FOUND_FREETYPE=no
60140      fi
60141    else
60142      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60143        # On Windows, we will need both .lib and .dll file.
60144        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60145          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60146$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60147          FOUND_FREETYPE=no
60148        fi
60149      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60150          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60151        # Found lib in isa dir, use that instead.
60152        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60153        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60154$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60155      fi
60156    fi
60157  fi
60158
60159  if test "x$FOUND_FREETYPE" = xyes; then
60160
60161  # Only process if variable expands to non-empty
60162
60163  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60164    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60165
60166  # Input might be given as Windows format, start by converting to
60167  # unix format.
60168  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60169  new_path=`$CYGPATH -u "$path"`
60170
60171  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60172  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60173  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60174  # "foo.exe" is OK but "foo" is an error.
60175  #
60176  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60177  # It is also a way to make sure we got the proper file name for the real test later on.
60178  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60179  if test "x$test_shortpath" = x; then
60180    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60181$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60182    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60183  fi
60184
60185  # Call helper function which possibly converts this using DOS-style short mode.
60186  # If so, the updated path is stored in $new_path.
60187
60188  input_path="$new_path"
60189  # Check if we need to convert this using DOS-style short mode. If the path
60190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60191  # take no chances and rewrite it.
60192  # Note: m4 eats our [], so we need to use [ and ] instead.
60193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60194  if test "x$has_forbidden_chars" != x; then
60195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60199      # Going to short mode and back again did indeed matter. Since short mode is
60200      # case insensitive, let's make it lowercase to improve readability.
60201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60202      # Now convert it back to Unix-style (cygpath)
60203      input_path=`$CYGPATH -u "$shortmode_path"`
60204      new_path="$input_path"
60205    fi
60206  fi
60207
60208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60209  if test "x$test_cygdrive_prefix" = x; then
60210    # As a simple fix, exclude /usr/bin since it's not a real path.
60211    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60213      # a path prefixed by /cygdrive for fixpath to work.
60214      new_path="$CYGWIN_ROOT_PATH$input_path"
60215    fi
60216  fi
60217
60218
60219  if test "x$path" != "x$new_path"; then
60220    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60222$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60223  fi
60224
60225    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60226
60227  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60228  has_colon=`$ECHO $path | $GREP ^.:`
60229  new_path="$path"
60230  if test "x$has_colon" = x; then
60231    # Not in mixed or Windows style, start by that.
60232    new_path=`cmd //c echo $path`
60233  fi
60234
60235
60236  input_path="$new_path"
60237  # Check if we need to convert this using DOS-style short mode. If the path
60238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60239  # take no chances and rewrite it.
60240  # Note: m4 eats our [], so we need to use [ and ] instead.
60241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60242  if test "x$has_forbidden_chars" != x; then
60243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60245  fi
60246
60247
60248  windows_path="$new_path"
60249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60250    unix_path=`$CYGPATH -u "$windows_path"`
60251    new_path="$unix_path"
60252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60254    new_path="$unix_path"
60255  fi
60256
60257  if test "x$path" != "x$new_path"; then
60258    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60260$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60261  fi
60262
60263  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60264  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60265
60266    else
60267      # We're on a unix platform. Hooray! :)
60268      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60269      has_space=`$ECHO "$path" | $GREP " "`
60270      if test "x$has_space" != x; then
60271        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60272$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60273        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60274      fi
60275
60276      # Use eval to expand a potential ~
60277      eval path="$path"
60278      if test ! -f "$path" && test ! -d "$path"; then
60279        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60280      fi
60281
60282      if test -d "$path"; then
60283        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60284      else
60285        dir="`$DIRNAME "$path"`"
60286        base="`$BASENAME "$path"`"
60287        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60288      fi
60289    fi
60290  fi
60291
60292
60293  # Only process if variable expands to non-empty
60294
60295  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60296    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60297
60298  # Input might be given as Windows format, start by converting to
60299  # unix format.
60300  path="$POTENTIAL_FREETYPE_LIB_PATH"
60301  new_path=`$CYGPATH -u "$path"`
60302
60303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60306  # "foo.exe" is OK but "foo" is an error.
60307  #
60308  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60309  # It is also a way to make sure we got the proper file name for the real test later on.
60310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60311  if test "x$test_shortpath" = x; then
60312    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60313$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60314    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60315  fi
60316
60317  # Call helper function which possibly converts this using DOS-style short mode.
60318  # If so, the updated path is stored in $new_path.
60319
60320  input_path="$new_path"
60321  # Check if we need to convert this using DOS-style short mode. If the path
60322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60323  # take no chances and rewrite it.
60324  # Note: m4 eats our [], so we need to use [ and ] instead.
60325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60326  if test "x$has_forbidden_chars" != x; then
60327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60331      # Going to short mode and back again did indeed matter. Since short mode is
60332      # case insensitive, let's make it lowercase to improve readability.
60333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60334      # Now convert it back to Unix-style (cygpath)
60335      input_path=`$CYGPATH -u "$shortmode_path"`
60336      new_path="$input_path"
60337    fi
60338  fi
60339
60340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60341  if test "x$test_cygdrive_prefix" = x; then
60342    # As a simple fix, exclude /usr/bin since it's not a real path.
60343    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60345      # a path prefixed by /cygdrive for fixpath to work.
60346      new_path="$CYGWIN_ROOT_PATH$input_path"
60347    fi
60348  fi
60349
60350
60351  if test "x$path" != "x$new_path"; then
60352    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60354$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60355  fi
60356
60357    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60358
60359  path="$POTENTIAL_FREETYPE_LIB_PATH"
60360  has_colon=`$ECHO $path | $GREP ^.:`
60361  new_path="$path"
60362  if test "x$has_colon" = x; then
60363    # Not in mixed or Windows style, start by that.
60364    new_path=`cmd //c echo $path`
60365  fi
60366
60367
60368  input_path="$new_path"
60369  # Check if we need to convert this using DOS-style short mode. If the path
60370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60371  # take no chances and rewrite it.
60372  # Note: m4 eats our [], so we need to use [ and ] instead.
60373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60374  if test "x$has_forbidden_chars" != x; then
60375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60376    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60377  fi
60378
60379
60380  windows_path="$new_path"
60381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60382    unix_path=`$CYGPATH -u "$windows_path"`
60383    new_path="$unix_path"
60384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60386    new_path="$unix_path"
60387  fi
60388
60389  if test "x$path" != "x$new_path"; then
60390    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60392$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60393  fi
60394
60395  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60396  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60397
60398    else
60399      # We're on a unix platform. Hooray! :)
60400      path="$POTENTIAL_FREETYPE_LIB_PATH"
60401      has_space=`$ECHO "$path" | $GREP " "`
60402      if test "x$has_space" != x; then
60403        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60404$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60405        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60406      fi
60407
60408      # Use eval to expand a potential ~
60409      eval path="$path"
60410      if test ! -f "$path" && test ! -d "$path"; then
60411        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60412      fi
60413
60414      if test -d "$path"; then
60415        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60416      else
60417        dir="`$DIRNAME "$path"`"
60418        base="`$BASENAME "$path"`"
60419        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60420      fi
60421    fi
60422  fi
60423
60424
60425    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60426    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60427$as_echo_n "checking for freetype includes... " >&6; }
60428    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60429$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60430    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60431    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60432$as_echo_n "checking for freetype libraries... " >&6; }
60433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60434$as_echo "$FREETYPE_LIB_PATH" >&6; }
60435  fi
60436
60437          fi
60438
60439          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60440            if test "x$FOUND_FREETYPE" != xyes; then
60441              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60442              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60443
60444  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60445  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60446  METHOD="well-known location"
60447
60448  # Let's start with an optimistic view of the world :-)
60449  FOUND_FREETYPE=yes
60450
60451  # First look for the canonical freetype main include file ft2build.h.
60452  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60453    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60454    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60455    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60456      # Fail.
60457      FOUND_FREETYPE=no
60458    fi
60459  fi
60460
60461  if test "x$FOUND_FREETYPE" = xyes; then
60462    # Include file found, let's continue the sanity check.
60463    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60464$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60465
60466    # Reset to default value
60467    FREETYPE_BASE_NAME=freetype
60468    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60469    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60470      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60471          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60472        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60473        # for the .6 version explicitly.
60474        FREETYPE_BASE_NAME=freetype.6
60475        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60476        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60477$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60478      else
60479        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60480$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60481        FOUND_FREETYPE=no
60482      fi
60483    else
60484      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60485        # On Windows, we will need both .lib and .dll file.
60486        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60487          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60488$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60489          FOUND_FREETYPE=no
60490        fi
60491      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60492          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60493        # Found lib in isa dir, use that instead.
60494        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60495        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60496$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60497      fi
60498    fi
60499  fi
60500
60501  if test "x$FOUND_FREETYPE" = xyes; then
60502
60503  # Only process if variable expands to non-empty
60504
60505  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60506    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60507
60508  # Input might be given as Windows format, start by converting to
60509  # unix format.
60510  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60511  new_path=`$CYGPATH -u "$path"`
60512
60513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60516  # "foo.exe" is OK but "foo" is an error.
60517  #
60518  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60519  # It is also a way to make sure we got the proper file name for the real test later on.
60520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60521  if test "x$test_shortpath" = x; then
60522    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60523$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60524    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60525  fi
60526
60527  # Call helper function which possibly converts this using DOS-style short mode.
60528  # If so, the updated path is stored in $new_path.
60529
60530  input_path="$new_path"
60531  # Check if we need to convert this using DOS-style short mode. If the path
60532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60533  # take no chances and rewrite it.
60534  # Note: m4 eats our [], so we need to use [ and ] instead.
60535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60536  if test "x$has_forbidden_chars" != x; then
60537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60541      # Going to short mode and back again did indeed matter. Since short mode is
60542      # case insensitive, let's make it lowercase to improve readability.
60543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60544      # Now convert it back to Unix-style (cygpath)
60545      input_path=`$CYGPATH -u "$shortmode_path"`
60546      new_path="$input_path"
60547    fi
60548  fi
60549
60550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60551  if test "x$test_cygdrive_prefix" = x; then
60552    # As a simple fix, exclude /usr/bin since it's not a real path.
60553    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60555      # a path prefixed by /cygdrive for fixpath to work.
60556      new_path="$CYGWIN_ROOT_PATH$input_path"
60557    fi
60558  fi
60559
60560
60561  if test "x$path" != "x$new_path"; then
60562    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60564$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60565  fi
60566
60567    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60568
60569  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60570  has_colon=`$ECHO $path | $GREP ^.:`
60571  new_path="$path"
60572  if test "x$has_colon" = x; then
60573    # Not in mixed or Windows style, start by that.
60574    new_path=`cmd //c echo $path`
60575  fi
60576
60577
60578  input_path="$new_path"
60579  # Check if we need to convert this using DOS-style short mode. If the path
60580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60581  # take no chances and rewrite it.
60582  # Note: m4 eats our [], so we need to use [ and ] instead.
60583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60584  if test "x$has_forbidden_chars" != x; then
60585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60586    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60587  fi
60588
60589
60590  windows_path="$new_path"
60591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60592    unix_path=`$CYGPATH -u "$windows_path"`
60593    new_path="$unix_path"
60594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60596    new_path="$unix_path"
60597  fi
60598
60599  if test "x$path" != "x$new_path"; then
60600    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60602$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60603  fi
60604
60605  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60606  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60607
60608    else
60609      # We're on a unix platform. Hooray! :)
60610      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60611      has_space=`$ECHO "$path" | $GREP " "`
60612      if test "x$has_space" != x; then
60613        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60614$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60615        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60616      fi
60617
60618      # Use eval to expand a potential ~
60619      eval path="$path"
60620      if test ! -f "$path" && test ! -d "$path"; then
60621        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60622      fi
60623
60624      if test -d "$path"; then
60625        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60626      else
60627        dir="`$DIRNAME "$path"`"
60628        base="`$BASENAME "$path"`"
60629        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60630      fi
60631    fi
60632  fi
60633
60634
60635  # Only process if variable expands to non-empty
60636
60637  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60638    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60639
60640  # Input might be given as Windows format, start by converting to
60641  # unix format.
60642  path="$POTENTIAL_FREETYPE_LIB_PATH"
60643  new_path=`$CYGPATH -u "$path"`
60644
60645  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60646  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60647  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60648  # "foo.exe" is OK but "foo" is an error.
60649  #
60650  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60651  # It is also a way to make sure we got the proper file name for the real test later on.
60652  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60653  if test "x$test_shortpath" = x; then
60654    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60655$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60656    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60657  fi
60658
60659  # Call helper function which possibly converts this using DOS-style short mode.
60660  # If so, the updated path is stored in $new_path.
60661
60662  input_path="$new_path"
60663  # Check if we need to convert this using DOS-style short mode. If the path
60664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60665  # take no chances and rewrite it.
60666  # Note: m4 eats our [], so we need to use [ and ] instead.
60667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60668  if test "x$has_forbidden_chars" != x; then
60669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60670    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60671    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60672    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60673      # Going to short mode and back again did indeed matter. Since short mode is
60674      # case insensitive, let's make it lowercase to improve readability.
60675      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60676      # Now convert it back to Unix-style (cygpath)
60677      input_path=`$CYGPATH -u "$shortmode_path"`
60678      new_path="$input_path"
60679    fi
60680  fi
60681
60682  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60683  if test "x$test_cygdrive_prefix" = x; then
60684    # As a simple fix, exclude /usr/bin since it's not a real path.
60685    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60686      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60687      # a path prefixed by /cygdrive for fixpath to work.
60688      new_path="$CYGWIN_ROOT_PATH$input_path"
60689    fi
60690  fi
60691
60692
60693  if test "x$path" != "x$new_path"; then
60694    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60696$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60697  fi
60698
60699    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60700
60701  path="$POTENTIAL_FREETYPE_LIB_PATH"
60702  has_colon=`$ECHO $path | $GREP ^.:`
60703  new_path="$path"
60704  if test "x$has_colon" = x; then
60705    # Not in mixed or Windows style, start by that.
60706    new_path=`cmd //c echo $path`
60707  fi
60708
60709
60710  input_path="$new_path"
60711  # Check if we need to convert this using DOS-style short mode. If the path
60712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60713  # take no chances and rewrite it.
60714  # Note: m4 eats our [], so we need to use [ and ] instead.
60715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60716  if test "x$has_forbidden_chars" != x; then
60717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60718    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60719  fi
60720
60721
60722  windows_path="$new_path"
60723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60724    unix_path=`$CYGPATH -u "$windows_path"`
60725    new_path="$unix_path"
60726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60728    new_path="$unix_path"
60729  fi
60730
60731  if test "x$path" != "x$new_path"; then
60732    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60733    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60734$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60735  fi
60736
60737  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60738  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60739
60740    else
60741      # We're on a unix platform. Hooray! :)
60742      path="$POTENTIAL_FREETYPE_LIB_PATH"
60743      has_space=`$ECHO "$path" | $GREP " "`
60744      if test "x$has_space" != x; then
60745        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60746$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60747        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60748      fi
60749
60750      # Use eval to expand a potential ~
60751      eval path="$path"
60752      if test ! -f "$path" && test ! -d "$path"; then
60753        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60754      fi
60755
60756      if test -d "$path"; then
60757        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60758      else
60759        dir="`$DIRNAME "$path"`"
60760        base="`$BASENAME "$path"`"
60761        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60762      fi
60763    fi
60764  fi
60765
60766
60767    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60768    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60769$as_echo_n "checking for freetype includes... " >&6; }
60770    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60771$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60772    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60773    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60774$as_echo_n "checking for freetype libraries... " >&6; }
60775    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60776$as_echo "$FREETYPE_LIB_PATH" >&6; }
60777  fi
60778
60779            fi
60780          fi
60781
60782          if test "x$FOUND_FREETYPE" != xyes; then
60783            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
60784
60785  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60786  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60787  METHOD="well-known location"
60788
60789  # Let's start with an optimistic view of the world :-)
60790  FOUND_FREETYPE=yes
60791
60792  # First look for the canonical freetype main include file ft2build.h.
60793  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60794    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60795    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60796    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60797      # Fail.
60798      FOUND_FREETYPE=no
60799    fi
60800  fi
60801
60802  if test "x$FOUND_FREETYPE" = xyes; then
60803    # Include file found, let's continue the sanity check.
60804    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60805$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60806
60807    # Reset to default value
60808    FREETYPE_BASE_NAME=freetype
60809    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60810    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60811      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60812          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60813        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60814        # for the .6 version explicitly.
60815        FREETYPE_BASE_NAME=freetype.6
60816        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60817        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60818$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60819      else
60820        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60821$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60822        FOUND_FREETYPE=no
60823      fi
60824    else
60825      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60826        # On Windows, we will need both .lib and .dll file.
60827        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60828          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60829$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60830          FOUND_FREETYPE=no
60831        fi
60832      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60833          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60834        # Found lib in isa dir, use that instead.
60835        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60836        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60837$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60838      fi
60839    fi
60840  fi
60841
60842  if test "x$FOUND_FREETYPE" = xyes; then
60843
60844  # Only process if variable expands to non-empty
60845
60846  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60847    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60848
60849  # Input might be given as Windows format, start by converting to
60850  # unix format.
60851  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60852  new_path=`$CYGPATH -u "$path"`
60853
60854  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60855  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60856  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60857  # "foo.exe" is OK but "foo" is an error.
60858  #
60859  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60860  # It is also a way to make sure we got the proper file name for the real test later on.
60861  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60862  if test "x$test_shortpath" = x; then
60863    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60864$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60865    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60866  fi
60867
60868  # Call helper function which possibly converts this using DOS-style short mode.
60869  # If so, the updated path is stored in $new_path.
60870
60871  input_path="$new_path"
60872  # Check if we need to convert this using DOS-style short mode. If the path
60873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60874  # take no chances and rewrite it.
60875  # Note: m4 eats our [], so we need to use [ and ] instead.
60876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60877  if test "x$has_forbidden_chars" != x; then
60878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60882      # Going to short mode and back again did indeed matter. Since short mode is
60883      # case insensitive, let's make it lowercase to improve readability.
60884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60885      # Now convert it back to Unix-style (cygpath)
60886      input_path=`$CYGPATH -u "$shortmode_path"`
60887      new_path="$input_path"
60888    fi
60889  fi
60890
60891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60892  if test "x$test_cygdrive_prefix" = x; then
60893    # As a simple fix, exclude /usr/bin since it's not a real path.
60894    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60896      # a path prefixed by /cygdrive for fixpath to work.
60897      new_path="$CYGWIN_ROOT_PATH$input_path"
60898    fi
60899  fi
60900
60901
60902  if test "x$path" != "x$new_path"; then
60903    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60905$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60906  fi
60907
60908    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60909
60910  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60911  has_colon=`$ECHO $path | $GREP ^.:`
60912  new_path="$path"
60913  if test "x$has_colon" = x; then
60914    # Not in mixed or Windows style, start by that.
60915    new_path=`cmd //c echo $path`
60916  fi
60917
60918
60919  input_path="$new_path"
60920  # Check if we need to convert this using DOS-style short mode. If the path
60921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60922  # take no chances and rewrite it.
60923  # Note: m4 eats our [], so we need to use [ and ] instead.
60924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60925  if test "x$has_forbidden_chars" != x; then
60926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60927    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60928  fi
60929
60930
60931  windows_path="$new_path"
60932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60933    unix_path=`$CYGPATH -u "$windows_path"`
60934    new_path="$unix_path"
60935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60937    new_path="$unix_path"
60938  fi
60939
60940  if test "x$path" != "x$new_path"; then
60941    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60943$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60944  fi
60945
60946  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60947  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60948
60949    else
60950      # We're on a unix platform. Hooray! :)
60951      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60952      has_space=`$ECHO "$path" | $GREP " "`
60953      if test "x$has_space" != x; then
60954        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60955$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60956        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60957      fi
60958
60959      # Use eval to expand a potential ~
60960      eval path="$path"
60961      if test ! -f "$path" && test ! -d "$path"; then
60962        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60963      fi
60964
60965      if test -d "$path"; then
60966        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60967      else
60968        dir="`$DIRNAME "$path"`"
60969        base="`$BASENAME "$path"`"
60970        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60971      fi
60972    fi
60973  fi
60974
60975
60976  # Only process if variable expands to non-empty
60977
60978  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60979    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60980
60981  # Input might be given as Windows format, start by converting to
60982  # unix format.
60983  path="$POTENTIAL_FREETYPE_LIB_PATH"
60984  new_path=`$CYGPATH -u "$path"`
60985
60986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60989  # "foo.exe" is OK but "foo" is an error.
60990  #
60991  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60992  # It is also a way to make sure we got the proper file name for the real test later on.
60993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60994  if test "x$test_shortpath" = x; then
60995    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60996$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60997    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60998  fi
60999
61000  # Call helper function which possibly converts this using DOS-style short mode.
61001  # If so, the updated path is stored in $new_path.
61002
61003  input_path="$new_path"
61004  # Check if we need to convert this using DOS-style short mode. If the path
61005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61006  # take no chances and rewrite it.
61007  # Note: m4 eats our [], so we need to use [ and ] instead.
61008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61009  if test "x$has_forbidden_chars" != x; then
61010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61014      # Going to short mode and back again did indeed matter. Since short mode is
61015      # case insensitive, let's make it lowercase to improve readability.
61016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61017      # Now convert it back to Unix-style (cygpath)
61018      input_path=`$CYGPATH -u "$shortmode_path"`
61019      new_path="$input_path"
61020    fi
61021  fi
61022
61023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61024  if test "x$test_cygdrive_prefix" = x; then
61025    # As a simple fix, exclude /usr/bin since it's not a real path.
61026    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61028      # a path prefixed by /cygdrive for fixpath to work.
61029      new_path="$CYGWIN_ROOT_PATH$input_path"
61030    fi
61031  fi
61032
61033
61034  if test "x$path" != "x$new_path"; then
61035    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61037$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61038  fi
61039
61040    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61041
61042  path="$POTENTIAL_FREETYPE_LIB_PATH"
61043  has_colon=`$ECHO $path | $GREP ^.:`
61044  new_path="$path"
61045  if test "x$has_colon" = x; then
61046    # Not in mixed or Windows style, start by that.
61047    new_path=`cmd //c echo $path`
61048  fi
61049
61050
61051  input_path="$new_path"
61052  # Check if we need to convert this using DOS-style short mode. If the path
61053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61054  # take no chances and rewrite it.
61055  # Note: m4 eats our [], so we need to use [ and ] instead.
61056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61057  if test "x$has_forbidden_chars" != x; then
61058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61060  fi
61061
61062
61063  windows_path="$new_path"
61064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61065    unix_path=`$CYGPATH -u "$windows_path"`
61066    new_path="$unix_path"
61067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61069    new_path="$unix_path"
61070  fi
61071
61072  if test "x$path" != "x$new_path"; then
61073    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61075$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61076  fi
61077
61078  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61079  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61080
61081    else
61082      # We're on a unix platform. Hooray! :)
61083      path="$POTENTIAL_FREETYPE_LIB_PATH"
61084      has_space=`$ECHO "$path" | $GREP " "`
61085      if test "x$has_space" != x; then
61086        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61087$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61088        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61089      fi
61090
61091      # Use eval to expand a potential ~
61092      eval path="$path"
61093      if test ! -f "$path" && test ! -d "$path"; then
61094        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61095      fi
61096
61097      if test -d "$path"; then
61098        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61099      else
61100        dir="`$DIRNAME "$path"`"
61101        base="`$BASENAME "$path"`"
61102        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61103      fi
61104    fi
61105  fi
61106
61107
61108    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61109    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61110$as_echo_n "checking for freetype includes... " >&6; }
61111    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61112$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61113    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61114    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61115$as_echo_n "checking for freetype libraries... " >&6; }
61116    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61117$as_echo "$FREETYPE_LIB_PATH" >&6; }
61118  fi
61119
61120          fi
61121
61122          if test "x$FOUND_FREETYPE" != xyes; then
61123            FREETYPE_BASE_DIR="$SYSROOT/usr"
61124            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61125
61126  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61127  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61128  METHOD="well-known location"
61129
61130  # Let's start with an optimistic view of the world :-)
61131  FOUND_FREETYPE=yes
61132
61133  # First look for the canonical freetype main include file ft2build.h.
61134  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61135    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61136    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61137    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61138      # Fail.
61139      FOUND_FREETYPE=no
61140    fi
61141  fi
61142
61143  if test "x$FOUND_FREETYPE" = xyes; then
61144    # Include file found, let's continue the sanity check.
61145    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61146$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61147
61148    # Reset to default value
61149    FREETYPE_BASE_NAME=freetype
61150    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61151    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61152      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61153          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61154        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61155        # for the .6 version explicitly.
61156        FREETYPE_BASE_NAME=freetype.6
61157        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61158        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61159$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61160      else
61161        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61162$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61163        FOUND_FREETYPE=no
61164      fi
61165    else
61166      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61167        # On Windows, we will need both .lib and .dll file.
61168        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61169          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61170$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61171          FOUND_FREETYPE=no
61172        fi
61173      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61174          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61175        # Found lib in isa dir, use that instead.
61176        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61177        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61178$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61179      fi
61180    fi
61181  fi
61182
61183  if test "x$FOUND_FREETYPE" = xyes; then
61184
61185  # Only process if variable expands to non-empty
61186
61187  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61189
61190  # Input might be given as Windows format, start by converting to
61191  # unix format.
61192  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61193  new_path=`$CYGPATH -u "$path"`
61194
61195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61198  # "foo.exe" is OK but "foo" is an error.
61199  #
61200  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61201  # It is also a way to make sure we got the proper file name for the real test later on.
61202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61203  if test "x$test_shortpath" = x; then
61204    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61205$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61206    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61207  fi
61208
61209  # Call helper function which possibly converts this using DOS-style short mode.
61210  # If so, the updated path is stored in $new_path.
61211
61212  input_path="$new_path"
61213  # Check if we need to convert this using DOS-style short mode. If the path
61214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61215  # take no chances and rewrite it.
61216  # Note: m4 eats our [], so we need to use [ and ] instead.
61217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61218  if test "x$has_forbidden_chars" != x; then
61219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61220    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61221    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61222    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61223      # Going to short mode and back again did indeed matter. Since short mode is
61224      # case insensitive, let's make it lowercase to improve readability.
61225      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61226      # Now convert it back to Unix-style (cygpath)
61227      input_path=`$CYGPATH -u "$shortmode_path"`
61228      new_path="$input_path"
61229    fi
61230  fi
61231
61232  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61233  if test "x$test_cygdrive_prefix" = x; then
61234    # As a simple fix, exclude /usr/bin since it's not a real path.
61235    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61236      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61237      # a path prefixed by /cygdrive for fixpath to work.
61238      new_path="$CYGWIN_ROOT_PATH$input_path"
61239    fi
61240  fi
61241
61242
61243  if test "x$path" != "x$new_path"; then
61244    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61246$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61247  fi
61248
61249    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61250
61251  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61252  has_colon=`$ECHO $path | $GREP ^.:`
61253  new_path="$path"
61254  if test "x$has_colon" = x; then
61255    # Not in mixed or Windows style, start by that.
61256    new_path=`cmd //c echo $path`
61257  fi
61258
61259
61260  input_path="$new_path"
61261  # Check if we need to convert this using DOS-style short mode. If the path
61262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61263  # take no chances and rewrite it.
61264  # Note: m4 eats our [], so we need to use [ and ] instead.
61265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61266  if test "x$has_forbidden_chars" != x; then
61267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61268    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61269  fi
61270
61271
61272  windows_path="$new_path"
61273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61274    unix_path=`$CYGPATH -u "$windows_path"`
61275    new_path="$unix_path"
61276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61278    new_path="$unix_path"
61279  fi
61280
61281  if test "x$path" != "x$new_path"; then
61282    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61284$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61285  fi
61286
61287  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61288  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61289
61290    else
61291      # We're on a unix platform. Hooray! :)
61292      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61293      has_space=`$ECHO "$path" | $GREP " "`
61294      if test "x$has_space" != x; then
61295        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61296$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61297        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61298      fi
61299
61300      # Use eval to expand a potential ~
61301      eval path="$path"
61302      if test ! -f "$path" && test ! -d "$path"; then
61303        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61304      fi
61305
61306      if test -d "$path"; then
61307        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61308      else
61309        dir="`$DIRNAME "$path"`"
61310        base="`$BASENAME "$path"`"
61311        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61312      fi
61313    fi
61314  fi
61315
61316
61317  # Only process if variable expands to non-empty
61318
61319  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61320    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61321
61322  # Input might be given as Windows format, start by converting to
61323  # unix format.
61324  path="$POTENTIAL_FREETYPE_LIB_PATH"
61325  new_path=`$CYGPATH -u "$path"`
61326
61327  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61328  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61329  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61330  # "foo.exe" is OK but "foo" is an error.
61331  #
61332  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61333  # It is also a way to make sure we got the proper file name for the real test later on.
61334  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61335  if test "x$test_shortpath" = x; then
61336    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61337$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61338    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61339  fi
61340
61341  # Call helper function which possibly converts this using DOS-style short mode.
61342  # If so, the updated path is stored in $new_path.
61343
61344  input_path="$new_path"
61345  # Check if we need to convert this using DOS-style short mode. If the path
61346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61347  # take no chances and rewrite it.
61348  # Note: m4 eats our [], so we need to use [ and ] instead.
61349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61350  if test "x$has_forbidden_chars" != x; then
61351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61352    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61353    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61354    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61355      # Going to short mode and back again did indeed matter. Since short mode is
61356      # case insensitive, let's make it lowercase to improve readability.
61357      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61358      # Now convert it back to Unix-style (cygpath)
61359      input_path=`$CYGPATH -u "$shortmode_path"`
61360      new_path="$input_path"
61361    fi
61362  fi
61363
61364  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61365  if test "x$test_cygdrive_prefix" = x; then
61366    # As a simple fix, exclude /usr/bin since it's not a real path.
61367    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61368      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61369      # a path prefixed by /cygdrive for fixpath to work.
61370      new_path="$CYGWIN_ROOT_PATH$input_path"
61371    fi
61372  fi
61373
61374
61375  if test "x$path" != "x$new_path"; then
61376    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61378$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61379  fi
61380
61381    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61382
61383  path="$POTENTIAL_FREETYPE_LIB_PATH"
61384  has_colon=`$ECHO $path | $GREP ^.:`
61385  new_path="$path"
61386  if test "x$has_colon" = x; then
61387    # Not in mixed or Windows style, start by that.
61388    new_path=`cmd //c echo $path`
61389  fi
61390
61391
61392  input_path="$new_path"
61393  # Check if we need to convert this using DOS-style short mode. If the path
61394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61395  # take no chances and rewrite it.
61396  # Note: m4 eats our [], so we need to use [ and ] instead.
61397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61398  if test "x$has_forbidden_chars" != x; then
61399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61400    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61401  fi
61402
61403
61404  windows_path="$new_path"
61405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61406    unix_path=`$CYGPATH -u "$windows_path"`
61407    new_path="$unix_path"
61408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61410    new_path="$unix_path"
61411  fi
61412
61413  if test "x$path" != "x$new_path"; then
61414    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61416$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61417  fi
61418
61419  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61420  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61421
61422    else
61423      # We're on a unix platform. Hooray! :)
61424      path="$POTENTIAL_FREETYPE_LIB_PATH"
61425      has_space=`$ECHO "$path" | $GREP " "`
61426      if test "x$has_space" != x; then
61427        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61428$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61429        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61430      fi
61431
61432      # Use eval to expand a potential ~
61433      eval path="$path"
61434      if test ! -f "$path" && test ! -d "$path"; then
61435        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61436      fi
61437
61438      if test -d "$path"; then
61439        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61440      else
61441        dir="`$DIRNAME "$path"`"
61442        base="`$BASENAME "$path"`"
61443        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61444      fi
61445    fi
61446  fi
61447
61448
61449    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61450    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61451$as_echo_n "checking for freetype includes... " >&6; }
61452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61453$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61454    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61455    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61456$as_echo_n "checking for freetype libraries... " >&6; }
61457    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61458$as_echo "$FREETYPE_LIB_PATH" >&6; }
61459  fi
61460
61461            else
61462
61463  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61464  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61465  METHOD="well-known location"
61466
61467  # Let's start with an optimistic view of the world :-)
61468  FOUND_FREETYPE=yes
61469
61470  # First look for the canonical freetype main include file ft2build.h.
61471  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61472    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61473    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61474    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61475      # Fail.
61476      FOUND_FREETYPE=no
61477    fi
61478  fi
61479
61480  if test "x$FOUND_FREETYPE" = xyes; then
61481    # Include file found, let's continue the sanity check.
61482    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61483$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61484
61485    # Reset to default value
61486    FREETYPE_BASE_NAME=freetype
61487    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61488    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61489      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61490          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61491        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61492        # for the .6 version explicitly.
61493        FREETYPE_BASE_NAME=freetype.6
61494        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61495        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61496$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61497      else
61498        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61499$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61500        FOUND_FREETYPE=no
61501      fi
61502    else
61503      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61504        # On Windows, we will need both .lib and .dll file.
61505        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61506          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61507$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61508          FOUND_FREETYPE=no
61509        fi
61510      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61511          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61512        # Found lib in isa dir, use that instead.
61513        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61514        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61515$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61516      fi
61517    fi
61518  fi
61519
61520  if test "x$FOUND_FREETYPE" = xyes; then
61521
61522  # Only process if variable expands to non-empty
61523
61524  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61525    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61526
61527  # Input might be given as Windows format, start by converting to
61528  # unix format.
61529  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61530  new_path=`$CYGPATH -u "$path"`
61531
61532  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61533  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61534  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61535  # "foo.exe" is OK but "foo" is an error.
61536  #
61537  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61538  # It is also a way to make sure we got the proper file name for the real test later on.
61539  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61540  if test "x$test_shortpath" = x; then
61541    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61542$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61543    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61544  fi
61545
61546  # Call helper function which possibly converts this using DOS-style short mode.
61547  # If so, the updated path is stored in $new_path.
61548
61549  input_path="$new_path"
61550  # Check if we need to convert this using DOS-style short mode. If the path
61551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61552  # take no chances and rewrite it.
61553  # Note: m4 eats our [], so we need to use [ and ] instead.
61554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61555  if test "x$has_forbidden_chars" != x; then
61556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61557    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61558    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61559    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61560      # Going to short mode and back again did indeed matter. Since short mode is
61561      # case insensitive, let's make it lowercase to improve readability.
61562      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61563      # Now convert it back to Unix-style (cygpath)
61564      input_path=`$CYGPATH -u "$shortmode_path"`
61565      new_path="$input_path"
61566    fi
61567  fi
61568
61569  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61570  if test "x$test_cygdrive_prefix" = x; then
61571    # As a simple fix, exclude /usr/bin since it's not a real path.
61572    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61573      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61574      # a path prefixed by /cygdrive for fixpath to work.
61575      new_path="$CYGWIN_ROOT_PATH$input_path"
61576    fi
61577  fi
61578
61579
61580  if test "x$path" != "x$new_path"; then
61581    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61582    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61583$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61584  fi
61585
61586    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61587
61588  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61589  has_colon=`$ECHO $path | $GREP ^.:`
61590  new_path="$path"
61591  if test "x$has_colon" = x; then
61592    # Not in mixed or Windows style, start by that.
61593    new_path=`cmd //c echo $path`
61594  fi
61595
61596
61597  input_path="$new_path"
61598  # Check if we need to convert this using DOS-style short mode. If the path
61599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61600  # take no chances and rewrite it.
61601  # Note: m4 eats our [], so we need to use [ and ] instead.
61602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61603  if test "x$has_forbidden_chars" != x; then
61604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61605    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61606  fi
61607
61608
61609  windows_path="$new_path"
61610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61611    unix_path=`$CYGPATH -u "$windows_path"`
61612    new_path="$unix_path"
61613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61615    new_path="$unix_path"
61616  fi
61617
61618  if test "x$path" != "x$new_path"; then
61619    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61620    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61621$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61622  fi
61623
61624  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61625  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61626
61627    else
61628      # We're on a unix platform. Hooray! :)
61629      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61630      has_space=`$ECHO "$path" | $GREP " "`
61631      if test "x$has_space" != x; then
61632        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61633$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61634        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61635      fi
61636
61637      # Use eval to expand a potential ~
61638      eval path="$path"
61639      if test ! -f "$path" && test ! -d "$path"; then
61640        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61641      fi
61642
61643      if test -d "$path"; then
61644        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61645      else
61646        dir="`$DIRNAME "$path"`"
61647        base="`$BASENAME "$path"`"
61648        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61649      fi
61650    fi
61651  fi
61652
61653
61654  # Only process if variable expands to non-empty
61655
61656  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61657    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61658
61659  # Input might be given as Windows format, start by converting to
61660  # unix format.
61661  path="$POTENTIAL_FREETYPE_LIB_PATH"
61662  new_path=`$CYGPATH -u "$path"`
61663
61664  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61665  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61666  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61667  # "foo.exe" is OK but "foo" is an error.
61668  #
61669  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61670  # It is also a way to make sure we got the proper file name for the real test later on.
61671  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61672  if test "x$test_shortpath" = x; then
61673    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61674$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61675    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61676  fi
61677
61678  # Call helper function which possibly converts this using DOS-style short mode.
61679  # If so, the updated path is stored in $new_path.
61680
61681  input_path="$new_path"
61682  # Check if we need to convert this using DOS-style short mode. If the path
61683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61684  # take no chances and rewrite it.
61685  # Note: m4 eats our [], so we need to use [ and ] instead.
61686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61687  if test "x$has_forbidden_chars" != x; then
61688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61689    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61690    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61691    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61692      # Going to short mode and back again did indeed matter. Since short mode is
61693      # case insensitive, let's make it lowercase to improve readability.
61694      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61695      # Now convert it back to Unix-style (cygpath)
61696      input_path=`$CYGPATH -u "$shortmode_path"`
61697      new_path="$input_path"
61698    fi
61699  fi
61700
61701  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61702  if test "x$test_cygdrive_prefix" = x; then
61703    # As a simple fix, exclude /usr/bin since it's not a real path.
61704    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61705      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61706      # a path prefixed by /cygdrive for fixpath to work.
61707      new_path="$CYGWIN_ROOT_PATH$input_path"
61708    fi
61709  fi
61710
61711
61712  if test "x$path" != "x$new_path"; then
61713    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61714    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61715$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61716  fi
61717
61718    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61719
61720  path="$POTENTIAL_FREETYPE_LIB_PATH"
61721  has_colon=`$ECHO $path | $GREP ^.:`
61722  new_path="$path"
61723  if test "x$has_colon" = x; then
61724    # Not in mixed or Windows style, start by that.
61725    new_path=`cmd //c echo $path`
61726  fi
61727
61728
61729  input_path="$new_path"
61730  # Check if we need to convert this using DOS-style short mode. If the path
61731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61732  # take no chances and rewrite it.
61733  # Note: m4 eats our [], so we need to use [ and ] instead.
61734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61735  if test "x$has_forbidden_chars" != x; then
61736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61737    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61738  fi
61739
61740
61741  windows_path="$new_path"
61742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61743    unix_path=`$CYGPATH -u "$windows_path"`
61744    new_path="$unix_path"
61745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61747    new_path="$unix_path"
61748  fi
61749
61750  if test "x$path" != "x$new_path"; then
61751    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61753$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61754  fi
61755
61756  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61757  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61758
61759    else
61760      # We're on a unix platform. Hooray! :)
61761      path="$POTENTIAL_FREETYPE_LIB_PATH"
61762      has_space=`$ECHO "$path" | $GREP " "`
61763      if test "x$has_space" != x; then
61764        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61765$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61766        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61767      fi
61768
61769      # Use eval to expand a potential ~
61770      eval path="$path"
61771      if test ! -f "$path" && test ! -d "$path"; then
61772        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61773      fi
61774
61775      if test -d "$path"; then
61776        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61777      else
61778        dir="`$DIRNAME "$path"`"
61779        base="`$BASENAME "$path"`"
61780        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61781      fi
61782    fi
61783  fi
61784
61785
61786    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61787    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61788$as_echo_n "checking for freetype includes... " >&6; }
61789    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61790$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61791    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61792    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61793$as_echo_n "checking for freetype libraries... " >&6; }
61794    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61795$as_echo "$FREETYPE_LIB_PATH" >&6; }
61796  fi
61797
61798              if test "x$FOUND_FREETYPE" != xyes; then
61799
61800  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61801  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61802  METHOD="well-known location"
61803
61804  # Let's start with an optimistic view of the world :-)
61805  FOUND_FREETYPE=yes
61806
61807  # First look for the canonical freetype main include file ft2build.h.
61808  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61809    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61810    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61811    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61812      # Fail.
61813      FOUND_FREETYPE=no
61814    fi
61815  fi
61816
61817  if test "x$FOUND_FREETYPE" = xyes; then
61818    # Include file found, let's continue the sanity check.
61819    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61820$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61821
61822    # Reset to default value
61823    FREETYPE_BASE_NAME=freetype
61824    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61825    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61826      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61827          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61828        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61829        # for the .6 version explicitly.
61830        FREETYPE_BASE_NAME=freetype.6
61831        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61832        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61833$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61834      else
61835        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61836$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61837        FOUND_FREETYPE=no
61838      fi
61839    else
61840      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61841        # On Windows, we will need both .lib and .dll file.
61842        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61843          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61844$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61845          FOUND_FREETYPE=no
61846        fi
61847      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61848          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61849        # Found lib in isa dir, use that instead.
61850        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61851        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61852$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61853      fi
61854    fi
61855  fi
61856
61857  if test "x$FOUND_FREETYPE" = xyes; then
61858
61859  # Only process if variable expands to non-empty
61860
61861  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61862    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61863
61864  # Input might be given as Windows format, start by converting to
61865  # unix format.
61866  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61867  new_path=`$CYGPATH -u "$path"`
61868
61869  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61870  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61871  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61872  # "foo.exe" is OK but "foo" is an error.
61873  #
61874  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61875  # It is also a way to make sure we got the proper file name for the real test later on.
61876  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61877  if test "x$test_shortpath" = x; then
61878    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61879$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61880    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61881  fi
61882
61883  # Call helper function which possibly converts this using DOS-style short mode.
61884  # If so, the updated path is stored in $new_path.
61885
61886  input_path="$new_path"
61887  # Check if we need to convert this using DOS-style short mode. If the path
61888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61889  # take no chances and rewrite it.
61890  # Note: m4 eats our [], so we need to use [ and ] instead.
61891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61892  if test "x$has_forbidden_chars" != x; then
61893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61894    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61895    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61896    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61897      # Going to short mode and back again did indeed matter. Since short mode is
61898      # case insensitive, let's make it lowercase to improve readability.
61899      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61900      # Now convert it back to Unix-style (cygpath)
61901      input_path=`$CYGPATH -u "$shortmode_path"`
61902      new_path="$input_path"
61903    fi
61904  fi
61905
61906  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61907  if test "x$test_cygdrive_prefix" = x; then
61908    # As a simple fix, exclude /usr/bin since it's not a real path.
61909    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61910      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61911      # a path prefixed by /cygdrive for fixpath to work.
61912      new_path="$CYGWIN_ROOT_PATH$input_path"
61913    fi
61914  fi
61915
61916
61917  if test "x$path" != "x$new_path"; then
61918    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61920$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61921  fi
61922
61923    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61924
61925  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61926  has_colon=`$ECHO $path | $GREP ^.:`
61927  new_path="$path"
61928  if test "x$has_colon" = x; then
61929    # Not in mixed or Windows style, start by that.
61930    new_path=`cmd //c echo $path`
61931  fi
61932
61933
61934  input_path="$new_path"
61935  # Check if we need to convert this using DOS-style short mode. If the path
61936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61937  # take no chances and rewrite it.
61938  # Note: m4 eats our [], so we need to use [ and ] instead.
61939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61940  if test "x$has_forbidden_chars" != x; then
61941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61943  fi
61944
61945
61946  windows_path="$new_path"
61947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61948    unix_path=`$CYGPATH -u "$windows_path"`
61949    new_path="$unix_path"
61950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61952    new_path="$unix_path"
61953  fi
61954
61955  if test "x$path" != "x$new_path"; then
61956    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61958$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61959  fi
61960
61961  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61962  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61963
61964    else
61965      # We're on a unix platform. Hooray! :)
61966      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61967      has_space=`$ECHO "$path" | $GREP " "`
61968      if test "x$has_space" != x; then
61969        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61970$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61971        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61972      fi
61973
61974      # Use eval to expand a potential ~
61975      eval path="$path"
61976      if test ! -f "$path" && test ! -d "$path"; then
61977        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61978      fi
61979
61980      if test -d "$path"; then
61981        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61982      else
61983        dir="`$DIRNAME "$path"`"
61984        base="`$BASENAME "$path"`"
61985        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61986      fi
61987    fi
61988  fi
61989
61990
61991  # Only process if variable expands to non-empty
61992
61993  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61994    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61995
61996  # Input might be given as Windows format, start by converting to
61997  # unix format.
61998  path="$POTENTIAL_FREETYPE_LIB_PATH"
61999  new_path=`$CYGPATH -u "$path"`
62000
62001  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62002  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62003  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62004  # "foo.exe" is OK but "foo" is an error.
62005  #
62006  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62007  # It is also a way to make sure we got the proper file name for the real test later on.
62008  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62009  if test "x$test_shortpath" = x; then
62010    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62011$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62012    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62013  fi
62014
62015  # Call helper function which possibly converts this using DOS-style short mode.
62016  # If so, the updated path is stored in $new_path.
62017
62018  input_path="$new_path"
62019  # Check if we need to convert this using DOS-style short mode. If the path
62020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62021  # take no chances and rewrite it.
62022  # Note: m4 eats our [], so we need to use [ and ] instead.
62023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62024  if test "x$has_forbidden_chars" != x; then
62025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62026    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62027    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62028    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62029      # Going to short mode and back again did indeed matter. Since short mode is
62030      # case insensitive, let's make it lowercase to improve readability.
62031      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62032      # Now convert it back to Unix-style (cygpath)
62033      input_path=`$CYGPATH -u "$shortmode_path"`
62034      new_path="$input_path"
62035    fi
62036  fi
62037
62038  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62039  if test "x$test_cygdrive_prefix" = x; then
62040    # As a simple fix, exclude /usr/bin since it's not a real path.
62041    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62042      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62043      # a path prefixed by /cygdrive for fixpath to work.
62044      new_path="$CYGWIN_ROOT_PATH$input_path"
62045    fi
62046  fi
62047
62048
62049  if test "x$path" != "x$new_path"; then
62050    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62052$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62053  fi
62054
62055    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62056
62057  path="$POTENTIAL_FREETYPE_LIB_PATH"
62058  has_colon=`$ECHO $path | $GREP ^.:`
62059  new_path="$path"
62060  if test "x$has_colon" = x; then
62061    # Not in mixed or Windows style, start by that.
62062    new_path=`cmd //c echo $path`
62063  fi
62064
62065
62066  input_path="$new_path"
62067  # Check if we need to convert this using DOS-style short mode. If the path
62068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62069  # take no chances and rewrite it.
62070  # Note: m4 eats our [], so we need to use [ and ] instead.
62071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62072  if test "x$has_forbidden_chars" != x; then
62073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62074    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62075  fi
62076
62077
62078  windows_path="$new_path"
62079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62080    unix_path=`$CYGPATH -u "$windows_path"`
62081    new_path="$unix_path"
62082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62084    new_path="$unix_path"
62085  fi
62086
62087  if test "x$path" != "x$new_path"; then
62088    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62090$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62091  fi
62092
62093  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62094  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62095
62096    else
62097      # We're on a unix platform. Hooray! :)
62098      path="$POTENTIAL_FREETYPE_LIB_PATH"
62099      has_space=`$ECHO "$path" | $GREP " "`
62100      if test "x$has_space" != x; then
62101        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62102$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62103        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62104      fi
62105
62106      # Use eval to expand a potential ~
62107      eval path="$path"
62108      if test ! -f "$path" && test ! -d "$path"; then
62109        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62110      fi
62111
62112      if test -d "$path"; then
62113        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62114      else
62115        dir="`$DIRNAME "$path"`"
62116        base="`$BASENAME "$path"`"
62117        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62118      fi
62119    fi
62120  fi
62121
62122
62123    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62124    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62125$as_echo_n "checking for freetype includes... " >&6; }
62126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62127$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62128    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62129    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62130$as_echo_n "checking for freetype libraries... " >&6; }
62131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62132$as_echo "$FREETYPE_LIB_PATH" >&6; }
62133  fi
62134
62135              fi
62136            fi
62137          fi
62138        fi
62139      fi # end check in well-known locations
62140
62141      if test "x$FOUND_FREETYPE" != xyes; then
62142
62143  # Print a helpful message on how to acquire the necessary build dependency.
62144  # freetype is the help tag: freetype, cups, alsa etc
62145  MISSING_DEPENDENCY=freetype
62146
62147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62148    cygwin_help $MISSING_DEPENDENCY
62149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62150    msys_help $MISSING_DEPENDENCY
62151  else
62152    PKGHANDLER_COMMAND=
62153
62154    case $PKGHANDLER in
62155      apt-get)
62156        apt_help     $MISSING_DEPENDENCY ;;
62157      yum)
62158        yum_help     $MISSING_DEPENDENCY ;;
62159      port)
62160        port_help    $MISSING_DEPENDENCY ;;
62161      pkgutil)
62162        pkgutil_help $MISSING_DEPENDENCY ;;
62163      pkgadd)
62164        pkgadd_help  $MISSING_DEPENDENCY ;;
62165    esac
62166
62167    if test "x$PKGHANDLER_COMMAND" != x; then
62168      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62169    fi
62170  fi
62171
62172        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62173      fi
62174    fi # end user specified settings
62175
62176    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62177    if test "x$FREETYPE_CFLAGS" = x; then
62178
62179  # Only process if variable expands to non-empty
62180
62181  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62183
62184  # Input might be given as Windows format, start by converting to
62185  # unix format.
62186  path="$FREETYPE_INCLUDE_PATH"
62187  new_path=`$CYGPATH -u "$path"`
62188
62189  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62190  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62191  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62192  # "foo.exe" is OK but "foo" is an error.
62193  #
62194  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62195  # It is also a way to make sure we got the proper file name for the real test later on.
62196  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62197  if test "x$test_shortpath" = x; then
62198    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62199$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62200    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62201  fi
62202
62203  # Call helper function which possibly converts this using DOS-style short mode.
62204  # If so, the updated path is stored in $new_path.
62205
62206  input_path="$new_path"
62207  # Check if we need to convert this using DOS-style short mode. If the path
62208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62209  # take no chances and rewrite it.
62210  # Note: m4 eats our [], so we need to use [ and ] instead.
62211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62212  if test "x$has_forbidden_chars" != x; then
62213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62217      # Going to short mode and back again did indeed matter. Since short mode is
62218      # case insensitive, let's make it lowercase to improve readability.
62219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62220      # Now convert it back to Unix-style (cygpath)
62221      input_path=`$CYGPATH -u "$shortmode_path"`
62222      new_path="$input_path"
62223    fi
62224  fi
62225
62226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62227  if test "x$test_cygdrive_prefix" = x; then
62228    # As a simple fix, exclude /usr/bin since it's not a real path.
62229    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62231      # a path prefixed by /cygdrive for fixpath to work.
62232      new_path="$CYGWIN_ROOT_PATH$input_path"
62233    fi
62234  fi
62235
62236
62237  if test "x$path" != "x$new_path"; then
62238    FREETYPE_INCLUDE_PATH="$new_path"
62239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62240$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62241  fi
62242
62243    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62244
62245  path="$FREETYPE_INCLUDE_PATH"
62246  has_colon=`$ECHO $path | $GREP ^.:`
62247  new_path="$path"
62248  if test "x$has_colon" = x; then
62249    # Not in mixed or Windows style, start by that.
62250    new_path=`cmd //c echo $path`
62251  fi
62252
62253
62254  input_path="$new_path"
62255  # Check if we need to convert this using DOS-style short mode. If the path
62256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62257  # take no chances and rewrite it.
62258  # Note: m4 eats our [], so we need to use [ and ] instead.
62259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62260  if test "x$has_forbidden_chars" != x; then
62261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62263  fi
62264
62265
62266  windows_path="$new_path"
62267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62268    unix_path=`$CYGPATH -u "$windows_path"`
62269    new_path="$unix_path"
62270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62272    new_path="$unix_path"
62273  fi
62274
62275  if test "x$path" != "x$new_path"; then
62276    FREETYPE_INCLUDE_PATH="$new_path"
62277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62278$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62279  fi
62280
62281  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62282  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62283
62284    else
62285      # We're on a unix platform. Hooray! :)
62286      path="$FREETYPE_INCLUDE_PATH"
62287      has_space=`$ECHO "$path" | $GREP " "`
62288      if test "x$has_space" != x; then
62289        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62290$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62291        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62292      fi
62293
62294      # Use eval to expand a potential ~
62295      eval path="$path"
62296      if test ! -f "$path" && test ! -d "$path"; then
62297        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62298      fi
62299
62300      if test -d "$path"; then
62301        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62302      else
62303        dir="`$DIRNAME "$path"`"
62304        base="`$BASENAME "$path"`"
62305        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62306      fi
62307    fi
62308  fi
62309
62310      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62311        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62312      else
62313        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62314      fi
62315    fi
62316
62317    if test "x$FREETYPE_LIBS" = x; then
62318
62319  # Only process if variable expands to non-empty
62320
62321  if test "x$FREETYPE_LIB_PATH" != x; then
62322    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62323
62324  # Input might be given as Windows format, start by converting to
62325  # unix format.
62326  path="$FREETYPE_LIB_PATH"
62327  new_path=`$CYGPATH -u "$path"`
62328
62329  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62330  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62331  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62332  # "foo.exe" is OK but "foo" is an error.
62333  #
62334  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62335  # It is also a way to make sure we got the proper file name for the real test later on.
62336  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62337  if test "x$test_shortpath" = x; then
62338    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62339$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62340    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62341  fi
62342
62343  # Call helper function which possibly converts this using DOS-style short mode.
62344  # If so, the updated path is stored in $new_path.
62345
62346  input_path="$new_path"
62347  # Check if we need to convert this using DOS-style short mode. If the path
62348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62349  # take no chances and rewrite it.
62350  # Note: m4 eats our [], so we need to use [ and ] instead.
62351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62352  if test "x$has_forbidden_chars" != x; then
62353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62354    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62355    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62356    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62357      # Going to short mode and back again did indeed matter. Since short mode is
62358      # case insensitive, let's make it lowercase to improve readability.
62359      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62360      # Now convert it back to Unix-style (cygpath)
62361      input_path=`$CYGPATH -u "$shortmode_path"`
62362      new_path="$input_path"
62363    fi
62364  fi
62365
62366  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62367  if test "x$test_cygdrive_prefix" = x; then
62368    # As a simple fix, exclude /usr/bin since it's not a real path.
62369    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62370      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62371      # a path prefixed by /cygdrive for fixpath to work.
62372      new_path="$CYGWIN_ROOT_PATH$input_path"
62373    fi
62374  fi
62375
62376
62377  if test "x$path" != "x$new_path"; then
62378    FREETYPE_LIB_PATH="$new_path"
62379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62380$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62381  fi
62382
62383    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62384
62385  path="$FREETYPE_LIB_PATH"
62386  has_colon=`$ECHO $path | $GREP ^.:`
62387  new_path="$path"
62388  if test "x$has_colon" = x; then
62389    # Not in mixed or Windows style, start by that.
62390    new_path=`cmd //c echo $path`
62391  fi
62392
62393
62394  input_path="$new_path"
62395  # Check if we need to convert this using DOS-style short mode. If the path
62396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62397  # take no chances and rewrite it.
62398  # Note: m4 eats our [], so we need to use [ and ] instead.
62399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62400  if test "x$has_forbidden_chars" != x; then
62401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62402    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62403  fi
62404
62405
62406  windows_path="$new_path"
62407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62408    unix_path=`$CYGPATH -u "$windows_path"`
62409    new_path="$unix_path"
62410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62412    new_path="$unix_path"
62413  fi
62414
62415  if test "x$path" != "x$new_path"; then
62416    FREETYPE_LIB_PATH="$new_path"
62417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62418$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62419  fi
62420
62421  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62422  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62423
62424    else
62425      # We're on a unix platform. Hooray! :)
62426      path="$FREETYPE_LIB_PATH"
62427      has_space=`$ECHO "$path" | $GREP " "`
62428      if test "x$has_space" != x; then
62429        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62430$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62431        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62432      fi
62433
62434      # Use eval to expand a potential ~
62435      eval path="$path"
62436      if test ! -f "$path" && test ! -d "$path"; then
62437        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62438      fi
62439
62440      if test -d "$path"; then
62441        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62442      else
62443        dir="`$DIRNAME "$path"`"
62444        base="`$BASENAME "$path"`"
62445        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62446      fi
62447    fi
62448  fi
62449
62450      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62451        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62452      else
62453        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62454      fi
62455    fi
62456
62457    # Try to compile it
62458    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62459$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62460    ac_ext=cpp
62461ac_cpp='$CXXCPP $CPPFLAGS'
62462ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62463ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62464ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62465
62466    PREV_CXXCFLAGS="$CXXFLAGS"
62467    PREV_LIBS="$LIBS"
62468    PREV_CXX="$CXX"
62469    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62470    LIBS="$LIBS $FREETYPE_LIBS"
62471    CXX="$FIXPATH $CXX"
62472    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62473/* end confdefs.h.  */
62474
62475          #include<ft2build.h>
62476          #include FT_FREETYPE_H
62477          int main () {
62478            FT_Init_FreeType(NULL);
62479            return 0;
62480          }
62481
62482_ACEOF
62483if ac_fn_cxx_try_link "$LINENO"; then :
62484
62485          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62486$as_echo "yes" >&6; }
62487
62488else
62489
62490          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62491$as_echo "no" >&6; }
62492          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62493$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62494          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62495$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62496
62497
62498  # Print a helpful message on how to acquire the necessary build dependency.
62499  # freetype is the help tag: freetype, cups, alsa etc
62500  MISSING_DEPENDENCY=freetype
62501
62502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62503    cygwin_help $MISSING_DEPENDENCY
62504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62505    msys_help $MISSING_DEPENDENCY
62506  else
62507    PKGHANDLER_COMMAND=
62508
62509    case $PKGHANDLER in
62510      apt-get)
62511        apt_help     $MISSING_DEPENDENCY ;;
62512      yum)
62513        yum_help     $MISSING_DEPENDENCY ;;
62514      port)
62515        port_help    $MISSING_DEPENDENCY ;;
62516      pkgutil)
62517        pkgutil_help $MISSING_DEPENDENCY ;;
62518      pkgadd)
62519        pkgadd_help  $MISSING_DEPENDENCY ;;
62520    esac
62521
62522    if test "x$PKGHANDLER_COMMAND" != x; then
62523      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62524    fi
62525  fi
62526
62527
62528          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62529
62530
62531fi
62532rm -f core conftest.err conftest.$ac_objext \
62533    conftest$ac_exeext conftest.$ac_ext
62534    CXXCFLAGS="$PREV_CXXFLAGS"
62535    LIBS="$PREV_LIBS"
62536    CXX="$PREV_CXX"
62537    ac_ext=cpp
62538ac_cpp='$CXXCPP $CPPFLAGS'
62539ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62540ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62541ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62542
62543
62544    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62545$as_echo_n "checking if we should bundle freetype... " >&6; }
62546    if test "x$BUNDLE_FREETYPE" = xyes; then
62547      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62548    fi
62549    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62550$as_echo "$BUNDLE_FREETYPE" >&6; }
62551
62552  fi # end freetype needed
62553
62554
62555
62556
62557
62558
62559
62560# Check whether --with-alsa was given.
62561if test "${with_alsa+set}" = set; then :
62562  withval=$with_alsa;
62563fi
62564
62565
62566# Check whether --with-alsa-include was given.
62567if test "${with_alsa_include+set}" = set; then :
62568  withval=$with_alsa_include;
62569fi
62570
62571
62572# Check whether --with-alsa-lib was given.
62573if test "${with_alsa_lib+set}" = set; then :
62574  withval=$with_alsa_lib;
62575fi
62576
62577
62578  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62579    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62580        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62581        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62582      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62583$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62584    fi
62585    ALSA_CFLAGS=
62586    ALSA_LIBS=
62587  else
62588    ALSA_FOUND=no
62589
62590    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62591      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62592    fi
62593
62594    if test "x${with_alsa}" != x; then
62595      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62596      ALSA_CFLAGS="-I${with_alsa}/include"
62597      ALSA_FOUND=yes
62598    fi
62599    if test "x${with_alsa_include}" != x; then
62600      ALSA_CFLAGS="-I${with_alsa_include}"
62601      ALSA_FOUND=yes
62602    fi
62603    if test "x${with_alsa_lib}" != x; then
62604      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62605      ALSA_FOUND=yes
62606    fi
62607    # Do not try pkg-config if we have a sysroot set.
62608    if test "x$SYSROOT" = x; then
62609      if test "x$ALSA_FOUND" = xno; then
62610
62611pkg_failed=no
62612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62613$as_echo_n "checking for ALSA... " >&6; }
62614
62615if test -n "$ALSA_CFLAGS"; then
62616    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62617 elif test -n "$PKG_CONFIG"; then
62618    if test -n "$PKG_CONFIG" && \
62619    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62620  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62621  ac_status=$?
62622  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62623  test $ac_status = 0; }; then
62624  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62625else
62626  pkg_failed=yes
62627fi
62628 else
62629    pkg_failed=untried
62630fi
62631if test -n "$ALSA_LIBS"; then
62632    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62633 elif test -n "$PKG_CONFIG"; then
62634    if test -n "$PKG_CONFIG" && \
62635    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62636  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62637  ac_status=$?
62638  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62639  test $ac_status = 0; }; then
62640  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62641else
62642  pkg_failed=yes
62643fi
62644 else
62645    pkg_failed=untried
62646fi
62647
62648
62649
62650if test $pkg_failed = yes; then
62651
62652if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62653        _pkg_short_errors_supported=yes
62654else
62655        _pkg_short_errors_supported=no
62656fi
62657        if test $_pkg_short_errors_supported = yes; then
62658	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62659        else
62660	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62661        fi
62662	# Put the nasty error message in config.log where it belongs
62663	echo "$ALSA_PKG_ERRORS" >&5
62664
62665	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62666$as_echo "no" >&6; }
62667                ALSA_FOUND=no
62668elif test $pkg_failed = untried; then
62669	ALSA_FOUND=no
62670else
62671	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62672	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62674$as_echo "yes" >&6; }
62675	ALSA_FOUND=yes
62676fi
62677      fi
62678    fi
62679    if test "x$ALSA_FOUND" = xno; then
62680      for ac_header in alsa/asoundlib.h
62681do :
62682  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62683if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62684  cat >>confdefs.h <<_ACEOF
62685#define HAVE_ALSA_ASOUNDLIB_H 1
62686_ACEOF
62687
62688            ALSA_FOUND=yes
62689            ALSA_CFLAGS=-Iignoreme
62690            ALSA_LIBS=-lasound
62691            DEFAULT_ALSA=yes
62692
62693else
62694  ALSA_FOUND=no
62695
62696fi
62697
62698done
62699
62700    fi
62701    if test "x$ALSA_FOUND" = xno; then
62702
62703  # Print a helpful message on how to acquire the necessary build dependency.
62704  # alsa is the help tag: freetype, cups, alsa etc
62705  MISSING_DEPENDENCY=alsa
62706
62707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62708    cygwin_help $MISSING_DEPENDENCY
62709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62710    msys_help $MISSING_DEPENDENCY
62711  else
62712    PKGHANDLER_COMMAND=
62713
62714    case $PKGHANDLER in
62715      apt-get)
62716        apt_help     $MISSING_DEPENDENCY ;;
62717      yum)
62718        yum_help     $MISSING_DEPENDENCY ;;
62719      port)
62720        port_help    $MISSING_DEPENDENCY ;;
62721      pkgutil)
62722        pkgutil_help $MISSING_DEPENDENCY ;;
62723      pkgadd)
62724        pkgadd_help  $MISSING_DEPENDENCY ;;
62725    esac
62726
62727    if test "x$PKGHANDLER_COMMAND" != x; then
62728      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62729    fi
62730  fi
62731
62732      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62733    fi
62734  fi
62735
62736
62737
62738
62739
62740
62741# Check whether --with-libffi was given.
62742if test "${with_libffi+set}" = set; then :
62743  withval=$with_libffi;
62744fi
62745
62746
62747# Check whether --with-libffi-include was given.
62748if test "${with_libffi_include+set}" = set; then :
62749  withval=$with_libffi_include;
62750fi
62751
62752
62753# Check whether --with-libffi-lib was given.
62754if test "${with_libffi_lib+set}" = set; then :
62755  withval=$with_libffi_lib;
62756fi
62757
62758
62759  if test "x$NEEDS_LIB_FFI" = xfalse; then
62760    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62761        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62762        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62763      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62764$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62765    fi
62766    LIBFFI_CFLAGS=
62767    LIBFFI_LIBS=
62768  else
62769    LIBFFI_FOUND=no
62770
62771    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62772      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62773    fi
62774
62775    if test "x${with_libffi}" != x; then
62776      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62777      LIBFFI_CFLAGS="-I${with_libffi}/include"
62778      LIBFFI_FOUND=yes
62779    fi
62780    if test "x${with_libffi_include}" != x; then
62781      LIBFFI_CFLAGS="-I${with_libffi_include}"
62782      LIBFFI_FOUND=yes
62783    fi
62784    if test "x${with_libffi_lib}" != x; then
62785      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62786      LIBFFI_FOUND=yes
62787    fi
62788    # Do not try pkg-config if we have a sysroot set.
62789    if test "x$SYSROOT" = x; then
62790      if test "x$LIBFFI_FOUND" = xno; then
62791        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62792
62793pkg_failed=no
62794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62795$as_echo_n "checking for LIBFFI... " >&6; }
62796
62797if test -n "$LIBFFI_CFLAGS"; then
62798    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62799 elif test -n "$PKG_CONFIG"; then
62800    if test -n "$PKG_CONFIG" && \
62801    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62802  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62803  ac_status=$?
62804  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62805  test $ac_status = 0; }; then
62806  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62807else
62808  pkg_failed=yes
62809fi
62810 else
62811    pkg_failed=untried
62812fi
62813if test -n "$LIBFFI_LIBS"; then
62814    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62815 elif test -n "$PKG_CONFIG"; then
62816    if test -n "$PKG_CONFIG" && \
62817    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62818  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62819  ac_status=$?
62820  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62821  test $ac_status = 0; }; then
62822  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62823else
62824  pkg_failed=yes
62825fi
62826 else
62827    pkg_failed=untried
62828fi
62829
62830
62831
62832if test $pkg_failed = yes; then
62833
62834if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62835        _pkg_short_errors_supported=yes
62836else
62837        _pkg_short_errors_supported=no
62838fi
62839        if test $_pkg_short_errors_supported = yes; then
62840	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62841        else
62842	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62843        fi
62844	# Put the nasty error message in config.log where it belongs
62845	echo "$LIBFFI_PKG_ERRORS" >&5
62846
62847	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62848$as_echo "no" >&6; }
62849                LIBFFI_FOUND=no
62850elif test $pkg_failed = untried; then
62851	LIBFFI_FOUND=no
62852else
62853	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62854	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62855        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62856$as_echo "yes" >&6; }
62857	LIBFFI_FOUND=yes
62858fi
62859      fi
62860    fi
62861    if test "x$LIBFFI_FOUND" = xno; then
62862      for ac_header in ffi.h
62863do :
62864  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62865if test "x$ac_cv_header_ffi_h" = xyes; then :
62866  cat >>confdefs.h <<_ACEOF
62867#define HAVE_FFI_H 1
62868_ACEOF
62869
62870            LIBFFI_FOUND=yes
62871            LIBFFI_CFLAGS=
62872            LIBFFI_LIBS=-lffi
62873
62874else
62875  LIBFFI_FOUND=no
62876
62877fi
62878
62879done
62880
62881    fi
62882    if test "x$LIBFFI_FOUND" = xno; then
62883
62884  # Print a helpful message on how to acquire the necessary build dependency.
62885  # ffi is the help tag: freetype, cups, alsa etc
62886  MISSING_DEPENDENCY=ffi
62887
62888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62889    cygwin_help $MISSING_DEPENDENCY
62890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62891    msys_help $MISSING_DEPENDENCY
62892  else
62893    PKGHANDLER_COMMAND=
62894
62895    case $PKGHANDLER in
62896      apt-get)
62897        apt_help     $MISSING_DEPENDENCY ;;
62898      yum)
62899        yum_help     $MISSING_DEPENDENCY ;;
62900      port)
62901        port_help    $MISSING_DEPENDENCY ;;
62902      pkgutil)
62903        pkgutil_help $MISSING_DEPENDENCY ;;
62904      pkgadd)
62905        pkgadd_help  $MISSING_DEPENDENCY ;;
62906    esac
62907
62908    if test "x$PKGHANDLER_COMMAND" != x; then
62909      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62910    fi
62911  fi
62912
62913      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62914    fi
62915
62916    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62917$as_echo_n "checking if libffi works... " >&6; }
62918    ac_ext=c
62919ac_cpp='$CPP $CPPFLAGS'
62920ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62921ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62922ac_compiler_gnu=$ac_cv_c_compiler_gnu
62923
62924    OLD_CFLAGS="$CFLAGS"
62925    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62926    OLD_LIBS="$LIBS"
62927    LIBS="$LIBS $LIBFFI_LIBS"
62928    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62929/* end confdefs.h.  */
62930#include <ffi.h>
62931int
62932main ()
62933{
62934
62935          ffi_call(NULL, NULL, NULL, NULL);
62936          return 0;
62937
62938  ;
62939  return 0;
62940}
62941_ACEOF
62942if ac_fn_c_try_link "$LINENO"; then :
62943  LIBFFI_WORKS=yes
62944else
62945  LIBFFI_WORKS=no
62946
62947fi
62948rm -f core conftest.err conftest.$ac_objext \
62949    conftest$ac_exeext conftest.$ac_ext
62950    CFLAGS="$OLD_CFLAGS"
62951    LIBS="$OLD_LIBS"
62952    ac_ext=cpp
62953ac_cpp='$CXXCPP $CPPFLAGS'
62954ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62955ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62956ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62957
62958    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62959$as_echo "$LIBFFI_WORKS" >&6; }
62960
62961    if test "x$LIBFFI_WORKS" = xno; then
62962
62963  # Print a helpful message on how to acquire the necessary build dependency.
62964  # ffi is the help tag: freetype, cups, alsa etc
62965  MISSING_DEPENDENCY=ffi
62966
62967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62968    cygwin_help $MISSING_DEPENDENCY
62969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62970    msys_help $MISSING_DEPENDENCY
62971  else
62972    PKGHANDLER_COMMAND=
62973
62974    case $PKGHANDLER in
62975      apt-get)
62976        apt_help     $MISSING_DEPENDENCY ;;
62977      yum)
62978        yum_help     $MISSING_DEPENDENCY ;;
62979      port)
62980        port_help    $MISSING_DEPENDENCY ;;
62981      pkgutil)
62982        pkgutil_help $MISSING_DEPENDENCY ;;
62983      pkgadd)
62984        pkgadd_help  $MISSING_DEPENDENCY ;;
62985    esac
62986
62987    if test "x$PKGHANDLER_COMMAND" != x; then
62988      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62989    fi
62990  fi
62991
62992      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
62993    fi
62994  fi
62995
62996
62997
62998
62999
63000  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63001    # Extract the first word of "llvm-config", so it can be a program name with args.
63002set dummy llvm-config; ac_word=$2
63003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63004$as_echo_n "checking for $ac_word... " >&6; }
63005if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63006  $as_echo_n "(cached) " >&6
63007else
63008  if test -n "$LLVM_CONFIG"; then
63009  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63010else
63011as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63012for as_dir in $PATH
63013do
63014  IFS=$as_save_IFS
63015  test -z "$as_dir" && as_dir=.
63016    for ac_exec_ext in '' $ac_executable_extensions; do
63017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63018    ac_cv_prog_LLVM_CONFIG="llvm-config"
63019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63020    break 2
63021  fi
63022done
63023  done
63024IFS=$as_save_IFS
63025
63026fi
63027fi
63028LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63029if test -n "$LLVM_CONFIG"; then
63030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63031$as_echo "$LLVM_CONFIG" >&6; }
63032else
63033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63034$as_echo "no" >&6; }
63035fi
63036
63037
63038
63039    if test "x$LLVM_CONFIG" != xllvm-config; then
63040      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63041    fi
63042
63043    llvm_components="jit mcjit engine nativecodegen native"
63044    unset LLVM_CFLAGS
63045    for flag in $("$LLVM_CONFIG" --cxxflags); do
63046      if echo "${flag}" | grep -q '^-[ID]'; then
63047        if test "${flag}" != "-D_DEBUG" ; then
63048          if test "${LLVM_CFLAGS}" != "" ; then
63049            LLVM_CFLAGS="${LLVM_CFLAGS} "
63050          fi
63051          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63052        fi
63053      fi
63054    done
63055    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
63056    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63057
63058    unset LLVM_LDFLAGS
63059    for flag in $("${LLVM_CONFIG}" --ldflags); do
63060      if echo "${flag}" | grep -q '^-L'; then
63061        if test "${LLVM_LDFLAGS}" != ""; then
63062          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63063        fi
63064        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63065      fi
63066    done
63067
63068    unset LLVM_LIBS
63069    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63070      if echo "${flag}" | grep -q '^-l'; then
63071        if test "${LLVM_LIBS}" != ""; then
63072          LLVM_LIBS="${LLVM_LIBS} "
63073        fi
63074        LLVM_LIBS="${LLVM_LIBS}${flag}"
63075      fi
63076    done
63077
63078    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63079    # always properly detect -ltinfo
63080    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63081
63082
63083
63084
63085  fi
63086
63087
63088
63089# Check whether --with-libjpeg was given.
63090if test "${with_libjpeg+set}" = set; then :
63091  withval=$with_libjpeg;
63092fi
63093
63094
63095  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63096$as_echo_n "checking for which libjpeg to use... " >&6; }
63097  # default is bundled
63098  DEFAULT_LIBJPEG=bundled
63099  # if user didn't specify, use DEFAULT_LIBJPEG
63100  if test "x${with_libjpeg}" = "x"; then
63101    with_libjpeg=${DEFAULT_LIBJPEG}
63102  fi
63103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63104$as_echo "${with_libjpeg}" >&6; }
63105
63106  if test "x${with_libjpeg}" = "xbundled"; then
63107    USE_EXTERNAL_LIBJPEG=false
63108  elif test "x${with_libjpeg}" = "xsystem"; then
63109    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63110if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63111
63112else
63113   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63114fi
63115
63116
63117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63118$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63119if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63120  $as_echo_n "(cached) " >&6
63121else
63122  ac_check_lib_save_LIBS=$LIBS
63123LIBS="-ljpeg  $LIBS"
63124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63125/* end confdefs.h.  */
63126
63127/* Override any GCC internal prototype to avoid an error.
63128   Use char because int might match the return type of a GCC
63129   builtin and then its argument prototype would still apply.  */
63130#ifdef __cplusplus
63131extern "C"
63132#endif
63133char jpeg_CreateDecompress ();
63134int
63135main ()
63136{
63137return jpeg_CreateDecompress ();
63138  ;
63139  return 0;
63140}
63141_ACEOF
63142if ac_fn_cxx_try_link "$LINENO"; then :
63143  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63144else
63145  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63146fi
63147rm -f core conftest.err conftest.$ac_objext \
63148    conftest$ac_exeext conftest.$ac_ext
63149LIBS=$ac_check_lib_save_LIBS
63150fi
63151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63152$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63153if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63154  cat >>confdefs.h <<_ACEOF
63155#define HAVE_LIBJPEG 1
63156_ACEOF
63157
63158  LIBS="-ljpeg $LIBS"
63159
63160else
63161   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63162fi
63163
63164
63165    USE_EXTERNAL_LIBJPEG=true
63166  else
63167    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63168  fi
63169
63170
63171
63172
63173
63174# Check whether --with-giflib was given.
63175if test "${with_giflib+set}" = set; then :
63176  withval=$with_giflib;
63177fi
63178
63179
63180  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63181$as_echo_n "checking for which giflib to use... " >&6; }
63182  # default is bundled
63183  DEFAULT_GIFLIB=bundled
63184  # if user didn't specify, use DEFAULT_GIFLIB
63185  if test "x${with_giflib}" = "x"; then
63186    with_giflib=${DEFAULT_GIFLIB}
63187  fi
63188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63189$as_echo "${with_giflib}" >&6; }
63190
63191  if test "x${with_giflib}" = "xbundled"; then
63192    USE_EXTERNAL_LIBGIF=false
63193  elif test "x${with_giflib}" = "xsystem"; then
63194    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63195if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63196
63197else
63198   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63199fi
63200
63201
63202    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63203$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63204if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63205  $as_echo_n "(cached) " >&6
63206else
63207  ac_check_lib_save_LIBS=$LIBS
63208LIBS="-lgif  $LIBS"
63209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63210/* end confdefs.h.  */
63211
63212/* Override any GCC internal prototype to avoid an error.
63213   Use char because int might match the return type of a GCC
63214   builtin and then its argument prototype would still apply.  */
63215#ifdef __cplusplus
63216extern "C"
63217#endif
63218char DGifGetCode ();
63219int
63220main ()
63221{
63222return DGifGetCode ();
63223  ;
63224  return 0;
63225}
63226_ACEOF
63227if ac_fn_cxx_try_link "$LINENO"; then :
63228  ac_cv_lib_gif_DGifGetCode=yes
63229else
63230  ac_cv_lib_gif_DGifGetCode=no
63231fi
63232rm -f core conftest.err conftest.$ac_objext \
63233    conftest$ac_exeext conftest.$ac_ext
63234LIBS=$ac_check_lib_save_LIBS
63235fi
63236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63237$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63238if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63239  cat >>confdefs.h <<_ACEOF
63240#define HAVE_LIBGIF 1
63241_ACEOF
63242
63243  LIBS="-lgif $LIBS"
63244
63245else
63246   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63247fi
63248
63249
63250    USE_EXTERNAL_LIBGIF=true
63251  else
63252    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63253  fi
63254
63255
63256
63257
63258
63259# Check whether --with-libpng was given.
63260if test "${with_libpng+set}" = set; then :
63261  withval=$with_libpng;
63262fi
63263
63264
63265  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63266$as_echo_n "checking for which libpng to use... " >&6; }
63267
63268  # default is bundled
63269  DEFAULT_LIBPNG=bundled
63270  # if user didn't specify, use DEFAULT_LIBPNG
63271  if test "x${with_libpng}" = "x"; then
63272      with_libpng=${DEFAULT_LIBPNG}
63273  fi
63274
63275  if test "x${with_libpng}" = "xbundled"; then
63276      USE_EXTERNAL_LIBPNG=false
63277      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63278$as_echo "bundled" >&6; }
63279  elif test "x${with_libpng}" = "xsystem"; then
63280
63281pkg_failed=no
63282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63283$as_echo_n "checking for PNG... " >&6; }
63284
63285if test -n "$PNG_CFLAGS"; then
63286    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63287 elif test -n "$PKG_CONFIG"; then
63288    if test -n "$PKG_CONFIG" && \
63289    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63290  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63291  ac_status=$?
63292  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63293  test $ac_status = 0; }; then
63294  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63295else
63296  pkg_failed=yes
63297fi
63298 else
63299    pkg_failed=untried
63300fi
63301if test -n "$PNG_LIBS"; then
63302    pkg_cv_PNG_LIBS="$PNG_LIBS"
63303 elif test -n "$PKG_CONFIG"; then
63304    if test -n "$PKG_CONFIG" && \
63305    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63306  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63307  ac_status=$?
63308  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63309  test $ac_status = 0; }; then
63310  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63311else
63312  pkg_failed=yes
63313fi
63314 else
63315    pkg_failed=untried
63316fi
63317
63318
63319
63320if test $pkg_failed = yes; then
63321
63322if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63323        _pkg_short_errors_supported=yes
63324else
63325        _pkg_short_errors_supported=no
63326fi
63327        if test $_pkg_short_errors_supported = yes; then
63328	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63329        else
63330	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63331        fi
63332	# Put the nasty error message in config.log where it belongs
63333	echo "$PNG_PKG_ERRORS" >&5
63334
63335	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63336$as_echo "no" >&6; }
63337                 LIBPNG_FOUND=no
63338elif test $pkg_failed = untried; then
63339	 LIBPNG_FOUND=no
63340else
63341	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63342	PNG_LIBS=$pkg_cv_PNG_LIBS
63343        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63344$as_echo "yes" >&6; }
63345	 LIBPNG_FOUND=yes
63346fi
63347      if test "x${LIBPNG_FOUND}" = "xyes"; then
63348          USE_EXTERNAL_LIBPNG=true
63349          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63350$as_echo "system" >&6; }
63351      else
63352          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63353$as_echo "system not found" >&6; }
63354          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63355      fi
63356  else
63357      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63358  fi
63359
63360
63361
63362
63363
63364# Check whether --with-zlib was given.
63365if test "${with_zlib+set}" = set; then :
63366  withval=$with_zlib;
63367fi
63368
63369
63370  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63371$as_echo_n "checking for compress in -lz... " >&6; }
63372if ${ac_cv_lib_z_compress+:} false; then :
63373  $as_echo_n "(cached) " >&6
63374else
63375  ac_check_lib_save_LIBS=$LIBS
63376LIBS="-lz  $LIBS"
63377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63378/* end confdefs.h.  */
63379
63380/* Override any GCC internal prototype to avoid an error.
63381   Use char because int might match the return type of a GCC
63382   builtin and then its argument prototype would still apply.  */
63383#ifdef __cplusplus
63384extern "C"
63385#endif
63386char compress ();
63387int
63388main ()
63389{
63390return compress ();
63391  ;
63392  return 0;
63393}
63394_ACEOF
63395if ac_fn_cxx_try_link "$LINENO"; then :
63396  ac_cv_lib_z_compress=yes
63397else
63398  ac_cv_lib_z_compress=no
63399fi
63400rm -f core conftest.err conftest.$ac_objext \
63401    conftest$ac_exeext conftest.$ac_ext
63402LIBS=$ac_check_lib_save_LIBS
63403fi
63404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63405$as_echo "$ac_cv_lib_z_compress" >&6; }
63406if test "x$ac_cv_lib_z_compress" = xyes; then :
63407   ZLIB_FOUND=yes
63408else
63409   ZLIB_FOUND=no
63410fi
63411
63412
63413  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63414$as_echo_n "checking for which zlib to use... " >&6; }
63415
63416  DEFAULT_ZLIB=system
63417  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63418    # On windows default is bundled...on others default is system
63419    DEFAULT_ZLIB=bundled
63420  fi
63421
63422  if test "x${ZLIB_FOUND}" != "xyes"; then
63423    # If we don't find any system...set default to bundled
63424    DEFAULT_ZLIB=bundled
63425  fi
63426
63427  # If user didn't specify, use DEFAULT_ZLIB
63428  if test "x${with_zlib}" = "x"; then
63429    with_zlib=${DEFAULT_ZLIB}
63430  fi
63431
63432  if test "x${with_zlib}" = "xbundled"; then
63433    USE_EXTERNAL_LIBZ=false
63434    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63435$as_echo "bundled" >&6; }
63436  elif test "x${with_zlib}" = "xsystem"; then
63437    if test "x${ZLIB_FOUND}" = "xyes"; then
63438      USE_EXTERNAL_LIBZ=true
63439      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63440$as_echo "system" >&6; }
63441    else
63442      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63443$as_echo "system not found" >&6; }
63444      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63445    fi
63446  else
63447    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63448  fi
63449
63450
63451
63452
63453
63454# Check whether --with-lcms was given.
63455if test "${with_lcms+set}" = set; then :
63456  withval=$with_lcms;
63457fi
63458
63459
63460  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63461$as_echo_n "checking for which lcms to use... " >&6; }
63462
63463  DEFAULT_LCMS=bundled
63464  # If user didn't specify, use DEFAULT_LCMS
63465  if test "x${with_lcms}" = "x"; then
63466      with_lcms=${DEFAULT_LCMS}
63467  fi
63468
63469  if test "x${with_lcms}" = "xbundled"; then
63470    USE_EXTERNAL_LCMS=false
63471    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63472$as_echo "bundled" >&6; }
63473  elif test "x${with_lcms}" = "xsystem"; then
63474    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63475$as_echo "system" >&6; }
63476
63477pkg_failed=no
63478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63479$as_echo_n "checking for LCMS... " >&6; }
63480
63481if test -n "$LCMS_CFLAGS"; then
63482    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63483 elif test -n "$PKG_CONFIG"; then
63484    if test -n "$PKG_CONFIG" && \
63485    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63486  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63487  ac_status=$?
63488  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63489  test $ac_status = 0; }; then
63490  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63491else
63492  pkg_failed=yes
63493fi
63494 else
63495    pkg_failed=untried
63496fi
63497if test -n "$LCMS_LIBS"; then
63498    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63499 elif test -n "$PKG_CONFIG"; then
63500    if test -n "$PKG_CONFIG" && \
63501    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63502  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63503  ac_status=$?
63504  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63505  test $ac_status = 0; }; then
63506  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63507else
63508  pkg_failed=yes
63509fi
63510 else
63511    pkg_failed=untried
63512fi
63513
63514
63515
63516if test $pkg_failed = yes; then
63517
63518if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63519        _pkg_short_errors_supported=yes
63520else
63521        _pkg_short_errors_supported=no
63522fi
63523        if test $_pkg_short_errors_supported = yes; then
63524	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63525        else
63526	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63527        fi
63528	# Put the nasty error message in config.log where it belongs
63529	echo "$LCMS_PKG_ERRORS" >&5
63530
63531	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63532$as_echo "no" >&6; }
63533                LCMS_FOUND=no
63534elif test $pkg_failed = untried; then
63535	LCMS_FOUND=no
63536else
63537	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63538	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63539        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63540$as_echo "yes" >&6; }
63541	LCMS_FOUND=yes
63542fi
63543    if test "x${LCMS_FOUND}" = "xyes"; then
63544      USE_EXTERNAL_LCMS=true
63545    else
63546      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63547    fi
63548  else
63549    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63550  fi
63551
63552
63553
63554
63555
63556
63557
63558
63559
63560
63561
63562  # Setup libm (the maths library)
63563  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63564    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63565$as_echo_n "checking for cos in -lm... " >&6; }
63566if ${ac_cv_lib_m_cos+:} false; then :
63567  $as_echo_n "(cached) " >&6
63568else
63569  ac_check_lib_save_LIBS=$LIBS
63570LIBS="-lm  $LIBS"
63571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63572/* end confdefs.h.  */
63573
63574/* Override any GCC internal prototype to avoid an error.
63575   Use char because int might match the return type of a GCC
63576   builtin and then its argument prototype would still apply.  */
63577#ifdef __cplusplus
63578extern "C"
63579#endif
63580char cos ();
63581int
63582main ()
63583{
63584return cos ();
63585  ;
63586  return 0;
63587}
63588_ACEOF
63589if ac_fn_cxx_try_link "$LINENO"; then :
63590  ac_cv_lib_m_cos=yes
63591else
63592  ac_cv_lib_m_cos=no
63593fi
63594rm -f core conftest.err conftest.$ac_objext \
63595    conftest$ac_exeext conftest.$ac_ext
63596LIBS=$ac_check_lib_save_LIBS
63597fi
63598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63599$as_echo "$ac_cv_lib_m_cos" >&6; }
63600if test "x$ac_cv_lib_m_cos" = xyes; then :
63601  cat >>confdefs.h <<_ACEOF
63602#define HAVE_LIBM 1
63603_ACEOF
63604
63605  LIBS="-lm $LIBS"
63606
63607else
63608
63609        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63610$as_echo "$as_me: Maths library was not found" >&6;}
63611
63612fi
63613
63614    LIBM="-lm"
63615  else
63616    LIBM=""
63617  fi
63618
63619
63620  # Setup libdl (for dynamic library loading)
63621  save_LIBS="$LIBS"
63622  LIBS=""
63623  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63624$as_echo_n "checking for dlopen in -ldl... " >&6; }
63625if ${ac_cv_lib_dl_dlopen+:} false; then :
63626  $as_echo_n "(cached) " >&6
63627else
63628  ac_check_lib_save_LIBS=$LIBS
63629LIBS="-ldl  $LIBS"
63630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63631/* end confdefs.h.  */
63632
63633/* Override any GCC internal prototype to avoid an error.
63634   Use char because int might match the return type of a GCC
63635   builtin and then its argument prototype would still apply.  */
63636#ifdef __cplusplus
63637extern "C"
63638#endif
63639char dlopen ();
63640int
63641main ()
63642{
63643return dlopen ();
63644  ;
63645  return 0;
63646}
63647_ACEOF
63648if ac_fn_cxx_try_link "$LINENO"; then :
63649  ac_cv_lib_dl_dlopen=yes
63650else
63651  ac_cv_lib_dl_dlopen=no
63652fi
63653rm -f core conftest.err conftest.$ac_objext \
63654    conftest$ac_exeext conftest.$ac_ext
63655LIBS=$ac_check_lib_save_LIBS
63656fi
63657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63658$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63659if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63660  cat >>confdefs.h <<_ACEOF
63661#define HAVE_LIBDL 1
63662_ACEOF
63663
63664  LIBS="-ldl $LIBS"
63665
63666fi
63667
63668  LIBDL="$LIBS"
63669
63670  LIBS="$save_LIBS"
63671
63672  # Deprecated libraries, keep the flags for backwards compatibility
63673  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63674
63675
63676# Check whether --with-dxsdk was given.
63677if test "${with_dxsdk+set}" = set; then :
63678  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63679$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63680fi
63681
63682
63683
63684
63685# Check whether --with-dxsdk-lib was given.
63686if test "${with_dxsdk_lib+set}" = set; then :
63687  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63688$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63689fi
63690
63691
63692
63693
63694# Check whether --with-dxsdk-include was given.
63695if test "${with_dxsdk_include+set}" = set; then :
63696  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63697$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63698fi
63699
63700
63701  fi
63702
63703  # Control if libzip can use mmap. Available for purposes of overriding.
63704  LIBZIP_CAN_USE_MMAP=true
63705
63706
63707
63708  if test "$OPENJDK_TARGET_OS" = "solaris"; then
63709    # Find the root of the Solaris Studio installation from the compiler path
63710    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63711    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63712    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63713$as_echo_n "checking for libstlport.so.1... " >&6; }
63714    if test -f "$STLPORT_LIB"; then
63715      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63716$as_echo "yes, $STLPORT_LIB" >&6; }
63717
63718  # Only process if variable expands to non-empty
63719
63720  if test "x$STLPORT_LIB" != x; then
63721    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63722
63723  # Input might be given as Windows format, start by converting to
63724  # unix format.
63725  path="$STLPORT_LIB"
63726  new_path=`$CYGPATH -u "$path"`
63727
63728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63731  # "foo.exe" is OK but "foo" is an error.
63732  #
63733  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63734  # It is also a way to make sure we got the proper file name for the real test later on.
63735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63736  if test "x$test_shortpath" = x; then
63737    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63738$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63739    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63740  fi
63741
63742  # Call helper function which possibly converts this using DOS-style short mode.
63743  # If so, the updated path is stored in $new_path.
63744
63745  input_path="$new_path"
63746  # Check if we need to convert this using DOS-style short mode. If the path
63747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63748  # take no chances and rewrite it.
63749  # Note: m4 eats our [], so we need to use [ and ] instead.
63750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63751  if test "x$has_forbidden_chars" != x; then
63752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63753    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63754    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63755    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63756      # Going to short mode and back again did indeed matter. Since short mode is
63757      # case insensitive, let's make it lowercase to improve readability.
63758      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63759      # Now convert it back to Unix-style (cygpath)
63760      input_path=`$CYGPATH -u "$shortmode_path"`
63761      new_path="$input_path"
63762    fi
63763  fi
63764
63765  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63766  if test "x$test_cygdrive_prefix" = x; then
63767    # As a simple fix, exclude /usr/bin since it's not a real path.
63768    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63769      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63770      # a path prefixed by /cygdrive for fixpath to work.
63771      new_path="$CYGWIN_ROOT_PATH$input_path"
63772    fi
63773  fi
63774
63775
63776  if test "x$path" != "x$new_path"; then
63777    STLPORT_LIB="$new_path"
63778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63779$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63780  fi
63781
63782    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63783
63784  path="$STLPORT_LIB"
63785  has_colon=`$ECHO $path | $GREP ^.:`
63786  new_path="$path"
63787  if test "x$has_colon" = x; then
63788    # Not in mixed or Windows style, start by that.
63789    new_path=`cmd //c echo $path`
63790  fi
63791
63792
63793  input_path="$new_path"
63794  # Check if we need to convert this using DOS-style short mode. If the path
63795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63796  # take no chances and rewrite it.
63797  # Note: m4 eats our [], so we need to use [ and ] instead.
63798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63799  if test "x$has_forbidden_chars" != x; then
63800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63801    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63802  fi
63803
63804
63805  windows_path="$new_path"
63806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63807    unix_path=`$CYGPATH -u "$windows_path"`
63808    new_path="$unix_path"
63809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63811    new_path="$unix_path"
63812  fi
63813
63814  if test "x$path" != "x$new_path"; then
63815    STLPORT_LIB="$new_path"
63816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63817$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63818  fi
63819
63820  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63821  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63822
63823    else
63824      # We're on a unix platform. Hooray! :)
63825      path="$STLPORT_LIB"
63826      has_space=`$ECHO "$path" | $GREP " "`
63827      if test "x$has_space" != x; then
63828        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63829$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63830        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63831      fi
63832
63833      # Use eval to expand a potential ~
63834      eval path="$path"
63835      if test ! -f "$path" && test ! -d "$path"; then
63836        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63837      fi
63838
63839      if test -d "$path"; then
63840        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63841      else
63842        dir="`$DIRNAME "$path"`"
63843        base="`$BASENAME "$path"`"
63844        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63845      fi
63846    fi
63847  fi
63848
63849    else
63850      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63851$as_echo "no, not found at $STLPORT_LIB" >&6; }
63852      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63853    fi
63854
63855  fi
63856
63857
63858
63859
63860
63861
63862
63863
63864
63865
63866
63867
63868
63869
63870###############################################################################
63871#
63872# We need to do some final tweaking, when everything else is done.
63873#
63874###############################################################################
63875
63876
63877  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63878$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63879
63880  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63881    ENABLE_INTREE_EC=yes
63882    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63883$as_echo "yes" >&6; }
63884  else
63885    ENABLE_INTREE_EC=no
63886    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63887$as_echo "no" >&6; }
63888  fi
63889
63890
63891
63892
63893  # Check whether --enable-jtreg-failure-handler was given.
63894if test "${enable_jtreg_failure_handler+set}" = set; then :
63895  enableval=$enable_jtreg_failure_handler;
63896fi
63897
63898
63899  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63900$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63901
63902  if test "x$enable_jtreg_failure_handler" = "xyes"; then
63903    if test "x$JT_HOME" = "x"; then
63904      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63905    else
63906      BUILD_FAILURE_HANDLER=true
63907      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63908$as_echo "yes, forced" >&6; }
63909    fi
63910  elif test "x$enable_jtreg_failure_handler" = "xno"; then
63911    BUILD_FAILURE_HANDLER=false
63912    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63913$as_echo "no, forced" >&6; }
63914  elif test "x$enable_jtreg_failure_handler" = "xauto" \
63915      || test "x$enable_jtreg_failure_handler" = "x"; then
63916    if test "x$JT_HOME" = "x"; then
63917      BUILD_FAILURE_HANDLER=false
63918      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63919$as_echo "no, missing jtreg" >&6; }
63920    else
63921      BUILD_FAILURE_HANDLER=true
63922      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63923$as_echo "yes, jtreg present" >&6; }
63924    fi
63925  else
63926    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63927  fi
63928
63929
63930
63931
63932###############################################################################
63933#
63934# Configure parts of the build that only affect the build performance,
63935# not the result.
63936#
63937###############################################################################
63938
63939
63940  # How many cores do we have on this build system?
63941
63942# Check whether --with-num-cores was given.
63943if test "${with_num_cores+set}" = set; then :
63944  withval=$with_num_cores;
63945fi
63946
63947  if test "x$with_num_cores" = x; then
63948    # The number of cores were not specified, try to probe them.
63949
63950  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63951$as_echo_n "checking for number of cores... " >&6; }
63952  NUM_CORES=1
63953  FOUND_CORES=no
63954
63955  if test -f /proc/cpuinfo; then
63956    # Looks like a Linux (or cygwin) system
63957    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63958    FOUND_CORES=yes
63959  elif test -x /usr/sbin/psrinfo; then
63960    # Looks like a Solaris system
63961    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63962    FOUND_CORES=yes
63963  elif test -x /usr/sbin/sysctl; then
63964    # Looks like a MacOSX system
63965    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63966    FOUND_CORES=yes
63967  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63968    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63969    FOUND_CORES=yes
63970  elif test -n "$NUMBER_OF_PROCESSORS"; then
63971    # On windows, look in the env
63972    NUM_CORES=$NUMBER_OF_PROCESSORS
63973    FOUND_CORES=yes
63974  fi
63975
63976  if test "x$FOUND_CORES" = xyes; then
63977    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63978$as_echo "$NUM_CORES" >&6; }
63979  else
63980    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63981$as_echo "could not detect number of cores, defaulting to 1" >&6; }
63982    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63983$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63984  fi
63985
63986  else
63987    NUM_CORES=$with_num_cores
63988  fi
63989
63990
63991
63992  # How much memory do we have on this build system?
63993
63994# Check whether --with-memory-size was given.
63995if test "${with_memory_size+set}" = set; then :
63996  withval=$with_memory_size;
63997fi
63998
63999  if test "x$with_memory_size" = x; then
64000    # The memory size was not specified, try to probe it.
64001
64002  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64003$as_echo_n "checking for memory size... " >&6; }
64004  # Default to 1024 MB
64005  MEMORY_SIZE=1024
64006  FOUND_MEM=no
64007
64008  if test -f /proc/meminfo; then
64009    # Looks like a Linux (or cygwin) system
64010    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64011    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64012    FOUND_MEM=yes
64013  elif test -x /usr/sbin/prtconf; then
64014    # Looks like a Solaris or AIX system
64015    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64016    FOUND_MEM=yes
64017  elif test -x /usr/sbin/sysctl; then
64018    # Looks like a MacOSX system
64019    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64020    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64021    FOUND_MEM=yes
64022  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64023    # Windows, but without cygwin
64024    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64025    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64026    FOUND_MEM=yes
64027  fi
64028
64029  if test "x$FOUND_MEM" = xyes; then
64030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64031$as_echo "$MEMORY_SIZE MB" >&6; }
64032  else
64033    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64034$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64035    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64036$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64037  fi
64038
64039  else
64040    MEMORY_SIZE=$with_memory_size
64041  fi
64042
64043
64044
64045  # Provide a decent default number of parallel jobs for make depending on
64046  # number of cores, amount of memory and machine architecture.
64047
64048# Check whether --with-jobs was given.
64049if test "${with_jobs+set}" = set; then :
64050  withval=$with_jobs;
64051fi
64052
64053  if test "x$with_jobs" = x; then
64054    # Number of jobs was not specified, calculate.
64055    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64056$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64057    # Approximate memory in GB.
64058    memory_gb=`expr $MEMORY_SIZE / 1024`
64059    # Pick the lowest of memory in gb and number of cores.
64060    if test "$memory_gb" -lt "$NUM_CORES"; then
64061      JOBS="$memory_gb"
64062    else
64063      JOBS="$NUM_CORES"
64064    fi
64065    if test "$JOBS" -eq "0"; then
64066      JOBS=1
64067    fi
64068    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64069$as_echo "$JOBS" >&6; }
64070  else
64071    JOBS=$with_jobs
64072  fi
64073
64074
64075
64076  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64077
64078# Check whether --with-test-jobs was given.
64079if test "${with_test_jobs+set}" = set; then :
64080  withval=$with_test_jobs;
64081fi
64082
64083  if test "x$with_test_jobs" = x; then
64084      TEST_JOBS=0
64085  else
64086      TEST_JOBS=$with_test_jobs
64087  fi
64088
64089
64090
64091# Setup arguments for the boot jdk (after cores and memory have been setup)
64092
64093  ##############################################################################
64094  #
64095  # Specify jvm options for anything that is run with the Boot JDK.
64096  # Not all JVM:s accept the same arguments on the command line.
64097  #
64098
64099# Check whether --with-boot-jdk-jvmargs was given.
64100if test "${with_boot_jdk_jvmargs+set}" = set; then :
64101  withval=$with_boot_jdk_jvmargs;
64102fi
64103
64104
64105  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64106$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64107
64108  # Disable special log output when a debug build is used as Boot JDK...
64109
64110  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64111  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64112  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64113  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64114  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64115  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64116    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64117    JVM_ARG_OK=true
64118  else
64119    $ECHO "Arg failed:" >&5
64120    $ECHO "$OUTPUT" >&5
64121    JVM_ARG_OK=false
64122  fi
64123
64124
64125  # Apply user provided options.
64126
64127  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64128  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64129  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64130  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64131  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64132  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64133    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64134    JVM_ARG_OK=true
64135  else
64136    $ECHO "Arg failed:" >&5
64137    $ECHO "$OUTPUT" >&5
64138    JVM_ARG_OK=false
64139  fi
64140
64141
64142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64143$as_echo "$boot_jdk_jvmargs" >&6; }
64144
64145  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64146  JAVA_FLAGS=$boot_jdk_jvmargs
64147
64148
64149
64150  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64151$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64152
64153  # Starting amount of heap memory.
64154
64155  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64156  $ECHO "Command: $JAVA -Xms64M -version" >&5
64157  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64158  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64159  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64160  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64161    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64162    JVM_ARG_OK=true
64163  else
64164    $ECHO "Arg failed:" >&5
64165    $ECHO "$OUTPUT" >&5
64166    JVM_ARG_OK=false
64167  fi
64168
64169
64170  # Maximum amount of heap memory.
64171  # Maximum stack size.
64172  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
64173  if test "x$BOOT_JDK_BITS" = "x32"; then
64174    if test "$JVM_MAX_HEAP" -gt "1100"; then
64175      JVM_MAX_HEAP=1100
64176    elif test "$JVM_MAX_HEAP" -lt "512"; then
64177      JVM_MAX_HEAP=512
64178    fi
64179    STACK_SIZE=768
64180  else
64181    # Running a 64 bit JVM allows for and requires a bigger heap
64182    if test "$JVM_MAX_HEAP" -gt "1600"; then
64183      JVM_MAX_HEAP=1600
64184    elif test "$JVM_MAX_HEAP" -lt "512"; then
64185      JVM_MAX_HEAP=512
64186    fi
64187    STACK_SIZE=1536
64188  fi
64189
64190  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64191  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64192  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64193  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64194  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64195  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64196    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64197    JVM_ARG_OK=true
64198  else
64199    $ECHO "Arg failed:" >&5
64200    $ECHO "$OUTPUT" >&5
64201    JVM_ARG_OK=false
64202  fi
64203
64204
64205  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64206  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64207  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64208  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64209  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64210  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64211    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64212    JVM_ARG_OK=true
64213  else
64214    $ECHO "Arg failed:" >&5
64215    $ECHO "$OUTPUT" >&5
64216    JVM_ARG_OK=false
64217  fi
64218
64219
64220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64221$as_echo "$boot_jdk_jvmargs_big" >&6; }
64222
64223  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64224
64225
64226  # By default, the main javac compilations use big
64227  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64228
64229
64230  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64231$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64232
64233  # Use serial gc for small short lived tools if possible
64234
64235  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64236  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64237  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64238  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64239  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64240  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64241    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64242    JVM_ARG_OK=true
64243  else
64244    $ECHO "Arg failed:" >&5
64245    $ECHO "$OUTPUT" >&5
64246    JVM_ARG_OK=false
64247  fi
64248
64249
64250  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64251  $ECHO "Command: $JAVA -Xms32M -version" >&5
64252  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64253  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64254  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64255  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64256    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64257    JVM_ARG_OK=true
64258  else
64259    $ECHO "Arg failed:" >&5
64260    $ECHO "$OUTPUT" >&5
64261    JVM_ARG_OK=false
64262  fi
64263
64264
64265  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64266  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64267  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64268  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64269  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64270  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64271    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64272    JVM_ARG_OK=true
64273  else
64274    $ECHO "Arg failed:" >&5
64275    $ECHO "$OUTPUT" >&5
64276    JVM_ARG_OK=false
64277  fi
64278
64279
64280  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64281  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64282  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64283  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64284  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64285  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64286    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64287    JVM_ARG_OK=true
64288  else
64289    $ECHO "Arg failed:" >&5
64290    $ECHO "$OUTPUT" >&5
64291    JVM_ARG_OK=false
64292  fi
64293
64294
64295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64296$as_echo "$boot_jdk_jvmargs_small" >&6; }
64297
64298  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64299
64300
64301  JAVA_TOOL_FLAGS_SMALL=""
64302  for f in $JAVA_FLAGS_SMALL; do
64303    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64304  done
64305
64306
64307
64308# Setup smart javac (after cores and memory have been setup)
64309
64310
64311# Check whether --with-sjavac-server-java was given.
64312if test "${with_sjavac_server_java+set}" = set; then :
64313  withval=$with_sjavac_server_java;
64314fi
64315
64316
64317  if test "x$with_sjavac_server_java" != x; then
64318    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64319    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64320    if test "x$FOUND_VERSION" = x; then
64321      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64322    fi
64323  else
64324    SJAVAC_SERVER_JAVA="$JAVA"
64325  fi
64326
64327
64328  if test "$MEMORY_SIZE" -gt "3000"; then
64329
64330  $ECHO "Check if jvm arg is ok: -d64" >&5
64331  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64332  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64333  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64334  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64335  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64336    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64337    JVM_ARG_OK=true
64338  else
64339    $ECHO "Arg failed:" >&5
64340    $ECHO "$OUTPUT" >&5
64341    JVM_ARG_OK=false
64342  fi
64343
64344    if test "$JVM_ARG_OK" = true; then
64345      JVM_64BIT=true
64346      JVM_ARG_OK=false
64347    fi
64348  fi
64349
64350  MX_VALUE=`expr $MEMORY_SIZE / 2`
64351  if test "$JVM_64BIT" = true; then
64352    # Set ms lower than mx since more than one instance of the server might
64353    # get launched at the same time before they figure out which instance won.
64354    MS_VALUE=512
64355    if test "$MX_VALUE" -gt "2048"; then
64356      MX_VALUE=2048
64357    fi
64358  else
64359    MS_VALUE=256
64360    if test "$MX_VALUE" -gt "1500"; then
64361      MX_VALUE=1500
64362    fi
64363  fi
64364  if test "$MX_VALUE" -lt "512"; then
64365    MX_VALUE=512
64366  fi
64367
64368  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64369  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64370  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64371  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64372  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64373  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64374    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64375    JVM_ARG_OK=true
64376  else
64377    $ECHO "Arg failed:" >&5
64378    $ECHO "$OUTPUT" >&5
64379    JVM_ARG_OK=false
64380  fi
64381
64382
64383
64384  # Check whether --enable-sjavac was given.
64385if test "${enable_sjavac+set}" = set; then :
64386  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64387else
64388  ENABLE_SJAVAC="no"
64389fi
64390
64391  if test "x$JVM_ARG_OK" = "xfalse"; then
64392    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64393$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64394    ENABLE_SJAVAC="no"
64395  fi
64396  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64397$as_echo_n "checking whether to use sjavac... " >&6; }
64398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64399$as_echo "$ENABLE_SJAVAC" >&6; }
64400
64401
64402  # Check whether --enable-javac-server was given.
64403if test "${enable_javac_server+set}" = set; then :
64404  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64405else
64406  ENABLE_JAVAC_SERVER="yes"
64407fi
64408
64409  if test "x$JVM_ARG_OK" = "xfalse"; then
64410    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64411$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64412    ENABLE_JAVAC_SERVER="no"
64413  fi
64414  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64415$as_echo_n "checking whether to use javac server... " >&6; }
64416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64417$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64418
64419
64420  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64421    # When using a server javac, the small client instances do not need much
64422    # resources.
64423    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64424  fi
64425
64426
64427# Setup use of icecc if requested
64428
64429  # Check whether --enable-icecc was given.
64430if test "${enable_icecc+set}" = set; then :
64431  enableval=$enable_icecc;
64432fi
64433
64434
64435  if test "x${enable_icecc}" = "xyes"; then
64436
64437
64438
64439  # Publish this variable in the help.
64440
64441
64442  if [ -z "${ICECC_CMD+x}" ]; then
64443    # The variable is not set by user, try to locate tool using the code snippet
64444    for ac_prog in icecc
64445do
64446  # Extract the first word of "$ac_prog", so it can be a program name with args.
64447set dummy $ac_prog; ac_word=$2
64448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64449$as_echo_n "checking for $ac_word... " >&6; }
64450if ${ac_cv_path_ICECC_CMD+:} false; then :
64451  $as_echo_n "(cached) " >&6
64452else
64453  case $ICECC_CMD in
64454  [\\/]* | ?:[\\/]*)
64455  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64456  ;;
64457  *)
64458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64459for as_dir in $PATH
64460do
64461  IFS=$as_save_IFS
64462  test -z "$as_dir" && as_dir=.
64463    for ac_exec_ext in '' $ac_executable_extensions; do
64464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64465    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64467    break 2
64468  fi
64469done
64470  done
64471IFS=$as_save_IFS
64472
64473  ;;
64474esac
64475fi
64476ICECC_CMD=$ac_cv_path_ICECC_CMD
64477if test -n "$ICECC_CMD"; then
64478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64479$as_echo "$ICECC_CMD" >&6; }
64480else
64481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64482$as_echo "no" >&6; }
64483fi
64484
64485
64486  test -n "$ICECC_CMD" && break
64487done
64488
64489  else
64490    # The variable is set, but is it from the command line or the environment?
64491
64492    # Try to remove the string !ICECC_CMD! from our list.
64493    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64494    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64495      # If it failed, the variable was not from the command line. Ignore it,
64496      # but warn the user (except for BASH, which is always set by the calling BASH).
64497      if test "xICECC_CMD" != xBASH; then
64498        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64499$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64500      fi
64501      # Try to locate tool using the code snippet
64502      for ac_prog in icecc
64503do
64504  # Extract the first word of "$ac_prog", so it can be a program name with args.
64505set dummy $ac_prog; ac_word=$2
64506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64507$as_echo_n "checking for $ac_word... " >&6; }
64508if ${ac_cv_path_ICECC_CMD+:} false; then :
64509  $as_echo_n "(cached) " >&6
64510else
64511  case $ICECC_CMD in
64512  [\\/]* | ?:[\\/]*)
64513  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64514  ;;
64515  *)
64516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64517for as_dir in $PATH
64518do
64519  IFS=$as_save_IFS
64520  test -z "$as_dir" && as_dir=.
64521    for ac_exec_ext in '' $ac_executable_extensions; do
64522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64523    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64525    break 2
64526  fi
64527done
64528  done
64529IFS=$as_save_IFS
64530
64531  ;;
64532esac
64533fi
64534ICECC_CMD=$ac_cv_path_ICECC_CMD
64535if test -n "$ICECC_CMD"; then
64536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64537$as_echo "$ICECC_CMD" >&6; }
64538else
64539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64540$as_echo "no" >&6; }
64541fi
64542
64543
64544  test -n "$ICECC_CMD" && break
64545done
64546
64547    else
64548      # If it succeeded, then it was overridden by the user. We will use it
64549      # for the tool.
64550
64551      # First remove it from the list of overridden variables, so we can test
64552      # for unknown variables in the end.
64553      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64554
64555      # Check if we try to supply an empty value
64556      if test "x$ICECC_CMD" = x; then
64557        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64558$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64559        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64560$as_echo_n "checking for ICECC_CMD... " >&6; }
64561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64562$as_echo "disabled" >&6; }
64563      else
64564        # Check if the provided tool contains a complete path.
64565        tool_specified="$ICECC_CMD"
64566        tool_basename="${tool_specified##*/}"
64567        if test "x$tool_basename" = "x$tool_specified"; then
64568          # A command without a complete path is provided, search $PATH.
64569          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64570$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64571          # Extract the first word of "$tool_basename", so it can be a program name with args.
64572set dummy $tool_basename; ac_word=$2
64573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64574$as_echo_n "checking for $ac_word... " >&6; }
64575if ${ac_cv_path_ICECC_CMD+:} false; then :
64576  $as_echo_n "(cached) " >&6
64577else
64578  case $ICECC_CMD in
64579  [\\/]* | ?:[\\/]*)
64580  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64581  ;;
64582  *)
64583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64584for as_dir in $PATH
64585do
64586  IFS=$as_save_IFS
64587  test -z "$as_dir" && as_dir=.
64588    for ac_exec_ext in '' $ac_executable_extensions; do
64589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64590    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64592    break 2
64593  fi
64594done
64595  done
64596IFS=$as_save_IFS
64597
64598  ;;
64599esac
64600fi
64601ICECC_CMD=$ac_cv_path_ICECC_CMD
64602if test -n "$ICECC_CMD"; then
64603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64604$as_echo "$ICECC_CMD" >&6; }
64605else
64606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64607$as_echo "no" >&6; }
64608fi
64609
64610
64611          if test "x$ICECC_CMD" = x; then
64612            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64613          fi
64614        else
64615          # Otherwise we believe it is a complete path. Use it as it is.
64616          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64617$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64618          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64619$as_echo_n "checking for ICECC_CMD... " >&6; }
64620          if test ! -x "$tool_specified"; then
64621            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64622$as_echo "not found" >&6; }
64623            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64624          fi
64625          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64626$as_echo "$tool_specified" >&6; }
64627        fi
64628      fi
64629    fi
64630
64631  fi
64632
64633
64634
64635  if test "x$ICECC_CMD" = x; then
64636    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64637  fi
64638
64639
64640    old_path="$PATH"
64641
64642    # Look for icecc-create-env in some known places
64643    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64644
64645
64646
64647  # Publish this variable in the help.
64648
64649
64650  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64651    # The variable is not set by user, try to locate tool using the code snippet
64652    for ac_prog in icecc-create-env
64653do
64654  # Extract the first word of "$ac_prog", so it can be a program name with args.
64655set dummy $ac_prog; ac_word=$2
64656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64657$as_echo_n "checking for $ac_word... " >&6; }
64658if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64659  $as_echo_n "(cached) " >&6
64660else
64661  case $ICECC_CREATE_ENV in
64662  [\\/]* | ?:[\\/]*)
64663  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64664  ;;
64665  *)
64666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64667for as_dir in $PATH
64668do
64669  IFS=$as_save_IFS
64670  test -z "$as_dir" && as_dir=.
64671    for ac_exec_ext in '' $ac_executable_extensions; do
64672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64673    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64675    break 2
64676  fi
64677done
64678  done
64679IFS=$as_save_IFS
64680
64681  ;;
64682esac
64683fi
64684ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64685if test -n "$ICECC_CREATE_ENV"; then
64686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64687$as_echo "$ICECC_CREATE_ENV" >&6; }
64688else
64689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64690$as_echo "no" >&6; }
64691fi
64692
64693
64694  test -n "$ICECC_CREATE_ENV" && break
64695done
64696
64697  else
64698    # The variable is set, but is it from the command line or the environment?
64699
64700    # Try to remove the string !ICECC_CREATE_ENV! from our list.
64701    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64702    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64703      # If it failed, the variable was not from the command line. Ignore it,
64704      # but warn the user (except for BASH, which is always set by the calling BASH).
64705      if test "xICECC_CREATE_ENV" != xBASH; then
64706        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64707$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64708      fi
64709      # Try to locate tool using the code snippet
64710      for ac_prog in icecc-create-env
64711do
64712  # Extract the first word of "$ac_prog", so it can be a program name with args.
64713set dummy $ac_prog; ac_word=$2
64714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64715$as_echo_n "checking for $ac_word... " >&6; }
64716if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64717  $as_echo_n "(cached) " >&6
64718else
64719  case $ICECC_CREATE_ENV in
64720  [\\/]* | ?:[\\/]*)
64721  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64722  ;;
64723  *)
64724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64725for as_dir in $PATH
64726do
64727  IFS=$as_save_IFS
64728  test -z "$as_dir" && as_dir=.
64729    for ac_exec_ext in '' $ac_executable_extensions; do
64730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64731    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64733    break 2
64734  fi
64735done
64736  done
64737IFS=$as_save_IFS
64738
64739  ;;
64740esac
64741fi
64742ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64743if test -n "$ICECC_CREATE_ENV"; then
64744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64745$as_echo "$ICECC_CREATE_ENV" >&6; }
64746else
64747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64748$as_echo "no" >&6; }
64749fi
64750
64751
64752  test -n "$ICECC_CREATE_ENV" && break
64753done
64754
64755    else
64756      # If it succeeded, then it was overridden by the user. We will use it
64757      # for the tool.
64758
64759      # First remove it from the list of overridden variables, so we can test
64760      # for unknown variables in the end.
64761      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64762
64763      # Check if we try to supply an empty value
64764      if test "x$ICECC_CREATE_ENV" = x; then
64765        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64766$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64767        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64768$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64769        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64770$as_echo "disabled" >&6; }
64771      else
64772        # Check if the provided tool contains a complete path.
64773        tool_specified="$ICECC_CREATE_ENV"
64774        tool_basename="${tool_specified##*/}"
64775        if test "x$tool_basename" = "x$tool_specified"; then
64776          # A command without a complete path is provided, search $PATH.
64777          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64778$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64779          # Extract the first word of "$tool_basename", so it can be a program name with args.
64780set dummy $tool_basename; ac_word=$2
64781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64782$as_echo_n "checking for $ac_word... " >&6; }
64783if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64784  $as_echo_n "(cached) " >&6
64785else
64786  case $ICECC_CREATE_ENV in
64787  [\\/]* | ?:[\\/]*)
64788  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64789  ;;
64790  *)
64791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64792for as_dir in $PATH
64793do
64794  IFS=$as_save_IFS
64795  test -z "$as_dir" && as_dir=.
64796    for ac_exec_ext in '' $ac_executable_extensions; do
64797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64798    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64800    break 2
64801  fi
64802done
64803  done
64804IFS=$as_save_IFS
64805
64806  ;;
64807esac
64808fi
64809ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64810if test -n "$ICECC_CREATE_ENV"; then
64811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64812$as_echo "$ICECC_CREATE_ENV" >&6; }
64813else
64814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64815$as_echo "no" >&6; }
64816fi
64817
64818
64819          if test "x$ICECC_CREATE_ENV" = x; then
64820            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64821          fi
64822        else
64823          # Otherwise we believe it is a complete path. Use it as it is.
64824          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64825$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64826          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64827$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64828          if test ! -x "$tool_specified"; then
64829            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64830$as_echo "not found" >&6; }
64831            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64832          fi
64833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64834$as_echo "$tool_specified" >&6; }
64835        fi
64836      fi
64837    fi
64838
64839  fi
64840
64841
64842
64843  if test "x$ICECC_CREATE_ENV" = x; then
64844    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64845  fi
64846
64847
64848    # Use icecc-create-env to create a minimal compilation environment that can
64849    # be sent to the other hosts in the icecream cluster.
64850    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64851    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64852    # Older versions of icecc does not have the --gcc parameter
64853    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64854      icecc_gcc_arg="--gcc"
64855    fi
64856    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64857
64858  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64859      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64860          ${icecc_create_env_log} 2>&1 )
64861  if test "$?" != "0"; then
64862    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64863$as_echo "$as_me: icecc-create-env output:" >&6;}
64864    cat \
64865          ${icecc_create_env_log}
64866    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64867  fi
64868
64869    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64870      # For clang, the icecc compilerwrapper is needed. It usually resides next
64871      # to icecc-create-env.
64872
64873
64874
64875  # Publish this variable in the help.
64876
64877
64878  if [ -z "${ICECC_WRAPPER+x}" ]; then
64879    # The variable is not set by user, try to locate tool using the code snippet
64880    for ac_prog in compilerwrapper
64881do
64882  # Extract the first word of "$ac_prog", so it can be a program name with args.
64883set dummy $ac_prog; ac_word=$2
64884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64885$as_echo_n "checking for $ac_word... " >&6; }
64886if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64887  $as_echo_n "(cached) " >&6
64888else
64889  case $ICECC_WRAPPER in
64890  [\\/]* | ?:[\\/]*)
64891  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64892  ;;
64893  *)
64894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64895for as_dir in $PATH
64896do
64897  IFS=$as_save_IFS
64898  test -z "$as_dir" && as_dir=.
64899    for ac_exec_ext in '' $ac_executable_extensions; do
64900  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64901    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64903    break 2
64904  fi
64905done
64906  done
64907IFS=$as_save_IFS
64908
64909  ;;
64910esac
64911fi
64912ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64913if test -n "$ICECC_WRAPPER"; then
64914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64915$as_echo "$ICECC_WRAPPER" >&6; }
64916else
64917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64918$as_echo "no" >&6; }
64919fi
64920
64921
64922  test -n "$ICECC_WRAPPER" && break
64923done
64924
64925  else
64926    # The variable is set, but is it from the command line or the environment?
64927
64928    # Try to remove the string !ICECC_WRAPPER! from our list.
64929    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64930    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64931      # If it failed, the variable was not from the command line. Ignore it,
64932      # but warn the user (except for BASH, which is always set by the calling BASH).
64933      if test "xICECC_WRAPPER" != xBASH; then
64934        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64935$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64936      fi
64937      # Try to locate tool using the code snippet
64938      for ac_prog in compilerwrapper
64939do
64940  # Extract the first word of "$ac_prog", so it can be a program name with args.
64941set dummy $ac_prog; ac_word=$2
64942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64943$as_echo_n "checking for $ac_word... " >&6; }
64944if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64945  $as_echo_n "(cached) " >&6
64946else
64947  case $ICECC_WRAPPER in
64948  [\\/]* | ?:[\\/]*)
64949  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64950  ;;
64951  *)
64952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64953for as_dir in $PATH
64954do
64955  IFS=$as_save_IFS
64956  test -z "$as_dir" && as_dir=.
64957    for ac_exec_ext in '' $ac_executable_extensions; do
64958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64959    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64961    break 2
64962  fi
64963done
64964  done
64965IFS=$as_save_IFS
64966
64967  ;;
64968esac
64969fi
64970ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64971if test -n "$ICECC_WRAPPER"; then
64972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64973$as_echo "$ICECC_WRAPPER" >&6; }
64974else
64975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64976$as_echo "no" >&6; }
64977fi
64978
64979
64980  test -n "$ICECC_WRAPPER" && break
64981done
64982
64983    else
64984      # If it succeeded, then it was overridden by the user. We will use it
64985      # for the tool.
64986
64987      # First remove it from the list of overridden variables, so we can test
64988      # for unknown variables in the end.
64989      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64990
64991      # Check if we try to supply an empty value
64992      if test "x$ICECC_WRAPPER" = x; then
64993        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
64994$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
64995        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
64996$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
64997        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64998$as_echo "disabled" >&6; }
64999      else
65000        # Check if the provided tool contains a complete path.
65001        tool_specified="$ICECC_WRAPPER"
65002        tool_basename="${tool_specified##*/}"
65003        if test "x$tool_basename" = "x$tool_specified"; then
65004          # A command without a complete path is provided, search $PATH.
65005          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65006$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65007          # Extract the first word of "$tool_basename", so it can be a program name with args.
65008set dummy $tool_basename; ac_word=$2
65009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65010$as_echo_n "checking for $ac_word... " >&6; }
65011if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65012  $as_echo_n "(cached) " >&6
65013else
65014  case $ICECC_WRAPPER in
65015  [\\/]* | ?:[\\/]*)
65016  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65017  ;;
65018  *)
65019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65020for as_dir in $PATH
65021do
65022  IFS=$as_save_IFS
65023  test -z "$as_dir" && as_dir=.
65024    for ac_exec_ext in '' $ac_executable_extensions; do
65025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65026    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65028    break 2
65029  fi
65030done
65031  done
65032IFS=$as_save_IFS
65033
65034  ;;
65035esac
65036fi
65037ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65038if test -n "$ICECC_WRAPPER"; then
65039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65040$as_echo "$ICECC_WRAPPER" >&6; }
65041else
65042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65043$as_echo "no" >&6; }
65044fi
65045
65046
65047          if test "x$ICECC_WRAPPER" = x; then
65048            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65049          fi
65050        else
65051          # Otherwise we believe it is a complete path. Use it as it is.
65052          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65053$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65054          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65055$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65056          if test ! -x "$tool_specified"; then
65057            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65058$as_echo "not found" >&6; }
65059            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65060          fi
65061          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65062$as_echo "$tool_specified" >&6; }
65063        fi
65064      fi
65065    fi
65066
65067  fi
65068
65069
65070
65071  if test "x$ICECC_WRAPPER" = x; then
65072    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65073  fi
65074
65075
65076
65077  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65078      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65079  if test "$?" != "0"; then
65080    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65081$as_echo "$as_me: icecc-create-env output:" >&6;}
65082    cat ${icecc_create_env_log}
65083    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65084  fi
65085
65086    else
65087      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65088    fi
65089    PATH="$old_path"
65090    # The bundle with the compiler gets a name based on checksums. Parse log file
65091    # to find it.
65092    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65093    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65094    if test ! -f ${ICECC_ENV_BUNDLE}; then
65095      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65096    fi
65097    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65098$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65099    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65100$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65101    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65102
65103    if test "x${COMPILE_TYPE}" = "xcross"; then
65104      # If cross compiling, create a separate env package for the build compiler
65105      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65106      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65107      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65108
65109  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65110      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65111            ${icecc_create_env_log_build} 2>&1 )
65112  if test "$?" != "0"; then
65113    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65114$as_echo "$as_me: icecc-create-env output:" >&6;}
65115    cat \
65116            ${icecc_create_env_log_build}
65117    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65118  fi
65119
65120      elif test "x${BUILD_CC##*/}" = "xclang"; then
65121
65122  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65123      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65124  if test "$?" != "0"; then
65125    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65126$as_echo "$as_me: icecc-create-env output:" >&6;}
65127    cat ${icecc_create_env_log_build}
65128    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65129  fi
65130
65131      else
65132        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65133      fi
65134      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65135      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65136      if test ! -f ${ICECC_ENV_BUNDLE}; then
65137        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65138      fi
65139      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65140$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65141      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65142$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65143      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65144          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65145    else
65146      BUILD_ICECC="${ICECC}"
65147    fi
65148
65149
65150  fi
65151
65152
65153# Can the C/C++ compiler use precompiled headers?
65154
65155
65156  ###############################################################################
65157  #
65158  # Can the C/C++ compiler use precompiled headers?
65159  #
65160  # Check whether --enable-precompiled-headers was given.
65161if test "${enable_precompiled_headers+set}" = set; then :
65162  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65163else
65164  ENABLE_PRECOMPH=yes
65165fi
65166
65167
65168  USE_PRECOMPILED_HEADER=1
65169  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65170$as_echo_n "checking If precompiled header is enabled... " >&6; }
65171  if test "x$ENABLE_PRECOMPH" = xno; then
65172    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65173$as_echo "no, forced" >&6; }
65174    USE_PRECOMPILED_HEADER=0
65175  elif test "x$ICECC" != "x"; then
65176    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65177$as_echo "no, does not work effectively with icecc" >&6; }
65178    USE_PRECOMPILED_HEADER=0
65179  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65181$as_echo "no, does not work with Solaris Studio" >&6; }
65182    USE_PRECOMPILED_HEADER=0
65183  else
65184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65185$as_echo "yes" >&6; }
65186  fi
65187
65188  if test "x$ENABLE_PRECOMPH" = xyes; then
65189    # Check that the compiler actually supports precomp headers.
65190    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65191      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65192$as_echo_n "checking that precompiled headers work... " >&6; }
65193      echo "int alfa();" > conftest.h
65194      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65195      if test ! -f conftest.hpp.gch; then
65196        USE_PRECOMPILED_HEADER=0
65197        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65198$as_echo "no" >&6; }
65199      else
65200        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65201$as_echo "yes" >&6; }
65202      fi
65203      rm -f conftest.h conftest.hpp.gch
65204    fi
65205  fi
65206
65207
65208
65209
65210# Setup use of ccache, if available
65211
65212  # Check whether --enable-ccache was given.
65213if test "${enable_ccache+set}" = set; then :
65214  enableval=$enable_ccache;
65215fi
65216
65217
65218  CCACHE=
65219  CCACHE_STATUS=
65220  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65221$as_echo_n "checking is ccache enabled... " >&6; }
65222  if test "x$enable_ccache" = xyes; then
65223    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65224      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65225$as_echo "yes" >&6; }
65226      OLD_PATH="$PATH"
65227      if test "x$TOOLCHAIN_PATH" != x; then
65228        PATH=$TOOLCHAIN_PATH:$PATH
65229      fi
65230
65231
65232
65233  # Publish this variable in the help.
65234
65235
65236  if [ -z "${CCACHE+x}" ]; then
65237    # The variable is not set by user, try to locate tool using the code snippet
65238    for ac_prog in ccache
65239do
65240  # Extract the first word of "$ac_prog", so it can be a program name with args.
65241set dummy $ac_prog; ac_word=$2
65242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65243$as_echo_n "checking for $ac_word... " >&6; }
65244if ${ac_cv_path_CCACHE+:} false; then :
65245  $as_echo_n "(cached) " >&6
65246else
65247  case $CCACHE in
65248  [\\/]* | ?:[\\/]*)
65249  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65250  ;;
65251  *)
65252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65253for as_dir in $PATH
65254do
65255  IFS=$as_save_IFS
65256  test -z "$as_dir" && as_dir=.
65257    for ac_exec_ext in '' $ac_executable_extensions; do
65258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65259    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65261    break 2
65262  fi
65263done
65264  done
65265IFS=$as_save_IFS
65266
65267  ;;
65268esac
65269fi
65270CCACHE=$ac_cv_path_CCACHE
65271if test -n "$CCACHE"; then
65272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65273$as_echo "$CCACHE" >&6; }
65274else
65275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65276$as_echo "no" >&6; }
65277fi
65278
65279
65280  test -n "$CCACHE" && break
65281done
65282
65283  else
65284    # The variable is set, but is it from the command line or the environment?
65285
65286    # Try to remove the string !CCACHE! from our list.
65287    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65288    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65289      # If it failed, the variable was not from the command line. Ignore it,
65290      # but warn the user (except for BASH, which is always set by the calling BASH).
65291      if test "xCCACHE" != xBASH; then
65292        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65293$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65294      fi
65295      # Try to locate tool using the code snippet
65296      for ac_prog in ccache
65297do
65298  # Extract the first word of "$ac_prog", so it can be a program name with args.
65299set dummy $ac_prog; ac_word=$2
65300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65301$as_echo_n "checking for $ac_word... " >&6; }
65302if ${ac_cv_path_CCACHE+:} false; then :
65303  $as_echo_n "(cached) " >&6
65304else
65305  case $CCACHE in
65306  [\\/]* | ?:[\\/]*)
65307  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65308  ;;
65309  *)
65310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65311for as_dir in $PATH
65312do
65313  IFS=$as_save_IFS
65314  test -z "$as_dir" && as_dir=.
65315    for ac_exec_ext in '' $ac_executable_extensions; do
65316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65317    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65319    break 2
65320  fi
65321done
65322  done
65323IFS=$as_save_IFS
65324
65325  ;;
65326esac
65327fi
65328CCACHE=$ac_cv_path_CCACHE
65329if test -n "$CCACHE"; then
65330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65331$as_echo "$CCACHE" >&6; }
65332else
65333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65334$as_echo "no" >&6; }
65335fi
65336
65337
65338  test -n "$CCACHE" && break
65339done
65340
65341    else
65342      # If it succeeded, then it was overridden by the user. We will use it
65343      # for the tool.
65344
65345      # First remove it from the list of overridden variables, so we can test
65346      # for unknown variables in the end.
65347      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65348
65349      # Check if we try to supply an empty value
65350      if test "x$CCACHE" = x; then
65351        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65352$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65353        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65354$as_echo_n "checking for CCACHE... " >&6; }
65355        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65356$as_echo "disabled" >&6; }
65357      else
65358        # Check if the provided tool contains a complete path.
65359        tool_specified="$CCACHE"
65360        tool_basename="${tool_specified##*/}"
65361        if test "x$tool_basename" = "x$tool_specified"; then
65362          # A command without a complete path is provided, search $PATH.
65363          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65364$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65365          # Extract the first word of "$tool_basename", so it can be a program name with args.
65366set dummy $tool_basename; ac_word=$2
65367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65368$as_echo_n "checking for $ac_word... " >&6; }
65369if ${ac_cv_path_CCACHE+:} false; then :
65370  $as_echo_n "(cached) " >&6
65371else
65372  case $CCACHE in
65373  [\\/]* | ?:[\\/]*)
65374  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65375  ;;
65376  *)
65377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65378for as_dir in $PATH
65379do
65380  IFS=$as_save_IFS
65381  test -z "$as_dir" && as_dir=.
65382    for ac_exec_ext in '' $ac_executable_extensions; do
65383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65384    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65386    break 2
65387  fi
65388done
65389  done
65390IFS=$as_save_IFS
65391
65392  ;;
65393esac
65394fi
65395CCACHE=$ac_cv_path_CCACHE
65396if test -n "$CCACHE"; then
65397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65398$as_echo "$CCACHE" >&6; }
65399else
65400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65401$as_echo "no" >&6; }
65402fi
65403
65404
65405          if test "x$CCACHE" = x; then
65406            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65407          fi
65408        else
65409          # Otherwise we believe it is a complete path. Use it as it is.
65410          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65411$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65412          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65413$as_echo_n "checking for CCACHE... " >&6; }
65414          if test ! -x "$tool_specified"; then
65415            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65416$as_echo "not found" >&6; }
65417            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65418          fi
65419          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65420$as_echo "$tool_specified" >&6; }
65421        fi
65422      fi
65423    fi
65424
65425  fi
65426
65427
65428
65429  if test "x$CCACHE" = x; then
65430    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65431  fi
65432
65433
65434      PATH="$OLD_PATH"
65435      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65436      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65437    else
65438      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65439$as_echo "no" >&6; }
65440      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65441$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65442    fi
65443  elif test "x$enable_ccache" = xno; then
65444    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65445$as_echo "no, explicitly disabled" >&6; }
65446    CCACHE_STATUS="Disabled"
65447  elif test "x$enable_ccache" = x; then
65448    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65449$as_echo "no" >&6; }
65450  else
65451    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65452$as_echo "unknown" >&6; }
65453    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65454  fi
65455
65456
65457
65458# Check whether --with-ccache-dir was given.
65459if test "${with_ccache_dir+set}" = set; then :
65460  withval=$with_ccache_dir;
65461fi
65462
65463
65464  if test "x$with_ccache_dir" != x; then
65465    # When using a non home ccache directory, assume the use is to share ccache files
65466    # with other users. Thus change the umask.
65467    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65468    if test "x$CCACHE" = x; then
65469      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65470$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65471    fi
65472  fi
65473
65474  if test "x$CCACHE" != x; then
65475
65476  if test "x$CCACHE" != x; then
65477    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65478      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65479          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65480      if test "x$HAS_BAD_CCACHE" != "x"; then
65481        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65482      fi
65483      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65484$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65485      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65486      PUSHED_FLAGS="$CXXFLAGS"
65487      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65488      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65489/* end confdefs.h.  */
65490
65491int
65492main ()
65493{
65494
65495  ;
65496  return 0;
65497}
65498_ACEOF
65499if ac_fn_cxx_try_compile "$LINENO"; then :
65500  CC_KNOWS_CCACHE_TRICK=yes
65501else
65502  CC_KNOWS_CCACHE_TRICK=no
65503fi
65504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65505      CXXFLAGS="$PUSHED_FLAGS"
65506      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65507        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65508$as_echo "yes" >&6; }
65509        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65510
65511        CCACHE_SLOPPINESS=pch_defines,time_macros
65512      else
65513        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65514$as_echo "no" >&6; }
65515        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65516      fi
65517    fi
65518
65519    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65520        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65521
65522    if test "x$SET_CCACHE_DIR" != x; then
65523      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65524      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65525    fi
65526  fi
65527
65528  fi
65529
65530
65531###############################################################################
65532#
65533# And now the finish...
65534#
65535###############################################################################
65536
65537# Check for some common pitfalls
65538
65539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65540    file_to_test="$SRC_ROOT/LICENSE"
65541    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65542      as_fn_error $? "Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin." "$LINENO" 5
65543    fi
65544  fi
65545
65546
65547  # Did user specify any unknown variables?
65548
65549  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65550    # Replace the separating ! with spaces before presenting for end user.
65551    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65552    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65553$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65554  fi
65555
65556
65557  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65558$as_echo_n "checking if build directory is on local disk... " >&6; }
65559
65560  # df -l lists only local disks; if the given directory is not found then
65561  # a non-zero exit code is given
65562  if test "x$DF" = x; then
65563    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65564      # msys does not have df; use Windows "net use" instead.
65565      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65566      if test "x$IS_NETWORK_DISK" = x; then
65567        OUTPUT_DIR_IS_LOCAL="yes"
65568      else
65569        OUTPUT_DIR_IS_LOCAL="no"
65570      fi
65571    else
65572      # No df here, say it's local
65573      OUTPUT_DIR_IS_LOCAL="yes"
65574    fi
65575  else
65576    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65577      OUTPUT_DIR_IS_LOCAL="yes"
65578    else
65579      OUTPUT_DIR_IS_LOCAL="no"
65580    fi
65581  fi
65582
65583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65584$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65585
65586
65587
65588  # Check if the user has any old-style ALT_ variables set.
65589  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65590
65591  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65592  # Since we can't properly handle the dependencies for this, warn the user about the situation
65593  if test -e $OUTPUT_ROOT/spec.gmk; then
65594    IS_RECONFIGURE=yes
65595  else
65596    IS_RECONFIGURE=no
65597  fi
65598
65599
65600# At the end, call the custom hook. (Dummy macro if no custom sources available)
65601
65602
65603# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65604
65605  # Keep feature lists sorted and free of duplicates
65606  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65607  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65608  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65609  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65610  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65611  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65612  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65613
65614  # Validate features
65615  for variant in $JVM_VARIANTS; do
65616    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65617$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65618    features_var_name=JVM_FEATURES_$variant
65619    JVM_FEATURES_TO_TEST=${!features_var_name}
65620    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65621$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65622    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65623    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65624    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65625    if test "x$INVALID_FEATURES" != x; then
65626      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65627    fi
65628  done
65629
65630
65631# We're messing a bit with internal autoconf variables to put the config.status
65632# in the output directory instead of the current directory.
65633CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65634
65635# Create the actual output files. Now the main work of configure is done.
65636cat >confcache <<\_ACEOF
65637# This file is a shell script that caches the results of configure
65638# tests run on this system so they can be shared between configure
65639# scripts and configure runs, see configure's option --config-cache.
65640# It is not useful on other systems.  If it contains results you don't
65641# want to keep, you may remove or edit it.
65642#
65643# config.status only pays attention to the cache file if you give it
65644# the --recheck option to rerun configure.
65645#
65646# `ac_cv_env_foo' variables (set or unset) will be overridden when
65647# loading this file, other *unset* `ac_cv_foo' will be assigned the
65648# following values.
65649
65650_ACEOF
65651
65652# The following way of writing the cache mishandles newlines in values,
65653# but we know of no workaround that is simple, portable, and efficient.
65654# So, we kill variables containing newlines.
65655# Ultrix sh set writes to stderr and can't be redirected directly,
65656# and sets the high bit in the cache file unless we assign to the vars.
65657(
65658  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65659    eval ac_val=\$$ac_var
65660    case $ac_val in #(
65661    *${as_nl}*)
65662      case $ac_var in #(
65663      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65664$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65665      esac
65666      case $ac_var in #(
65667      _ | IFS | as_nl) ;; #(
65668      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65669      *) { eval $ac_var=; unset $ac_var;} ;;
65670      esac ;;
65671    esac
65672  done
65673
65674  (set) 2>&1 |
65675    case $as_nl`(ac_space=' '; set) 2>&1` in #(
65676    *${as_nl}ac_space=\ *)
65677      # `set' does not quote correctly, so add quotes: double-quote
65678      # substitution turns \\\\ into \\, and sed turns \\ into \.
65679      sed -n \
65680	"s/'/'\\\\''/g;
65681	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65682      ;; #(
65683    *)
65684      # `set' quotes correctly as required by POSIX, so do not add quotes.
65685      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65686      ;;
65687    esac |
65688    sort
65689) |
65690  sed '
65691     /^ac_cv_env_/b end
65692     t clear
65693     :clear
65694     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65695     t end
65696     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65697     :end' >>confcache
65698if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65699  if test -w "$cache_file"; then
65700    if test "x$cache_file" != "x/dev/null"; then
65701      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65702$as_echo "$as_me: updating cache $cache_file" >&6;}
65703      if test ! -f "$cache_file" || test -h "$cache_file"; then
65704	cat confcache >"$cache_file"
65705      else
65706        case $cache_file in #(
65707        */* | ?:*)
65708	  mv -f confcache "$cache_file"$$ &&
65709	  mv -f "$cache_file"$$ "$cache_file" ;; #(
65710        *)
65711	  mv -f confcache "$cache_file" ;;
65712	esac
65713      fi
65714    fi
65715  else
65716    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65717$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65718  fi
65719fi
65720rm -f confcache
65721
65722test "x$prefix" = xNONE && prefix=$ac_default_prefix
65723# Let make expand exec_prefix.
65724test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65725
65726# Transform confdefs.h into DEFS.
65727# Protect against shell expansion while executing Makefile rules.
65728# Protect against Makefile macro expansion.
65729#
65730# If the first sed substitution is executed (which looks for macros that
65731# take arguments), then branch to the quote section.  Otherwise,
65732# look for a macro that doesn't take arguments.
65733ac_script='
65734:mline
65735/\\$/{
65736 N
65737 s,\\\n,,
65738 b mline
65739}
65740t clear
65741:clear
65742s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
65743t quote
65744s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
65745t quote
65746b any
65747:quote
65748s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65749s/\[/\\&/g
65750s/\]/\\&/g
65751s/\$/$$/g
65752H
65753:any
65754${
65755	g
65756	s/^\n//
65757	s/\n/ /g
65758	p
65759}
65760'
65761DEFS=`sed -n "$ac_script" confdefs.h`
65762
65763
65764ac_libobjs=
65765ac_ltlibobjs=
65766U=
65767for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65768  # 1. Remove the extension, and $U if already installed.
65769  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65770  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65771  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65772  #    will be set to the directory where LIBOBJS objects are built.
65773  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65774  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65775done
65776LIBOBJS=$ac_libobjs
65777
65778LTLIBOBJS=$ac_ltlibobjs
65779
65780
65781
65782: "${CONFIG_STATUS=./config.status}"
65783ac_write_fail=0
65784ac_clean_files_save=$ac_clean_files
65785ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65786{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65787$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65788as_write_fail=0
65789cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65790#! $SHELL
65791# Generated by $as_me.
65792# Run this file to recreate the current configuration.
65793# Compiler output produced by configure, useful for debugging
65794# configure, is in config.log if it exists.
65795
65796debug=false
65797ac_cs_recheck=false
65798ac_cs_silent=false
65799
65800SHELL=\${CONFIG_SHELL-$SHELL}
65801export SHELL
65802_ASEOF
65803cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65804## -------------------- ##
65805## M4sh Initialization. ##
65806## -------------------- ##
65807
65808# Be more Bourne compatible
65809DUALCASE=1; export DUALCASE # for MKS sh
65810if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65811  emulate sh
65812  NULLCMD=:
65813  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65814  # is contrary to our usage.  Disable this feature.
65815  alias -g '${1+"$@"}'='"$@"'
65816  setopt NO_GLOB_SUBST
65817else
65818  case `(set -o) 2>/dev/null` in #(
65819  *posix*) :
65820    set -o posix ;; #(
65821  *) :
65822     ;;
65823esac
65824fi
65825
65826
65827as_nl='
65828'
65829export as_nl
65830# Printing a long string crashes Solaris 7 /usr/bin/printf.
65831as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65832as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65833as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65834# Prefer a ksh shell builtin over an external printf program on Solaris,
65835# but without wasting forks for bash or zsh.
65836if test -z "$BASH_VERSION$ZSH_VERSION" \
65837    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65838  as_echo='print -r --'
65839  as_echo_n='print -rn --'
65840elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65841  as_echo='printf %s\n'
65842  as_echo_n='printf %s'
65843else
65844  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65845    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65846    as_echo_n='/usr/ucb/echo -n'
65847  else
65848    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65849    as_echo_n_body='eval
65850      arg=$1;
65851      case $arg in #(
65852      *"$as_nl"*)
65853	expr "X$arg" : "X\\(.*\\)$as_nl";
65854	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65855      esac;
65856      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65857    '
65858    export as_echo_n_body
65859    as_echo_n='sh -c $as_echo_n_body as_echo'
65860  fi
65861  export as_echo_body
65862  as_echo='sh -c $as_echo_body as_echo'
65863fi
65864
65865# The user is always right.
65866if test "${PATH_SEPARATOR+set}" != set; then
65867  PATH_SEPARATOR=:
65868  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65869    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65870      PATH_SEPARATOR=';'
65871  }
65872fi
65873
65874
65875# IFS
65876# We need space, tab and new line, in precisely that order.  Quoting is
65877# there to prevent editors from complaining about space-tab.
65878# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65879# splitting by setting IFS to empty value.)
65880IFS=" ""	$as_nl"
65881
65882# Find who we are.  Look in the path if we contain no directory separator.
65883as_myself=
65884case $0 in #((
65885  *[\\/]* ) as_myself=$0 ;;
65886  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65887for as_dir in $PATH
65888do
65889  IFS=$as_save_IFS
65890  test -z "$as_dir" && as_dir=.
65891    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65892  done
65893IFS=$as_save_IFS
65894
65895     ;;
65896esac
65897# We did not find ourselves, most probably we were run as `sh COMMAND'
65898# in which case we are not to be found in the path.
65899if test "x$as_myself" = x; then
65900  as_myself=$0
65901fi
65902if test ! -f "$as_myself"; then
65903  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65904  exit 1
65905fi
65906
65907# Unset variables that we do not need and which cause bugs (e.g. in
65908# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65909# suppresses any "Segmentation fault" message there.  '((' could
65910# trigger a bug in pdksh 5.2.14.
65911for as_var in BASH_ENV ENV MAIL MAILPATH
65912do eval test x\${$as_var+set} = xset \
65913  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65914done
65915PS1='$ '
65916PS2='> '
65917PS4='+ '
65918
65919# NLS nuisances.
65920LC_ALL=C
65921export LC_ALL
65922LANGUAGE=C
65923export LANGUAGE
65924
65925# CDPATH.
65926(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65927
65928
65929# as_fn_error STATUS ERROR [LINENO LOG_FD]
65930# ----------------------------------------
65931# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65932# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65933# script with STATUS, using 1 if that was 0.
65934as_fn_error ()
65935{
65936  as_status=$1; test $as_status -eq 0 && as_status=1
65937  if test "$4"; then
65938    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65939    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65940  fi
65941  $as_echo "$as_me: error: $2" >&2
65942  as_fn_exit $as_status
65943} # as_fn_error
65944
65945
65946# as_fn_set_status STATUS
65947# -----------------------
65948# Set $? to STATUS, without forking.
65949as_fn_set_status ()
65950{
65951  return $1
65952} # as_fn_set_status
65953
65954# as_fn_exit STATUS
65955# -----------------
65956# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
65957as_fn_exit ()
65958{
65959  set +e
65960  as_fn_set_status $1
65961  exit $1
65962} # as_fn_exit
65963
65964# as_fn_unset VAR
65965# ---------------
65966# Portably unset VAR.
65967as_fn_unset ()
65968{
65969  { eval $1=; unset $1;}
65970}
65971as_unset=as_fn_unset
65972# as_fn_append VAR VALUE
65973# ----------------------
65974# Append the text in VALUE to the end of the definition contained in VAR. Take
65975# advantage of any shell optimizations that allow amortized linear growth over
65976# repeated appends, instead of the typical quadratic growth present in naive
65977# implementations.
65978if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
65979  eval 'as_fn_append ()
65980  {
65981    eval $1+=\$2
65982  }'
65983else
65984  as_fn_append ()
65985  {
65986    eval $1=\$$1\$2
65987  }
65988fi # as_fn_append
65989
65990# as_fn_arith ARG...
65991# ------------------
65992# Perform arithmetic evaluation on the ARGs, and store the result in the
65993# global $as_val. Take advantage of shells that can avoid forks. The arguments
65994# must be portable across $(()) and expr.
65995if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
65996  eval 'as_fn_arith ()
65997  {
65998    as_val=$(( $* ))
65999  }'
66000else
66001  as_fn_arith ()
66002  {
66003    as_val=`expr "$@" || test $? -eq 1`
66004  }
66005fi # as_fn_arith
66006
66007
66008if expr a : '\(a\)' >/dev/null 2>&1 &&
66009   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66010  as_expr=expr
66011else
66012  as_expr=false
66013fi
66014
66015if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66016  as_basename=basename
66017else
66018  as_basename=false
66019fi
66020
66021if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66022  as_dirname=dirname
66023else
66024  as_dirname=false
66025fi
66026
66027as_me=`$as_basename -- "$0" ||
66028$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66029	 X"$0" : 'X\(//\)$' \| \
66030	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66031$as_echo X/"$0" |
66032    sed '/^.*\/\([^/][^/]*\)\/*$/{
66033	    s//\1/
66034	    q
66035	  }
66036	  /^X\/\(\/\/\)$/{
66037	    s//\1/
66038	    q
66039	  }
66040	  /^X\/\(\/\).*/{
66041	    s//\1/
66042	    q
66043	  }
66044	  s/.*/./; q'`
66045
66046# Avoid depending upon Character Ranges.
66047as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66048as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66049as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66050as_cr_digits='0123456789'
66051as_cr_alnum=$as_cr_Letters$as_cr_digits
66052
66053ECHO_C= ECHO_N= ECHO_T=
66054case `echo -n x` in #(((((
66055-n*)
66056  case `echo 'xy\c'` in
66057  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66058  xy)  ECHO_C='\c';;
66059  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66060       ECHO_T='	';;
66061  esac;;
66062*)
66063  ECHO_N='-n';;
66064esac
66065
66066rm -f conf$$ conf$$.exe conf$$.file
66067if test -d conf$$.dir; then
66068  rm -f conf$$.dir/conf$$.file
66069else
66070  rm -f conf$$.dir
66071  mkdir conf$$.dir 2>/dev/null
66072fi
66073if (echo >conf$$.file) 2>/dev/null; then
66074  if ln -s conf$$.file conf$$ 2>/dev/null; then
66075    as_ln_s='ln -s'
66076    # ... but there are two gotchas:
66077    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66078    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66079    # In both cases, we have to default to `cp -pR'.
66080    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66081      as_ln_s='cp -pR'
66082  elif ln conf$$.file conf$$ 2>/dev/null; then
66083    as_ln_s=ln
66084  else
66085    as_ln_s='cp -pR'
66086  fi
66087else
66088  as_ln_s='cp -pR'
66089fi
66090rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66091rmdir conf$$.dir 2>/dev/null
66092
66093
66094# as_fn_mkdir_p
66095# -------------
66096# Create "$as_dir" as a directory, including parents if necessary.
66097as_fn_mkdir_p ()
66098{
66099
66100  case $as_dir in #(
66101  -*) as_dir=./$as_dir;;
66102  esac
66103  test -d "$as_dir" || eval $as_mkdir_p || {
66104    as_dirs=
66105    while :; do
66106      case $as_dir in #(
66107      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66108      *) as_qdir=$as_dir;;
66109      esac
66110      as_dirs="'$as_qdir' $as_dirs"
66111      as_dir=`$as_dirname -- "$as_dir" ||
66112$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66113	 X"$as_dir" : 'X\(//\)[^/]' \| \
66114	 X"$as_dir" : 'X\(//\)$' \| \
66115	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66116$as_echo X"$as_dir" |
66117    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66118	    s//\1/
66119	    q
66120	  }
66121	  /^X\(\/\/\)[^/].*/{
66122	    s//\1/
66123	    q
66124	  }
66125	  /^X\(\/\/\)$/{
66126	    s//\1/
66127	    q
66128	  }
66129	  /^X\(\/\).*/{
66130	    s//\1/
66131	    q
66132	  }
66133	  s/.*/./; q'`
66134      test -d "$as_dir" && break
66135    done
66136    test -z "$as_dirs" || eval "mkdir $as_dirs"
66137  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66138
66139
66140} # as_fn_mkdir_p
66141if mkdir -p . 2>/dev/null; then
66142  as_mkdir_p='mkdir -p "$as_dir"'
66143else
66144  test -d ./-p && rmdir ./-p
66145  as_mkdir_p=false
66146fi
66147
66148
66149# as_fn_executable_p FILE
66150# -----------------------
66151# Test if FILE is an executable regular file.
66152as_fn_executable_p ()
66153{
66154  test -f "$1" && test -x "$1"
66155} # as_fn_executable_p
66156as_test_x='test -x'
66157as_executable_p=as_fn_executable_p
66158
66159# Sed expression to map a string onto a valid CPP name.
66160as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66161
66162# Sed expression to map a string onto a valid variable name.
66163as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66164
66165
66166exec 6>&1
66167## ----------------------------------- ##
66168## Main body of $CONFIG_STATUS script. ##
66169## ----------------------------------- ##
66170_ASEOF
66171test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66172
66173cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66174# Save the log message, to keep $0 and so on meaningful, and to
66175# report actual input values of CONFIG_FILES etc. instead of their
66176# values after options handling.
66177ac_log="
66178This file was extended by OpenJDK $as_me jdk9, which was
66179generated by GNU Autoconf 2.69.  Invocation command line was
66180
66181  CONFIG_FILES    = $CONFIG_FILES
66182  CONFIG_HEADERS  = $CONFIG_HEADERS
66183  CONFIG_LINKS    = $CONFIG_LINKS
66184  CONFIG_COMMANDS = $CONFIG_COMMANDS
66185  $ $0 $@
66186
66187on `(hostname || uname -n) 2>/dev/null | sed 1q`
66188"
66189
66190_ACEOF
66191
66192case $ac_config_files in *"
66193"*) set x $ac_config_files; shift; ac_config_files=$*;;
66194esac
66195
66196
66197
66198cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66199# Files that config.status was made for.
66200config_files="$ac_config_files"
66201
66202_ACEOF
66203
66204cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66205ac_cs_usage="\
66206\`$as_me' instantiates files and other configuration actions
66207from templates according to the current configuration.  Unless the files
66208and actions are specified as TAGs, all are instantiated by default.
66209
66210Usage: $0 [OPTION]... [TAG]...
66211
66212  -h, --help       print this help, then exit
66213  -V, --version    print version number and configuration settings, then exit
66214      --config     print configuration, then exit
66215  -q, --quiet, --silent
66216                   do not print progress messages
66217  -d, --debug      don't remove temporary files
66218      --recheck    update $as_me by reconfiguring in the same conditions
66219      --file=FILE[:TEMPLATE]
66220                   instantiate the configuration file FILE
66221
66222Configuration files:
66223$config_files
66224
66225Report bugs to <build-dev@openjdk.java.net>.
66226OpenJDK home page: <http://openjdk.java.net>."
66227
66228_ACEOF
66229cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66230ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66231ac_cs_version="\\
66232OpenJDK config.status jdk9
66233configured by $0, generated by GNU Autoconf 2.69,
66234  with options \\"\$ac_cs_config\\"
66235
66236Copyright (C) 2012 Free Software Foundation, Inc.
66237This config.status script is free software; the Free Software Foundation
66238gives unlimited permission to copy, distribute and modify it."
66239
66240ac_pwd='$ac_pwd'
66241srcdir='$srcdir'
66242AWK='$AWK'
66243test -n "\$AWK" || AWK=awk
66244_ACEOF
66245
66246cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66247# The default lists apply if the user does not specify any file.
66248ac_need_defaults=:
66249while test $# != 0
66250do
66251  case $1 in
66252  --*=?*)
66253    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66254    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66255    ac_shift=:
66256    ;;
66257  --*=)
66258    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66259    ac_optarg=
66260    ac_shift=:
66261    ;;
66262  *)
66263    ac_option=$1
66264    ac_optarg=$2
66265    ac_shift=shift
66266    ;;
66267  esac
66268
66269  case $ac_option in
66270  # Handling of the options.
66271  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66272    ac_cs_recheck=: ;;
66273  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66274    $as_echo "$ac_cs_version"; exit ;;
66275  --config | --confi | --conf | --con | --co | --c )
66276    $as_echo "$ac_cs_config"; exit ;;
66277  --debug | --debu | --deb | --de | --d | -d )
66278    debug=: ;;
66279  --file | --fil | --fi | --f )
66280    $ac_shift
66281    case $ac_optarg in
66282    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66283    '') as_fn_error $? "missing file argument" ;;
66284    esac
66285    as_fn_append CONFIG_FILES " '$ac_optarg'"
66286    ac_need_defaults=false;;
66287  --he | --h |  --help | --hel | -h )
66288    $as_echo "$ac_cs_usage"; exit ;;
66289  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66290  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66291    ac_cs_silent=: ;;
66292
66293  # This is an error.
66294  -*) as_fn_error $? "unrecognized option: \`$1'
66295Try \`$0 --help' for more information." ;;
66296
66297  *) as_fn_append ac_config_targets " $1"
66298     ac_need_defaults=false ;;
66299
66300  esac
66301  shift
66302done
66303
66304ac_configure_extra_args=
66305
66306if $ac_cs_silent; then
66307  exec 6>/dev/null
66308  ac_configure_extra_args="$ac_configure_extra_args --silent"
66309fi
66310
66311_ACEOF
66312cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66313if \$ac_cs_recheck; then
66314  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66315  shift
66316  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66317  CONFIG_SHELL='$SHELL'
66318  export CONFIG_SHELL
66319  exec "\$@"
66320fi
66321
66322_ACEOF
66323cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66324exec 5>>config.log
66325{
66326  echo
66327  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66328## Running $as_me. ##
66329_ASBOX
66330  $as_echo "$ac_log"
66331} >&5
66332
66333_ACEOF
66334cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66335_ACEOF
66336
66337cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66338
66339# Handling of arguments.
66340for ac_config_target in $ac_config_targets
66341do
66342  case $ac_config_target in
66343    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66344    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66345    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66346    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66347    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66348
66349  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66350  esac
66351done
66352
66353
66354# If the user did not use the arguments to specify the items to instantiate,
66355# then the envvar interface is used.  Set only those that are not.
66356# We use the long form for the default assignment because of an extremely
66357# bizarre bug on SunOS 4.1.3.
66358if $ac_need_defaults; then
66359  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66360fi
66361
66362# Have a temporary directory for convenience.  Make it in the build tree
66363# simply because there is no reason against having it here, and in addition,
66364# creating and moving files from /tmp can sometimes cause problems.
66365# Hook for its removal unless debugging.
66366# Note that there is a small window in which the directory will not be cleaned:
66367# after its creation but before its name has been assigned to `$tmp'.
66368$debug ||
66369{
66370  tmp= ac_tmp=
66371  trap 'exit_status=$?
66372  : "${ac_tmp:=$tmp}"
66373  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66374' 0
66375  trap 'as_fn_exit 1' 1 2 13 15
66376}
66377# Create a (secure) tmp directory for tmp files.
66378
66379{
66380  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66381  test -d "$tmp"
66382}  ||
66383{
66384  tmp=./conf$$-$RANDOM
66385  (umask 077 && mkdir "$tmp")
66386} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66387ac_tmp=$tmp
66388
66389# Set up the scripts for CONFIG_FILES section.
66390# No need to generate them if there are no CONFIG_FILES.
66391# This happens for instance with `./config.status config.h'.
66392if test -n "$CONFIG_FILES"; then
66393
66394
66395ac_cr=`echo X | tr X '\015'`
66396# On cygwin, bash can eat \r inside `` if the user requested igncr.
66397# But we know of no other shell where ac_cr would be empty at this
66398# point, so we can use a bashism as a fallback.
66399if test "x$ac_cr" = x; then
66400  eval ac_cr=\$\'\\r\'
66401fi
66402ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66403if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66404  ac_cs_awk_cr='\\r'
66405else
66406  ac_cs_awk_cr=$ac_cr
66407fi
66408
66409echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66410_ACEOF
66411
66412
66413{
66414  echo "cat >conf$$subs.awk <<_ACEOF" &&
66415  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66416  echo "_ACEOF"
66417} >conf$$subs.sh ||
66418  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66419ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66420ac_delim='%!_!# '
66421for ac_last_try in false false false false false :; do
66422  . ./conf$$subs.sh ||
66423    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66424
66425  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66426  if test $ac_delim_n = $ac_delim_num; then
66427    break
66428  elif $ac_last_try; then
66429    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66430  else
66431    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66432  fi
66433done
66434rm -f conf$$subs.sh
66435
66436cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66437cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66438_ACEOF
66439sed -n '
66440h
66441s/^/S["/; s/!.*/"]=/
66442p
66443g
66444s/^[^!]*!//
66445:repl
66446t repl
66447s/'"$ac_delim"'$//
66448t delim
66449:nl
66450h
66451s/\(.\{148\}\)..*/\1/
66452t more1
66453s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66454p
66455n
66456b repl
66457:more1
66458s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66459p
66460g
66461s/.\{148\}//
66462t nl
66463:delim
66464h
66465s/\(.\{148\}\)..*/\1/
66466t more2
66467s/["\\]/\\&/g; s/^/"/; s/$/"/
66468p
66469b
66470:more2
66471s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66472p
66473g
66474s/.\{148\}//
66475t delim
66476' <conf$$subs.awk | sed '
66477/^[^""]/{
66478  N
66479  s/\n//
66480}
66481' >>$CONFIG_STATUS || ac_write_fail=1
66482rm -f conf$$subs.awk
66483cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66484_ACAWK
66485cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66486  for (key in S) S_is_set[key] = 1
66487  FS = ""
66488
66489}
66490{
66491  line = $ 0
66492  nfields = split(line, field, "@")
66493  substed = 0
66494  len = length(field[1])
66495  for (i = 2; i < nfields; i++) {
66496    key = field[i]
66497    keylen = length(key)
66498    if (S_is_set[key]) {
66499      value = S[key]
66500      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66501      len += length(value) + length(field[++i])
66502      substed = 1
66503    } else
66504      len += 1 + keylen
66505  }
66506
66507  print line
66508}
66509
66510_ACAWK
66511_ACEOF
66512cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66513if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66514  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66515else
66516  cat
66517fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66518  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66519_ACEOF
66520
66521# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66522# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66523# trailing colons and then remove the whole line if VPATH becomes empty
66524# (actually we leave an empty line to preserve line numbers).
66525if test "x$srcdir" = x.; then
66526  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66527h
66528s///
66529s/^/:/
66530s/[	 ]*$/:/
66531s/:\$(srcdir):/:/g
66532s/:\${srcdir}:/:/g
66533s/:@srcdir@:/:/g
66534s/^:*//
66535s/:*$//
66536x
66537s/\(=[	 ]*\).*/\1/
66538G
66539s/\n//
66540s/^[^=]*=[	 ]*$//
66541}'
66542fi
66543
66544cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66545fi # test -n "$CONFIG_FILES"
66546
66547
66548eval set X "  :F $CONFIG_FILES      "
66549shift
66550for ac_tag
66551do
66552  case $ac_tag in
66553  :[FHLC]) ac_mode=$ac_tag; continue;;
66554  esac
66555  case $ac_mode$ac_tag in
66556  :[FHL]*:*);;
66557  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66558  :[FH]-) ac_tag=-:-;;
66559  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66560  esac
66561  ac_save_IFS=$IFS
66562  IFS=:
66563  set x $ac_tag
66564  IFS=$ac_save_IFS
66565  shift
66566  ac_file=$1
66567  shift
66568
66569  case $ac_mode in
66570  :L) ac_source=$1;;
66571  :[FH])
66572    ac_file_inputs=
66573    for ac_f
66574    do
66575      case $ac_f in
66576      -) ac_f="$ac_tmp/stdin";;
66577      *) # Look for the file first in the build tree, then in the source tree
66578	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66579	 # because $ac_f cannot contain `:'.
66580	 test -f "$ac_f" ||
66581	   case $ac_f in
66582	   [\\/$]*) false;;
66583	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66584	   esac ||
66585	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66586      esac
66587      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66588      as_fn_append ac_file_inputs " '$ac_f'"
66589    done
66590
66591    # Let's still pretend it is `configure' which instantiates (i.e., don't
66592    # use $as_me), people would be surprised to read:
66593    #    /* config.h.  Generated by config.status.  */
66594    configure_input='Generated from '`
66595	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66596	`' by configure.'
66597    if test x"$ac_file" != x-; then
66598      configure_input="$ac_file.  $configure_input"
66599      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66600$as_echo "$as_me: creating $ac_file" >&6;}
66601    fi
66602    # Neutralize special characters interpreted by sed in replacement strings.
66603    case $configure_input in #(
66604    *\&* | *\|* | *\\* )
66605       ac_sed_conf_input=`$as_echo "$configure_input" |
66606       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66607    *) ac_sed_conf_input=$configure_input;;
66608    esac
66609
66610    case $ac_tag in
66611    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66612      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66613    esac
66614    ;;
66615  esac
66616
66617  ac_dir=`$as_dirname -- "$ac_file" ||
66618$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66619	 X"$ac_file" : 'X\(//\)[^/]' \| \
66620	 X"$ac_file" : 'X\(//\)$' \| \
66621	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66622$as_echo X"$ac_file" |
66623    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66624	    s//\1/
66625	    q
66626	  }
66627	  /^X\(\/\/\)[^/].*/{
66628	    s//\1/
66629	    q
66630	  }
66631	  /^X\(\/\/\)$/{
66632	    s//\1/
66633	    q
66634	  }
66635	  /^X\(\/\).*/{
66636	    s//\1/
66637	    q
66638	  }
66639	  s/.*/./; q'`
66640  as_dir="$ac_dir"; as_fn_mkdir_p
66641  ac_builddir=.
66642
66643case "$ac_dir" in
66644.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66645*)
66646  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66647  # A ".." for each directory in $ac_dir_suffix.
66648  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66649  case $ac_top_builddir_sub in
66650  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66651  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66652  esac ;;
66653esac
66654ac_abs_top_builddir=$ac_pwd
66655ac_abs_builddir=$ac_pwd$ac_dir_suffix
66656# for backward compatibility:
66657ac_top_builddir=$ac_top_build_prefix
66658
66659case $srcdir in
66660  .)  # We are building in place.
66661    ac_srcdir=.
66662    ac_top_srcdir=$ac_top_builddir_sub
66663    ac_abs_top_srcdir=$ac_pwd ;;
66664  [\\/]* | ?:[\\/]* )  # Absolute name.
66665    ac_srcdir=$srcdir$ac_dir_suffix;
66666    ac_top_srcdir=$srcdir
66667    ac_abs_top_srcdir=$srcdir ;;
66668  *) # Relative name.
66669    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66670    ac_top_srcdir=$ac_top_build_prefix$srcdir
66671    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66672esac
66673ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66674
66675
66676  case $ac_mode in
66677  :F)
66678  #
66679  # CONFIG_FILE
66680  #
66681
66682_ACEOF
66683
66684cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66685# If the template does not know about datarootdir, expand it.
66686# FIXME: This hack should be removed a few years after 2.60.
66687ac_datarootdir_hack=; ac_datarootdir_seen=
66688ac_sed_dataroot='
66689/datarootdir/ {
66690  p
66691  q
66692}
66693/@datadir@/p
66694/@docdir@/p
66695/@infodir@/p
66696/@localedir@/p
66697/@mandir@/p'
66698case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66699*datarootdir*) ac_datarootdir_seen=yes;;
66700*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66701  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66702$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66703_ACEOF
66704cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66705  ac_datarootdir_hack='
66706  s&@datadir@&$datadir&g
66707  s&@docdir@&$docdir&g
66708  s&@infodir@&$infodir&g
66709  s&@localedir@&$localedir&g
66710  s&@mandir@&$mandir&g
66711  s&\\\${datarootdir}&$datarootdir&g' ;;
66712esac
66713_ACEOF
66714
66715# Neutralize VPATH when `$srcdir' = `.'.
66716# Shell code in configure.ac might set extrasub.
66717# FIXME: do we really want to maintain this feature?
66718cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66719ac_sed_extra="$ac_vpsub
66720$extrasub
66721_ACEOF
66722cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66723:t
66724/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66725s|@configure_input@|$ac_sed_conf_input|;t t
66726s&@top_builddir@&$ac_top_builddir_sub&;t t
66727s&@top_build_prefix@&$ac_top_build_prefix&;t t
66728s&@srcdir@&$ac_srcdir&;t t
66729s&@abs_srcdir@&$ac_abs_srcdir&;t t
66730s&@top_srcdir@&$ac_top_srcdir&;t t
66731s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66732s&@builddir@&$ac_builddir&;t t
66733s&@abs_builddir@&$ac_abs_builddir&;t t
66734s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66735$ac_datarootdir_hack
66736"
66737eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66738  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66739
66740test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66741  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66742  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66743      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66744  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66745which seems to be undefined.  Please make sure it is defined" >&5
66746$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66747which seems to be undefined.  Please make sure it is defined" >&2;}
66748
66749  rm -f "$ac_tmp/stdin"
66750  case $ac_file in
66751  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66752  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66753  esac \
66754  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66755 ;;
66756
66757
66758
66759  esac
66760
66761done # for ac_tag
66762
66763
66764as_fn_exit 0
66765_ACEOF
66766ac_clean_files=$ac_clean_files_save
66767
66768test $ac_write_fail = 0 ||
66769  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66770
66771
66772# configure is writing to config.log, and then calls config.status.
66773# config.status does its own redirection, appending to config.log.
66774# Unfortunately, on DOS this fails, as config.log is still kept open
66775# by configure, so config.status won't be able to write to it; its
66776# output is simply discarded.  So we exec the FD to /dev/null,
66777# effectively closing config.log, so it can be properly (re)opened and
66778# appended to by config.status.  When coming back to configure, we
66779# need to make the FD available again.
66780if test "$no_create" != yes; then
66781  ac_cs_success=:
66782  ac_config_status_args=
66783  test "$silent" = yes &&
66784    ac_config_status_args="$ac_config_status_args --quiet"
66785  exec 5>/dev/null
66786  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66787  exec 5>>config.log
66788  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66789  # would make configure fail if this is the last instruction.
66790  $ac_cs_success || as_fn_exit 1
66791fi
66792if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66793  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66794$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66795fi
66796
66797
66798# After AC_OUTPUT, we need to do final work
66799
66800
66801  # Try to move config.log (generated by autoconf) to the configure-support directory.
66802  if test -e ./config.log; then
66803    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66804  fi
66805
66806  # Rotate our log file (configure.log)
66807  if test -e "$OUTPUT_ROOT/configure.log.old"; then
66808    $RM -f "$OUTPUT_ROOT/configure.log.old"
66809  fi
66810  if test -e "$OUTPUT_ROOT/configure.log"; then
66811    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66812  fi
66813
66814  # Move configure.log from current directory to the build output root
66815  if test -e ./configure.log; then
66816    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66817  fi
66818
66819  # Make the compare script executable
66820  $CHMOD +x $OUTPUT_ROOT/compare.sh
66821
66822
66823# Finally output some useful information to the user
66824
66825  # Finally output some useful information to the user
66826
66827  printf "\n"
66828  printf "====================================================\n"
66829  if test "x$no_create" != "xyes"; then
66830    if test "x$IS_RECONFIGURE" != "xyes"; then
66831      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66832    else
66833      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66834    fi
66835  else
66836    if test "x$IS_RECONFIGURE" != "xyes"; then
66837      printf "A configuration has been successfully checked but not created\n"
66838    else
66839      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66840    fi
66841  fi
66842  if test "x$CONFIGURE_COMMAND_LINE" != x; then
66843    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66844  else
66845    printf "using default settings.\n"
66846  fi
66847
66848  printf "\n"
66849  printf "Configuration summary:\n"
66850  printf "* Debug level:    $DEBUG_LEVEL\n"
66851  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66852  printf "* JDK variant:    $JDK_VARIANT\n"
66853  printf "* JVM variants:   $JVM_VARIANTS\n"
66854  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66855  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66856
66857  printf "\n"
66858  printf "Tools summary:\n"
66859  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66860    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66861  fi
66862  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66863  if test "x$TOOLCHAIN_VERSION" != "x"; then
66864    print_version=" $TOOLCHAIN_VERSION"
66865  fi
66866  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66867  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66868  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66869
66870  printf "\n"
66871  printf "Build performance summary:\n"
66872  printf "* Cores to use:   $JOBS\n"
66873  printf "* Memory limit:   $MEMORY_SIZE MB\n"
66874  if test "x$CCACHE_STATUS" != "x"; then
66875    printf "* ccache status:  $CCACHE_STATUS\n"
66876  fi
66877  printf "\n"
66878
66879  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66880    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66881    printf "will result in longer build times.\n"
66882    printf "\n"
66883  fi
66884
66885  if test "x$FOUND_ALT_VARIABLES" != "x"; then
66886    printf "WARNING: You have old-style ALT_ environment variables set.\n"
66887    printf "These are not respected, and will be ignored. It is recommended\n"
66888    printf "that you clean your environment. The following variables are set:\n"
66889    printf "$FOUND_ALT_VARIABLES\n"
66890    printf "\n"
66891  fi
66892
66893  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66894    printf "WARNING: Your build output directory is not on a local disk.\n"
66895    printf "This will severely degrade build performance!\n"
66896    printf "It is recommended that you create an output directory on a local disk,\n"
66897    printf "and run the configure script again from that directory.\n"
66898    printf "\n"
66899  fi
66900
66901  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66902    printf "WARNING: The result of this configuration has overridden an older\n"
66903    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66904    printf "proper build. Failure to do so might result in strange build problems.\n"
66905    printf "\n"
66906  fi
66907
66908  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66909    printf "WARNING: The result of this configuration was not saved.\n"
66910    printf "You should run without '--no-create | -n' to create the configuration.\n"
66911    printf "\n"
66912  fi
66913
66914
66915
66916  # Locate config.log.
66917  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66918    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66919  elif test -e "./config.log"; then
66920    CONFIG_LOG_PATH="."
66921  fi
66922
66923  if test -e "$CONFIG_LOG_PATH/config.log"; then
66924    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66925    if test $? -eq 0; then
66926      printf "The following warnings were produced. Repeated here for convenience:\n"
66927      # We must quote sed expression (using []) to stop m4 from eating the [].
66928      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66929      printf "\n"
66930    fi
66931  fi
66932
66933