generated-configure.sh revision 2711:d71bedc6660e
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647BOOTCYCLE_JVM_ARGS_BIG
648JAVA_FLAGS_BIG
649JAVA_FLAGS
650TEST_JOBS
651JOBS
652MEMORY_SIZE
653NUM_CORES
654ENABLE_GENERATE_CLASSLIST
655BUILD_FAILURE_HANDLER
656ENABLE_INTREE_EC
657VALID_JVM_FEATURES
658JVM_FEATURES_custom
659JVM_FEATURES_zeroshark
660JVM_FEATURES_zero
661JVM_FEATURES_minimal
662JVM_FEATURES_core
663JVM_FEATURES_client
664JVM_FEATURES_server
665INCLUDE_GRAAL
666STLPORT_LIB
667LIBZIP_CAN_USE_MMAP
668LIBDL
669LIBM
670USE_EXTERNAL_LCMS
671LCMS_LIBS
672LCMS_CFLAGS
673USE_EXTERNAL_LIBZ
674USE_EXTERNAL_LIBPNG
675PNG_LIBS
676PNG_CFLAGS
677USE_EXTERNAL_LIBGIF
678USE_EXTERNAL_LIBJPEG
679LLVM_LIBS
680LLVM_LDFLAGS
681LLVM_CFLAGS
682LLVM_CONFIG
683LIBFFI_LIB_FILE
684ENABLE_LIBFFI_BUNDLING
685LIBFFI_LIBS
686LIBFFI_CFLAGS
687ALSA_LIBS
688ALSA_CFLAGS
689FREETYPE_BUNDLE_LIB_PATH
690FREETYPE_LIBS
691FREETYPE_CFLAGS
692CUPS_CFLAGS
693X_EXTRA_LIBS
694X_LIBS
695X_PRE_LIBS
696X_CFLAGS
697XMKMF
698MSVCP_DLL
699MSVCR_DLL
700LIBCXX
701FIXPATH_DETACH_FLAG
702FIXPATH
703BUILD_GTEST
704ENABLE_AOT
705INCLUDE_DTRACE
706GCOV_ENABLED
707ZIP_EXTERNAL_DEBUG_SYMBOLS
708COPY_DEBUG_SYMBOLS
709COMPILE_WITH_DEBUG_SYMBOLS
710CFLAGS_WARNINGS_ARE_ERRORS
711BUILD_CC_DISABLE_WARNING_PREFIX
712DISABLE_WARNING_PREFIX
713HOTSPOT_SET_WARNINGS_AS_ERRORS
714WARNINGS_AS_ERRORS
715COMPILER_SUPPORTS_TARGET_BITS_FLAG
716ZERO_ARCHFLAG
717LDFLAGS_TESTEXE
718LDFLAGS_TESTLIB
719CXXFLAGS_TESTEXE
720CXXFLAGS_TESTLIB
721CFLAGS_TESTEXE
722CFLAGS_TESTLIB
723OPENJDK_BUILD_JVM_LIBS
724OPENJDK_BUILD_JVM_ASFLAGS
725OPENJDK_BUILD_JVM_LDFLAGS
726OPENJDK_BUILD_JVM_CFLAGS
727OPENJDK_BUILD_LDFLAGS_HASH_STYLE
728OPENJDK_BUILD_LDFLAGS_CXX_JDK
729OPENJDK_BUILD_JDKEXE_LIBS
730OPENJDK_BUILD_JDKLIB_LIBS
731OPENJDK_BUILD_LDFLAGS_JDKEXE
732OPENJDK_BUILD_LDFLAGS_JDKLIB
733OPENJDK_BUILD_CXXFLAGS_JDKEXE
734OPENJDK_BUILD_CXXFLAGS_JDKLIB
735OPENJDK_BUILD_CFLAGS_JDKEXE
736OPENJDK_BUILD_CFLAGS_JDKLIB
737OPENJDK_BUILD_CXXSTD_CXXFLAG
738JVM_LIBS
739JVM_ASFLAGS
740JVM_LDFLAGS
741JVM_CFLAGS
742LDFLAGS_HASH_STYLE
743LDFLAGS_CXX_JDK
744JDKEXE_LIBS
745JDKLIB_LIBS
746LDFLAGS_JDKEXE
747LDFLAGS_JDKLIB
748CXXFLAGS_JDKEXE
749CXXFLAGS_JDKLIB
750CFLAGS_JDKEXE
751CFLAGS_JDKLIB
752MACOSX_VERSION_MIN
753CXXSTD_CXXFLAG
754JDK_ARCH_ABI_PROP_NAME
755CXX_O_FLAG_SIZE
756CXX_O_FLAG_NONE
757CXX_O_FLAG_DEBUG
758CXX_O_FLAG_NORM
759CXX_O_FLAG_HI
760CXX_O_FLAG_HIGHEST
761CXX_O_FLAG_HIGHEST_JVM
762C_O_FLAG_SIZE
763C_O_FLAG_NONE
764C_O_FLAG_DEBUG
765C_O_FLAG_NORM
766C_O_FLAG_HI
767C_O_FLAG_HIGHEST
768C_O_FLAG_HIGHEST_JVM
769JVM_CFLAGS_SYMBOLS
770CXXFLAGS_DEBUG_SYMBOLS
771CFLAGS_DEBUG_SYMBOLS
772CXX_FLAG_DEPS
773C_FLAG_DEPS
774SHARED_LIBRARY_FLAGS
775SET_SHARED_LIBRARY_MAPFILE
776SET_SHARED_LIBRARY_NAME
777SET_SHARED_LIBRARY_ORIGIN
778SET_EXECUTABLE_ORIGIN
779CXX_FLAG_REORDER
780C_FLAG_REORDER
781JVM_RCFLAGS
782RC_FLAGS
783AR_OUT_OPTION
784LD_OUT_OPTION
785EXE_OUT_OPTION
786CC_OUT_OPTION
787STRIPFLAGS
788ARFLAGS
789COMPILER_BINDCMD_FILE_FLAG
790COMPILER_COMMAND_FILE_FLAG
791COMPILER_TARGET_BITS_FLAG
792JT_HOME
793JTREGEXE
794HOTSPOT_TOOLCHAIN_TYPE
795USING_BROKEN_SUSE_LD
796PACKAGE_PATH
797BUILD_AS
798BUILD_LDCXX
799BUILD_LD
800BUILD_STRIP
801BUILD_OBJCOPY
802BUILD_AR
803BUILD_NM
804BUILD_CXX
805BUILD_CC
806BUILD_SYSROOT_LDFLAGS
807BUILD_SYSROOT_CFLAGS
808ac_ct_OBJDUMP
809OBJDUMP
810ac_ct_OBJCOPY
811OBJCOPY
812ac_ct_NM
813ac_ct_STRIP
814GNM
815NM
816STRIP
817MSBUILD
818DUMPBIN
819RC
820MT
821LIPO
822ac_ct_AR
823AR
824AS
825LDCXX
826LD
827CXXCPP
828CPP
829CXX_VERSION_NUMBER
830CC_VERSION_NUMBER
831ac_ct_CXX
832CXXFLAGS
833CXX
834TOOLCHAIN_PATH_CXX
835POTENTIAL_CXX
836OBJEXT
837EXEEXT
838ac_ct_CC
839CPPFLAGS
840LDFLAGS
841CFLAGS
842CC
843TOOLCHAIN_PATH_CC
844POTENTIAL_CC
845TOOLCHAIN_VERSION
846VS_LIB
847VS_INCLUDE
848VS_PATH
849CYGWIN_LINK
850SYSROOT_LDFLAGS
851SYSROOT_CFLAGS
852EXTRA_LDFLAGS
853EXTRA_CXXFLAGS
854EXTRA_CFLAGS
855EXE_SUFFIX
856OBJ_SUFFIX
857STATIC_LIBRARY
858SHARED_LIBRARY
859STATIC_LIBRARY_SUFFIX
860SHARED_LIBRARY_SUFFIX
861LIBRARY_PREFIX
862TOOLCHAIN_TYPE
863STATIC_BUILD
864IMPORT_MODULES_MAKE
865IMPORT_MODULES_SRC
866IMPORT_MODULES_MAN
867IMPORT_MODULES_LEGAL
868IMPORT_MODULES_CONF
869IMPORT_MODULES_LIBS
870IMPORT_MODULES_CMDS
871IMPORT_MODULES_CLASSES
872BUILD_OUTPUT
873JDK_TOPDIR
874NASHORN_TOPDIR
875HOTSPOT_TOPDIR
876JAXWS_TOPDIR
877JAXP_TOPDIR
878CORBA_TOPDIR
879LANGTOOLS_TOPDIR
880EXTERNAL_BUILDJDK
881BUILD_JDK
882CREATE_BUILDJDK
883JLINK
884JMOD
885BOOT_JDK_BITS
886JAVAC_FLAGS
887BOOT_JDK_MODULAR
888BOOT_JDK_SOURCETARGET
889JARSIGNER
890JAR
891JAVAH
892JAVAC
893JAVA
894BOOT_JDK
895JAVA_CHECK
896JAVAC_CHECK
897VERSION_IS_GA
898VERSION_SHORT
899VERSION_STRING
900VERSION_NUMBER_FOUR_POSITIONS
901VERSION_NUMBER
902VERSION_OPT
903VERSION_BUILD
904VERSION_PRE
905VERSION_PATCH
906VERSION_SECURITY
907VERSION_MINOR
908VERSION_MAJOR
909MACOSX_BUNDLE_ID_BASE
910MACOSX_BUNDLE_NAME_BASE
911HOTSPOT_VM_DISTRO
912COMPANY_NAME
913JDK_RC_PLATFORM_NAME
914PRODUCT_SUFFIX
915PRODUCT_NAME
916LAUNCHER_NAME
917JLINK_KEEP_PACKAGED_MODULES
918COPYRIGHT_YEAR
919COMPRESS_JARS
920INCLUDE_SA
921UNLIMITED_CRYPTO
922CACERTS_FILE
923ENABLE_HEADLESS_ONLY
924DEFAULT_MAKE_TARGET
925OS_VERSION_MICRO
926OS_VERSION_MINOR
927OS_VERSION_MAJOR
928PKG_CONFIG
929BASH_ARGS
930SETFILE
931CODESIGN
932XATTR
933DSYMUTIL
934IS_GNU_TIME
935PATCH
936DTRACE
937TIME
938STAT
939HG
940READELF
941OTOOL
942LDD
943ZIPEXE
944UNZIP
945TAR_SUPPORTS_TRANSFORM
946TAR_INCLUDE_PARAM
947TAR_CREATE_EXTRA_PARAM
948TAR_TYPE
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
964JVM_VARIANT_MAIN
965VALID_JVM_VARIANTS
966JVM_VARIANTS
967DEBUG_LEVEL
968HOTSPOT_DEBUG_LEVEL
969JDK_VARIANT
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_BUNDLE_PLATFORM
982OPENJDK_BUILD_CPU_BUNDLE
983OPENJDK_BUILD_OS_BUNDLE
984OPENJDK_BUILD_OS_EXPORT_DIR
985OPENJDK_BUILD_CPU_OSARCH
986OPENJDK_BUILD_CPU_ISADIR
987OPENJDK_BUILD_CPU_LEGACY_LIB
988OPENJDK_BUILD_CPU_LEGACY
989HOTSPOT_TARGET_CPU_DEFINE
990HOTSPOT_TARGET_CPU_ARCH
991HOTSPOT_TARGET_CPU
992HOTSPOT_TARGET_OS_TYPE
993HOTSPOT_TARGET_OS
994DEFINE_CROSS_COMPILE_ARCH
995LP64
996OPENJDK_TARGET_BUNDLE_PLATFORM
997OPENJDK_TARGET_CPU_BUNDLE
998OPENJDK_TARGET_OS_BUNDLE
999OPENJDK_TARGET_OS_EXPORT_DIR
1000OPENJDK_TARGET_CPU_OSARCH
1001OPENJDK_TARGET_CPU_ISADIR
1002OPENJDK_TARGET_CPU_LEGACY_LIB
1003OPENJDK_TARGET_CPU_LEGACY
1004REQUIRED_OS_VERSION
1005REQUIRED_OS_NAME
1006COMPILE_TYPE
1007OPENJDK_TARGET_CPU_ENDIAN
1008OPENJDK_TARGET_CPU_BITS
1009OPENJDK_TARGET_CPU_ARCH
1010OPENJDK_TARGET_CPU
1011OPENJDK_TARGET_OS_ENV
1012OPENJDK_TARGET_OS_TYPE
1013OPENJDK_TARGET_OS
1014OPENJDK_BUILD_CPU_ENDIAN
1015OPENJDK_BUILD_CPU_BITS
1016OPENJDK_BUILD_CPU_ARCH
1017OPENJDK_BUILD_CPU
1018OPENJDK_BUILD_OS_ENV
1019OPENJDK_BUILD_OS_TYPE
1020OPENJDK_BUILD_OS
1021OPENJDK_BUILD_AUTOCONF_NAME
1022OPENJDK_TARGET_AUTOCONF_NAME
1023target_os
1024target_vendor
1025target_cpu
1026target
1027host_os
1028host_vendor
1029host_cpu
1030host
1031build_os
1032build_vendor
1033build_cpu
1034build
1035NICE
1036CPIO
1037DF
1038READLINK
1039CYGPATH
1040SED
1041FGREP
1042EGREP
1043GREP
1044AWK
1045XARGS
1046WHICH
1047WC
1048UNIQ
1049UNAME
1050TR
1051TOUCH
1052TEE
1053TAR
1054TAIL
1055SORT
1056SH
1057RMDIR
1058RM
1059PRINTF
1060NAWK
1061MV
1062MKTEMP
1063MKDIR
1064LS
1065LN
1066GZIP
1067GUNZIP
1068HEAD
1069FIND
1070FILE
1071EXPR
1072ECHO
1073DIRNAME
1074DIFF
1075DATE
1076CUT
1077CP
1078COMM
1079CMP
1080CHMOD
1081CAT
1082BASH
1083BASENAME
1084DATE_WHEN_CONFIGURED
1085ORIGINAL_PATH
1086CONFIGURE_COMMAND_LINE
1087target_alias
1088host_alias
1089build_alias
1090LIBS
1091ECHO_T
1092ECHO_N
1093ECHO_C
1094DEFS
1095mandir
1096localedir
1097libdir
1098psdir
1099pdfdir
1100dvidir
1101htmldir
1102infodir
1103docdir
1104oldincludedir
1105includedir
1106localstatedir
1107sharedstatedir
1108sysconfdir
1109datadir
1110datarootdir
1111libexecdir
1112sbindir
1113bindir
1114program_transform_name
1115prefix
1116exec_prefix
1117PACKAGE_URL
1118PACKAGE_BUGREPORT
1119PACKAGE_STRING
1120PACKAGE_VERSION
1121PACKAGE_TARNAME
1122PACKAGE_NAME
1123PATH_SEPARATOR
1124SHELL'
1125ac_subst_files=''
1126ac_user_opts='
1127enable_option_checking
1128with_target_bits
1129enable_openjdk_only
1130with_custom_make_dir
1131with_jdk_variant
1132enable_debug
1133with_debug_level
1134with_jvm_variants
1135with_cpu_port
1136with_devkit
1137with_sys_root
1138with_sysroot
1139with_tools_dir
1140with_toolchain_path
1141with_extra_path
1142with_sdk_name
1143with_conf_name
1144with_output_sync
1145with_default_make_target
1146enable_headless_only
1147with_cacerts_file
1148enable_unlimited_crypto
1149with_copyright_year
1150enable_keep_packaged_modules
1151with_milestone
1152with_update_version
1153with_user_release_suffix
1154with_build_number
1155with_version_string
1156with_version_pre
1157with_version_opt
1158with_version_build
1159with_version_major
1160with_version_minor
1161with_version_security
1162with_version_patch
1163with_boot_jdk
1164with_build_jdk
1165with_add_source_root
1166with_override_source_root
1167with_adds_and_overrides
1168with_override_langtools
1169with_override_corba
1170with_override_jaxp
1171with_override_jaxws
1172with_override_hotspot
1173with_override_nashorn
1174with_override_jdk
1175with_import_hotspot
1176with_import_modules
1177enable_static_build
1178with_toolchain_type
1179with_extra_cflags
1180with_extra_cxxflags
1181with_extra_ldflags
1182with_toolchain_version
1183with_build_devkit
1184with_jtreg
1185with_abi_profile
1186enable_warnings_as_errors
1187with_native_debug_symbols
1188enable_debug_symbols
1189enable_zip_debug_info
1190enable_native_coverage
1191enable_dtrace
1192enable_aot
1193enable_hotspot_gtest
1194with_stdc__lib
1195with_msvcr_dll
1196with_msvcp_dll
1197with_x
1198with_cups
1199with_cups_include
1200with_freetype
1201with_freetype_include
1202with_freetype_lib
1203with_freetype_src
1204enable_freetype_bundling
1205with_alsa
1206with_alsa_include
1207with_alsa_lib
1208with_libffi
1209with_libffi_include
1210with_libffi_lib
1211enable_libffi_bundling
1212with_libjpeg
1213with_giflib
1214with_libpng
1215with_zlib
1216with_lcms
1217with_dxsdk
1218with_dxsdk_lib
1219with_dxsdk_include
1220with_jvm_features
1221with_jvm_interpreter
1222enable_jtreg_failure_handler
1223enable_generate_classlist
1224with_num_cores
1225with_memory_size
1226with_jobs
1227with_test_jobs
1228with_boot_jdk_jvmargs
1229with_sjavac_server_java
1230enable_sjavac
1231enable_javac_server
1232enable_icecc
1233enable_precompiled_headers
1234enable_ccache
1235with_ccache_dir
1236'
1237      ac_precious_vars='build_alias
1238host_alias
1239target_alias
1240BASENAME
1241BASH
1242CAT
1243CHMOD
1244CMP
1245COMM
1246CP
1247CUT
1248DATE
1249DIFF
1250DIRNAME
1251ECHO
1252EXPR
1253FILE
1254FIND
1255HEAD
1256GUNZIP
1257GZIP
1258LN
1259LS
1260MKDIR
1261MKTEMP
1262MV
1263NAWK
1264PRINTF
1265RM
1266RMDIR
1267SH
1268SORT
1269TAIL
1270TAR
1271TEE
1272TOUCH
1273TR
1274UNAME
1275UNIQ
1276WC
1277WHICH
1278XARGS
1279AWK
1280GREP
1281EGREP
1282FGREP
1283SED
1284CYGPATH
1285READLINK
1286DF
1287CPIO
1288NICE
1289MAKE
1290UNZIP
1291ZIPEXE
1292LDD
1293OTOOL
1294READELF
1295HG
1296STAT
1297TIME
1298DTRACE
1299PATCH
1300DSYMUTIL
1301XATTR
1302CODESIGN
1303SETFILE
1304PKG_CONFIG
1305JAVA
1306JAVAC
1307JAVAH
1308JAR
1309JARSIGNER
1310CC
1311CFLAGS
1312LDFLAGS
1313LIBS
1314CPPFLAGS
1315CXX
1316CXXFLAGS
1317CCC
1318CPP
1319CXXCPP
1320AS
1321AR
1322LIPO
1323STRIP
1324NM
1325GNM
1326OBJCOPY
1327OBJDUMP
1328BUILD_CC
1329BUILD_CXX
1330BUILD_NM
1331BUILD_AR
1332BUILD_OBJCOPY
1333BUILD_STRIP
1334JTREGEXE
1335XMKMF
1336FREETYPE_CFLAGS
1337FREETYPE_LIBS
1338ALSA_CFLAGS
1339ALSA_LIBS
1340LIBFFI_CFLAGS
1341LIBFFI_LIBS
1342PNG_CFLAGS
1343PNG_LIBS
1344LCMS_CFLAGS
1345LCMS_LIBS
1346ICECC_CMD
1347ICECC_CREATE_ENV
1348ICECC_WRAPPER
1349CCACHE'
1350
1351
1352# Initialize some variables set by options.
1353ac_init_help=
1354ac_init_version=false
1355ac_unrecognized_opts=
1356ac_unrecognized_sep=
1357# The variables have the same names as the options, with
1358# dashes changed to underlines.
1359cache_file=/dev/null
1360exec_prefix=NONE
1361no_create=
1362no_recursion=
1363prefix=NONE
1364program_prefix=NONE
1365program_suffix=NONE
1366program_transform_name=s,x,x,
1367silent=
1368site=
1369srcdir=
1370verbose=
1371x_includes=NONE
1372x_libraries=NONE
1373
1374# Installation directory options.
1375# These are left unexpanded so users can "make install exec_prefix=/foo"
1376# and all the variables that are supposed to be based on exec_prefix
1377# by default will actually change.
1378# Use braces instead of parens because sh, perl, etc. also accept them.
1379# (The list follows the same order as the GNU Coding Standards.)
1380bindir='${exec_prefix}/bin'
1381sbindir='${exec_prefix}/sbin'
1382libexecdir='${exec_prefix}/libexec'
1383datarootdir='${prefix}/share'
1384datadir='${datarootdir}'
1385sysconfdir='${prefix}/etc'
1386sharedstatedir='${prefix}/com'
1387localstatedir='${prefix}/var'
1388includedir='${prefix}/include'
1389oldincludedir='/usr/include'
1390docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1391infodir='${datarootdir}/info'
1392htmldir='${docdir}'
1393dvidir='${docdir}'
1394pdfdir='${docdir}'
1395psdir='${docdir}'
1396libdir='${exec_prefix}/lib'
1397localedir='${datarootdir}/locale'
1398mandir='${datarootdir}/man'
1399
1400ac_prev=
1401ac_dashdash=
1402for ac_option
1403do
1404  # If the previous option needs an argument, assign it.
1405  if test -n "$ac_prev"; then
1406    eval $ac_prev=\$ac_option
1407    ac_prev=
1408    continue
1409  fi
1410
1411  case $ac_option in
1412  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1413  *=)   ac_optarg= ;;
1414  *)    ac_optarg=yes ;;
1415  esac
1416
1417  # Accept the important Cygnus configure options, so we can diagnose typos.
1418
1419  case $ac_dashdash$ac_option in
1420  --)
1421    ac_dashdash=yes ;;
1422
1423  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1424    ac_prev=bindir ;;
1425  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1426    bindir=$ac_optarg ;;
1427
1428  -build | --build | --buil | --bui | --bu)
1429    ac_prev=build_alias ;;
1430  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1431    build_alias=$ac_optarg ;;
1432
1433  -cache-file | --cache-file | --cache-fil | --cache-fi \
1434  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1435    ac_prev=cache_file ;;
1436  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1437  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1438    cache_file=$ac_optarg ;;
1439
1440  --config-cache | -C)
1441    cache_file=config.cache ;;
1442
1443  -datadir | --datadir | --datadi | --datad)
1444    ac_prev=datadir ;;
1445  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1446    datadir=$ac_optarg ;;
1447
1448  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1449  | --dataroo | --dataro | --datar)
1450    ac_prev=datarootdir ;;
1451  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1452  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1453    datarootdir=$ac_optarg ;;
1454
1455  -disable-* | --disable-*)
1456    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1457    # Reject names that are not valid shell variable names.
1458    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1459      as_fn_error $? "invalid feature name: $ac_useropt"
1460    ac_useropt_orig=$ac_useropt
1461    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1462    case $ac_user_opts in
1463      *"
1464"enable_$ac_useropt"
1465"*) ;;
1466      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1467	 ac_unrecognized_sep=', ';;
1468    esac
1469    eval enable_$ac_useropt=no ;;
1470
1471  -docdir | --docdir | --docdi | --doc | --do)
1472    ac_prev=docdir ;;
1473  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1474    docdir=$ac_optarg ;;
1475
1476  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1477    ac_prev=dvidir ;;
1478  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1479    dvidir=$ac_optarg ;;
1480
1481  -enable-* | --enable-*)
1482    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1483    # Reject names that are not valid shell variable names.
1484    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1485      as_fn_error $? "invalid feature name: $ac_useropt"
1486    ac_useropt_orig=$ac_useropt
1487    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1488    case $ac_user_opts in
1489      *"
1490"enable_$ac_useropt"
1491"*) ;;
1492      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1493	 ac_unrecognized_sep=', ';;
1494    esac
1495    eval enable_$ac_useropt=\$ac_optarg ;;
1496
1497  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1498  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1499  | --exec | --exe | --ex)
1500    ac_prev=exec_prefix ;;
1501  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1502  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1503  | --exec=* | --exe=* | --ex=*)
1504    exec_prefix=$ac_optarg ;;
1505
1506  -gas | --gas | --ga | --g)
1507    # Obsolete; use --with-gas.
1508    with_gas=yes ;;
1509
1510  -help | --help | --hel | --he | -h)
1511    ac_init_help=long ;;
1512  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1513    ac_init_help=recursive ;;
1514  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1515    ac_init_help=short ;;
1516
1517  -host | --host | --hos | --ho)
1518    ac_prev=host_alias ;;
1519  -host=* | --host=* | --hos=* | --ho=*)
1520    host_alias=$ac_optarg ;;
1521
1522  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1523    ac_prev=htmldir ;;
1524  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1525  | --ht=*)
1526    htmldir=$ac_optarg ;;
1527
1528  -includedir | --includedir | --includedi | --included | --include \
1529  | --includ | --inclu | --incl | --inc)
1530    ac_prev=includedir ;;
1531  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1532  | --includ=* | --inclu=* | --incl=* | --inc=*)
1533    includedir=$ac_optarg ;;
1534
1535  -infodir | --infodir | --infodi | --infod | --info | --inf)
1536    ac_prev=infodir ;;
1537  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1538    infodir=$ac_optarg ;;
1539
1540  -libdir | --libdir | --libdi | --libd)
1541    ac_prev=libdir ;;
1542  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1543    libdir=$ac_optarg ;;
1544
1545  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1546  | --libexe | --libex | --libe)
1547    ac_prev=libexecdir ;;
1548  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1549  | --libexe=* | --libex=* | --libe=*)
1550    libexecdir=$ac_optarg ;;
1551
1552  -localedir | --localedir | --localedi | --localed | --locale)
1553    ac_prev=localedir ;;
1554  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1555    localedir=$ac_optarg ;;
1556
1557  -localstatedir | --localstatedir | --localstatedi | --localstated \
1558  | --localstate | --localstat | --localsta | --localst | --locals)
1559    ac_prev=localstatedir ;;
1560  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1561  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1562    localstatedir=$ac_optarg ;;
1563
1564  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1565    ac_prev=mandir ;;
1566  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1567    mandir=$ac_optarg ;;
1568
1569  -nfp | --nfp | --nf)
1570    # Obsolete; use --without-fp.
1571    with_fp=no ;;
1572
1573  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1574  | --no-cr | --no-c | -n)
1575    no_create=yes ;;
1576
1577  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1578  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1579    no_recursion=yes ;;
1580
1581  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1582  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1583  | --oldin | --oldi | --old | --ol | --o)
1584    ac_prev=oldincludedir ;;
1585  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1586  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1587  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1588    oldincludedir=$ac_optarg ;;
1589
1590  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1591    ac_prev=prefix ;;
1592  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1593    prefix=$ac_optarg ;;
1594
1595  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1596  | --program-pre | --program-pr | --program-p)
1597    ac_prev=program_prefix ;;
1598  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1599  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1600    program_prefix=$ac_optarg ;;
1601
1602  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1603  | --program-suf | --program-su | --program-s)
1604    ac_prev=program_suffix ;;
1605  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1606  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1607    program_suffix=$ac_optarg ;;
1608
1609  -program-transform-name | --program-transform-name \
1610  | --program-transform-nam | --program-transform-na \
1611  | --program-transform-n | --program-transform- \
1612  | --program-transform | --program-transfor \
1613  | --program-transfo | --program-transf \
1614  | --program-trans | --program-tran \
1615  | --progr-tra | --program-tr | --program-t)
1616    ac_prev=program_transform_name ;;
1617  -program-transform-name=* | --program-transform-name=* \
1618  | --program-transform-nam=* | --program-transform-na=* \
1619  | --program-transform-n=* | --program-transform-=* \
1620  | --program-transform=* | --program-transfor=* \
1621  | --program-transfo=* | --program-transf=* \
1622  | --program-trans=* | --program-tran=* \
1623  | --progr-tra=* | --program-tr=* | --program-t=*)
1624    program_transform_name=$ac_optarg ;;
1625
1626  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1627    ac_prev=pdfdir ;;
1628  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1629    pdfdir=$ac_optarg ;;
1630
1631  -psdir | --psdir | --psdi | --psd | --ps)
1632    ac_prev=psdir ;;
1633  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1634    psdir=$ac_optarg ;;
1635
1636  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1637  | -silent | --silent | --silen | --sile | --sil)
1638    silent=yes ;;
1639
1640  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1641    ac_prev=sbindir ;;
1642  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1643  | --sbi=* | --sb=*)
1644    sbindir=$ac_optarg ;;
1645
1646  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1647  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1648  | --sharedst | --shareds | --shared | --share | --shar \
1649  | --sha | --sh)
1650    ac_prev=sharedstatedir ;;
1651  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1652  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1653  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1654  | --sha=* | --sh=*)
1655    sharedstatedir=$ac_optarg ;;
1656
1657  -site | --site | --sit)
1658    ac_prev=site ;;
1659  -site=* | --site=* | --sit=*)
1660    site=$ac_optarg ;;
1661
1662  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1663    ac_prev=srcdir ;;
1664  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1665    srcdir=$ac_optarg ;;
1666
1667  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1668  | --syscon | --sysco | --sysc | --sys | --sy)
1669    ac_prev=sysconfdir ;;
1670  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1671  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1672    sysconfdir=$ac_optarg ;;
1673
1674  -target | --target | --targe | --targ | --tar | --ta | --t)
1675    ac_prev=target_alias ;;
1676  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1677    target_alias=$ac_optarg ;;
1678
1679  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1680    verbose=yes ;;
1681
1682  -version | --version | --versio | --versi | --vers | -V)
1683    ac_init_version=: ;;
1684
1685  -with-* | --with-*)
1686    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1687    # Reject names that are not valid shell variable names.
1688    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1689      as_fn_error $? "invalid package name: $ac_useropt"
1690    ac_useropt_orig=$ac_useropt
1691    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1692    case $ac_user_opts in
1693      *"
1694"with_$ac_useropt"
1695"*) ;;
1696      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1697	 ac_unrecognized_sep=', ';;
1698    esac
1699    eval with_$ac_useropt=\$ac_optarg ;;
1700
1701  -without-* | --without-*)
1702    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1703    # Reject names that are not valid shell variable names.
1704    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1705      as_fn_error $? "invalid package name: $ac_useropt"
1706    ac_useropt_orig=$ac_useropt
1707    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1708    case $ac_user_opts in
1709      *"
1710"with_$ac_useropt"
1711"*) ;;
1712      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1713	 ac_unrecognized_sep=', ';;
1714    esac
1715    eval with_$ac_useropt=no ;;
1716
1717  --x)
1718    # Obsolete; use --with-x.
1719    with_x=yes ;;
1720
1721  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1722  | --x-incl | --x-inc | --x-in | --x-i)
1723    ac_prev=x_includes ;;
1724  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1725  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1726    x_includes=$ac_optarg ;;
1727
1728  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1729  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1730    ac_prev=x_libraries ;;
1731  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1732  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1733    x_libraries=$ac_optarg ;;
1734
1735  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1736Try \`$0 --help' for more information"
1737    ;;
1738
1739  *=*)
1740    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1741    # Reject names that are not valid shell variable names.
1742    case $ac_envvar in #(
1743      '' | [0-9]* | *[!_$as_cr_alnum]* )
1744      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1745    esac
1746    eval $ac_envvar=\$ac_optarg
1747    export $ac_envvar ;;
1748
1749  *)
1750    # FIXME: should be removed in autoconf 3.0.
1751    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1752    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1753      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1754    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1755    ;;
1756
1757  esac
1758done
1759
1760if test -n "$ac_prev"; then
1761  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1762  as_fn_error $? "missing argument to $ac_option"
1763fi
1764
1765if test -n "$ac_unrecognized_opts"; then
1766  case $enable_option_checking in
1767    no) ;;
1768    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1769    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1770  esac
1771fi
1772
1773# Check all directory arguments for consistency.
1774for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1775		datadir sysconfdir sharedstatedir localstatedir includedir \
1776		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1777		libdir localedir mandir
1778do
1779  eval ac_val=\$$ac_var
1780  # Remove trailing slashes.
1781  case $ac_val in
1782    */ )
1783      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1784      eval $ac_var=\$ac_val;;
1785  esac
1786  # Be sure to have absolute directory names.
1787  case $ac_val in
1788    [\\/$]* | ?:[\\/]* )  continue;;
1789    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1790  esac
1791  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1792done
1793
1794# There might be people who depend on the old broken behavior: `$host'
1795# used to hold the argument of --host etc.
1796# FIXME: To remove some day.
1797build=$build_alias
1798host=$host_alias
1799target=$target_alias
1800
1801# FIXME: To remove some day.
1802if test "x$host_alias" != x; then
1803  if test "x$build_alias" = x; then
1804    cross_compiling=maybe
1805  elif test "x$build_alias" != "x$host_alias"; then
1806    cross_compiling=yes
1807  fi
1808fi
1809
1810ac_tool_prefix=
1811test -n "$host_alias" && ac_tool_prefix=$host_alias-
1812
1813test "$silent" = yes && exec 6>/dev/null
1814
1815
1816ac_pwd=`pwd` && test -n "$ac_pwd" &&
1817ac_ls_di=`ls -di .` &&
1818ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1819  as_fn_error $? "working directory cannot be determined"
1820test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1821  as_fn_error $? "pwd does not report name of working directory"
1822
1823
1824# Find the source files, if location was not specified.
1825if test -z "$srcdir"; then
1826  ac_srcdir_defaulted=yes
1827  # Try the directory containing this script, then the parent directory.
1828  ac_confdir=`$as_dirname -- "$as_myself" ||
1829$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1830	 X"$as_myself" : 'X\(//\)[^/]' \| \
1831	 X"$as_myself" : 'X\(//\)$' \| \
1832	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1833$as_echo X"$as_myself" |
1834    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1835	    s//\1/
1836	    q
1837	  }
1838	  /^X\(\/\/\)[^/].*/{
1839	    s//\1/
1840	    q
1841	  }
1842	  /^X\(\/\/\)$/{
1843	    s//\1/
1844	    q
1845	  }
1846	  /^X\(\/\).*/{
1847	    s//\1/
1848	    q
1849	  }
1850	  s/.*/./; q'`
1851  srcdir=$ac_confdir
1852  if test ! -r "$srcdir/$ac_unique_file"; then
1853    srcdir=..
1854  fi
1855else
1856  ac_srcdir_defaulted=no
1857fi
1858if test ! -r "$srcdir/$ac_unique_file"; then
1859  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1860  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1861fi
1862ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1863ac_abs_confdir=`(
1864	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1865	pwd)`
1866# When building in place, set srcdir=.
1867if test "$ac_abs_confdir" = "$ac_pwd"; then
1868  srcdir=.
1869fi
1870# Remove unnecessary trailing slashes from srcdir.
1871# Double slashes in file names in object file debugging info
1872# mess up M-x gdb in Emacs.
1873case $srcdir in
1874*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1875esac
1876for ac_var in $ac_precious_vars; do
1877  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1878  eval ac_env_${ac_var}_value=\$${ac_var}
1879  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1880  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1881done
1882
1883#
1884# Report the --help message.
1885#
1886if test "$ac_init_help" = "long"; then
1887  # Omit some internal or obsolete options to make the list less imposing.
1888  # This message is too long to be a string in the A/UX 3.1 sh.
1889  cat <<_ACEOF
1890\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1891
1892Usage: $0 [OPTION]... [VAR=VALUE]...
1893
1894To assign environment variables (e.g., CC, CFLAGS...), specify them as
1895VAR=VALUE.  See below for descriptions of some of the useful variables.
1896
1897Defaults for the options are specified in brackets.
1898
1899Configuration:
1900  -h, --help              display this help and exit
1901      --help=short        display options specific to this package
1902      --help=recursive    display the short help of all the included packages
1903  -V, --version           display version information and exit
1904  -q, --quiet, --silent   do not print \`checking ...' messages
1905      --cache-file=FILE   cache test results in FILE [disabled]
1906  -C, --config-cache      alias for \`--cache-file=config.cache'
1907  -n, --no-create         do not create output files
1908      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1909
1910Installation directories:
1911  --prefix=PREFIX         install architecture-independent files in PREFIX
1912                          [$ac_default_prefix]
1913  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1914                          [PREFIX]
1915
1916By default, \`make install' will install all the files in
1917\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1918an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1919for instance \`--prefix=\$HOME'.
1920
1921For better control, use the options below.
1922
1923Fine tuning of the installation directories:
1924  --bindir=DIR            user executables [EPREFIX/bin]
1925  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1926  --libexecdir=DIR        program executables [EPREFIX/libexec]
1927  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1928  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1929  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1930  --libdir=DIR            object code libraries [EPREFIX/lib]
1931  --includedir=DIR        C header files [PREFIX/include]
1932  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1933  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1934  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1935  --infodir=DIR           info documentation [DATAROOTDIR/info]
1936  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1937  --mandir=DIR            man documentation [DATAROOTDIR/man]
1938  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1939  --htmldir=DIR           html documentation [DOCDIR]
1940  --dvidir=DIR            dvi documentation [DOCDIR]
1941  --pdfdir=DIR            pdf documentation [DOCDIR]
1942  --psdir=DIR             ps documentation [DOCDIR]
1943_ACEOF
1944
1945  cat <<\_ACEOF
1946
1947X features:
1948  --x-includes=DIR    X include files are in DIR
1949  --x-libraries=DIR   X library files are in DIR
1950
1951System types:
1952  --build=BUILD     configure for building on BUILD [guessed]
1953  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1954  --target=TARGET   configure for building compilers for TARGET [HOST]
1955_ACEOF
1956fi
1957
1958if test -n "$ac_init_help"; then
1959  case $ac_init_help in
1960     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1961   esac
1962  cat <<\_ACEOF
1963
1964Optional Features:
1965  --disable-option-checking  ignore unrecognized --enable/--with options
1966  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1967  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1968  --enable-openjdk-only   suppress building custom source even if present
1969                          [disabled]
1970  --enable-debug          set the debug level to fastdebug (shorthand for
1971                          --with-debug-level=fastdebug) [disabled]
1972  --enable-headless-only  only build headless (no GUI) support [disabled]
1973  --disable-unlimited-crypto
1974                          Disable unlimited crypto policy [enabled]
1975  --disable-keep-packaged-modules
1976                          Do not keep packaged modules in jdk image [enable]
1977  --enable-static-build   enable static library build [disabled]
1978  --disable-warnings-as-errors
1979                          do not consider native warnings to be an error
1980                          [enabled]
1981  --enable-debug-symbols  Deprecated. Option is kept for backwards
1982                          compatibility and is ignored
1983  --enable-zip-debug-info Deprecated. Option is kept for backwards
1984                          compatibility and is ignored
1985  --enable-native-coverage
1986                          enable native compilation with code coverage
1987                          data[disabled]
1988  --enable-dtrace[=yes/no/auto]
1989                          enable dtrace. Default is auto, where dtrace is
1990                          enabled if all dependencies are present.
1991  --enable-aot[=yes/no/auto]
1992                          enable ahead of time compilation feature. Default is
1993                          auto, where aot is enabled if all dependencies are
1994                          present.
1995  --disable-hotspot-gtest Disables building of the Hotspot unit tests
1996  --disable-freetype-bundling
1997                          disable bundling of the freetype library with the
1998                          build result [enabled on Windows or when using
1999                          --with-freetype, disabled otherwise]
2000  --enable-libffi-bundling
2001                          enable bundling of libffi.so to make the built JDK
2002                          runnable on more systems
2003  --enable-jtreg-failure-handler
2004                          forces build of the jtreg failure handler to be
2005                          enabled, missing dependencies become fatal errors.
2006                          Default is auto, where the failure handler is built
2007                          if all dependencies are present and otherwise just
2008                          disabled.
2009  --disable-generate-classlist
2010                          forces enabling or disabling of the generation of a
2011                          CDS classlist at build time. Default is to generate
2012                          it when either the server or client JVMs are built.
2013  --enable-sjavac         use sjavac to do fast incremental compiles
2014                          [disabled]
2015  --disable-javac-server  disable javac server [enabled]
2016  --enable-icecc          enable distribted compilation of native code using
2017                          icecc/icecream [disabled]
2018  --disable-precompiled-headers
2019                          disable using precompiled headers when compiling C++
2020                          [enabled]
2021  --enable-ccache         enable using ccache to speed up recompilations
2022                          [disabled]
2023
2024Optional Packages:
2025  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2026  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2027  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2028                          support it), e.g. --with-target-bits=32 [guessed]
2029  --with-custom-make-dir  Deprecated. Option is kept for backwards
2030                          compatibility and is ignored
2031  --with-jdk-variant      JDK variant to build (normal) [normal]
2032  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2033                          optimized) [release]
2034  --with-jvm-variants     JVM variants (separated by commas) to build
2035                          (server,client,minimal,core,zero,zeroshark,custom)
2036                          [server]
2037  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2038                          (arm64,aarch64) [aarch64]
2039  --with-devkit           use this devkit for compilers, tools and resources
2040  --with-sys-root         alias for --with-sysroot for backwards compatability
2041  --with-sysroot          use this directory as sysroot
2042  --with-tools-dir        alias for --with-toolchain-path for backwards
2043                          compatibility
2044  --with-toolchain-path   prepend these directories when searching for
2045                          toolchain binaries (compilers etc)
2046  --with-extra-path       prepend these directories to the default path
2047  --with-sdk-name         use the platform SDK of the given name. [macosx]
2048  --with-conf-name        use this as the name of the configuration [generated
2049                          from important configuration options]
2050  --with-output-sync      set make output sync type if supported by make.
2051                          [recurse]
2052  --with-default-make-target
2053                          set the default make target [exploded-image]
2054  --with-cacerts-file     specify alternative cacerts file
2055  --with-copyright-year   Set copyright year value for build [current year]
2056  --with-milestone        Deprecated. Option is kept for backwards
2057                          compatibility and is ignored
2058  --with-update-version   Deprecated. Option is kept for backwards
2059                          compatibility and is ignored
2060  --with-user-release-suffix
2061                          Deprecated. Option is kept for backwards
2062                          compatibility and is ignored
2063  --with-build-number     Deprecated. Option is kept for backwards
2064                          compatibility and is ignored
2065  --with-version-string   Set version string [calculated]
2066  --with-version-pre      Set the base part of the version 'PRE' field
2067                          (pre-release identifier) ['internal']
2068  --with-version-opt      Set version 'OPT' field (build metadata)
2069                          [<timestamp>.<user>.<dirname>]
2070  --with-version-build    Set version 'BUILD' field (build number) [not
2071                          specified]
2072  --with-version-major    Set version 'MAJOR' field (first number) [current
2073                          source value]
2074  --with-version-minor    Set version 'MINOR' field (second number) [current
2075                          source value]
2076  --with-version-security Set version 'SECURITY' field (third number) [current
2077                          source value]
2078  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2079                          specified]
2080  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2081  --with-build-jdk        path to JDK of same version as is being built[the
2082                          newly built JDK]
2083  --with-add-source-root  Deprecated. Option is kept for backwards
2084                          compatibility and is ignored
2085  --with-override-source-root
2086                          Deprecated. Option is kept for backwards
2087                          compatibility and is ignored
2088  --with-adds-and-overrides
2089                          Deprecated. Option is kept for backwards
2090                          compatibility and is ignored
2091  --with-override-langtools
2092                          Deprecated. Option is kept for backwards
2093                          compatibility and is ignored
2094  --with-override-corba   Deprecated. Option is kept for backwards
2095                          compatibility and is ignored
2096  --with-override-jaxp    Deprecated. Option is kept for backwards
2097                          compatibility and is ignored
2098  --with-override-jaxws   Deprecated. Option is kept for backwards
2099                          compatibility and is ignored
2100  --with-override-hotspot Deprecated. Option is kept for backwards
2101                          compatibility and is ignored
2102  --with-override-nashorn Deprecated. Option is kept for backwards
2103                          compatibility and is ignored
2104  --with-override-jdk     Deprecated. Option is kept for backwards
2105                          compatibility and is ignored
2106  --with-import_hotspot   Deprecated. Option is kept for backwards
2107                          compatibility and is ignored
2108  --with-import-modules   import a set of prebuilt modules either as a zip
2109                          file or an exploded directory
2110  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2111                          to show possible values [platform dependent]
2112  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2113  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2114  --with-extra-ldflags    extra flags to be used when linking jdk
2115  --with-toolchain-version
2116                          the version of the toolchain to look for, use
2117                          '--help' to show possible values [platform
2118                          dependent]
2119  --with-build-devkit     Devkit to use for the build platform toolchain
2120  --with-jtreg            Regression Test Harness [probed]
2121  --with-abi-profile      specify ABI profile for ARM builds
2122                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2123                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2124                          [toolchain dependent]
2125  --with-native-debug-symbols
2126                          set the native debug symbol configuration (none,
2127                          internal, external, zipped) [varying]
2128  --with-stdc++lib=<static>,<dynamic>,<default>
2129                          force linking of the C++ runtime on Linux to either
2130                          static or dynamic, default is static with dynamic as
2131                          fallback
2132  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2133                          (Windows only) [probed]
2134  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2135                          (Windows only) [probed]
2136  --with-x                use the X Window System
2137  --with-cups             specify prefix directory for the cups package
2138                          (expecting the headers under PATH/include)
2139  --with-cups-include     specify directory for the cups include files
2140  --with-freetype         specify prefix directory for the freetype package
2141                          (expecting the libraries under PATH/lib and the
2142                          headers under PATH/include)
2143  --with-freetype-include specify directory for the freetype include files
2144  --with-freetype-lib     specify directory for the freetype library
2145  --with-freetype-src     specify directory with freetype sources to
2146                          automatically build the library (experimental,
2147                          Windows-only)
2148  --with-alsa             specify prefix directory for the alsa package
2149                          (expecting the libraries under PATH/lib and the
2150                          headers under PATH/include)
2151  --with-alsa-include     specify directory for the alsa include files
2152  --with-alsa-lib         specify directory for the alsa library
2153  --with-libffi           specify prefix directory for the libffi package
2154                          (expecting the libraries under PATH/lib and the
2155                          headers under PATH/include)
2156  --with-libffi-include   specify directory for the libffi include files
2157  --with-libffi-lib       specify directory for the libffi library
2158  --with-libjpeg          use libjpeg from build system or OpenJDK source
2159                          (system, bundled) [bundled]
2160  --with-giflib           use giflib from build system or OpenJDK source
2161                          (system, bundled) [bundled]
2162  --with-libpng           use libpng from build system or OpenJDK source
2163                          (system, bundled) [bundled]
2164  --with-zlib             use zlib from build system or OpenJDK source
2165                          (system, bundled) [bundled]
2166  --with-lcms             use lcms2 from build system or OpenJDK source
2167                          (system, bundled) [bundled]
2168  --with-dxsdk            Deprecated. Option is kept for backwards
2169                          compatibility and is ignored
2170  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2171                          compatibility and is ignored
2172  --with-dxsdk-include    Deprecated. Option is kept for backwards
2173                          compatibility and is ignored
2174  --with-jvm-features     additional JVM features to enable (separated by
2175                          comma), use '--help' to show possible values [none]
2176  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2177                          compatibility and is ignored
2178  --with-num-cores        number of cores in the build system, e.g.
2179                          --with-num-cores=8 [probed]
2180  --with-memory-size      memory (in MB) available in the build system, e.g.
2181                          --with-memory-size=1024 [probed]
2182  --with-jobs             number of parallel jobs to let make run [calculated
2183                          based on cores and memory]
2184  --with-test-jobs        number of parallel tests jobs to run [based on build
2185                          jobs]
2186  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2187                          invocations of boot JDK, overriding the default
2188                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2189                          -enableassertions"
2190  --with-sjavac-server-java
2191                          use this java binary for running the sjavac
2192                          background server [Boot JDK java]
2193  --with-ccache-dir       where to store ccache files [~/.ccache]
2194
2195Some influential environment variables:
2196  BASENAME    Override default value for BASENAME
2197  BASH        Override default value for BASH
2198  CAT         Override default value for CAT
2199  CHMOD       Override default value for CHMOD
2200  CMP         Override default value for CMP
2201  COMM        Override default value for COMM
2202  CP          Override default value for CP
2203  CUT         Override default value for CUT
2204  DATE        Override default value for DATE
2205  DIFF        Override default value for DIFF
2206  DIRNAME     Override default value for DIRNAME
2207  ECHO        Override default value for ECHO
2208  EXPR        Override default value for EXPR
2209  FILE        Override default value for FILE
2210  FIND        Override default value for FIND
2211  HEAD        Override default value for HEAD
2212  GUNZIP      Override default value for GUNZIP
2213  GZIP        Override default value for GZIP
2214  LN          Override default value for LN
2215  LS          Override default value for LS
2216  MKDIR       Override default value for MKDIR
2217  MKTEMP      Override default value for MKTEMP
2218  MV          Override default value for MV
2219  NAWK        Override default value for NAWK
2220  PRINTF      Override default value for PRINTF
2221  RM          Override default value for RM
2222  RMDIR       Override default value for RMDIR
2223  SH          Override default value for SH
2224  SORT        Override default value for SORT
2225  TAIL        Override default value for TAIL
2226  TAR         Override default value for TAR
2227  TEE         Override default value for TEE
2228  TOUCH       Override default value for TOUCH
2229  TR          Override default value for TR
2230  UNAME       Override default value for UNAME
2231  UNIQ        Override default value for UNIQ
2232  WC          Override default value for WC
2233  WHICH       Override default value for WHICH
2234  XARGS       Override default value for XARGS
2235  AWK         Override default value for AWK
2236  GREP        Override default value for GREP
2237  EGREP       Override default value for EGREP
2238  FGREP       Override default value for FGREP
2239  SED         Override default value for SED
2240  CYGPATH     Override default value for CYGPATH
2241  READLINK    Override default value for READLINK
2242  DF          Override default value for DF
2243  CPIO        Override default value for CPIO
2244  NICE        Override default value for NICE
2245  MAKE        Override default value for MAKE
2246  UNZIP       Override default value for UNZIP
2247  ZIPEXE      Override default value for ZIPEXE
2248  LDD         Override default value for LDD
2249  OTOOL       Override default value for OTOOL
2250  READELF     Override default value for READELF
2251  HG          Override default value for HG
2252  STAT        Override default value for STAT
2253  TIME        Override default value for TIME
2254  DTRACE      Override default value for DTRACE
2255  PATCH       Override default value for PATCH
2256  DSYMUTIL    Override default value for DSYMUTIL
2257  XATTR       Override default value for XATTR
2258  CODESIGN    Override default value for CODESIGN
2259  SETFILE     Override default value for SETFILE
2260  PKG_CONFIG  path to pkg-config utility
2261  JAVA        Override default value for JAVA
2262  JAVAC       Override default value for JAVAC
2263  JAVAH       Override default value for JAVAH
2264  JAR         Override default value for JAR
2265  JARSIGNER   Override default value for JARSIGNER
2266  CC          C compiler command
2267  CFLAGS      C compiler flags
2268  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2269              nonstandard directory <lib dir>
2270  LIBS        libraries to pass to the linker, e.g. -l<library>
2271  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2272              you have headers in a nonstandard directory <include dir>
2273  CXX         C++ compiler command
2274  CXXFLAGS    C++ compiler flags
2275  CPP         C preprocessor
2276  CXXCPP      C++ preprocessor
2277  AS          Override default value for AS
2278  AR          Override default value for AR
2279  LIPO        Override default value for LIPO
2280  STRIP       Override default value for STRIP
2281  NM          Override default value for NM
2282  GNM         Override default value for GNM
2283  OBJCOPY     Override default value for OBJCOPY
2284  OBJDUMP     Override default value for OBJDUMP
2285  BUILD_CC    Override default value for BUILD_CC
2286  BUILD_CXX   Override default value for BUILD_CXX
2287  BUILD_NM    Override default value for BUILD_NM
2288  BUILD_AR    Override default value for BUILD_AR
2289  BUILD_OBJCOPY
2290              Override default value for BUILD_OBJCOPY
2291  BUILD_STRIP Override default value for BUILD_STRIP
2292  JTREGEXE    Override default value for JTREGEXE
2293  XMKMF       Path to xmkmf, Makefile generator for X Window System
2294  FREETYPE_CFLAGS
2295              C compiler flags for FREETYPE, overriding pkg-config
2296  FREETYPE_LIBS
2297              linker flags for FREETYPE, overriding pkg-config
2298  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2299  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2300  LIBFFI_CFLAGS
2301              C compiler flags for LIBFFI, overriding pkg-config
2302  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2303  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2304  PNG_LIBS    linker flags for PNG, overriding pkg-config
2305  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2306  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2307  ICECC_CMD   Override default value for ICECC_CMD
2308  ICECC_CREATE_ENV
2309              Override default value for ICECC_CREATE_ENV
2310  ICECC_WRAPPER
2311              Override default value for ICECC_WRAPPER
2312  CCACHE      Override default value for CCACHE
2313
2314Use these variables to override the choices made by `configure' or to help
2315it to find libraries and programs with nonstandard names/locations.
2316
2317Report bugs to <build-dev@openjdk.java.net>.
2318OpenJDK home page: <http://openjdk.java.net>.
2319_ACEOF
2320ac_status=$?
2321fi
2322
2323if test "$ac_init_help" = "recursive"; then
2324  # If there are subdirs, report their specific --help.
2325  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2326    test -d "$ac_dir" ||
2327      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2328      continue
2329    ac_builddir=.
2330
2331case "$ac_dir" in
2332.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2333*)
2334  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2335  # A ".." for each directory in $ac_dir_suffix.
2336  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2337  case $ac_top_builddir_sub in
2338  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2339  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2340  esac ;;
2341esac
2342ac_abs_top_builddir=$ac_pwd
2343ac_abs_builddir=$ac_pwd$ac_dir_suffix
2344# for backward compatibility:
2345ac_top_builddir=$ac_top_build_prefix
2346
2347case $srcdir in
2348  .)  # We are building in place.
2349    ac_srcdir=.
2350    ac_top_srcdir=$ac_top_builddir_sub
2351    ac_abs_top_srcdir=$ac_pwd ;;
2352  [\\/]* | ?:[\\/]* )  # Absolute name.
2353    ac_srcdir=$srcdir$ac_dir_suffix;
2354    ac_top_srcdir=$srcdir
2355    ac_abs_top_srcdir=$srcdir ;;
2356  *) # Relative name.
2357    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2358    ac_top_srcdir=$ac_top_build_prefix$srcdir
2359    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2360esac
2361ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2362
2363    cd "$ac_dir" || { ac_status=$?; continue; }
2364    # Check for guested configure.
2365    if test -f "$ac_srcdir/configure.gnu"; then
2366      echo &&
2367      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2368    elif test -f "$ac_srcdir/configure"; then
2369      echo &&
2370      $SHELL "$ac_srcdir/configure" --help=recursive
2371    else
2372      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2373    fi || ac_status=$?
2374    cd "$ac_pwd" || { ac_status=$?; break; }
2375  done
2376fi
2377
2378test -n "$ac_init_help" && exit $ac_status
2379if $ac_init_version; then
2380  cat <<\_ACEOF
2381OpenJDK configure jdk9
2382generated by GNU Autoconf 2.69
2383
2384Copyright (C) 2012 Free Software Foundation, Inc.
2385This configure script is free software; the Free Software Foundation
2386gives unlimited permission to copy, distribute and modify it.
2387_ACEOF
2388  exit
2389fi
2390
2391## ------------------------ ##
2392## Autoconf initialization. ##
2393## ------------------------ ##
2394
2395# ac_fn_c_try_compile LINENO
2396# --------------------------
2397# Try to compile conftest.$ac_ext, and return whether this succeeded.
2398ac_fn_c_try_compile ()
2399{
2400  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2401  rm -f conftest.$ac_objext
2402  if { { ac_try="$ac_compile"
2403case "(($ac_try" in
2404  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2405  *) ac_try_echo=$ac_try;;
2406esac
2407eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2408$as_echo "$ac_try_echo"; } >&5
2409  (eval "$ac_compile") 2>conftest.err
2410  ac_status=$?
2411  if test -s conftest.err; then
2412    grep -v '^ *+' conftest.err >conftest.er1
2413    cat conftest.er1 >&5
2414    mv -f conftest.er1 conftest.err
2415  fi
2416  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2417  test $ac_status = 0; } && {
2418	 test -z "$ac_c_werror_flag" ||
2419	 test ! -s conftest.err
2420       } && test -s conftest.$ac_objext; then :
2421  ac_retval=0
2422else
2423  $as_echo "$as_me: failed program was:" >&5
2424sed 's/^/| /' conftest.$ac_ext >&5
2425
2426	ac_retval=1
2427fi
2428  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2429  as_fn_set_status $ac_retval
2430
2431} # ac_fn_c_try_compile
2432
2433# ac_fn_cxx_try_compile LINENO
2434# ----------------------------
2435# Try to compile conftest.$ac_ext, and return whether this succeeded.
2436ac_fn_cxx_try_compile ()
2437{
2438  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2439  rm -f conftest.$ac_objext
2440  if { { ac_try="$ac_compile"
2441case "(($ac_try" in
2442  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2443  *) ac_try_echo=$ac_try;;
2444esac
2445eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2446$as_echo "$ac_try_echo"; } >&5
2447  (eval "$ac_compile") 2>conftest.err
2448  ac_status=$?
2449  if test -s conftest.err; then
2450    grep -v '^ *+' conftest.err >conftest.er1
2451    cat conftest.er1 >&5
2452    mv -f conftest.er1 conftest.err
2453  fi
2454  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2455  test $ac_status = 0; } && {
2456	 test -z "$ac_cxx_werror_flag" ||
2457	 test ! -s conftest.err
2458       } && test -s conftest.$ac_objext; then :
2459  ac_retval=0
2460else
2461  $as_echo "$as_me: failed program was:" >&5
2462sed 's/^/| /' conftest.$ac_ext >&5
2463
2464	ac_retval=1
2465fi
2466  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2467  as_fn_set_status $ac_retval
2468
2469} # ac_fn_cxx_try_compile
2470
2471# ac_fn_c_try_cpp LINENO
2472# ----------------------
2473# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2474ac_fn_c_try_cpp ()
2475{
2476  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2477  if { { ac_try="$ac_cpp conftest.$ac_ext"
2478case "(($ac_try" in
2479  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2480  *) ac_try_echo=$ac_try;;
2481esac
2482eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2483$as_echo "$ac_try_echo"; } >&5
2484  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2485  ac_status=$?
2486  if test -s conftest.err; then
2487    grep -v '^ *+' conftest.err >conftest.er1
2488    cat conftest.er1 >&5
2489    mv -f conftest.er1 conftest.err
2490  fi
2491  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2492  test $ac_status = 0; } > conftest.i && {
2493	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2494	 test ! -s conftest.err
2495       }; then :
2496  ac_retval=0
2497else
2498  $as_echo "$as_me: failed program was:" >&5
2499sed 's/^/| /' conftest.$ac_ext >&5
2500
2501    ac_retval=1
2502fi
2503  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2504  as_fn_set_status $ac_retval
2505
2506} # ac_fn_c_try_cpp
2507
2508# ac_fn_cxx_try_cpp LINENO
2509# ------------------------
2510# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2511ac_fn_cxx_try_cpp ()
2512{
2513  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2514  if { { ac_try="$ac_cpp conftest.$ac_ext"
2515case "(($ac_try" in
2516  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2517  *) ac_try_echo=$ac_try;;
2518esac
2519eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2520$as_echo "$ac_try_echo"; } >&5
2521  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2522  ac_status=$?
2523  if test -s conftest.err; then
2524    grep -v '^ *+' conftest.err >conftest.er1
2525    cat conftest.er1 >&5
2526    mv -f conftest.er1 conftest.err
2527  fi
2528  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2529  test $ac_status = 0; } > conftest.i && {
2530	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2531	 test ! -s conftest.err
2532       }; then :
2533  ac_retval=0
2534else
2535  $as_echo "$as_me: failed program was:" >&5
2536sed 's/^/| /' conftest.$ac_ext >&5
2537
2538    ac_retval=1
2539fi
2540  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2541  as_fn_set_status $ac_retval
2542
2543} # ac_fn_cxx_try_cpp
2544
2545# ac_fn_c_try_link LINENO
2546# -----------------------
2547# Try to link conftest.$ac_ext, and return whether this succeeded.
2548ac_fn_c_try_link ()
2549{
2550  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2551  rm -f conftest.$ac_objext conftest$ac_exeext
2552  if { { ac_try="$ac_link"
2553case "(($ac_try" in
2554  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2555  *) ac_try_echo=$ac_try;;
2556esac
2557eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2558$as_echo "$ac_try_echo"; } >&5
2559  (eval "$ac_link") 2>conftest.err
2560  ac_status=$?
2561  if test -s conftest.err; then
2562    grep -v '^ *+' conftest.err >conftest.er1
2563    cat conftest.er1 >&5
2564    mv -f conftest.er1 conftest.err
2565  fi
2566  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2567  test $ac_status = 0; } && {
2568	 test -z "$ac_c_werror_flag" ||
2569	 test ! -s conftest.err
2570       } && test -s conftest$ac_exeext && {
2571	 test "$cross_compiling" = yes ||
2572	 test -x conftest$ac_exeext
2573       }; then :
2574  ac_retval=0
2575else
2576  $as_echo "$as_me: failed program was:" >&5
2577sed 's/^/| /' conftest.$ac_ext >&5
2578
2579	ac_retval=1
2580fi
2581  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2582  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2583  # interfere with the next link command; also delete a directory that is
2584  # left behind by Apple's compiler.  We do this before executing the actions.
2585  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2586  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2587  as_fn_set_status $ac_retval
2588
2589} # ac_fn_c_try_link
2590
2591# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2592# ---------------------------------------------------------
2593# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2594# the include files in INCLUDES and setting the cache variable VAR
2595# accordingly.
2596ac_fn_cxx_check_header_mongrel ()
2597{
2598  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2599  if eval \${$3+:} false; then :
2600  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2601$as_echo_n "checking for $2... " >&6; }
2602if eval \${$3+:} false; then :
2603  $as_echo_n "(cached) " >&6
2604fi
2605eval ac_res=\$$3
2606	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2607$as_echo "$ac_res" >&6; }
2608else
2609  # Is the header compilable?
2610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2611$as_echo_n "checking $2 usability... " >&6; }
2612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2613/* end confdefs.h.  */
2614$4
2615#include <$2>
2616_ACEOF
2617if ac_fn_cxx_try_compile "$LINENO"; then :
2618  ac_header_compiler=yes
2619else
2620  ac_header_compiler=no
2621fi
2622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2624$as_echo "$ac_header_compiler" >&6; }
2625
2626# Is the header present?
2627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2628$as_echo_n "checking $2 presence... " >&6; }
2629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2630/* end confdefs.h.  */
2631#include <$2>
2632_ACEOF
2633if ac_fn_cxx_try_cpp "$LINENO"; then :
2634  ac_header_preproc=yes
2635else
2636  ac_header_preproc=no
2637fi
2638rm -f conftest.err conftest.i conftest.$ac_ext
2639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2640$as_echo "$ac_header_preproc" >&6; }
2641
2642# So?  What about this header?
2643case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2644  yes:no: )
2645    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2646$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2647    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2648$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2649    ;;
2650  no:yes:* )
2651    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2652$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2653    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2654$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2655    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2656$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2657    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2658$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2659    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2660$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2661( $as_echo "## ----------------------------------------- ##
2662## Report this to build-dev@openjdk.java.net ##
2663## ----------------------------------------- ##"
2664     ) | sed "s/^/$as_me: WARNING:     /" >&2
2665    ;;
2666esac
2667  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2668$as_echo_n "checking for $2... " >&6; }
2669if eval \${$3+:} false; then :
2670  $as_echo_n "(cached) " >&6
2671else
2672  eval "$3=\$ac_header_compiler"
2673fi
2674eval ac_res=\$$3
2675	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2676$as_echo "$ac_res" >&6; }
2677fi
2678  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2679
2680} # ac_fn_cxx_check_header_mongrel
2681
2682# ac_fn_cxx_try_run LINENO
2683# ------------------------
2684# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2685# that executables *can* be run.
2686ac_fn_cxx_try_run ()
2687{
2688  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2689  if { { ac_try="$ac_link"
2690case "(($ac_try" in
2691  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2692  *) ac_try_echo=$ac_try;;
2693esac
2694eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2695$as_echo "$ac_try_echo"; } >&5
2696  (eval "$ac_link") 2>&5
2697  ac_status=$?
2698  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2699  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2700  { { case "(($ac_try" in
2701  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2702  *) ac_try_echo=$ac_try;;
2703esac
2704eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2705$as_echo "$ac_try_echo"; } >&5
2706  (eval "$ac_try") 2>&5
2707  ac_status=$?
2708  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2709  test $ac_status = 0; }; }; then :
2710  ac_retval=0
2711else
2712  $as_echo "$as_me: program exited with status $ac_status" >&5
2713       $as_echo "$as_me: failed program was:" >&5
2714sed 's/^/| /' conftest.$ac_ext >&5
2715
2716       ac_retval=$ac_status
2717fi
2718  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2719  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2720  as_fn_set_status $ac_retval
2721
2722} # ac_fn_cxx_try_run
2723
2724# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2725# ---------------------------------------------------------
2726# Tests whether HEADER exists and can be compiled using the include files in
2727# INCLUDES, setting the cache variable VAR accordingly.
2728ac_fn_cxx_check_header_compile ()
2729{
2730  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2731  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2732$as_echo_n "checking for $2... " >&6; }
2733if eval \${$3+:} false; then :
2734  $as_echo_n "(cached) " >&6
2735else
2736  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2737/* end confdefs.h.  */
2738$4
2739#include <$2>
2740_ACEOF
2741if ac_fn_cxx_try_compile "$LINENO"; then :
2742  eval "$3=yes"
2743else
2744  eval "$3=no"
2745fi
2746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2747fi
2748eval ac_res=\$$3
2749	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2750$as_echo "$ac_res" >&6; }
2751  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2752
2753} # ac_fn_cxx_check_header_compile
2754
2755# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2756# ----------------------------------------------
2757# Tries to find the compile-time value of EXPR in a program that includes
2758# INCLUDES, setting VAR accordingly. Returns whether the value could be
2759# computed
2760ac_fn_cxx_compute_int ()
2761{
2762  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2763  if test "$cross_compiling" = yes; then
2764    # Depending upon the size, compute the lo and hi bounds.
2765cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2766/* end confdefs.h.  */
2767$4
2768int
2769main ()
2770{
2771static int test_array [1 - 2 * !(($2) >= 0)];
2772test_array [0] = 0;
2773return test_array [0];
2774
2775  ;
2776  return 0;
2777}
2778_ACEOF
2779if ac_fn_cxx_try_compile "$LINENO"; then :
2780  ac_lo=0 ac_mid=0
2781  while :; do
2782    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2783/* end confdefs.h.  */
2784$4
2785int
2786main ()
2787{
2788static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2789test_array [0] = 0;
2790return test_array [0];
2791
2792  ;
2793  return 0;
2794}
2795_ACEOF
2796if ac_fn_cxx_try_compile "$LINENO"; then :
2797  ac_hi=$ac_mid; break
2798else
2799  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2800			if test $ac_lo -le $ac_mid; then
2801			  ac_lo= ac_hi=
2802			  break
2803			fi
2804			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2805fi
2806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2807  done
2808else
2809  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2810/* end confdefs.h.  */
2811$4
2812int
2813main ()
2814{
2815static int test_array [1 - 2 * !(($2) < 0)];
2816test_array [0] = 0;
2817return test_array [0];
2818
2819  ;
2820  return 0;
2821}
2822_ACEOF
2823if ac_fn_cxx_try_compile "$LINENO"; then :
2824  ac_hi=-1 ac_mid=-1
2825  while :; do
2826    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2827/* end confdefs.h.  */
2828$4
2829int
2830main ()
2831{
2832static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2833test_array [0] = 0;
2834return test_array [0];
2835
2836  ;
2837  return 0;
2838}
2839_ACEOF
2840if ac_fn_cxx_try_compile "$LINENO"; then :
2841  ac_lo=$ac_mid; break
2842else
2843  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2844			if test $ac_mid -le $ac_hi; then
2845			  ac_lo= ac_hi=
2846			  break
2847			fi
2848			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2849fi
2850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2851  done
2852else
2853  ac_lo= ac_hi=
2854fi
2855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2856fi
2857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2858# Binary search between lo and hi bounds.
2859while test "x$ac_lo" != "x$ac_hi"; do
2860  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2861  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2862/* end confdefs.h.  */
2863$4
2864int
2865main ()
2866{
2867static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2868test_array [0] = 0;
2869return test_array [0];
2870
2871  ;
2872  return 0;
2873}
2874_ACEOF
2875if ac_fn_cxx_try_compile "$LINENO"; then :
2876  ac_hi=$ac_mid
2877else
2878  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2879fi
2880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2881done
2882case $ac_lo in #((
2883?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2884'') ac_retval=1 ;;
2885esac
2886  else
2887    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2888/* end confdefs.h.  */
2889$4
2890static long int longval () { return $2; }
2891static unsigned long int ulongval () { return $2; }
2892#include <stdio.h>
2893#include <stdlib.h>
2894int
2895main ()
2896{
2897
2898  FILE *f = fopen ("conftest.val", "w");
2899  if (! f)
2900    return 1;
2901  if (($2) < 0)
2902    {
2903      long int i = longval ();
2904      if (i != ($2))
2905	return 1;
2906      fprintf (f, "%ld", i);
2907    }
2908  else
2909    {
2910      unsigned long int i = ulongval ();
2911      if (i != ($2))
2912	return 1;
2913      fprintf (f, "%lu", i);
2914    }
2915  /* Do not output a trailing newline, as this causes \r\n confusion
2916     on some platforms.  */
2917  return ferror (f) || fclose (f) != 0;
2918
2919  ;
2920  return 0;
2921}
2922_ACEOF
2923if ac_fn_cxx_try_run "$LINENO"; then :
2924  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2925else
2926  ac_retval=1
2927fi
2928rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2929  conftest.$ac_objext conftest.beam conftest.$ac_ext
2930rm -f conftest.val
2931
2932  fi
2933  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2934  as_fn_set_status $ac_retval
2935
2936} # ac_fn_cxx_compute_int
2937
2938# ac_fn_cxx_try_link LINENO
2939# -------------------------
2940# Try to link conftest.$ac_ext, and return whether this succeeded.
2941ac_fn_cxx_try_link ()
2942{
2943  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2944  rm -f conftest.$ac_objext conftest$ac_exeext
2945  if { { ac_try="$ac_link"
2946case "(($ac_try" in
2947  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2948  *) ac_try_echo=$ac_try;;
2949esac
2950eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2951$as_echo "$ac_try_echo"; } >&5
2952  (eval "$ac_link") 2>conftest.err
2953  ac_status=$?
2954  if test -s conftest.err; then
2955    grep -v '^ *+' conftest.err >conftest.er1
2956    cat conftest.er1 >&5
2957    mv -f conftest.er1 conftest.err
2958  fi
2959  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2960  test $ac_status = 0; } && {
2961	 test -z "$ac_cxx_werror_flag" ||
2962	 test ! -s conftest.err
2963       } && test -s conftest$ac_exeext && {
2964	 test "$cross_compiling" = yes ||
2965	 test -x conftest$ac_exeext
2966       }; then :
2967  ac_retval=0
2968else
2969  $as_echo "$as_me: failed program was:" >&5
2970sed 's/^/| /' conftest.$ac_ext >&5
2971
2972	ac_retval=1
2973fi
2974  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2975  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2976  # interfere with the next link command; also delete a directory that is
2977  # left behind by Apple's compiler.  We do this before executing the actions.
2978  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2979  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2980  as_fn_set_status $ac_retval
2981
2982} # ac_fn_cxx_try_link
2983
2984# ac_fn_cxx_check_func LINENO FUNC VAR
2985# ------------------------------------
2986# Tests whether FUNC exists, setting the cache variable VAR accordingly
2987ac_fn_cxx_check_func ()
2988{
2989  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2990  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2991$as_echo_n "checking for $2... " >&6; }
2992if eval \${$3+:} false; then :
2993  $as_echo_n "(cached) " >&6
2994else
2995  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2996/* end confdefs.h.  */
2997/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2998   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2999#define $2 innocuous_$2
3000
3001/* System header to define __stub macros and hopefully few prototypes,
3002    which can conflict with char $2 (); below.
3003    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3004    <limits.h> exists even on freestanding compilers.  */
3005
3006#ifdef __STDC__
3007# include <limits.h>
3008#else
3009# include <assert.h>
3010#endif
3011
3012#undef $2
3013
3014/* Override any GCC internal prototype to avoid an error.
3015   Use char because int might match the return type of a GCC
3016   builtin and then its argument prototype would still apply.  */
3017#ifdef __cplusplus
3018extern "C"
3019#endif
3020char $2 ();
3021/* The GNU C library defines this for functions which it implements
3022    to always fail with ENOSYS.  Some functions are actually named
3023    something starting with __ and the normal name is an alias.  */
3024#if defined __stub_$2 || defined __stub___$2
3025choke me
3026#endif
3027
3028int
3029main ()
3030{
3031return $2 ();
3032  ;
3033  return 0;
3034}
3035_ACEOF
3036if ac_fn_cxx_try_link "$LINENO"; then :
3037  eval "$3=yes"
3038else
3039  eval "$3=no"
3040fi
3041rm -f core conftest.err conftest.$ac_objext \
3042    conftest$ac_exeext conftest.$ac_ext
3043fi
3044eval ac_res=\$$3
3045	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3046$as_echo "$ac_res" >&6; }
3047  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3048
3049} # ac_fn_cxx_check_func
3050
3051# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3052# -------------------------------------------------------
3053# Tests whether HEADER exists and can be compiled using the include files in
3054# INCLUDES, setting the cache variable VAR accordingly.
3055ac_fn_c_check_header_compile ()
3056{
3057  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3058  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3059$as_echo_n "checking for $2... " >&6; }
3060if eval \${$3+:} false; then :
3061  $as_echo_n "(cached) " >&6
3062else
3063  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3064/* end confdefs.h.  */
3065$4
3066#include <$2>
3067_ACEOF
3068if ac_fn_c_try_compile "$LINENO"; then :
3069  eval "$3=yes"
3070else
3071  eval "$3=no"
3072fi
3073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3074fi
3075eval ac_res=\$$3
3076	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3077$as_echo "$ac_res" >&6; }
3078  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3079
3080} # ac_fn_c_check_header_compile
3081cat >config.log <<_ACEOF
3082This file contains any messages produced by compilers while
3083running configure, to aid debugging if configure makes a mistake.
3084
3085It was created by OpenJDK $as_me jdk9, which was
3086generated by GNU Autoconf 2.69.  Invocation command line was
3087
3088  $ $0 $@
3089
3090_ACEOF
3091exec 5>>config.log
3092{
3093cat <<_ASUNAME
3094## --------- ##
3095## Platform. ##
3096## --------- ##
3097
3098hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3099uname -m = `(uname -m) 2>/dev/null || echo unknown`
3100uname -r = `(uname -r) 2>/dev/null || echo unknown`
3101uname -s = `(uname -s) 2>/dev/null || echo unknown`
3102uname -v = `(uname -v) 2>/dev/null || echo unknown`
3103
3104/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3105/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3106
3107/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3108/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3109/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3110/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3111/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3112/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3113/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3114
3115_ASUNAME
3116
3117as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3118for as_dir in $PATH
3119do
3120  IFS=$as_save_IFS
3121  test -z "$as_dir" && as_dir=.
3122    $as_echo "PATH: $as_dir"
3123  done
3124IFS=$as_save_IFS
3125
3126} >&5
3127
3128cat >&5 <<_ACEOF
3129
3130
3131## ----------- ##
3132## Core tests. ##
3133## ----------- ##
3134
3135_ACEOF
3136
3137
3138# Keep a trace of the command line.
3139# Strip out --no-create and --no-recursion so they do not pile up.
3140# Strip out --silent because we don't want to record it for future runs.
3141# Also quote any args containing shell meta-characters.
3142# Make two passes to allow for proper duplicate-argument suppression.
3143ac_configure_args=
3144ac_configure_args0=
3145ac_configure_args1=
3146ac_must_keep_next=false
3147for ac_pass in 1 2
3148do
3149  for ac_arg
3150  do
3151    case $ac_arg in
3152    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3153    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3154    | -silent | --silent | --silen | --sile | --sil)
3155      continue ;;
3156    *\'*)
3157      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3158    esac
3159    case $ac_pass in
3160    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3161    2)
3162      as_fn_append ac_configure_args1 " '$ac_arg'"
3163      if test $ac_must_keep_next = true; then
3164	ac_must_keep_next=false # Got value, back to normal.
3165      else
3166	case $ac_arg in
3167	  *=* | --config-cache | -C | -disable-* | --disable-* \
3168	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3169	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3170	  | -with-* | --with-* | -without-* | --without-* | --x)
3171	    case "$ac_configure_args0 " in
3172	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3173	    esac
3174	    ;;
3175	  -* ) ac_must_keep_next=true ;;
3176	esac
3177      fi
3178      as_fn_append ac_configure_args " '$ac_arg'"
3179      ;;
3180    esac
3181  done
3182done
3183{ ac_configure_args0=; unset ac_configure_args0;}
3184{ ac_configure_args1=; unset ac_configure_args1;}
3185
3186# When interrupted or exit'd, cleanup temporary files, and complete
3187# config.log.  We remove comments because anyway the quotes in there
3188# would cause problems or look ugly.
3189# WARNING: Use '\'' to represent an apostrophe within the trap.
3190# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3191trap 'exit_status=$?
3192  # Save into config.log some information that might help in debugging.
3193  {
3194    echo
3195
3196    $as_echo "## ---------------- ##
3197## Cache variables. ##
3198## ---------------- ##"
3199    echo
3200    # The following way of writing the cache mishandles newlines in values,
3201(
3202  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3203    eval ac_val=\$$ac_var
3204    case $ac_val in #(
3205    *${as_nl}*)
3206      case $ac_var in #(
3207      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3208$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3209      esac
3210      case $ac_var in #(
3211      _ | IFS | as_nl) ;; #(
3212      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3213      *) { eval $ac_var=; unset $ac_var;} ;;
3214      esac ;;
3215    esac
3216  done
3217  (set) 2>&1 |
3218    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3219    *${as_nl}ac_space=\ *)
3220      sed -n \
3221	"s/'\''/'\''\\\\'\'''\''/g;
3222	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3223      ;; #(
3224    *)
3225      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3226      ;;
3227    esac |
3228    sort
3229)
3230    echo
3231
3232    $as_echo "## ----------------- ##
3233## Output variables. ##
3234## ----------------- ##"
3235    echo
3236    for ac_var in $ac_subst_vars
3237    do
3238      eval ac_val=\$$ac_var
3239      case $ac_val in
3240      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3241      esac
3242      $as_echo "$ac_var='\''$ac_val'\''"
3243    done | sort
3244    echo
3245
3246    if test -n "$ac_subst_files"; then
3247      $as_echo "## ------------------- ##
3248## File substitutions. ##
3249## ------------------- ##"
3250      echo
3251      for ac_var in $ac_subst_files
3252      do
3253	eval ac_val=\$$ac_var
3254	case $ac_val in
3255	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3256	esac
3257	$as_echo "$ac_var='\''$ac_val'\''"
3258      done | sort
3259      echo
3260    fi
3261
3262    if test -s confdefs.h; then
3263      $as_echo "## ----------- ##
3264## confdefs.h. ##
3265## ----------- ##"
3266      echo
3267      cat confdefs.h
3268      echo
3269    fi
3270    test "$ac_signal" != 0 &&
3271      $as_echo "$as_me: caught signal $ac_signal"
3272    $as_echo "$as_me: exit $exit_status"
3273  } >&5
3274  rm -f core *.core core.conftest.* &&
3275    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3276    exit $exit_status
3277' 0
3278for ac_signal in 1 2 13 15; do
3279  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3280done
3281ac_signal=0
3282
3283# confdefs.h avoids OS command line length limits that DEFS can exceed.
3284rm -f -r conftest* confdefs.h
3285
3286$as_echo "/* confdefs.h */" > confdefs.h
3287
3288# Predefined preprocessor variables.
3289
3290cat >>confdefs.h <<_ACEOF
3291#define PACKAGE_NAME "$PACKAGE_NAME"
3292_ACEOF
3293
3294cat >>confdefs.h <<_ACEOF
3295#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3296_ACEOF
3297
3298cat >>confdefs.h <<_ACEOF
3299#define PACKAGE_VERSION "$PACKAGE_VERSION"
3300_ACEOF
3301
3302cat >>confdefs.h <<_ACEOF
3303#define PACKAGE_STRING "$PACKAGE_STRING"
3304_ACEOF
3305
3306cat >>confdefs.h <<_ACEOF
3307#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3308_ACEOF
3309
3310cat >>confdefs.h <<_ACEOF
3311#define PACKAGE_URL "$PACKAGE_URL"
3312_ACEOF
3313
3314
3315# Let the site file select an alternate cache file if it wants to.
3316# Prefer an explicitly selected file to automatically selected ones.
3317ac_site_file1=NONE
3318ac_site_file2=NONE
3319if test -n "$CONFIG_SITE"; then
3320  # We do not want a PATH search for config.site.
3321  case $CONFIG_SITE in #((
3322    -*)  ac_site_file1=./$CONFIG_SITE;;
3323    */*) ac_site_file1=$CONFIG_SITE;;
3324    *)   ac_site_file1=./$CONFIG_SITE;;
3325  esac
3326elif test "x$prefix" != xNONE; then
3327  ac_site_file1=$prefix/share/config.site
3328  ac_site_file2=$prefix/etc/config.site
3329else
3330  ac_site_file1=$ac_default_prefix/share/config.site
3331  ac_site_file2=$ac_default_prefix/etc/config.site
3332fi
3333for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3334do
3335  test "x$ac_site_file" = xNONE && continue
3336  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3337    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3338$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3339    sed 's/^/| /' "$ac_site_file" >&5
3340    . "$ac_site_file" \
3341      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3342$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3343as_fn_error $? "failed to load site script $ac_site_file
3344See \`config.log' for more details" "$LINENO" 5; }
3345  fi
3346done
3347
3348if test -r "$cache_file"; then
3349  # Some versions of bash will fail to source /dev/null (special files
3350  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3351  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3352    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3353$as_echo "$as_me: loading cache $cache_file" >&6;}
3354    case $cache_file in
3355      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3356      *)                      . "./$cache_file";;
3357    esac
3358  fi
3359else
3360  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3361$as_echo "$as_me: creating cache $cache_file" >&6;}
3362  >$cache_file
3363fi
3364
3365# Check that the precious variables saved in the cache have kept the same
3366# value.
3367ac_cache_corrupted=false
3368for ac_var in $ac_precious_vars; do
3369  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3370  eval ac_new_set=\$ac_env_${ac_var}_set
3371  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3372  eval ac_new_val=\$ac_env_${ac_var}_value
3373  case $ac_old_set,$ac_new_set in
3374    set,)
3375      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3376$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3377      ac_cache_corrupted=: ;;
3378    ,set)
3379      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3380$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3381      ac_cache_corrupted=: ;;
3382    ,);;
3383    *)
3384      if test "x$ac_old_val" != "x$ac_new_val"; then
3385	# differences in whitespace do not lead to failure.
3386	ac_old_val_w=`echo x $ac_old_val`
3387	ac_new_val_w=`echo x $ac_new_val`
3388	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3389	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3390$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3391	  ac_cache_corrupted=:
3392	else
3393	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3394$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3395	  eval $ac_var=\$ac_old_val
3396	fi
3397	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3398$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3399	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3400$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3401      fi;;
3402  esac
3403  # Pass precious variables to config.status.
3404  if test "$ac_new_set" = set; then
3405    case $ac_new_val in
3406    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3407    *) ac_arg=$ac_var=$ac_new_val ;;
3408    esac
3409    case " $ac_configure_args " in
3410      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3411      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3412    esac
3413  fi
3414done
3415if $ac_cache_corrupted; then
3416  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3417$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3418  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3419$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3420  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3421fi
3422## -------------------- ##
3423## Main body of script. ##
3424## -------------------- ##
3425
3426ac_ext=c
3427ac_cpp='$CPP $CPPFLAGS'
3428ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3429ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3430ac_compiler_gnu=$ac_cv_c_compiler_gnu
3431
3432
3433
3434ac_aux_dir=
3435for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3436  if test -f "$ac_dir/install-sh"; then
3437    ac_aux_dir=$ac_dir
3438    ac_install_sh="$ac_aux_dir/install-sh -c"
3439    break
3440  elif test -f "$ac_dir/install.sh"; then
3441    ac_aux_dir=$ac_dir
3442    ac_install_sh="$ac_aux_dir/install.sh -c"
3443    break
3444  elif test -f "$ac_dir/shtool"; then
3445    ac_aux_dir=$ac_dir
3446    ac_install_sh="$ac_aux_dir/shtool install -c"
3447    break
3448  fi
3449done
3450if test -z "$ac_aux_dir"; then
3451  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
3452fi
3453
3454# These three variables are undocumented and unsupported,
3455# and are intended to be withdrawn in a future Autoconf release.
3456# They can cause serious problems if a builder's source tree is in a directory
3457# whose full name contains unusual characters.
3458ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3459ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3460ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3461
3462
3463# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3464
3465#
3466# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3467# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3468#
3469# This code is free software; you can redistribute it and/or modify it
3470# under the terms of the GNU General Public License version 2 only, as
3471# published by the Free Software Foundation.  Oracle designates this
3472# particular file as subject to the "Classpath" exception as provided
3473# by Oracle in the LICENSE file that accompanied this code.
3474#
3475# This code is distributed in the hope that it will be useful, but WITHOUT
3476# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3477# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3478# version 2 for more details (a copy is included in the LICENSE file that
3479# accompanied this code).
3480#
3481# You should have received a copy of the GNU General Public License version
3482# 2 along with this work; if not, write to the Free Software Foundation,
3483# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3484#
3485# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3486# or visit www.oracle.com if you need additional information or have any
3487# questions.
3488#
3489
3490#
3491# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3492#
3493# This program is free software; you can redistribute it and/or modify
3494# it under the terms of the GNU General Public License as published by
3495# the Free Software Foundation; either version 2 of the License, or
3496# (at your option) any later version.
3497#
3498# This program is distributed in the hope that it will be useful, but
3499# WITHOUT ANY WARRANTY; without even the implied warranty of
3500# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3501# General Public License for more details.
3502#
3503# You should have received a copy of the GNU General Public License
3504# along with this program; if not, write to the Free Software
3505# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3506#
3507# As a special exception to the GNU General Public License, if you
3508# distribute this file as part of a program that contains a
3509# configuration script generated by Autoconf, you may include it under
3510# the same distribution terms that you use for the rest of that program.
3511
3512# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3513# ----------------------------------
3514# PKG_PROG_PKG_CONFIG
3515
3516# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3517#
3518# Check to see whether a particular set of modules exists.  Similar
3519# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3520#
3521#
3522# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3523# this or PKG_CHECK_MODULES is called, or make sure to call
3524# PKG_CHECK_EXISTS manually
3525# --------------------------------------------------------------
3526
3527
3528
3529# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3530# ---------------------------------------------
3531# _PKG_CONFIG
3532
3533# _PKG_SHORT_ERRORS_SUPPORTED
3534# -----------------------------
3535# _PKG_SHORT_ERRORS_SUPPORTED
3536
3537
3538# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3539# [ACTION-IF-NOT-FOUND])
3540#
3541#
3542# Note that if there is a possibility the first call to
3543# PKG_CHECK_MODULES might not happen, you should be sure to include an
3544# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3545#
3546#
3547# --------------------------------------------------------------
3548# PKG_CHECK_MODULES
3549
3550
3551# Include these first...
3552#
3553# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3554# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3555#
3556# This code is free software; you can redistribute it and/or modify it
3557# under the terms of the GNU General Public License version 2 only, as
3558# published by the Free Software Foundation.  Oracle designates this
3559# particular file as subject to the "Classpath" exception as provided
3560# by Oracle in the LICENSE file that accompanied this code.
3561#
3562# This code is distributed in the hope that it will be useful, but WITHOUT
3563# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3564# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3565# version 2 for more details (a copy is included in the LICENSE file that
3566# accompanied this code).
3567#
3568# You should have received a copy of the GNU General Public License version
3569# 2 along with this work; if not, write to the Free Software Foundation,
3570# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3571#
3572# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3573# or visit www.oracle.com if you need additional information or have any
3574# questions.
3575#
3576
3577# Create a function/macro that takes a series of named arguments. The call is
3578# similar to AC_DEFUN, but the setup of the function looks like this:
3579# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3580# ... do something
3581#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3582# ])
3583# A star (*) in front of a named argument means that it is required and it's
3584# presence will be verified. To pass e.g. the first value as a normal indexed
3585# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3586# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3587# "ARG_FOO".
3588#
3589# The generated function can be called like this:
3590# MYFUNC(FOO: [foo-val],
3591#     BAR: [
3592#         $ECHO hello world
3593#     ])
3594# Note that the argument value must start on the same line as the argument name.
3595#
3596# Argument 1: Name of the function to define
3597# Argument 2: List of legal named arguments, with a * prefix for required arguments
3598# Argument 3: Argument array to treat as named, typically $@
3599# Argument 4: The main function body
3600
3601
3602# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3603# If so, then append $1 to $2 \
3604# Also set JVM_ARG_OK to true/false depending on outcome.
3605
3606
3607# Appends a string to a path variable, only adding the : when needed.
3608
3609
3610# Prepends a string to a path variable, only adding the : when needed.
3611
3612
3613# This will make sure the given variable points to a full and proper
3614# path. This means:
3615# 1) There will be no spaces in the path. On unix platforms,
3616#    spaces in the path will result in an error. On Windows,
3617#    the path will be rewritten using short-style to be space-free.
3618# 2) The path will be absolute, and it will be in unix-style (on
3619#     cygwin).
3620# $1: The name of the variable to fix
3621
3622
3623# This will make sure the given variable points to a executable
3624# with a full and proper path. This means:
3625# 1) There will be no spaces in the path. On unix platforms,
3626#    spaces in the path will result in an error. On Windows,
3627#    the path will be rewritten using short-style to be space-free.
3628# 2) The path will be absolute, and it will be in unix-style (on
3629#     cygwin).
3630# Any arguments given to the executable is preserved.
3631# If the input variable does not have a directory specification, then
3632# it need to be in the PATH.
3633# $1: The name of the variable to fix
3634
3635
3636
3637
3638# Register a --with argument but mark it as deprecated
3639# $1: The name of the with argument to deprecate, not including --with-
3640
3641
3642# Register a --enable argument but mark it as deprecated
3643# $1: The name of the with argument to deprecate, not including --enable-
3644# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3645# $3: Messages to user.
3646
3647
3648
3649
3650# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3651# $1: variable to check
3652
3653
3654# Check that there are no unprocessed overridden variables left.
3655# If so, they are an incorrect argument and we will exit with an error.
3656
3657
3658# Setup a tool for the given variable. If correctly specified by the user,
3659# use that value, otherwise search for the tool using the supplied code snippet.
3660# $1: variable to set
3661# $2: code snippet to call to look for the tool
3662# $3: code snippet to call if variable was used to find tool
3663
3664
3665# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3666# $1: variable to set
3667# $2: executable name (or list of names) to look for
3668# $3: [path]
3669
3670
3671# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3672# $1: variable to set
3673# $2: executable name (or list of names) to look for
3674
3675
3676# Like BASIC_PATH_PROGS but fails if no tool was found.
3677# $1: variable to set
3678# $2: executable name (or list of names) to look for
3679# $3: [path]
3680
3681
3682# Like BASIC_SETUP_TOOL but fails if no tool was found.
3683# $1: variable to set
3684# $2: autoconf macro to call to look for the special tool
3685
3686
3687# Setup the most fundamental tools that relies on not much else to set up,
3688# but is used by much of the early bootstrap code.
3689
3690
3691# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3692
3693
3694# Evaluates platform specific overrides for devkit variables.
3695# $1: Name of variable
3696
3697
3698
3699
3700
3701
3702#%%% Simple tools %%%
3703
3704# Check if we have found a usable version of make
3705# $1: the path to a potential make binary (or empty)
3706# $2: the description on how we found this
3707
3708
3709
3710
3711# Goes looking for a usable version of GNU make.
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722# Check if build directory is on local disk. If not possible to determine,
3723# we prefer to claim it's local.
3724# Argument 1: directory to test
3725# Argument 2: what to do if it is on local disk
3726# Argument 3: what to do otherwise (remote disk or failure)
3727
3728
3729# Check that source files have basic read permissions set. This might
3730# not be the case in cygwin in certain conditions.
3731
3732
3733
3734
3735# Check for support for specific options in bash
3736
3737
3738################################################################################
3739#
3740# Default make target
3741#
3742
3743
3744# Code to run after AC_OUTPUT
3745
3746
3747#
3748# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3749# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3750#
3751# This code is free software; you can redistribute it and/or modify it
3752# under the terms of the GNU General Public License version 2 only, as
3753# published by the Free Software Foundation.  Oracle designates this
3754# particular file as subject to the "Classpath" exception as provided
3755# by Oracle in the LICENSE file that accompanied this code.
3756#
3757# This code is distributed in the hope that it will be useful, but WITHOUT
3758# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3759# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3760# version 2 for more details (a copy is included in the LICENSE file that
3761# accompanied this code).
3762#
3763# You should have received a copy of the GNU General Public License version
3764# 2 along with this work; if not, write to the Free Software Foundation,
3765# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3766#
3767# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3768# or visit www.oracle.com if you need additional information or have any
3769# questions.
3770#
3771
3772
3773
3774
3775
3776# Helper function which possibly converts a path using DOS-style short mode.
3777# If so, the updated path is stored in $new_path.
3778# $1: The path to check
3779
3780
3781# Helper function which possibly converts a path using DOS-style short mode.
3782# If so, the updated path is stored in $new_path.
3783# $1: The path to check
3784
3785
3786# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3787# and could probably be heavily simplified. However, all changes in this
3788# area tend to need lot of testing in different scenarios, and in lack of
3789# proper unit testing, cleaning this up has not been deemed worth the effort
3790# at the moment.
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3801
3802
3803
3804
3805# ... then the rest
3806#
3807# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3808# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3809#
3810# This code is free software; you can redistribute it and/or modify it
3811# under the terms of the GNU General Public License version 2 only, as
3812# published by the Free Software Foundation.  Oracle designates this
3813# particular file as subject to the "Classpath" exception as provided
3814# by Oracle in the LICENSE file that accompanied this code.
3815#
3816# This code is distributed in the hope that it will be useful, but WITHOUT
3817# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3818# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3819# version 2 for more details (a copy is included in the LICENSE file that
3820# accompanied this code).
3821#
3822# You should have received a copy of the GNU General Public License version
3823# 2 along with this work; if not, write to the Free Software Foundation,
3824# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3825#
3826# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3827# or visit www.oracle.com if you need additional information or have any
3828# questions.
3829#
3830
3831########################################################################
3832# This file handles detection of the Boot JDK. The Boot JDK detection
3833# process has been developed as a response to solve a complex real-world
3834# problem. Initially, it was simple, but it has grown as platform after
3835# platform, idiosyncracy after idiosyncracy has been supported.
3836#
3837# The basic idea is this:
3838# 1) You need an acceptable *) JDK to use as a Boot JDK
3839# 2) There are several ways to locate a JDK, that are mostly platform
3840#    dependent **)
3841# 3) You can have multiple JDKs installed
3842# 4) If possible, configure should try to dig out an acceptable JDK
3843#    automatically, without having to resort to command-line options
3844#
3845# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3846#     javac) and not a JRE, etc.
3847#
3848# **) On Windows we typically use a well-known path.
3849#     On MacOSX we typically use the tool java_home.
3850#     On Linux we typically find javac in the $PATH, and then follow a
3851#     chain of symlinks that often ends up in a real JDK.
3852#
3853# This leads to the code where we check in different ways to locate a
3854# JDK, and if one is found, check if it is acceptable. If not, we print
3855# our reasons for rejecting it (useful when debugging non-working
3856# configure situations) and continue checking the next one.
3857########################################################################
3858
3859# Execute the check given as argument, and verify the result
3860# If the Boot JDK was previously found, do nothing
3861# $1 A command line (typically autoconf macro) to execute
3862
3863
3864# Test: Is bootjdk explicitly set by command line arguments?
3865
3866
3867# Test: Is $JAVA_HOME set?
3868
3869
3870# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3871
3872
3873# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3874# $1: Argument to the java_home binary (optional)
3875
3876
3877# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3878
3879
3880# Look for a jdk in the given path. If there are multiple, try to select the newest.
3881# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3882# $1 = Path to directory containing jdk installations.
3883# $2 = String to append to the found JDK directory to get the proper JDK home
3884
3885
3886# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3887# environmental variable as base for where to look.
3888# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3889
3890
3891# Test: Is there a JDK installed in default, well-known locations?
3892
3893
3894# Check that a command-line tool in the Boot JDK is correct
3895# $1 = name of variable to assign
3896# $2 = name of binary
3897
3898
3899###############################################################################
3900#
3901# We need a Boot JDK to bootstrap the build.
3902#
3903
3904
3905
3906
3907
3908# BUILD_JDK: the location of the latest JDK that can run
3909#   on the host system and supports the target class file version
3910#   generated in this JDK build.  This variable should only be
3911#   used after the launchers are built.
3912#
3913
3914# Execute the check given as argument, and verify the result.
3915# If the JDK was previously found, do nothing.
3916# $1 A command line (typically autoconf macro) to execute
3917
3918
3919# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3920# is different than the host system doing the build (e.g. cross-compilation),
3921# a special BUILD_JDK is built as part of the build process.  An external
3922# prebuilt BUILD_JDK can also be supplied.
3923
3924
3925#
3926# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3927# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3928#
3929# This code is free software; you can redistribute it and/or modify it
3930# under the terms of the GNU General Public License version 2 only, as
3931# published by the Free Software Foundation.  Oracle designates this
3932# particular file as subject to the "Classpath" exception as provided
3933# by Oracle in the LICENSE file that accompanied this code.
3934#
3935# This code is distributed in the hope that it will be useful, but WITHOUT
3936# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3937# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3938# version 2 for more details (a copy is included in the LICENSE file that
3939# accompanied this code).
3940#
3941# You should have received a copy of the GNU General Public License version
3942# 2 along with this work; if not, write to the Free Software Foundation,
3943# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3944#
3945# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3946# or visit www.oracle.com if you need additional information or have any
3947# questions.
3948#
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966################################################################################
3967#
3968# Runs icecc-create-env once and prints the error if it fails
3969#
3970# $1: arguments to icecc-create-env
3971# $2: log file
3972#
3973
3974
3975################################################################################
3976#
3977# Optionally enable distributed compilation of native code using icecc/icecream
3978#
3979
3980
3981
3982
3983
3984
3985
3986#
3987# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3988# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3989#
3990# This code is free software; you can redistribute it and/or modify it
3991# under the terms of the GNU General Public License version 2 only, as
3992# published by the Free Software Foundation.  Oracle designates this
3993# particular file as subject to the "Classpath" exception as provided
3994# by Oracle in the LICENSE file that accompanied this code.
3995#
3996# This code is distributed in the hope that it will be useful, but WITHOUT
3997# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3998# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3999# version 2 for more details (a copy is included in the LICENSE file that
4000# accompanied this code).
4001#
4002# You should have received a copy of the GNU General Public License version
4003# 2 along with this work; if not, write to the Free Software Foundation,
4004# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4005#
4006# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4007# or visit www.oracle.com if you need additional information or have any
4008# questions.
4009#
4010
4011################################################################################
4012#
4013# Setup ABI profile (for arm)
4014#
4015
4016
4017# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4018# corresponding configure arguments instead
4019
4020
4021# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4022# that configure can use them while detecting compilers.
4023# TOOLCHAIN_TYPE is available here.
4024# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4025
4026
4027
4028
4029
4030
4031# Documentation on common flags used for solstudio in HIGHEST.
4032#
4033# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4034#          done with care, there are some assumptions below that need to
4035#          be understood about the use of pointers, and IEEE behavior.
4036#
4037# -fns: Use non-standard floating point mode (not IEEE 754)
4038# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4039# -fsingle: Use single precision floating point with 'float'
4040# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4041#   (Source with excessing pointer casting and data access with mixed
4042#    pointer types are not recommended)
4043# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4044#   (If you expect perfect errno behavior, do not use this)
4045# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4046# -xrestrict: Pointer parameters to functions do not overlap
4047#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4048#    If you pass in multiple pointers to the same data, do not use this)
4049# -xlibmil: Inline some library routines
4050#   (If you expect perfect errno behavior, do not use this)
4051# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4052#   (If you expect perfect errno behavior, do not use this)
4053#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4054
4055    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4056    # Bug?
4057    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4058    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4059    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4060    #fi
4061
4062
4063
4064
4065
4066
4067################################################################################
4068# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4069#      conditionals against.
4070# $2 - Optional prefix for each variable defined.
4071
4072
4073# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4074#                                  IF_FALSE: [RUN-IF-FALSE])
4075# ------------------------------------------------------------
4076# Check that the C compiler supports an argument
4077
4078
4079
4080
4081# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4082#                                    IF_FALSE: [RUN-IF-FALSE])
4083# ------------------------------------------------------------
4084# Check that the C++ compiler supports an argument
4085
4086
4087
4088
4089# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4090#                                IF_FALSE: [RUN-IF-FALSE])
4091# ------------------------------------------------------------
4092# Check that the C and C++ compilers support an argument
4093
4094
4095
4096
4097# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4098#                                   IF_FALSE: [RUN-IF-FALSE])
4099# ------------------------------------------------------------
4100# Check that the linker support an argument
4101
4102
4103
4104
4105
4106
4107# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4108# Arguments:
4109# $1 - Optional prefix for each variable defined.
4110
4111
4112#
4113# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4114# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4115#
4116# This code is free software; you can redistribute it and/or modify it
4117# under the terms of the GNU General Public License version 2 only, as
4118# published by the Free Software Foundation.  Oracle designates this
4119# particular file as subject to the "Classpath" exception as provided
4120# by Oracle in the LICENSE file that accompanied this code.
4121#
4122# This code is distributed in the hope that it will be useful, but WITHOUT
4123# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4124# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4125# version 2 for more details (a copy is included in the LICENSE file that
4126# accompanied this code).
4127#
4128# You should have received a copy of the GNU General Public License version
4129# 2 along with this work; if not, write to the Free Software Foundation,
4130# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4131#
4132# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4133# or visit www.oracle.com if you need additional information or have any
4134# questions.
4135#
4136
4137
4138
4139
4140
4141cygwin_help() {
4142  case $1 in
4143    unzip)
4144      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4145      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4146      ;;
4147    zip)
4148      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4149      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4150      ;;
4151    make)
4152      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4153      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4154      ;;
4155    freetype)
4156      HELP_MSG="
4157The freetype library can now be build during the configure process.
4158Download the freetype sources and unpack them into an arbitrary directory:
4159
4160wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4161tar -xzf freetype-2.5.3.tar.gz
4162
4163Then run configure with '--with-freetype-src=<freetype_src>'. This will
4164automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4165builds or into '<freetype_src>/lib32' for 32-bit builds.
4166Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4167and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4168
4169Alternatively you can unpack the sources like this to use the default directory:
4170
4171tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4172      ;;
4173  esac
4174}
4175
4176msys_help() {
4177  PKGHANDLER_COMMAND=""
4178}
4179
4180apt_help() {
4181  case $1 in
4182    reduced)
4183      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4184    devkit)
4185      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4186    openjdk)
4187      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4188    alsa)
4189      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4190    cups)
4191      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4192    freetype)
4193      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4194    ffi)
4195      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4196    x11)
4197      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4198    ccache)
4199      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4200    dtrace)
4201      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4202    elf)
4203      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4204  esac
4205}
4206
4207yum_help() {
4208  case $1 in
4209    devkit)
4210      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4211    openjdk)
4212      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4213    alsa)
4214      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4215    cups)
4216      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4217    freetype)
4218      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4219    x11)
4220      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4221    ccache)
4222      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4223    elf)
4224      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4225  esac
4226}
4227
4228brew_help() {
4229  case $1 in
4230    openjdk)
4231      PKGHANDLER_COMMAND="brew cask install java" ;;
4232    freetype)
4233      PKGHANDLER_COMMAND="brew install freetype" ;;
4234    ccache)
4235      PKGHANDLER_COMMAND="brew install ccache" ;;
4236  esac
4237}
4238
4239port_help() {
4240  PKGHANDLER_COMMAND=""
4241}
4242
4243pkgutil_help() {
4244  PKGHANDLER_COMMAND=""
4245}
4246
4247pkgadd_help() {
4248  PKGHANDLER_COMMAND=""
4249}
4250
4251# This function will check if we're called from the "configure" wrapper while
4252# printing --help. If so, we will print out additional information that can
4253# only be extracted within the autoconf script, and then exit. This must be
4254# called at the very beginning in configure.ac.
4255
4256
4257
4258
4259
4260
4261#
4262# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4263# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4264#
4265# This code is free software; you can redistribute it and/or modify it
4266# under the terms of the GNU General Public License version 2 only, as
4267# published by the Free Software Foundation.  Oracle designates this
4268# particular file as subject to the "Classpath" exception as provided
4269# by Oracle in the LICENSE file that accompanied this code.
4270#
4271# This code is distributed in the hope that it will be useful, but WITHOUT
4272# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4273# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4274# version 2 for more details (a copy is included in the LICENSE file that
4275# accompanied this code).
4276#
4277# You should have received a copy of the GNU General Public License version
4278# 2 along with this work; if not, write to the Free Software Foundation,
4279# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4280#
4281# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4282# or visit www.oracle.com if you need additional information or have any
4283# questions.
4284#
4285
4286# All valid JVM features, regardless of platform
4287VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4288    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4289    static-build link-time-opt aot"
4290
4291# All valid JVM variants
4292VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4293
4294###############################################################################
4295# Check if the specified JVM variant should be built. To be used in shell if
4296# constructs, like this:
4297# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4298#
4299# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4300
4301# Definition kept in one line to allow inlining in if statements.
4302# Additional [] needed to keep m4 from mangling shell constructs.
4303
4304
4305###############################################################################
4306# Check if the specified JVM features are explicitly enabled. To be used in
4307# shell if constructs, like this:
4308# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4309#
4310# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4311
4312# Definition kept in one line to allow inlining in if statements.
4313# Additional [] needed to keep m4 from mangling shell constructs.
4314
4315
4316###############################################################################
4317# Check which variants of the JVM that we want to build. Available variants are:
4318#   server: normal interpreter, and a tiered C1/C2 compiler
4319#   client: normal interpreter, and C1 (no C2 compiler)
4320#   minimal: reduced form of client with optional features stripped out
4321#   core: normal interpreter only, no compiler
4322#   zero: C++ based interpreter only, no compiler
4323#   zeroshark: C++ based interpreter, and a llvm-based compiler
4324#   custom: baseline JVM with no default features
4325#
4326
4327
4328###############################################################################
4329# Check if dtrace should be enabled and has all prerequisites present.
4330#
4331
4332
4333################################################################################
4334# Check if AOT should be enabled
4335#
4336
4337
4338###############################################################################
4339# Set up all JVM features for each JVM variant.
4340#
4341
4342
4343###############################################################################
4344# Validate JVM features once all setup is complete, including custom setup.
4345#
4346
4347
4348################################################################################
4349#
4350# Specify which sources will be used to build the 64-bit ARM port
4351#
4352# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4353# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4354#
4355
4356
4357
4358################################################################################
4359# Check if gtest should be built
4360#
4361
4362
4363#
4364# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4365# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4366#
4367# This code is free software; you can redistribute it and/or modify it
4368# under the terms of the GNU General Public License version 2 only, as
4369# published by the Free Software Foundation.  Oracle designates this
4370# particular file as subject to the "Classpath" exception as provided
4371# by Oracle in the LICENSE file that accompanied this code.
4372#
4373# This code is distributed in the hope that it will be useful, but WITHOUT
4374# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4375# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4376# version 2 for more details (a copy is included in the LICENSE file that
4377# accompanied this code).
4378#
4379# You should have received a copy of the GNU General Public License version
4380# 2 along with this work; if not, write to the Free Software Foundation,
4381# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4382#
4383# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4384# or visit www.oracle.com if you need additional information or have any
4385# questions.
4386#
4387
4388###############################################################################
4389# Check which variant of the JDK that we want to build.
4390# Currently we have:
4391#    normal:   standard edition
4392# but the custom make system may add other variants
4393#
4394# Effectively the JDK variant gives a name to a specific set of
4395# modules to compile into the JDK.
4396
4397
4398###############################################################################
4399# Set the debug level
4400#    release: no debug information, all optimizations, no asserts.
4401#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4402#    fastdebug: debug information (-g), all optimizations, all asserts
4403#    slowdebug: debug information (-g), no optimizations, all asserts
4404
4405
4406###############################################################################
4407#
4408# Should we build only OpenJDK even if closed sources are present?
4409#
4410
4411
4412
4413
4414###############################################################################
4415#
4416# Enable or disable the elliptic curve crypto implementation
4417#
4418
4419
4420
4421
4422################################################################################
4423#
4424# Gcov coverage data for hotspot
4425#
4426
4427
4428################################################################################
4429#
4430# Static build support.  When enabled will generate static
4431# libraries instead of shared libraries for all JDK libs.
4432#
4433
4434
4435################################################################################
4436#
4437# jlink options.
4438# We always keep packaged modules in JDK image.
4439#
4440
4441
4442################################################################################
4443#
4444# Check if building of the jtreg failure handler should be enabled.
4445#
4446
4447
4448################################################################################
4449#
4450# Enable or disable generation of the classlist at build time
4451#
4452
4453
4454#
4455# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4456# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4457#
4458# This code is free software; you can redistribute it and/or modify it
4459# under the terms of the GNU General Public License version 2 only, as
4460# published by the Free Software Foundation.  Oracle designates this
4461# particular file as subject to the "Classpath" exception as provided
4462# by Oracle in the LICENSE file that accompanied this code.
4463#
4464# This code is distributed in the hope that it will be useful, but WITHOUT
4465# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4466# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4467# version 2 for more details (a copy is included in the LICENSE file that
4468# accompanied this code).
4469#
4470# You should have received a copy of the GNU General Public License version
4471# 2 along with this work; if not, write to the Free Software Foundation,
4472# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4473#
4474# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4475# or visit www.oracle.com if you need additional information or have any
4476# questions.
4477#
4478
4479###############################################################################
4480#
4481# Setup version numbers
4482#
4483
4484# Verify that a given string represents a valid version number, and assign it
4485# to a variable.
4486
4487# Argument 1: the variable to assign to
4488# Argument 2: the value given by the user
4489
4490
4491
4492
4493#
4494# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4495# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4496#
4497# This code is free software; you can redistribute it and/or modify it
4498# under the terms of the GNU General Public License version 2 only, as
4499# published by the Free Software Foundation.  Oracle designates this
4500# particular file as subject to the "Classpath" exception as provided
4501# by Oracle in the LICENSE file that accompanied this code.
4502#
4503# This code is distributed in the hope that it will be useful, but WITHOUT
4504# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4505# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4506# version 2 for more details (a copy is included in the LICENSE file that
4507# accompanied this code).
4508#
4509# You should have received a copy of the GNU General Public License version
4510# 2 along with this work; if not, write to the Free Software Foundation,
4511# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4512#
4513# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4514# or visit www.oracle.com if you need additional information or have any
4515# questions.
4516#
4517
4518# Major library component reside in separate files.
4519#
4520# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4521# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4522#
4523# This code is free software; you can redistribute it and/or modify it
4524# under the terms of the GNU General Public License version 2 only, as
4525# published by the Free Software Foundation.  Oracle designates this
4526# particular file as subject to the "Classpath" exception as provided
4527# by Oracle in the LICENSE file that accompanied this code.
4528#
4529# This code is distributed in the hope that it will be useful, but WITHOUT
4530# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4531# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4532# version 2 for more details (a copy is included in the LICENSE file that
4533# accompanied this code).
4534#
4535# You should have received a copy of the GNU General Public License version
4536# 2 along with this work; if not, write to the Free Software Foundation,
4537# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4538#
4539# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4540# or visit www.oracle.com if you need additional information or have any
4541# questions.
4542#
4543
4544################################################################################
4545# Setup alsa (Advanced Linux Sound Architecture)
4546################################################################################
4547
4548
4549#
4550# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4551# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4552#
4553# This code is free software; you can redistribute it and/or modify it
4554# under the terms of the GNU General Public License version 2 only, as
4555# published by the Free Software Foundation.  Oracle designates this
4556# particular file as subject to the "Classpath" exception as provided
4557# by Oracle in the LICENSE file that accompanied this code.
4558#
4559# This code is distributed in the hope that it will be useful, but WITHOUT
4560# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4561# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4562# version 2 for more details (a copy is included in the LICENSE file that
4563# accompanied this code).
4564#
4565# You should have received a copy of the GNU General Public License version
4566# 2 along with this work; if not, write to the Free Software Foundation,
4567# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4568#
4569# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4570# or visit www.oracle.com if you need additional information or have any
4571# questions.
4572#
4573
4574################################################################################
4575# Setup bundled libraries.
4576#
4577# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4578# OpenJDK repository. Default is to use these libraries as bundled, but they
4579# might be replaced by en external version by the user.
4580################################################################################
4581
4582
4583################################################################################
4584# Setup libjpeg
4585################################################################################
4586
4587
4588################################################################################
4589# Setup giflib
4590################################################################################
4591
4592
4593################################################################################
4594# Setup libpng
4595################################################################################
4596
4597
4598################################################################################
4599# Setup zlib
4600################################################################################
4601
4602
4603################################################################################
4604# Setup lcms (Little CMS)
4605################################################################################
4606
4607
4608#
4609# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4610# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4611#
4612# This code is free software; you can redistribute it and/or modify it
4613# under the terms of the GNU General Public License version 2 only, as
4614# published by the Free Software Foundation.  Oracle designates this
4615# particular file as subject to the "Classpath" exception as provided
4616# by Oracle in the LICENSE file that accompanied this code.
4617#
4618# This code is distributed in the hope that it will be useful, but WITHOUT
4619# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4620# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4621# version 2 for more details (a copy is included in the LICENSE file that
4622# accompanied this code).
4623#
4624# You should have received a copy of the GNU General Public License version
4625# 2 along with this work; if not, write to the Free Software Foundation,
4626# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4627#
4628# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4629# or visit www.oracle.com if you need additional information or have any
4630# questions.
4631#
4632
4633################################################################################
4634# Setup cups (Common Unix Printing System)
4635################################################################################
4636
4637
4638#
4639# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4640# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4641#
4642# This code is free software; you can redistribute it and/or modify it
4643# under the terms of the GNU General Public License version 2 only, as
4644# published by the Free Software Foundation.  Oracle designates this
4645# particular file as subject to the "Classpath" exception as provided
4646# by Oracle in the LICENSE file that accompanied this code.
4647#
4648# This code is distributed in the hope that it will be useful, but WITHOUT
4649# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4650# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4651# version 2 for more details (a copy is included in the LICENSE file that
4652# accompanied this code).
4653#
4654# You should have received a copy of the GNU General Public License version
4655# 2 along with this work; if not, write to the Free Software Foundation,
4656# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4657#
4658# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4659# or visit www.oracle.com if you need additional information or have any
4660# questions.
4661#
4662
4663################################################################################
4664# Setup libffi (Foreign Function Interface)
4665################################################################################
4666
4667
4668#
4669# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4670# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4671#
4672# This code is free software; you can redistribute it and/or modify it
4673# under the terms of the GNU General Public License version 2 only, as
4674# published by the Free Software Foundation.  Oracle designates this
4675# particular file as subject to the "Classpath" exception as provided
4676# by Oracle in the LICENSE file that accompanied this code.
4677#
4678# This code is distributed in the hope that it will be useful, but WITHOUT
4679# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4680# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4681# version 2 for more details (a copy is included in the LICENSE file that
4682# accompanied this code).
4683#
4684# You should have received a copy of the GNU General Public License version
4685# 2 along with this work; if not, write to the Free Software Foundation,
4686# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4687#
4688# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4689# or visit www.oracle.com if you need additional information or have any
4690# questions.
4691#
4692
4693################################################################################
4694# Build the freetype lib from source
4695################################################################################
4696
4697
4698################################################################################
4699# Check if a potential freeype library match is correct and usable
4700################################################################################
4701
4702
4703################################################################################
4704# Setup freetype (The FreeType2 font rendering library)
4705################################################################################
4706
4707
4708#
4709# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4710# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4711#
4712# This code is free software; you can redistribute it and/or modify it
4713# under the terms of the GNU General Public License version 2 only, as
4714# published by the Free Software Foundation.  Oracle designates this
4715# particular file as subject to the "Classpath" exception as provided
4716# by Oracle in the LICENSE file that accompanied this code.
4717#
4718# This code is distributed in the hope that it will be useful, but WITHOUT
4719# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4720# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4721# version 2 for more details (a copy is included in the LICENSE file that
4722# accompanied this code).
4723#
4724# You should have received a copy of the GNU General Public License version
4725# 2 along with this work; if not, write to the Free Software Foundation,
4726# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4727#
4728# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4729# or visit www.oracle.com if you need additional information or have any
4730# questions.
4731#
4732
4733################################################################################
4734# Setup the standard C/C++ runtime libraries.
4735#
4736# Most importantly, determine if stdc++ should be linked statically or
4737# dynamically.
4738################################################################################
4739
4740
4741#
4742# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4743# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4744#
4745# This code is free software; you can redistribute it and/or modify it
4746# under the terms of the GNU General Public License version 2 only, as
4747# published by the Free Software Foundation.  Oracle designates this
4748# particular file as subject to the "Classpath" exception as provided
4749# by Oracle in the LICENSE file that accompanied this code.
4750#
4751# This code is distributed in the hope that it will be useful, but WITHOUT
4752# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4753# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4754# version 2 for more details (a copy is included in the LICENSE file that
4755# accompanied this code).
4756#
4757# You should have received a copy of the GNU General Public License version
4758# 2 along with this work; if not, write to the Free Software Foundation,
4759# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4760#
4761# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4762# or visit www.oracle.com if you need additional information or have any
4763# questions.
4764#
4765
4766################################################################################
4767# Setup X11 Windows system
4768################################################################################
4769
4770
4771
4772################################################################################
4773# Determine which libraries are needed for this configuration
4774################################################################################
4775
4776
4777################################################################################
4778# Parse library options, and setup needed libraries
4779################################################################################
4780
4781
4782################################################################################
4783# Setup llvm (Low-Level VM)
4784################################################################################
4785
4786
4787################################################################################
4788# Setup various libraries, typically small system libraries
4789################################################################################
4790
4791
4792################################################################################
4793# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4794# redistribute it in the test image.
4795################################################################################
4796
4797
4798
4799#
4800# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4801# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4802#
4803# This code is free software; you can redistribute it and/or modify it
4804# under the terms of the GNU General Public License version 2 only, as
4805# published by the Free Software Foundation.  Oracle designates this
4806# particular file as subject to the "Classpath" exception as provided
4807# by Oracle in the LICENSE file that accompanied this code.
4808#
4809# This code is distributed in the hope that it will be useful, but WITHOUT
4810# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4811# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4812# version 2 for more details (a copy is included in the LICENSE file that
4813# accompanied this code).
4814#
4815# You should have received a copy of the GNU General Public License version
4816# 2 along with this work; if not, write to the Free Software Foundation,
4817# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4818#
4819# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4820# or visit www.oracle.com if you need additional information or have any
4821# questions.
4822#
4823
4824# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4825# Converts autoconf style CPU name to OpenJDK style, into
4826# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4827
4828
4829# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4830# Converts autoconf style OS name to OpenJDK style, into
4831# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4832
4833
4834# Expects $host_os $host_cpu $build_os and $build_cpu
4835# and $with_target_bits to have been setup!
4836#
4837# Translate the standard triplet(quadruplet) definition
4838# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4839# OPENJDK_BUILD_OS, etc.
4840
4841
4842# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4843# accordingly. Must be done after setting up build and target system, but before
4844# doing anything else with these values.
4845
4846
4847# Setup the legacy variables, for controlling the old makefiles.
4848#
4849
4850
4851# $1 - Either TARGET or BUILD to setup the variables for.
4852
4853
4854
4855
4856#%%% Build and target systems %%%
4857
4858
4859
4860
4861# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4862# Add -mX to various FLAGS variables.
4863
4864
4865
4866
4867
4868
4869#
4870# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4871# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4872#
4873# This code is free software; you can redistribute it and/or modify it
4874# under the terms of the GNU General Public License version 2 only, as
4875# published by the Free Software Foundation.  Oracle designates this
4876# particular file as subject to the "Classpath" exception as provided
4877# by Oracle in the LICENSE file that accompanied this code.
4878#
4879# This code is distributed in the hope that it will be useful, but WITHOUT
4880# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4881# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4882# version 2 for more details (a copy is included in the LICENSE file that
4883# accompanied this code).
4884#
4885# You should have received a copy of the GNU General Public License version
4886# 2 along with this work; if not, write to the Free Software Foundation,
4887# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4888#
4889# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4890# or visit www.oracle.com if you need additional information or have any
4891# questions.
4892#
4893
4894
4895
4896
4897
4898
4899
4900################################################################################
4901# Define a mechanism for importing extra prebuilt modules
4902#
4903
4904
4905
4906#
4907# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4908# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4909#
4910# This code is free software; you can redistribute it and/or modify it
4911# under the terms of the GNU General Public License version 2 only, as
4912# published by the Free Software Foundation.  Oracle designates this
4913# particular file as subject to the "Classpath" exception as provided
4914# by Oracle in the LICENSE file that accompanied this code.
4915#
4916# This code is distributed in the hope that it will be useful, but WITHOUT
4917# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4918# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4919# version 2 for more details (a copy is included in the LICENSE file that
4920# accompanied this code).
4921#
4922# You should have received a copy of the GNU General Public License version
4923# 2 along with this work; if not, write to the Free Software Foundation,
4924# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4925#
4926# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4927# or visit www.oracle.com if you need additional information or have any
4928# questions.
4929#
4930
4931########################################################################
4932# This file is responsible for detecting, verifying and setting up the
4933# toolchain, i.e. the compiler, linker and related utilities. It will setup
4934# proper paths to the binaries, but it will not setup any flags.
4935#
4936# The binaries used is determined by the toolchain type, which is the family of
4937# compilers and related tools that are used.
4938########################################################################
4939
4940
4941# All valid toolchains, regardless of platform (used by help.m4)
4942VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4943
4944# These toolchains are valid on different platforms
4945VALID_TOOLCHAINS_linux="gcc clang"
4946VALID_TOOLCHAINS_solaris="solstudio"
4947VALID_TOOLCHAINS_macosx="gcc clang"
4948VALID_TOOLCHAINS_aix="xlc"
4949VALID_TOOLCHAINS_windows="microsoft"
4950
4951# Toolchain descriptions
4952TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4953TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4954TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4955TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4956TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4957
4958# Minimum supported versions, empty means unspecified
4959TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4960TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4961TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4962TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4963TOOLCHAIN_MINIMUM_VERSION_xlc=""
4964
4965# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4966# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4967# $1 - optional variable prefix for compiler and version variables (BUILD_)
4968# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4969
4970
4971# Check if the configured compiler (C and C++) is of a specific version or
4972# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4973#
4974# Arguments:
4975#   VERSION:   The version string to check against the found version
4976#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4977#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4978#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4979
4980
4981
4982
4983# Setup a number of variables describing how native output files are
4984# named on this platform/toolchain.
4985
4986
4987# Determine which toolchain type to use, and make sure it is valid for this
4988# platform. Setup various information about the selected toolchain.
4989
4990
4991# Before we start detecting the toolchain executables, we might need some
4992# special setup, e.g. additional paths etc.
4993
4994
4995# Restore path, etc
4996
4997
4998# Check if a compiler is of the toolchain type we expect, and save the version
4999# information from it. If the compiler does not match the expected type,
5000# this function will abort using AC_MSG_ERROR. If it matches, the version will
5001# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5002# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5003#
5004# $1 = compiler to test (CC or CXX)
5005# $2 = human readable name of compiler (C or C++)
5006
5007
5008# Try to locate the given C or C++ compiler in the path, or otherwise.
5009#
5010# $1 = compiler to test (CC or CXX)
5011# $2 = human readable name of compiler (C or C++)
5012# $3 = list of compiler names to search for
5013
5014
5015# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5016# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5017# archiver (AR). Verify that the compilers are correct according to the
5018# toolchain type.
5019
5020
5021# Setup additional tools that is considered a part of the toolchain, but not the
5022# core part. Many of these are highly platform-specific and do not exist,
5023# and/or are not needed on all platforms.
5024
5025
5026# Setup the build tools (i.e, the compiler and linker used to build programs
5027# that should be run on the build platform, not the target platform, as a build
5028# helper). Since the non-cross-compile case uses the normal, target compilers
5029# for this, we can only do this after these have been setup.
5030
5031
5032# Do some additional checks on the detected tools.
5033
5034
5035# Setup the JTReg Regression Test Harness.
5036
5037
5038#
5039# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5040# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5041#
5042# This code is free software; you can redistribute it and/or modify it
5043# under the terms of the GNU General Public License version 2 only, as
5044# published by the Free Software Foundation.  Oracle designates this
5045# particular file as subject to the "Classpath" exception as provided
5046# by Oracle in the LICENSE file that accompanied this code.
5047#
5048# This code is distributed in the hope that it will be useful, but WITHOUT
5049# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5050# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5051# version 2 for more details (a copy is included in the LICENSE file that
5052# accompanied this code).
5053#
5054# You should have received a copy of the GNU General Public License version
5055# 2 along with this work; if not, write to the Free Software Foundation,
5056# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5057#
5058# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5059# or visit www.oracle.com if you need additional information or have any
5060# questions.
5061#
5062
5063################################################################################
5064# The order of these defines the priority by which we try to find them.
5065VALID_VS_VERSIONS="2013 2012 2010"
5066
5067VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5068VS_VERSION_INTERNAL_2010=100
5069VS_MSVCR_2010=msvcr100.dll
5070# We don't use msvcp on Visual Studio 2010
5071#VS_MSVCP_2010=msvcp100.dll
5072VS_ENVVAR_2010="VS100COMNTOOLS"
5073VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5074VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5075VS_VS_PLATFORM_NAME_2010="v100"
5076VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5077
5078VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5079VS_VERSION_INTERNAL_2012=110
5080VS_MSVCR_2012=msvcr110.dll
5081VS_MSVCP_2012=msvcp110.dll
5082VS_ENVVAR_2012="VS110COMNTOOLS"
5083VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5084VS_SDK_INSTALLDIR_2012=
5085VS_VS_PLATFORM_NAME_2012="v110"
5086VS_SDK_PLATFORM_NAME_2012=
5087
5088VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5089VS_VERSION_INTERNAL_2013=120
5090VS_MSVCR_2013=msvcr120.dll
5091VS_MSVCP_2013=msvcp120.dll
5092VS_ENVVAR_2013="VS120COMNTOOLS"
5093VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5094VS_SDK_INSTALLDIR_2013=
5095VS_VS_PLATFORM_NAME_2013="v120"
5096VS_SDK_PLATFORM_NAME_2013=
5097
5098################################################################################
5099
5100
5101
5102################################################################################
5103
5104
5105
5106################################################################################
5107# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5108# build environment and assigns it to VS_ENV_CMD
5109
5110
5111################################################################################
5112
5113
5114
5115################################################################################
5116# Check if the VS env variables were setup prior to running configure.
5117# If not, then find vcvarsall.bat and run it automatically, and integrate
5118# the set env variables into the spec file.
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133# This line needs to be here, verbatim, after all includes and the dummy hook
5134# definitions. It is replaced with custom functionality when building
5135# custom sources.
5136#CUSTOM_AUTOCONF_INCLUDE
5137
5138# Do not change or remove the following line, it is needed for consistency checks:
5139DATE_WHEN_GENERATED=1486657511
5140
5141###############################################################################
5142#
5143# Initialization / Boot-strapping
5144#
5145# The bootstrapping process needs to solve the "chicken or the egg" problem,
5146# thus it jumps back and forth, each time gaining something needed later on.
5147#
5148###############################################################################
5149
5150# If we are requested to print additional help, do that and then exit.
5151# This must be the very first call.
5152
5153  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5154
5155    # Print available toolchains
5156    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5157    $PRINTF "Which are valid to use depends on the build platform.\n"
5158    for toolchain in $VALID_TOOLCHAINS_all; do
5159      # Use indirect variable referencing
5160      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5161      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5162      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5163    done
5164    $PRINTF "\n"
5165
5166    # Print available jvm features
5167    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5168    $PRINTF "Which are valid to use depends on the target platform.\n  "
5169    $PRINTF "%s " $VALID_JVM_FEATURES
5170    $PRINTF "\n"
5171
5172    # And now exit directly
5173    exit 0
5174  fi
5175
5176
5177# Basic initialization that must happen first of all in the normal process.
5178
5179  # Save the original command line. This is passed to us by the wrapper configure script.
5180
5181  # Save the path variable before it gets changed
5182  ORIGINAL_PATH="$PATH"
5183
5184  DATE_WHEN_CONFIGURED=`LANG=C date`
5185
5186  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5187$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5188  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5189$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5190
5191
5192  # Start with tools that do not need have cross compilation support
5193  # and can be expected to be found in the default PATH. These tools are
5194  # used by configure.
5195
5196  # First are all the simple required tools.
5197
5198
5199
5200  # Publish this variable in the help.
5201
5202
5203  if [ -z "${BASENAME+x}" ]; then
5204    # The variable is not set by user, try to locate tool using the code snippet
5205    for ac_prog in basename
5206do
5207  # Extract the first word of "$ac_prog", so it can be a program name with args.
5208set dummy $ac_prog; ac_word=$2
5209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5210$as_echo_n "checking for $ac_word... " >&6; }
5211if ${ac_cv_path_BASENAME+:} false; then :
5212  $as_echo_n "(cached) " >&6
5213else
5214  case $BASENAME in
5215  [\\/]* | ?:[\\/]*)
5216  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5217  ;;
5218  *)
5219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5220for as_dir in $PATH
5221do
5222  IFS=$as_save_IFS
5223  test -z "$as_dir" && as_dir=.
5224    for ac_exec_ext in '' $ac_executable_extensions; do
5225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5226    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5228    break 2
5229  fi
5230done
5231  done
5232IFS=$as_save_IFS
5233
5234  ;;
5235esac
5236fi
5237BASENAME=$ac_cv_path_BASENAME
5238if test -n "$BASENAME"; then
5239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5240$as_echo "$BASENAME" >&6; }
5241else
5242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5243$as_echo "no" >&6; }
5244fi
5245
5246
5247  test -n "$BASENAME" && break
5248done
5249
5250  else
5251    # The variable is set, but is it from the command line or the environment?
5252
5253    # Try to remove the string !BASENAME! from our list.
5254    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5255    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5256      # If it failed, the variable was not from the command line. Ignore it,
5257      # but warn the user (except for BASH, which is always set by the calling BASH).
5258      if test "xBASENAME" != xBASH; then
5259        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5260$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5261      fi
5262      # Try to locate tool using the code snippet
5263      for ac_prog in basename
5264do
5265  # Extract the first word of "$ac_prog", so it can be a program name with args.
5266set dummy $ac_prog; ac_word=$2
5267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5268$as_echo_n "checking for $ac_word... " >&6; }
5269if ${ac_cv_path_BASENAME+:} false; then :
5270  $as_echo_n "(cached) " >&6
5271else
5272  case $BASENAME in
5273  [\\/]* | ?:[\\/]*)
5274  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5275  ;;
5276  *)
5277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5278for as_dir in $PATH
5279do
5280  IFS=$as_save_IFS
5281  test -z "$as_dir" && as_dir=.
5282    for ac_exec_ext in '' $ac_executable_extensions; do
5283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5284    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5286    break 2
5287  fi
5288done
5289  done
5290IFS=$as_save_IFS
5291
5292  ;;
5293esac
5294fi
5295BASENAME=$ac_cv_path_BASENAME
5296if test -n "$BASENAME"; then
5297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5298$as_echo "$BASENAME" >&6; }
5299else
5300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5301$as_echo "no" >&6; }
5302fi
5303
5304
5305  test -n "$BASENAME" && break
5306done
5307
5308    else
5309      # If it succeeded, then it was overridden by the user. We will use it
5310      # for the tool.
5311
5312      # First remove it from the list of overridden variables, so we can test
5313      # for unknown variables in the end.
5314      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5315
5316      # Check if we try to supply an empty value
5317      if test "x$BASENAME" = x; then
5318        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5319$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5320        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5321$as_echo_n "checking for BASENAME... " >&6; }
5322        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5323$as_echo "disabled" >&6; }
5324      else
5325        # Check if the provided tool contains a complete path.
5326        tool_specified="$BASENAME"
5327        tool_basename="${tool_specified##*/}"
5328        if test "x$tool_basename" = "x$tool_specified"; then
5329          # A command without a complete path is provided, search $PATH.
5330          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5331$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5332          # Extract the first word of "$tool_basename", so it can be a program name with args.
5333set dummy $tool_basename; ac_word=$2
5334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5335$as_echo_n "checking for $ac_word... " >&6; }
5336if ${ac_cv_path_BASENAME+:} false; then :
5337  $as_echo_n "(cached) " >&6
5338else
5339  case $BASENAME in
5340  [\\/]* | ?:[\\/]*)
5341  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5342  ;;
5343  *)
5344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5345for as_dir in $PATH
5346do
5347  IFS=$as_save_IFS
5348  test -z "$as_dir" && as_dir=.
5349    for ac_exec_ext in '' $ac_executable_extensions; do
5350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5351    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5353    break 2
5354  fi
5355done
5356  done
5357IFS=$as_save_IFS
5358
5359  ;;
5360esac
5361fi
5362BASENAME=$ac_cv_path_BASENAME
5363if test -n "$BASENAME"; then
5364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5365$as_echo "$BASENAME" >&6; }
5366else
5367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5368$as_echo "no" >&6; }
5369fi
5370
5371
5372          if test "x$BASENAME" = x; then
5373            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5374          fi
5375        else
5376          # Otherwise we believe it is a complete path. Use it as it is.
5377          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5378$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5379          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5380$as_echo_n "checking for BASENAME... " >&6; }
5381          if test ! -x "$tool_specified"; then
5382            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5383$as_echo "not found" >&6; }
5384            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5385          fi
5386          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5387$as_echo "$tool_specified" >&6; }
5388        fi
5389      fi
5390    fi
5391
5392  fi
5393
5394
5395
5396  if test "x$BASENAME" = x; then
5397    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5398  fi
5399
5400
5401
5402
5403
5404  # Publish this variable in the help.
5405
5406
5407  if [ -z "${BASH+x}" ]; then
5408    # The variable is not set by user, try to locate tool using the code snippet
5409    for ac_prog in bash
5410do
5411  # Extract the first word of "$ac_prog", so it can be a program name with args.
5412set dummy $ac_prog; ac_word=$2
5413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5414$as_echo_n "checking for $ac_word... " >&6; }
5415if ${ac_cv_path_BASH+:} false; then :
5416  $as_echo_n "(cached) " >&6
5417else
5418  case $BASH in
5419  [\\/]* | ?:[\\/]*)
5420  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5421  ;;
5422  *)
5423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5424for as_dir in $PATH
5425do
5426  IFS=$as_save_IFS
5427  test -z "$as_dir" && as_dir=.
5428    for ac_exec_ext in '' $ac_executable_extensions; do
5429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5430    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5432    break 2
5433  fi
5434done
5435  done
5436IFS=$as_save_IFS
5437
5438  ;;
5439esac
5440fi
5441BASH=$ac_cv_path_BASH
5442if test -n "$BASH"; then
5443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5444$as_echo "$BASH" >&6; }
5445else
5446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5447$as_echo "no" >&6; }
5448fi
5449
5450
5451  test -n "$BASH" && break
5452done
5453
5454  else
5455    # The variable is set, but is it from the command line or the environment?
5456
5457    # Try to remove the string !BASH! from our list.
5458    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5459    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5460      # If it failed, the variable was not from the command line. Ignore it,
5461      # but warn the user (except for BASH, which is always set by the calling BASH).
5462      if test "xBASH" != xBASH; then
5463        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5464$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5465      fi
5466      # Try to locate tool using the code snippet
5467      for ac_prog in bash
5468do
5469  # Extract the first word of "$ac_prog", so it can be a program name with args.
5470set dummy $ac_prog; ac_word=$2
5471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5472$as_echo_n "checking for $ac_word... " >&6; }
5473if ${ac_cv_path_BASH+:} false; then :
5474  $as_echo_n "(cached) " >&6
5475else
5476  case $BASH in
5477  [\\/]* | ?:[\\/]*)
5478  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5479  ;;
5480  *)
5481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5482for as_dir in $PATH
5483do
5484  IFS=$as_save_IFS
5485  test -z "$as_dir" && as_dir=.
5486    for ac_exec_ext in '' $ac_executable_extensions; do
5487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5488    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5490    break 2
5491  fi
5492done
5493  done
5494IFS=$as_save_IFS
5495
5496  ;;
5497esac
5498fi
5499BASH=$ac_cv_path_BASH
5500if test -n "$BASH"; then
5501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5502$as_echo "$BASH" >&6; }
5503else
5504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5505$as_echo "no" >&6; }
5506fi
5507
5508
5509  test -n "$BASH" && break
5510done
5511
5512    else
5513      # If it succeeded, then it was overridden by the user. We will use it
5514      # for the tool.
5515
5516      # First remove it from the list of overridden variables, so we can test
5517      # for unknown variables in the end.
5518      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5519
5520      # Check if we try to supply an empty value
5521      if test "x$BASH" = x; then
5522        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5523$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5524        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5525$as_echo_n "checking for BASH... " >&6; }
5526        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5527$as_echo "disabled" >&6; }
5528      else
5529        # Check if the provided tool contains a complete path.
5530        tool_specified="$BASH"
5531        tool_basename="${tool_specified##*/}"
5532        if test "x$tool_basename" = "x$tool_specified"; then
5533          # A command without a complete path is provided, search $PATH.
5534          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5535$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5536          # Extract the first word of "$tool_basename", so it can be a program name with args.
5537set dummy $tool_basename; ac_word=$2
5538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5539$as_echo_n "checking for $ac_word... " >&6; }
5540if ${ac_cv_path_BASH+:} false; then :
5541  $as_echo_n "(cached) " >&6
5542else
5543  case $BASH in
5544  [\\/]* | ?:[\\/]*)
5545  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5546  ;;
5547  *)
5548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5549for as_dir in $PATH
5550do
5551  IFS=$as_save_IFS
5552  test -z "$as_dir" && as_dir=.
5553    for ac_exec_ext in '' $ac_executable_extensions; do
5554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5555    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5557    break 2
5558  fi
5559done
5560  done
5561IFS=$as_save_IFS
5562
5563  ;;
5564esac
5565fi
5566BASH=$ac_cv_path_BASH
5567if test -n "$BASH"; then
5568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5569$as_echo "$BASH" >&6; }
5570else
5571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5572$as_echo "no" >&6; }
5573fi
5574
5575
5576          if test "x$BASH" = x; then
5577            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5578          fi
5579        else
5580          # Otherwise we believe it is a complete path. Use it as it is.
5581          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5582$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5583          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5584$as_echo_n "checking for BASH... " >&6; }
5585          if test ! -x "$tool_specified"; then
5586            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5587$as_echo "not found" >&6; }
5588            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5589          fi
5590          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5591$as_echo "$tool_specified" >&6; }
5592        fi
5593      fi
5594    fi
5595
5596  fi
5597
5598
5599
5600  if test "x$BASH" = x; then
5601    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5602  fi
5603
5604
5605
5606
5607
5608  # Publish this variable in the help.
5609
5610
5611  if [ -z "${CAT+x}" ]; then
5612    # The variable is not set by user, try to locate tool using the code snippet
5613    for ac_prog in cat
5614do
5615  # Extract the first word of "$ac_prog", so it can be a program name with args.
5616set dummy $ac_prog; ac_word=$2
5617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5618$as_echo_n "checking for $ac_word... " >&6; }
5619if ${ac_cv_path_CAT+:} false; then :
5620  $as_echo_n "(cached) " >&6
5621else
5622  case $CAT in
5623  [\\/]* | ?:[\\/]*)
5624  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5625  ;;
5626  *)
5627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5628for as_dir in $PATH
5629do
5630  IFS=$as_save_IFS
5631  test -z "$as_dir" && as_dir=.
5632    for ac_exec_ext in '' $ac_executable_extensions; do
5633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5634    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5636    break 2
5637  fi
5638done
5639  done
5640IFS=$as_save_IFS
5641
5642  ;;
5643esac
5644fi
5645CAT=$ac_cv_path_CAT
5646if test -n "$CAT"; then
5647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5648$as_echo "$CAT" >&6; }
5649else
5650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5651$as_echo "no" >&6; }
5652fi
5653
5654
5655  test -n "$CAT" && break
5656done
5657
5658  else
5659    # The variable is set, but is it from the command line or the environment?
5660
5661    # Try to remove the string !CAT! from our list.
5662    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5663    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5664      # If it failed, the variable was not from the command line. Ignore it,
5665      # but warn the user (except for BASH, which is always set by the calling BASH).
5666      if test "xCAT" != xBASH; then
5667        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5668$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5669      fi
5670      # Try to locate tool using the code snippet
5671      for ac_prog in cat
5672do
5673  # Extract the first word of "$ac_prog", so it can be a program name with args.
5674set dummy $ac_prog; ac_word=$2
5675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5676$as_echo_n "checking for $ac_word... " >&6; }
5677if ${ac_cv_path_CAT+:} false; then :
5678  $as_echo_n "(cached) " >&6
5679else
5680  case $CAT in
5681  [\\/]* | ?:[\\/]*)
5682  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5683  ;;
5684  *)
5685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5686for as_dir in $PATH
5687do
5688  IFS=$as_save_IFS
5689  test -z "$as_dir" && as_dir=.
5690    for ac_exec_ext in '' $ac_executable_extensions; do
5691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5692    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5694    break 2
5695  fi
5696done
5697  done
5698IFS=$as_save_IFS
5699
5700  ;;
5701esac
5702fi
5703CAT=$ac_cv_path_CAT
5704if test -n "$CAT"; then
5705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5706$as_echo "$CAT" >&6; }
5707else
5708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5709$as_echo "no" >&6; }
5710fi
5711
5712
5713  test -n "$CAT" && break
5714done
5715
5716    else
5717      # If it succeeded, then it was overridden by the user. We will use it
5718      # for the tool.
5719
5720      # First remove it from the list of overridden variables, so we can test
5721      # for unknown variables in the end.
5722      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5723
5724      # Check if we try to supply an empty value
5725      if test "x$CAT" = x; then
5726        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5727$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5728        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5729$as_echo_n "checking for CAT... " >&6; }
5730        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5731$as_echo "disabled" >&6; }
5732      else
5733        # Check if the provided tool contains a complete path.
5734        tool_specified="$CAT"
5735        tool_basename="${tool_specified##*/}"
5736        if test "x$tool_basename" = "x$tool_specified"; then
5737          # A command without a complete path is provided, search $PATH.
5738          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5739$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5740          # Extract the first word of "$tool_basename", so it can be a program name with args.
5741set dummy $tool_basename; ac_word=$2
5742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5743$as_echo_n "checking for $ac_word... " >&6; }
5744if ${ac_cv_path_CAT+:} false; then :
5745  $as_echo_n "(cached) " >&6
5746else
5747  case $CAT in
5748  [\\/]* | ?:[\\/]*)
5749  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5750  ;;
5751  *)
5752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5753for as_dir in $PATH
5754do
5755  IFS=$as_save_IFS
5756  test -z "$as_dir" && as_dir=.
5757    for ac_exec_ext in '' $ac_executable_extensions; do
5758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5759    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5761    break 2
5762  fi
5763done
5764  done
5765IFS=$as_save_IFS
5766
5767  ;;
5768esac
5769fi
5770CAT=$ac_cv_path_CAT
5771if test -n "$CAT"; then
5772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5773$as_echo "$CAT" >&6; }
5774else
5775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5776$as_echo "no" >&6; }
5777fi
5778
5779
5780          if test "x$CAT" = x; then
5781            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5782          fi
5783        else
5784          # Otherwise we believe it is a complete path. Use it as it is.
5785          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5786$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5787          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5788$as_echo_n "checking for CAT... " >&6; }
5789          if test ! -x "$tool_specified"; then
5790            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5791$as_echo "not found" >&6; }
5792            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5793          fi
5794          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5795$as_echo "$tool_specified" >&6; }
5796        fi
5797      fi
5798    fi
5799
5800  fi
5801
5802
5803
5804  if test "x$CAT" = x; then
5805    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5806  fi
5807
5808
5809
5810
5811
5812  # Publish this variable in the help.
5813
5814
5815  if [ -z "${CHMOD+x}" ]; then
5816    # The variable is not set by user, try to locate tool using the code snippet
5817    for ac_prog in chmod
5818do
5819  # Extract the first word of "$ac_prog", so it can be a program name with args.
5820set dummy $ac_prog; ac_word=$2
5821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5822$as_echo_n "checking for $ac_word... " >&6; }
5823if ${ac_cv_path_CHMOD+:} false; then :
5824  $as_echo_n "(cached) " >&6
5825else
5826  case $CHMOD in
5827  [\\/]* | ?:[\\/]*)
5828  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5829  ;;
5830  *)
5831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5832for as_dir in $PATH
5833do
5834  IFS=$as_save_IFS
5835  test -z "$as_dir" && as_dir=.
5836    for ac_exec_ext in '' $ac_executable_extensions; do
5837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5838    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5840    break 2
5841  fi
5842done
5843  done
5844IFS=$as_save_IFS
5845
5846  ;;
5847esac
5848fi
5849CHMOD=$ac_cv_path_CHMOD
5850if test -n "$CHMOD"; then
5851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5852$as_echo "$CHMOD" >&6; }
5853else
5854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5855$as_echo "no" >&6; }
5856fi
5857
5858
5859  test -n "$CHMOD" && break
5860done
5861
5862  else
5863    # The variable is set, but is it from the command line or the environment?
5864
5865    # Try to remove the string !CHMOD! from our list.
5866    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5867    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5868      # If it failed, the variable was not from the command line. Ignore it,
5869      # but warn the user (except for BASH, which is always set by the calling BASH).
5870      if test "xCHMOD" != xBASH; then
5871        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5872$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5873      fi
5874      # Try to locate tool using the code snippet
5875      for ac_prog in chmod
5876do
5877  # Extract the first word of "$ac_prog", so it can be a program name with args.
5878set dummy $ac_prog; ac_word=$2
5879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5880$as_echo_n "checking for $ac_word... " >&6; }
5881if ${ac_cv_path_CHMOD+:} false; then :
5882  $as_echo_n "(cached) " >&6
5883else
5884  case $CHMOD in
5885  [\\/]* | ?:[\\/]*)
5886  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5887  ;;
5888  *)
5889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5890for as_dir in $PATH
5891do
5892  IFS=$as_save_IFS
5893  test -z "$as_dir" && as_dir=.
5894    for ac_exec_ext in '' $ac_executable_extensions; do
5895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5896    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5898    break 2
5899  fi
5900done
5901  done
5902IFS=$as_save_IFS
5903
5904  ;;
5905esac
5906fi
5907CHMOD=$ac_cv_path_CHMOD
5908if test -n "$CHMOD"; then
5909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5910$as_echo "$CHMOD" >&6; }
5911else
5912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5913$as_echo "no" >&6; }
5914fi
5915
5916
5917  test -n "$CHMOD" && break
5918done
5919
5920    else
5921      # If it succeeded, then it was overridden by the user. We will use it
5922      # for the tool.
5923
5924      # First remove it from the list of overridden variables, so we can test
5925      # for unknown variables in the end.
5926      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5927
5928      # Check if we try to supply an empty value
5929      if test "x$CHMOD" = x; then
5930        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5931$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5932        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5933$as_echo_n "checking for CHMOD... " >&6; }
5934        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5935$as_echo "disabled" >&6; }
5936      else
5937        # Check if the provided tool contains a complete path.
5938        tool_specified="$CHMOD"
5939        tool_basename="${tool_specified##*/}"
5940        if test "x$tool_basename" = "x$tool_specified"; then
5941          # A command without a complete path is provided, search $PATH.
5942          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5943$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5944          # Extract the first word of "$tool_basename", so it can be a program name with args.
5945set dummy $tool_basename; ac_word=$2
5946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5947$as_echo_n "checking for $ac_word... " >&6; }
5948if ${ac_cv_path_CHMOD+:} false; then :
5949  $as_echo_n "(cached) " >&6
5950else
5951  case $CHMOD in
5952  [\\/]* | ?:[\\/]*)
5953  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5954  ;;
5955  *)
5956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5957for as_dir in $PATH
5958do
5959  IFS=$as_save_IFS
5960  test -z "$as_dir" && as_dir=.
5961    for ac_exec_ext in '' $ac_executable_extensions; do
5962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5963    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5965    break 2
5966  fi
5967done
5968  done
5969IFS=$as_save_IFS
5970
5971  ;;
5972esac
5973fi
5974CHMOD=$ac_cv_path_CHMOD
5975if test -n "$CHMOD"; then
5976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5977$as_echo "$CHMOD" >&6; }
5978else
5979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5980$as_echo "no" >&6; }
5981fi
5982
5983
5984          if test "x$CHMOD" = x; then
5985            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5986          fi
5987        else
5988          # Otherwise we believe it is a complete path. Use it as it is.
5989          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5990$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5991          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5992$as_echo_n "checking for CHMOD... " >&6; }
5993          if test ! -x "$tool_specified"; then
5994            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5995$as_echo "not found" >&6; }
5996            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5997          fi
5998          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5999$as_echo "$tool_specified" >&6; }
6000        fi
6001      fi
6002    fi
6003
6004  fi
6005
6006
6007
6008  if test "x$CHMOD" = x; then
6009    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6010  fi
6011
6012
6013
6014
6015
6016  # Publish this variable in the help.
6017
6018
6019  if [ -z "${CMP+x}" ]; then
6020    # The variable is not set by user, try to locate tool using the code snippet
6021    for ac_prog in cmp
6022do
6023  # Extract the first word of "$ac_prog", so it can be a program name with args.
6024set dummy $ac_prog; ac_word=$2
6025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6026$as_echo_n "checking for $ac_word... " >&6; }
6027if ${ac_cv_path_CMP+:} false; then :
6028  $as_echo_n "(cached) " >&6
6029else
6030  case $CMP in
6031  [\\/]* | ?:[\\/]*)
6032  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6033  ;;
6034  *)
6035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6036for as_dir in $PATH
6037do
6038  IFS=$as_save_IFS
6039  test -z "$as_dir" && as_dir=.
6040    for ac_exec_ext in '' $ac_executable_extensions; do
6041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6042    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6044    break 2
6045  fi
6046done
6047  done
6048IFS=$as_save_IFS
6049
6050  ;;
6051esac
6052fi
6053CMP=$ac_cv_path_CMP
6054if test -n "$CMP"; then
6055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6056$as_echo "$CMP" >&6; }
6057else
6058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6059$as_echo "no" >&6; }
6060fi
6061
6062
6063  test -n "$CMP" && break
6064done
6065
6066  else
6067    # The variable is set, but is it from the command line or the environment?
6068
6069    # Try to remove the string !CMP! from our list.
6070    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6071    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6072      # If it failed, the variable was not from the command line. Ignore it,
6073      # but warn the user (except for BASH, which is always set by the calling BASH).
6074      if test "xCMP" != xBASH; then
6075        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6076$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6077      fi
6078      # Try to locate tool using the code snippet
6079      for ac_prog in cmp
6080do
6081  # Extract the first word of "$ac_prog", so it can be a program name with args.
6082set dummy $ac_prog; ac_word=$2
6083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6084$as_echo_n "checking for $ac_word... " >&6; }
6085if ${ac_cv_path_CMP+:} false; then :
6086  $as_echo_n "(cached) " >&6
6087else
6088  case $CMP in
6089  [\\/]* | ?:[\\/]*)
6090  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6091  ;;
6092  *)
6093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6094for as_dir in $PATH
6095do
6096  IFS=$as_save_IFS
6097  test -z "$as_dir" && as_dir=.
6098    for ac_exec_ext in '' $ac_executable_extensions; do
6099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6100    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6102    break 2
6103  fi
6104done
6105  done
6106IFS=$as_save_IFS
6107
6108  ;;
6109esac
6110fi
6111CMP=$ac_cv_path_CMP
6112if test -n "$CMP"; then
6113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6114$as_echo "$CMP" >&6; }
6115else
6116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6117$as_echo "no" >&6; }
6118fi
6119
6120
6121  test -n "$CMP" && break
6122done
6123
6124    else
6125      # If it succeeded, then it was overridden by the user. We will use it
6126      # for the tool.
6127
6128      # First remove it from the list of overridden variables, so we can test
6129      # for unknown variables in the end.
6130      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6131
6132      # Check if we try to supply an empty value
6133      if test "x$CMP" = x; then
6134        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6135$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6136        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6137$as_echo_n "checking for CMP... " >&6; }
6138        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6139$as_echo "disabled" >&6; }
6140      else
6141        # Check if the provided tool contains a complete path.
6142        tool_specified="$CMP"
6143        tool_basename="${tool_specified##*/}"
6144        if test "x$tool_basename" = "x$tool_specified"; then
6145          # A command without a complete path is provided, search $PATH.
6146          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6147$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6148          # Extract the first word of "$tool_basename", so it can be a program name with args.
6149set dummy $tool_basename; ac_word=$2
6150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6151$as_echo_n "checking for $ac_word... " >&6; }
6152if ${ac_cv_path_CMP+:} false; then :
6153  $as_echo_n "(cached) " >&6
6154else
6155  case $CMP in
6156  [\\/]* | ?:[\\/]*)
6157  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6158  ;;
6159  *)
6160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6161for as_dir in $PATH
6162do
6163  IFS=$as_save_IFS
6164  test -z "$as_dir" && as_dir=.
6165    for ac_exec_ext in '' $ac_executable_extensions; do
6166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6167    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6169    break 2
6170  fi
6171done
6172  done
6173IFS=$as_save_IFS
6174
6175  ;;
6176esac
6177fi
6178CMP=$ac_cv_path_CMP
6179if test -n "$CMP"; then
6180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6181$as_echo "$CMP" >&6; }
6182else
6183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6184$as_echo "no" >&6; }
6185fi
6186
6187
6188          if test "x$CMP" = x; then
6189            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6190          fi
6191        else
6192          # Otherwise we believe it is a complete path. Use it as it is.
6193          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6194$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6195          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6196$as_echo_n "checking for CMP... " >&6; }
6197          if test ! -x "$tool_specified"; then
6198            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6199$as_echo "not found" >&6; }
6200            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6201          fi
6202          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6203$as_echo "$tool_specified" >&6; }
6204        fi
6205      fi
6206    fi
6207
6208  fi
6209
6210
6211
6212  if test "x$CMP" = x; then
6213    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6214  fi
6215
6216
6217
6218
6219
6220  # Publish this variable in the help.
6221
6222
6223  if [ -z "${COMM+x}" ]; then
6224    # The variable is not set by user, try to locate tool using the code snippet
6225    for ac_prog in comm
6226do
6227  # Extract the first word of "$ac_prog", so it can be a program name with args.
6228set dummy $ac_prog; ac_word=$2
6229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6230$as_echo_n "checking for $ac_word... " >&6; }
6231if ${ac_cv_path_COMM+:} false; then :
6232  $as_echo_n "(cached) " >&6
6233else
6234  case $COMM in
6235  [\\/]* | ?:[\\/]*)
6236  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6237  ;;
6238  *)
6239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6240for as_dir in $PATH
6241do
6242  IFS=$as_save_IFS
6243  test -z "$as_dir" && as_dir=.
6244    for ac_exec_ext in '' $ac_executable_extensions; do
6245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6246    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6248    break 2
6249  fi
6250done
6251  done
6252IFS=$as_save_IFS
6253
6254  ;;
6255esac
6256fi
6257COMM=$ac_cv_path_COMM
6258if test -n "$COMM"; then
6259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6260$as_echo "$COMM" >&6; }
6261else
6262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6263$as_echo "no" >&6; }
6264fi
6265
6266
6267  test -n "$COMM" && break
6268done
6269
6270  else
6271    # The variable is set, but is it from the command line or the environment?
6272
6273    # Try to remove the string !COMM! from our list.
6274    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6275    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6276      # If it failed, the variable was not from the command line. Ignore it,
6277      # but warn the user (except for BASH, which is always set by the calling BASH).
6278      if test "xCOMM" != xBASH; then
6279        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6280$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6281      fi
6282      # Try to locate tool using the code snippet
6283      for ac_prog in comm
6284do
6285  # Extract the first word of "$ac_prog", so it can be a program name with args.
6286set dummy $ac_prog; ac_word=$2
6287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6288$as_echo_n "checking for $ac_word... " >&6; }
6289if ${ac_cv_path_COMM+:} false; then :
6290  $as_echo_n "(cached) " >&6
6291else
6292  case $COMM in
6293  [\\/]* | ?:[\\/]*)
6294  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6295  ;;
6296  *)
6297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6298for as_dir in $PATH
6299do
6300  IFS=$as_save_IFS
6301  test -z "$as_dir" && as_dir=.
6302    for ac_exec_ext in '' $ac_executable_extensions; do
6303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6304    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6306    break 2
6307  fi
6308done
6309  done
6310IFS=$as_save_IFS
6311
6312  ;;
6313esac
6314fi
6315COMM=$ac_cv_path_COMM
6316if test -n "$COMM"; then
6317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6318$as_echo "$COMM" >&6; }
6319else
6320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6321$as_echo "no" >&6; }
6322fi
6323
6324
6325  test -n "$COMM" && break
6326done
6327
6328    else
6329      # If it succeeded, then it was overridden by the user. We will use it
6330      # for the tool.
6331
6332      # First remove it from the list of overridden variables, so we can test
6333      # for unknown variables in the end.
6334      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6335
6336      # Check if we try to supply an empty value
6337      if test "x$COMM" = x; then
6338        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6339$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6340        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6341$as_echo_n "checking for COMM... " >&6; }
6342        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6343$as_echo "disabled" >&6; }
6344      else
6345        # Check if the provided tool contains a complete path.
6346        tool_specified="$COMM"
6347        tool_basename="${tool_specified##*/}"
6348        if test "x$tool_basename" = "x$tool_specified"; then
6349          # A command without a complete path is provided, search $PATH.
6350          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6351$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6352          # Extract the first word of "$tool_basename", so it can be a program name with args.
6353set dummy $tool_basename; ac_word=$2
6354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6355$as_echo_n "checking for $ac_word... " >&6; }
6356if ${ac_cv_path_COMM+:} false; then :
6357  $as_echo_n "(cached) " >&6
6358else
6359  case $COMM in
6360  [\\/]* | ?:[\\/]*)
6361  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6362  ;;
6363  *)
6364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6365for as_dir in $PATH
6366do
6367  IFS=$as_save_IFS
6368  test -z "$as_dir" && as_dir=.
6369    for ac_exec_ext in '' $ac_executable_extensions; do
6370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6371    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6373    break 2
6374  fi
6375done
6376  done
6377IFS=$as_save_IFS
6378
6379  ;;
6380esac
6381fi
6382COMM=$ac_cv_path_COMM
6383if test -n "$COMM"; then
6384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6385$as_echo "$COMM" >&6; }
6386else
6387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6388$as_echo "no" >&6; }
6389fi
6390
6391
6392          if test "x$COMM" = x; then
6393            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6394          fi
6395        else
6396          # Otherwise we believe it is a complete path. Use it as it is.
6397          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6398$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6399          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6400$as_echo_n "checking for COMM... " >&6; }
6401          if test ! -x "$tool_specified"; then
6402            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6403$as_echo "not found" >&6; }
6404            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6405          fi
6406          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6407$as_echo "$tool_specified" >&6; }
6408        fi
6409      fi
6410    fi
6411
6412  fi
6413
6414
6415
6416  if test "x$COMM" = x; then
6417    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6418  fi
6419
6420
6421
6422
6423
6424  # Publish this variable in the help.
6425
6426
6427  if [ -z "${CP+x}" ]; then
6428    # The variable is not set by user, try to locate tool using the code snippet
6429    for ac_prog in cp
6430do
6431  # Extract the first word of "$ac_prog", so it can be a program name with args.
6432set dummy $ac_prog; ac_word=$2
6433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6434$as_echo_n "checking for $ac_word... " >&6; }
6435if ${ac_cv_path_CP+:} false; then :
6436  $as_echo_n "(cached) " >&6
6437else
6438  case $CP in
6439  [\\/]* | ?:[\\/]*)
6440  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6441  ;;
6442  *)
6443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6444for as_dir in $PATH
6445do
6446  IFS=$as_save_IFS
6447  test -z "$as_dir" && as_dir=.
6448    for ac_exec_ext in '' $ac_executable_extensions; do
6449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6450    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6452    break 2
6453  fi
6454done
6455  done
6456IFS=$as_save_IFS
6457
6458  ;;
6459esac
6460fi
6461CP=$ac_cv_path_CP
6462if test -n "$CP"; then
6463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6464$as_echo "$CP" >&6; }
6465else
6466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6467$as_echo "no" >&6; }
6468fi
6469
6470
6471  test -n "$CP" && break
6472done
6473
6474  else
6475    # The variable is set, but is it from the command line or the environment?
6476
6477    # Try to remove the string !CP! from our list.
6478    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6479    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6480      # If it failed, the variable was not from the command line. Ignore it,
6481      # but warn the user (except for BASH, which is always set by the calling BASH).
6482      if test "xCP" != xBASH; then
6483        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6484$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6485      fi
6486      # Try to locate tool using the code snippet
6487      for ac_prog in cp
6488do
6489  # Extract the first word of "$ac_prog", so it can be a program name with args.
6490set dummy $ac_prog; ac_word=$2
6491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6492$as_echo_n "checking for $ac_word... " >&6; }
6493if ${ac_cv_path_CP+:} false; then :
6494  $as_echo_n "(cached) " >&6
6495else
6496  case $CP in
6497  [\\/]* | ?:[\\/]*)
6498  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6499  ;;
6500  *)
6501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6502for as_dir in $PATH
6503do
6504  IFS=$as_save_IFS
6505  test -z "$as_dir" && as_dir=.
6506    for ac_exec_ext in '' $ac_executable_extensions; do
6507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6508    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6510    break 2
6511  fi
6512done
6513  done
6514IFS=$as_save_IFS
6515
6516  ;;
6517esac
6518fi
6519CP=$ac_cv_path_CP
6520if test -n "$CP"; then
6521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6522$as_echo "$CP" >&6; }
6523else
6524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6525$as_echo "no" >&6; }
6526fi
6527
6528
6529  test -n "$CP" && break
6530done
6531
6532    else
6533      # If it succeeded, then it was overridden by the user. We will use it
6534      # for the tool.
6535
6536      # First remove it from the list of overridden variables, so we can test
6537      # for unknown variables in the end.
6538      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6539
6540      # Check if we try to supply an empty value
6541      if test "x$CP" = x; then
6542        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6543$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6544        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6545$as_echo_n "checking for CP... " >&6; }
6546        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6547$as_echo "disabled" >&6; }
6548      else
6549        # Check if the provided tool contains a complete path.
6550        tool_specified="$CP"
6551        tool_basename="${tool_specified##*/}"
6552        if test "x$tool_basename" = "x$tool_specified"; then
6553          # A command without a complete path is provided, search $PATH.
6554          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6555$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6556          # Extract the first word of "$tool_basename", so it can be a program name with args.
6557set dummy $tool_basename; ac_word=$2
6558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6559$as_echo_n "checking for $ac_word... " >&6; }
6560if ${ac_cv_path_CP+:} false; then :
6561  $as_echo_n "(cached) " >&6
6562else
6563  case $CP in
6564  [\\/]* | ?:[\\/]*)
6565  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6566  ;;
6567  *)
6568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6569for as_dir in $PATH
6570do
6571  IFS=$as_save_IFS
6572  test -z "$as_dir" && as_dir=.
6573    for ac_exec_ext in '' $ac_executable_extensions; do
6574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6575    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6577    break 2
6578  fi
6579done
6580  done
6581IFS=$as_save_IFS
6582
6583  ;;
6584esac
6585fi
6586CP=$ac_cv_path_CP
6587if test -n "$CP"; then
6588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6589$as_echo "$CP" >&6; }
6590else
6591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6592$as_echo "no" >&6; }
6593fi
6594
6595
6596          if test "x$CP" = x; then
6597            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6598          fi
6599        else
6600          # Otherwise we believe it is a complete path. Use it as it is.
6601          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6602$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6603          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6604$as_echo_n "checking for CP... " >&6; }
6605          if test ! -x "$tool_specified"; then
6606            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6607$as_echo "not found" >&6; }
6608            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6609          fi
6610          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6611$as_echo "$tool_specified" >&6; }
6612        fi
6613      fi
6614    fi
6615
6616  fi
6617
6618
6619
6620  if test "x$CP" = x; then
6621    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6622  fi
6623
6624
6625
6626
6627
6628  # Publish this variable in the help.
6629
6630
6631  if [ -z "${CUT+x}" ]; then
6632    # The variable is not set by user, try to locate tool using the code snippet
6633    for ac_prog in cut
6634do
6635  # Extract the first word of "$ac_prog", so it can be a program name with args.
6636set dummy $ac_prog; ac_word=$2
6637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6638$as_echo_n "checking for $ac_word... " >&6; }
6639if ${ac_cv_path_CUT+:} false; then :
6640  $as_echo_n "(cached) " >&6
6641else
6642  case $CUT in
6643  [\\/]* | ?:[\\/]*)
6644  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6645  ;;
6646  *)
6647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6648for as_dir in $PATH
6649do
6650  IFS=$as_save_IFS
6651  test -z "$as_dir" && as_dir=.
6652    for ac_exec_ext in '' $ac_executable_extensions; do
6653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6654    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6656    break 2
6657  fi
6658done
6659  done
6660IFS=$as_save_IFS
6661
6662  ;;
6663esac
6664fi
6665CUT=$ac_cv_path_CUT
6666if test -n "$CUT"; then
6667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6668$as_echo "$CUT" >&6; }
6669else
6670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6671$as_echo "no" >&6; }
6672fi
6673
6674
6675  test -n "$CUT" && break
6676done
6677
6678  else
6679    # The variable is set, but is it from the command line or the environment?
6680
6681    # Try to remove the string !CUT! from our list.
6682    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6683    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6684      # If it failed, the variable was not from the command line. Ignore it,
6685      # but warn the user (except for BASH, which is always set by the calling BASH).
6686      if test "xCUT" != xBASH; then
6687        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6688$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6689      fi
6690      # Try to locate tool using the code snippet
6691      for ac_prog in cut
6692do
6693  # Extract the first word of "$ac_prog", so it can be a program name with args.
6694set dummy $ac_prog; ac_word=$2
6695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6696$as_echo_n "checking for $ac_word... " >&6; }
6697if ${ac_cv_path_CUT+:} false; then :
6698  $as_echo_n "(cached) " >&6
6699else
6700  case $CUT in
6701  [\\/]* | ?:[\\/]*)
6702  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6703  ;;
6704  *)
6705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6706for as_dir in $PATH
6707do
6708  IFS=$as_save_IFS
6709  test -z "$as_dir" && as_dir=.
6710    for ac_exec_ext in '' $ac_executable_extensions; do
6711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6712    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6714    break 2
6715  fi
6716done
6717  done
6718IFS=$as_save_IFS
6719
6720  ;;
6721esac
6722fi
6723CUT=$ac_cv_path_CUT
6724if test -n "$CUT"; then
6725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6726$as_echo "$CUT" >&6; }
6727else
6728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6729$as_echo "no" >&6; }
6730fi
6731
6732
6733  test -n "$CUT" && break
6734done
6735
6736    else
6737      # If it succeeded, then it was overridden by the user. We will use it
6738      # for the tool.
6739
6740      # First remove it from the list of overridden variables, so we can test
6741      # for unknown variables in the end.
6742      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6743
6744      # Check if we try to supply an empty value
6745      if test "x$CUT" = x; then
6746        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6747$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6748        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6749$as_echo_n "checking for CUT... " >&6; }
6750        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6751$as_echo "disabled" >&6; }
6752      else
6753        # Check if the provided tool contains a complete path.
6754        tool_specified="$CUT"
6755        tool_basename="${tool_specified##*/}"
6756        if test "x$tool_basename" = "x$tool_specified"; then
6757          # A command without a complete path is provided, search $PATH.
6758          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6759$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6760          # Extract the first word of "$tool_basename", so it can be a program name with args.
6761set dummy $tool_basename; ac_word=$2
6762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6763$as_echo_n "checking for $ac_word... " >&6; }
6764if ${ac_cv_path_CUT+:} false; then :
6765  $as_echo_n "(cached) " >&6
6766else
6767  case $CUT in
6768  [\\/]* | ?:[\\/]*)
6769  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6770  ;;
6771  *)
6772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6773for as_dir in $PATH
6774do
6775  IFS=$as_save_IFS
6776  test -z "$as_dir" && as_dir=.
6777    for ac_exec_ext in '' $ac_executable_extensions; do
6778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6779    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6781    break 2
6782  fi
6783done
6784  done
6785IFS=$as_save_IFS
6786
6787  ;;
6788esac
6789fi
6790CUT=$ac_cv_path_CUT
6791if test -n "$CUT"; then
6792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6793$as_echo "$CUT" >&6; }
6794else
6795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6796$as_echo "no" >&6; }
6797fi
6798
6799
6800          if test "x$CUT" = x; then
6801            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6802          fi
6803        else
6804          # Otherwise we believe it is a complete path. Use it as it is.
6805          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6806$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6807          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6808$as_echo_n "checking for CUT... " >&6; }
6809          if test ! -x "$tool_specified"; then
6810            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6811$as_echo "not found" >&6; }
6812            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6813          fi
6814          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6815$as_echo "$tool_specified" >&6; }
6816        fi
6817      fi
6818    fi
6819
6820  fi
6821
6822
6823
6824  if test "x$CUT" = x; then
6825    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6826  fi
6827
6828
6829
6830
6831
6832  # Publish this variable in the help.
6833
6834
6835  if [ -z "${DATE+x}" ]; then
6836    # The variable is not set by user, try to locate tool using the code snippet
6837    for ac_prog in date
6838do
6839  # Extract the first word of "$ac_prog", so it can be a program name with args.
6840set dummy $ac_prog; ac_word=$2
6841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6842$as_echo_n "checking for $ac_word... " >&6; }
6843if ${ac_cv_path_DATE+:} false; then :
6844  $as_echo_n "(cached) " >&6
6845else
6846  case $DATE in
6847  [\\/]* | ?:[\\/]*)
6848  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6849  ;;
6850  *)
6851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6852for as_dir in $PATH
6853do
6854  IFS=$as_save_IFS
6855  test -z "$as_dir" && as_dir=.
6856    for ac_exec_ext in '' $ac_executable_extensions; do
6857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6858    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6860    break 2
6861  fi
6862done
6863  done
6864IFS=$as_save_IFS
6865
6866  ;;
6867esac
6868fi
6869DATE=$ac_cv_path_DATE
6870if test -n "$DATE"; then
6871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6872$as_echo "$DATE" >&6; }
6873else
6874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6875$as_echo "no" >&6; }
6876fi
6877
6878
6879  test -n "$DATE" && break
6880done
6881
6882  else
6883    # The variable is set, but is it from the command line or the environment?
6884
6885    # Try to remove the string !DATE! from our list.
6886    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6887    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6888      # If it failed, the variable was not from the command line. Ignore it,
6889      # but warn the user (except for BASH, which is always set by the calling BASH).
6890      if test "xDATE" != xBASH; then
6891        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6892$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6893      fi
6894      # Try to locate tool using the code snippet
6895      for ac_prog in date
6896do
6897  # Extract the first word of "$ac_prog", so it can be a program name with args.
6898set dummy $ac_prog; ac_word=$2
6899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6900$as_echo_n "checking for $ac_word... " >&6; }
6901if ${ac_cv_path_DATE+:} false; then :
6902  $as_echo_n "(cached) " >&6
6903else
6904  case $DATE in
6905  [\\/]* | ?:[\\/]*)
6906  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6907  ;;
6908  *)
6909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6910for as_dir in $PATH
6911do
6912  IFS=$as_save_IFS
6913  test -z "$as_dir" && as_dir=.
6914    for ac_exec_ext in '' $ac_executable_extensions; do
6915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6916    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6918    break 2
6919  fi
6920done
6921  done
6922IFS=$as_save_IFS
6923
6924  ;;
6925esac
6926fi
6927DATE=$ac_cv_path_DATE
6928if test -n "$DATE"; then
6929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6930$as_echo "$DATE" >&6; }
6931else
6932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6933$as_echo "no" >&6; }
6934fi
6935
6936
6937  test -n "$DATE" && break
6938done
6939
6940    else
6941      # If it succeeded, then it was overridden by the user. We will use it
6942      # for the tool.
6943
6944      # First remove it from the list of overridden variables, so we can test
6945      # for unknown variables in the end.
6946      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6947
6948      # Check if we try to supply an empty value
6949      if test "x$DATE" = x; then
6950        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6951$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6952        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6953$as_echo_n "checking for DATE... " >&6; }
6954        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6955$as_echo "disabled" >&6; }
6956      else
6957        # Check if the provided tool contains a complete path.
6958        tool_specified="$DATE"
6959        tool_basename="${tool_specified##*/}"
6960        if test "x$tool_basename" = "x$tool_specified"; then
6961          # A command without a complete path is provided, search $PATH.
6962          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6963$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6964          # Extract the first word of "$tool_basename", so it can be a program name with args.
6965set dummy $tool_basename; ac_word=$2
6966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6967$as_echo_n "checking for $ac_word... " >&6; }
6968if ${ac_cv_path_DATE+:} false; then :
6969  $as_echo_n "(cached) " >&6
6970else
6971  case $DATE in
6972  [\\/]* | ?:[\\/]*)
6973  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6974  ;;
6975  *)
6976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6977for as_dir in $PATH
6978do
6979  IFS=$as_save_IFS
6980  test -z "$as_dir" && as_dir=.
6981    for ac_exec_ext in '' $ac_executable_extensions; do
6982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6983    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6985    break 2
6986  fi
6987done
6988  done
6989IFS=$as_save_IFS
6990
6991  ;;
6992esac
6993fi
6994DATE=$ac_cv_path_DATE
6995if test -n "$DATE"; then
6996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6997$as_echo "$DATE" >&6; }
6998else
6999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7000$as_echo "no" >&6; }
7001fi
7002
7003
7004          if test "x$DATE" = x; then
7005            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7006          fi
7007        else
7008          # Otherwise we believe it is a complete path. Use it as it is.
7009          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7010$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7011          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7012$as_echo_n "checking for DATE... " >&6; }
7013          if test ! -x "$tool_specified"; then
7014            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7015$as_echo "not found" >&6; }
7016            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7017          fi
7018          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7019$as_echo "$tool_specified" >&6; }
7020        fi
7021      fi
7022    fi
7023
7024  fi
7025
7026
7027
7028  if test "x$DATE" = x; then
7029    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7030  fi
7031
7032
7033
7034
7035
7036  # Publish this variable in the help.
7037
7038
7039  if [ -z "${DIFF+x}" ]; then
7040    # The variable is not set by user, try to locate tool using the code snippet
7041    for ac_prog in gdiff diff
7042do
7043  # Extract the first word of "$ac_prog", so it can be a program name with args.
7044set dummy $ac_prog; ac_word=$2
7045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7046$as_echo_n "checking for $ac_word... " >&6; }
7047if ${ac_cv_path_DIFF+:} false; then :
7048  $as_echo_n "(cached) " >&6
7049else
7050  case $DIFF in
7051  [\\/]* | ?:[\\/]*)
7052  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7053  ;;
7054  *)
7055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7056for as_dir in $PATH
7057do
7058  IFS=$as_save_IFS
7059  test -z "$as_dir" && as_dir=.
7060    for ac_exec_ext in '' $ac_executable_extensions; do
7061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7062    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7064    break 2
7065  fi
7066done
7067  done
7068IFS=$as_save_IFS
7069
7070  ;;
7071esac
7072fi
7073DIFF=$ac_cv_path_DIFF
7074if test -n "$DIFF"; then
7075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7076$as_echo "$DIFF" >&6; }
7077else
7078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7079$as_echo "no" >&6; }
7080fi
7081
7082
7083  test -n "$DIFF" && break
7084done
7085
7086  else
7087    # The variable is set, but is it from the command line or the environment?
7088
7089    # Try to remove the string !DIFF! from our list.
7090    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7091    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7092      # If it failed, the variable was not from the command line. Ignore it,
7093      # but warn the user (except for BASH, which is always set by the calling BASH).
7094      if test "xDIFF" != xBASH; then
7095        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7096$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7097      fi
7098      # Try to locate tool using the code snippet
7099      for ac_prog in gdiff diff
7100do
7101  # Extract the first word of "$ac_prog", so it can be a program name with args.
7102set dummy $ac_prog; ac_word=$2
7103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7104$as_echo_n "checking for $ac_word... " >&6; }
7105if ${ac_cv_path_DIFF+:} false; then :
7106  $as_echo_n "(cached) " >&6
7107else
7108  case $DIFF in
7109  [\\/]* | ?:[\\/]*)
7110  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7111  ;;
7112  *)
7113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7114for as_dir in $PATH
7115do
7116  IFS=$as_save_IFS
7117  test -z "$as_dir" && as_dir=.
7118    for ac_exec_ext in '' $ac_executable_extensions; do
7119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7120    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7122    break 2
7123  fi
7124done
7125  done
7126IFS=$as_save_IFS
7127
7128  ;;
7129esac
7130fi
7131DIFF=$ac_cv_path_DIFF
7132if test -n "$DIFF"; then
7133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7134$as_echo "$DIFF" >&6; }
7135else
7136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7137$as_echo "no" >&6; }
7138fi
7139
7140
7141  test -n "$DIFF" && break
7142done
7143
7144    else
7145      # If it succeeded, then it was overridden by the user. We will use it
7146      # for the tool.
7147
7148      # First remove it from the list of overridden variables, so we can test
7149      # for unknown variables in the end.
7150      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7151
7152      # Check if we try to supply an empty value
7153      if test "x$DIFF" = x; then
7154        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7155$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7156        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7157$as_echo_n "checking for DIFF... " >&6; }
7158        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7159$as_echo "disabled" >&6; }
7160      else
7161        # Check if the provided tool contains a complete path.
7162        tool_specified="$DIFF"
7163        tool_basename="${tool_specified##*/}"
7164        if test "x$tool_basename" = "x$tool_specified"; then
7165          # A command without a complete path is provided, search $PATH.
7166          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7167$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7168          # Extract the first word of "$tool_basename", so it can be a program name with args.
7169set dummy $tool_basename; ac_word=$2
7170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7171$as_echo_n "checking for $ac_word... " >&6; }
7172if ${ac_cv_path_DIFF+:} false; then :
7173  $as_echo_n "(cached) " >&6
7174else
7175  case $DIFF in
7176  [\\/]* | ?:[\\/]*)
7177  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7178  ;;
7179  *)
7180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7181for as_dir in $PATH
7182do
7183  IFS=$as_save_IFS
7184  test -z "$as_dir" && as_dir=.
7185    for ac_exec_ext in '' $ac_executable_extensions; do
7186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7187    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7189    break 2
7190  fi
7191done
7192  done
7193IFS=$as_save_IFS
7194
7195  ;;
7196esac
7197fi
7198DIFF=$ac_cv_path_DIFF
7199if test -n "$DIFF"; then
7200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7201$as_echo "$DIFF" >&6; }
7202else
7203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7204$as_echo "no" >&6; }
7205fi
7206
7207
7208          if test "x$DIFF" = x; then
7209            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7210          fi
7211        else
7212          # Otherwise we believe it is a complete path. Use it as it is.
7213          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7214$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7215          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7216$as_echo_n "checking for DIFF... " >&6; }
7217          if test ! -x "$tool_specified"; then
7218            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7219$as_echo "not found" >&6; }
7220            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7221          fi
7222          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7223$as_echo "$tool_specified" >&6; }
7224        fi
7225      fi
7226    fi
7227
7228  fi
7229
7230
7231
7232  if test "x$DIFF" = x; then
7233    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7234  fi
7235
7236
7237
7238
7239
7240  # Publish this variable in the help.
7241
7242
7243  if [ -z "${DIRNAME+x}" ]; then
7244    # The variable is not set by user, try to locate tool using the code snippet
7245    for ac_prog in dirname
7246do
7247  # Extract the first word of "$ac_prog", so it can be a program name with args.
7248set dummy $ac_prog; ac_word=$2
7249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7250$as_echo_n "checking for $ac_word... " >&6; }
7251if ${ac_cv_path_DIRNAME+:} false; then :
7252  $as_echo_n "(cached) " >&6
7253else
7254  case $DIRNAME in
7255  [\\/]* | ?:[\\/]*)
7256  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7257  ;;
7258  *)
7259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7260for as_dir in $PATH
7261do
7262  IFS=$as_save_IFS
7263  test -z "$as_dir" && as_dir=.
7264    for ac_exec_ext in '' $ac_executable_extensions; do
7265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7266    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7268    break 2
7269  fi
7270done
7271  done
7272IFS=$as_save_IFS
7273
7274  ;;
7275esac
7276fi
7277DIRNAME=$ac_cv_path_DIRNAME
7278if test -n "$DIRNAME"; then
7279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7280$as_echo "$DIRNAME" >&6; }
7281else
7282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7283$as_echo "no" >&6; }
7284fi
7285
7286
7287  test -n "$DIRNAME" && break
7288done
7289
7290  else
7291    # The variable is set, but is it from the command line or the environment?
7292
7293    # Try to remove the string !DIRNAME! from our list.
7294    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7295    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7296      # If it failed, the variable was not from the command line. Ignore it,
7297      # but warn the user (except for BASH, which is always set by the calling BASH).
7298      if test "xDIRNAME" != xBASH; then
7299        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7300$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7301      fi
7302      # Try to locate tool using the code snippet
7303      for ac_prog in dirname
7304do
7305  # Extract the first word of "$ac_prog", so it can be a program name with args.
7306set dummy $ac_prog; ac_word=$2
7307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7308$as_echo_n "checking for $ac_word... " >&6; }
7309if ${ac_cv_path_DIRNAME+:} false; then :
7310  $as_echo_n "(cached) " >&6
7311else
7312  case $DIRNAME in
7313  [\\/]* | ?:[\\/]*)
7314  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7315  ;;
7316  *)
7317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7318for as_dir in $PATH
7319do
7320  IFS=$as_save_IFS
7321  test -z "$as_dir" && as_dir=.
7322    for ac_exec_ext in '' $ac_executable_extensions; do
7323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7324    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7326    break 2
7327  fi
7328done
7329  done
7330IFS=$as_save_IFS
7331
7332  ;;
7333esac
7334fi
7335DIRNAME=$ac_cv_path_DIRNAME
7336if test -n "$DIRNAME"; then
7337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7338$as_echo "$DIRNAME" >&6; }
7339else
7340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7341$as_echo "no" >&6; }
7342fi
7343
7344
7345  test -n "$DIRNAME" && break
7346done
7347
7348    else
7349      # If it succeeded, then it was overridden by the user. We will use it
7350      # for the tool.
7351
7352      # First remove it from the list of overridden variables, so we can test
7353      # for unknown variables in the end.
7354      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7355
7356      # Check if we try to supply an empty value
7357      if test "x$DIRNAME" = x; then
7358        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7359$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7360        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7361$as_echo_n "checking for DIRNAME... " >&6; }
7362        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7363$as_echo "disabled" >&6; }
7364      else
7365        # Check if the provided tool contains a complete path.
7366        tool_specified="$DIRNAME"
7367        tool_basename="${tool_specified##*/}"
7368        if test "x$tool_basename" = "x$tool_specified"; then
7369          # A command without a complete path is provided, search $PATH.
7370          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7371$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7372          # Extract the first word of "$tool_basename", so it can be a program name with args.
7373set dummy $tool_basename; ac_word=$2
7374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7375$as_echo_n "checking for $ac_word... " >&6; }
7376if ${ac_cv_path_DIRNAME+:} false; then :
7377  $as_echo_n "(cached) " >&6
7378else
7379  case $DIRNAME in
7380  [\\/]* | ?:[\\/]*)
7381  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7382  ;;
7383  *)
7384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7385for as_dir in $PATH
7386do
7387  IFS=$as_save_IFS
7388  test -z "$as_dir" && as_dir=.
7389    for ac_exec_ext in '' $ac_executable_extensions; do
7390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7391    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7393    break 2
7394  fi
7395done
7396  done
7397IFS=$as_save_IFS
7398
7399  ;;
7400esac
7401fi
7402DIRNAME=$ac_cv_path_DIRNAME
7403if test -n "$DIRNAME"; then
7404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7405$as_echo "$DIRNAME" >&6; }
7406else
7407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7408$as_echo "no" >&6; }
7409fi
7410
7411
7412          if test "x$DIRNAME" = x; then
7413            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7414          fi
7415        else
7416          # Otherwise we believe it is a complete path. Use it as it is.
7417          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7418$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7419          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7420$as_echo_n "checking for DIRNAME... " >&6; }
7421          if test ! -x "$tool_specified"; then
7422            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7423$as_echo "not found" >&6; }
7424            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7425          fi
7426          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7427$as_echo "$tool_specified" >&6; }
7428        fi
7429      fi
7430    fi
7431
7432  fi
7433
7434
7435
7436  if test "x$DIRNAME" = x; then
7437    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7438  fi
7439
7440
7441
7442
7443
7444  # Publish this variable in the help.
7445
7446
7447  if [ -z "${ECHO+x}" ]; then
7448    # The variable is not set by user, try to locate tool using the code snippet
7449    for ac_prog in echo
7450do
7451  # Extract the first word of "$ac_prog", so it can be a program name with args.
7452set dummy $ac_prog; ac_word=$2
7453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7454$as_echo_n "checking for $ac_word... " >&6; }
7455if ${ac_cv_path_ECHO+:} false; then :
7456  $as_echo_n "(cached) " >&6
7457else
7458  case $ECHO in
7459  [\\/]* | ?:[\\/]*)
7460  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7461  ;;
7462  *)
7463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7464for as_dir in $PATH
7465do
7466  IFS=$as_save_IFS
7467  test -z "$as_dir" && as_dir=.
7468    for ac_exec_ext in '' $ac_executable_extensions; do
7469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7470    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7472    break 2
7473  fi
7474done
7475  done
7476IFS=$as_save_IFS
7477
7478  ;;
7479esac
7480fi
7481ECHO=$ac_cv_path_ECHO
7482if test -n "$ECHO"; then
7483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7484$as_echo "$ECHO" >&6; }
7485else
7486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7487$as_echo "no" >&6; }
7488fi
7489
7490
7491  test -n "$ECHO" && break
7492done
7493
7494  else
7495    # The variable is set, but is it from the command line or the environment?
7496
7497    # Try to remove the string !ECHO! from our list.
7498    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7499    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7500      # If it failed, the variable was not from the command line. Ignore it,
7501      # but warn the user (except for BASH, which is always set by the calling BASH).
7502      if test "xECHO" != xBASH; then
7503        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7504$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7505      fi
7506      # Try to locate tool using the code snippet
7507      for ac_prog in echo
7508do
7509  # Extract the first word of "$ac_prog", so it can be a program name with args.
7510set dummy $ac_prog; ac_word=$2
7511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7512$as_echo_n "checking for $ac_word... " >&6; }
7513if ${ac_cv_path_ECHO+:} false; then :
7514  $as_echo_n "(cached) " >&6
7515else
7516  case $ECHO in
7517  [\\/]* | ?:[\\/]*)
7518  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7519  ;;
7520  *)
7521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7522for as_dir in $PATH
7523do
7524  IFS=$as_save_IFS
7525  test -z "$as_dir" && as_dir=.
7526    for ac_exec_ext in '' $ac_executable_extensions; do
7527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7528    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7530    break 2
7531  fi
7532done
7533  done
7534IFS=$as_save_IFS
7535
7536  ;;
7537esac
7538fi
7539ECHO=$ac_cv_path_ECHO
7540if test -n "$ECHO"; then
7541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7542$as_echo "$ECHO" >&6; }
7543else
7544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7545$as_echo "no" >&6; }
7546fi
7547
7548
7549  test -n "$ECHO" && break
7550done
7551
7552    else
7553      # If it succeeded, then it was overridden by the user. We will use it
7554      # for the tool.
7555
7556      # First remove it from the list of overridden variables, so we can test
7557      # for unknown variables in the end.
7558      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7559
7560      # Check if we try to supply an empty value
7561      if test "x$ECHO" = x; then
7562        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7563$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7564        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7565$as_echo_n "checking for ECHO... " >&6; }
7566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7567$as_echo "disabled" >&6; }
7568      else
7569        # Check if the provided tool contains a complete path.
7570        tool_specified="$ECHO"
7571        tool_basename="${tool_specified##*/}"
7572        if test "x$tool_basename" = "x$tool_specified"; then
7573          # A command without a complete path is provided, search $PATH.
7574          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7575$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7576          # Extract the first word of "$tool_basename", so it can be a program name with args.
7577set dummy $tool_basename; ac_word=$2
7578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7579$as_echo_n "checking for $ac_word... " >&6; }
7580if ${ac_cv_path_ECHO+:} false; then :
7581  $as_echo_n "(cached) " >&6
7582else
7583  case $ECHO in
7584  [\\/]* | ?:[\\/]*)
7585  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7586  ;;
7587  *)
7588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7589for as_dir in $PATH
7590do
7591  IFS=$as_save_IFS
7592  test -z "$as_dir" && as_dir=.
7593    for ac_exec_ext in '' $ac_executable_extensions; do
7594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7595    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7597    break 2
7598  fi
7599done
7600  done
7601IFS=$as_save_IFS
7602
7603  ;;
7604esac
7605fi
7606ECHO=$ac_cv_path_ECHO
7607if test -n "$ECHO"; then
7608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7609$as_echo "$ECHO" >&6; }
7610else
7611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7612$as_echo "no" >&6; }
7613fi
7614
7615
7616          if test "x$ECHO" = x; then
7617            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7618          fi
7619        else
7620          # Otherwise we believe it is a complete path. Use it as it is.
7621          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7622$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7623          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7624$as_echo_n "checking for ECHO... " >&6; }
7625          if test ! -x "$tool_specified"; then
7626            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7627$as_echo "not found" >&6; }
7628            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7629          fi
7630          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7631$as_echo "$tool_specified" >&6; }
7632        fi
7633      fi
7634    fi
7635
7636  fi
7637
7638
7639
7640  if test "x$ECHO" = x; then
7641    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7642  fi
7643
7644
7645
7646
7647
7648  # Publish this variable in the help.
7649
7650
7651  if [ -z "${EXPR+x}" ]; then
7652    # The variable is not set by user, try to locate tool using the code snippet
7653    for ac_prog in expr
7654do
7655  # Extract the first word of "$ac_prog", so it can be a program name with args.
7656set dummy $ac_prog; ac_word=$2
7657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7658$as_echo_n "checking for $ac_word... " >&6; }
7659if ${ac_cv_path_EXPR+:} false; then :
7660  $as_echo_n "(cached) " >&6
7661else
7662  case $EXPR in
7663  [\\/]* | ?:[\\/]*)
7664  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7665  ;;
7666  *)
7667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7668for as_dir in $PATH
7669do
7670  IFS=$as_save_IFS
7671  test -z "$as_dir" && as_dir=.
7672    for ac_exec_ext in '' $ac_executable_extensions; do
7673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7674    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7676    break 2
7677  fi
7678done
7679  done
7680IFS=$as_save_IFS
7681
7682  ;;
7683esac
7684fi
7685EXPR=$ac_cv_path_EXPR
7686if test -n "$EXPR"; then
7687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7688$as_echo "$EXPR" >&6; }
7689else
7690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7691$as_echo "no" >&6; }
7692fi
7693
7694
7695  test -n "$EXPR" && break
7696done
7697
7698  else
7699    # The variable is set, but is it from the command line or the environment?
7700
7701    # Try to remove the string !EXPR! from our list.
7702    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7703    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7704      # If it failed, the variable was not from the command line. Ignore it,
7705      # but warn the user (except for BASH, which is always set by the calling BASH).
7706      if test "xEXPR" != xBASH; then
7707        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7708$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7709      fi
7710      # Try to locate tool using the code snippet
7711      for ac_prog in expr
7712do
7713  # Extract the first word of "$ac_prog", so it can be a program name with args.
7714set dummy $ac_prog; ac_word=$2
7715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7716$as_echo_n "checking for $ac_word... " >&6; }
7717if ${ac_cv_path_EXPR+:} false; then :
7718  $as_echo_n "(cached) " >&6
7719else
7720  case $EXPR in
7721  [\\/]* | ?:[\\/]*)
7722  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7723  ;;
7724  *)
7725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7726for as_dir in $PATH
7727do
7728  IFS=$as_save_IFS
7729  test -z "$as_dir" && as_dir=.
7730    for ac_exec_ext in '' $ac_executable_extensions; do
7731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7732    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7734    break 2
7735  fi
7736done
7737  done
7738IFS=$as_save_IFS
7739
7740  ;;
7741esac
7742fi
7743EXPR=$ac_cv_path_EXPR
7744if test -n "$EXPR"; then
7745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7746$as_echo "$EXPR" >&6; }
7747else
7748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7749$as_echo "no" >&6; }
7750fi
7751
7752
7753  test -n "$EXPR" && break
7754done
7755
7756    else
7757      # If it succeeded, then it was overridden by the user. We will use it
7758      # for the tool.
7759
7760      # First remove it from the list of overridden variables, so we can test
7761      # for unknown variables in the end.
7762      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7763
7764      # Check if we try to supply an empty value
7765      if test "x$EXPR" = x; then
7766        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7767$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7768        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7769$as_echo_n "checking for EXPR... " >&6; }
7770        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7771$as_echo "disabled" >&6; }
7772      else
7773        # Check if the provided tool contains a complete path.
7774        tool_specified="$EXPR"
7775        tool_basename="${tool_specified##*/}"
7776        if test "x$tool_basename" = "x$tool_specified"; then
7777          # A command without a complete path is provided, search $PATH.
7778          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7779$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7780          # Extract the first word of "$tool_basename", so it can be a program name with args.
7781set dummy $tool_basename; ac_word=$2
7782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7783$as_echo_n "checking for $ac_word... " >&6; }
7784if ${ac_cv_path_EXPR+:} false; then :
7785  $as_echo_n "(cached) " >&6
7786else
7787  case $EXPR in
7788  [\\/]* | ?:[\\/]*)
7789  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7790  ;;
7791  *)
7792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7793for as_dir in $PATH
7794do
7795  IFS=$as_save_IFS
7796  test -z "$as_dir" && as_dir=.
7797    for ac_exec_ext in '' $ac_executable_extensions; do
7798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7799    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7801    break 2
7802  fi
7803done
7804  done
7805IFS=$as_save_IFS
7806
7807  ;;
7808esac
7809fi
7810EXPR=$ac_cv_path_EXPR
7811if test -n "$EXPR"; then
7812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7813$as_echo "$EXPR" >&6; }
7814else
7815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7816$as_echo "no" >&6; }
7817fi
7818
7819
7820          if test "x$EXPR" = x; then
7821            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7822          fi
7823        else
7824          # Otherwise we believe it is a complete path. Use it as it is.
7825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7826$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7827          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7828$as_echo_n "checking for EXPR... " >&6; }
7829          if test ! -x "$tool_specified"; then
7830            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7831$as_echo "not found" >&6; }
7832            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7833          fi
7834          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7835$as_echo "$tool_specified" >&6; }
7836        fi
7837      fi
7838    fi
7839
7840  fi
7841
7842
7843
7844  if test "x$EXPR" = x; then
7845    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7846  fi
7847
7848
7849
7850
7851
7852  # Publish this variable in the help.
7853
7854
7855  if [ -z "${FILE+x}" ]; then
7856    # The variable is not set by user, try to locate tool using the code snippet
7857    for ac_prog in file
7858do
7859  # Extract the first word of "$ac_prog", so it can be a program name with args.
7860set dummy $ac_prog; ac_word=$2
7861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7862$as_echo_n "checking for $ac_word... " >&6; }
7863if ${ac_cv_path_FILE+:} false; then :
7864  $as_echo_n "(cached) " >&6
7865else
7866  case $FILE in
7867  [\\/]* | ?:[\\/]*)
7868  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7869  ;;
7870  *)
7871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7872for as_dir in $PATH
7873do
7874  IFS=$as_save_IFS
7875  test -z "$as_dir" && as_dir=.
7876    for ac_exec_ext in '' $ac_executable_extensions; do
7877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7878    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7880    break 2
7881  fi
7882done
7883  done
7884IFS=$as_save_IFS
7885
7886  ;;
7887esac
7888fi
7889FILE=$ac_cv_path_FILE
7890if test -n "$FILE"; then
7891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7892$as_echo "$FILE" >&6; }
7893else
7894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7895$as_echo "no" >&6; }
7896fi
7897
7898
7899  test -n "$FILE" && break
7900done
7901
7902  else
7903    # The variable is set, but is it from the command line or the environment?
7904
7905    # Try to remove the string !FILE! from our list.
7906    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7907    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7908      # If it failed, the variable was not from the command line. Ignore it,
7909      # but warn the user (except for BASH, which is always set by the calling BASH).
7910      if test "xFILE" != xBASH; then
7911        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7912$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7913      fi
7914      # Try to locate tool using the code snippet
7915      for ac_prog in file
7916do
7917  # Extract the first word of "$ac_prog", so it can be a program name with args.
7918set dummy $ac_prog; ac_word=$2
7919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7920$as_echo_n "checking for $ac_word... " >&6; }
7921if ${ac_cv_path_FILE+:} false; then :
7922  $as_echo_n "(cached) " >&6
7923else
7924  case $FILE in
7925  [\\/]* | ?:[\\/]*)
7926  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7927  ;;
7928  *)
7929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7930for as_dir in $PATH
7931do
7932  IFS=$as_save_IFS
7933  test -z "$as_dir" && as_dir=.
7934    for ac_exec_ext in '' $ac_executable_extensions; do
7935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7936    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7938    break 2
7939  fi
7940done
7941  done
7942IFS=$as_save_IFS
7943
7944  ;;
7945esac
7946fi
7947FILE=$ac_cv_path_FILE
7948if test -n "$FILE"; then
7949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7950$as_echo "$FILE" >&6; }
7951else
7952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7953$as_echo "no" >&6; }
7954fi
7955
7956
7957  test -n "$FILE" && break
7958done
7959
7960    else
7961      # If it succeeded, then it was overridden by the user. We will use it
7962      # for the tool.
7963
7964      # First remove it from the list of overridden variables, so we can test
7965      # for unknown variables in the end.
7966      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7967
7968      # Check if we try to supply an empty value
7969      if test "x$FILE" = x; then
7970        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7971$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7972        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7973$as_echo_n "checking for FILE... " >&6; }
7974        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7975$as_echo "disabled" >&6; }
7976      else
7977        # Check if the provided tool contains a complete path.
7978        tool_specified="$FILE"
7979        tool_basename="${tool_specified##*/}"
7980        if test "x$tool_basename" = "x$tool_specified"; then
7981          # A command without a complete path is provided, search $PATH.
7982          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7983$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7984          # Extract the first word of "$tool_basename", so it can be a program name with args.
7985set dummy $tool_basename; ac_word=$2
7986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7987$as_echo_n "checking for $ac_word... " >&6; }
7988if ${ac_cv_path_FILE+:} false; then :
7989  $as_echo_n "(cached) " >&6
7990else
7991  case $FILE in
7992  [\\/]* | ?:[\\/]*)
7993  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7994  ;;
7995  *)
7996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7997for as_dir in $PATH
7998do
7999  IFS=$as_save_IFS
8000  test -z "$as_dir" && as_dir=.
8001    for ac_exec_ext in '' $ac_executable_extensions; do
8002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8003    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8005    break 2
8006  fi
8007done
8008  done
8009IFS=$as_save_IFS
8010
8011  ;;
8012esac
8013fi
8014FILE=$ac_cv_path_FILE
8015if test -n "$FILE"; then
8016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8017$as_echo "$FILE" >&6; }
8018else
8019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8020$as_echo "no" >&6; }
8021fi
8022
8023
8024          if test "x$FILE" = x; then
8025            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8026          fi
8027        else
8028          # Otherwise we believe it is a complete path. Use it as it is.
8029          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8030$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8031          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8032$as_echo_n "checking for FILE... " >&6; }
8033          if test ! -x "$tool_specified"; then
8034            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8035$as_echo "not found" >&6; }
8036            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8037          fi
8038          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8039$as_echo "$tool_specified" >&6; }
8040        fi
8041      fi
8042    fi
8043
8044  fi
8045
8046
8047
8048  if test "x$FILE" = x; then
8049    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8050  fi
8051
8052
8053
8054
8055
8056  # Publish this variable in the help.
8057
8058
8059  if [ -z "${FIND+x}" ]; then
8060    # The variable is not set by user, try to locate tool using the code snippet
8061    for ac_prog in find
8062do
8063  # Extract the first word of "$ac_prog", so it can be a program name with args.
8064set dummy $ac_prog; ac_word=$2
8065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8066$as_echo_n "checking for $ac_word... " >&6; }
8067if ${ac_cv_path_FIND+:} false; then :
8068  $as_echo_n "(cached) " >&6
8069else
8070  case $FIND in
8071  [\\/]* | ?:[\\/]*)
8072  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8073  ;;
8074  *)
8075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8076for as_dir in $PATH
8077do
8078  IFS=$as_save_IFS
8079  test -z "$as_dir" && as_dir=.
8080    for ac_exec_ext in '' $ac_executable_extensions; do
8081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8082    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8084    break 2
8085  fi
8086done
8087  done
8088IFS=$as_save_IFS
8089
8090  ;;
8091esac
8092fi
8093FIND=$ac_cv_path_FIND
8094if test -n "$FIND"; then
8095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8096$as_echo "$FIND" >&6; }
8097else
8098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8099$as_echo "no" >&6; }
8100fi
8101
8102
8103  test -n "$FIND" && break
8104done
8105
8106  else
8107    # The variable is set, but is it from the command line or the environment?
8108
8109    # Try to remove the string !FIND! from our list.
8110    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8111    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8112      # If it failed, the variable was not from the command line. Ignore it,
8113      # but warn the user (except for BASH, which is always set by the calling BASH).
8114      if test "xFIND" != xBASH; then
8115        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8116$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8117      fi
8118      # Try to locate tool using the code snippet
8119      for ac_prog in find
8120do
8121  # Extract the first word of "$ac_prog", so it can be a program name with args.
8122set dummy $ac_prog; ac_word=$2
8123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8124$as_echo_n "checking for $ac_word... " >&6; }
8125if ${ac_cv_path_FIND+:} false; then :
8126  $as_echo_n "(cached) " >&6
8127else
8128  case $FIND in
8129  [\\/]* | ?:[\\/]*)
8130  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8131  ;;
8132  *)
8133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8134for as_dir in $PATH
8135do
8136  IFS=$as_save_IFS
8137  test -z "$as_dir" && as_dir=.
8138    for ac_exec_ext in '' $ac_executable_extensions; do
8139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8140    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8142    break 2
8143  fi
8144done
8145  done
8146IFS=$as_save_IFS
8147
8148  ;;
8149esac
8150fi
8151FIND=$ac_cv_path_FIND
8152if test -n "$FIND"; then
8153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8154$as_echo "$FIND" >&6; }
8155else
8156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8157$as_echo "no" >&6; }
8158fi
8159
8160
8161  test -n "$FIND" && break
8162done
8163
8164    else
8165      # If it succeeded, then it was overridden by the user. We will use it
8166      # for the tool.
8167
8168      # First remove it from the list of overridden variables, so we can test
8169      # for unknown variables in the end.
8170      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8171
8172      # Check if we try to supply an empty value
8173      if test "x$FIND" = x; then
8174        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8175$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8176        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8177$as_echo_n "checking for FIND... " >&6; }
8178        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8179$as_echo "disabled" >&6; }
8180      else
8181        # Check if the provided tool contains a complete path.
8182        tool_specified="$FIND"
8183        tool_basename="${tool_specified##*/}"
8184        if test "x$tool_basename" = "x$tool_specified"; then
8185          # A command without a complete path is provided, search $PATH.
8186          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8187$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8188          # Extract the first word of "$tool_basename", so it can be a program name with args.
8189set dummy $tool_basename; ac_word=$2
8190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8191$as_echo_n "checking for $ac_word... " >&6; }
8192if ${ac_cv_path_FIND+:} false; then :
8193  $as_echo_n "(cached) " >&6
8194else
8195  case $FIND in
8196  [\\/]* | ?:[\\/]*)
8197  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8198  ;;
8199  *)
8200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8201for as_dir in $PATH
8202do
8203  IFS=$as_save_IFS
8204  test -z "$as_dir" && as_dir=.
8205    for ac_exec_ext in '' $ac_executable_extensions; do
8206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8207    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8209    break 2
8210  fi
8211done
8212  done
8213IFS=$as_save_IFS
8214
8215  ;;
8216esac
8217fi
8218FIND=$ac_cv_path_FIND
8219if test -n "$FIND"; then
8220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8221$as_echo "$FIND" >&6; }
8222else
8223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8224$as_echo "no" >&6; }
8225fi
8226
8227
8228          if test "x$FIND" = x; then
8229            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8230          fi
8231        else
8232          # Otherwise we believe it is a complete path. Use it as it is.
8233          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8234$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8235          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8236$as_echo_n "checking for FIND... " >&6; }
8237          if test ! -x "$tool_specified"; then
8238            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8239$as_echo "not found" >&6; }
8240            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8241          fi
8242          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8243$as_echo "$tool_specified" >&6; }
8244        fi
8245      fi
8246    fi
8247
8248  fi
8249
8250
8251
8252  if test "x$FIND" = x; then
8253    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8254  fi
8255
8256
8257
8258
8259
8260  # Publish this variable in the help.
8261
8262
8263  if [ -z "${HEAD+x}" ]; then
8264    # The variable is not set by user, try to locate tool using the code snippet
8265    for ac_prog in head
8266do
8267  # Extract the first word of "$ac_prog", so it can be a program name with args.
8268set dummy $ac_prog; ac_word=$2
8269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8270$as_echo_n "checking for $ac_word... " >&6; }
8271if ${ac_cv_path_HEAD+:} false; then :
8272  $as_echo_n "(cached) " >&6
8273else
8274  case $HEAD in
8275  [\\/]* | ?:[\\/]*)
8276  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8277  ;;
8278  *)
8279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8280for as_dir in $PATH
8281do
8282  IFS=$as_save_IFS
8283  test -z "$as_dir" && as_dir=.
8284    for ac_exec_ext in '' $ac_executable_extensions; do
8285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8286    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8288    break 2
8289  fi
8290done
8291  done
8292IFS=$as_save_IFS
8293
8294  ;;
8295esac
8296fi
8297HEAD=$ac_cv_path_HEAD
8298if test -n "$HEAD"; then
8299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8300$as_echo "$HEAD" >&6; }
8301else
8302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8303$as_echo "no" >&6; }
8304fi
8305
8306
8307  test -n "$HEAD" && break
8308done
8309
8310  else
8311    # The variable is set, but is it from the command line or the environment?
8312
8313    # Try to remove the string !HEAD! from our list.
8314    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8315    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8316      # If it failed, the variable was not from the command line. Ignore it,
8317      # but warn the user (except for BASH, which is always set by the calling BASH).
8318      if test "xHEAD" != xBASH; then
8319        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8320$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8321      fi
8322      # Try to locate tool using the code snippet
8323      for ac_prog in head
8324do
8325  # Extract the first word of "$ac_prog", so it can be a program name with args.
8326set dummy $ac_prog; ac_word=$2
8327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8328$as_echo_n "checking for $ac_word... " >&6; }
8329if ${ac_cv_path_HEAD+:} false; then :
8330  $as_echo_n "(cached) " >&6
8331else
8332  case $HEAD in
8333  [\\/]* | ?:[\\/]*)
8334  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8335  ;;
8336  *)
8337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8338for as_dir in $PATH
8339do
8340  IFS=$as_save_IFS
8341  test -z "$as_dir" && as_dir=.
8342    for ac_exec_ext in '' $ac_executable_extensions; do
8343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8344    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8346    break 2
8347  fi
8348done
8349  done
8350IFS=$as_save_IFS
8351
8352  ;;
8353esac
8354fi
8355HEAD=$ac_cv_path_HEAD
8356if test -n "$HEAD"; then
8357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8358$as_echo "$HEAD" >&6; }
8359else
8360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8361$as_echo "no" >&6; }
8362fi
8363
8364
8365  test -n "$HEAD" && break
8366done
8367
8368    else
8369      # If it succeeded, then it was overridden by the user. We will use it
8370      # for the tool.
8371
8372      # First remove it from the list of overridden variables, so we can test
8373      # for unknown variables in the end.
8374      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8375
8376      # Check if we try to supply an empty value
8377      if test "x$HEAD" = x; then
8378        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8379$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8380        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8381$as_echo_n "checking for HEAD... " >&6; }
8382        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8383$as_echo "disabled" >&6; }
8384      else
8385        # Check if the provided tool contains a complete path.
8386        tool_specified="$HEAD"
8387        tool_basename="${tool_specified##*/}"
8388        if test "x$tool_basename" = "x$tool_specified"; then
8389          # A command without a complete path is provided, search $PATH.
8390          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8391$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8392          # Extract the first word of "$tool_basename", so it can be a program name with args.
8393set dummy $tool_basename; ac_word=$2
8394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8395$as_echo_n "checking for $ac_word... " >&6; }
8396if ${ac_cv_path_HEAD+:} false; then :
8397  $as_echo_n "(cached) " >&6
8398else
8399  case $HEAD in
8400  [\\/]* | ?:[\\/]*)
8401  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8402  ;;
8403  *)
8404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8405for as_dir in $PATH
8406do
8407  IFS=$as_save_IFS
8408  test -z "$as_dir" && as_dir=.
8409    for ac_exec_ext in '' $ac_executable_extensions; do
8410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8411    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8413    break 2
8414  fi
8415done
8416  done
8417IFS=$as_save_IFS
8418
8419  ;;
8420esac
8421fi
8422HEAD=$ac_cv_path_HEAD
8423if test -n "$HEAD"; then
8424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8425$as_echo "$HEAD" >&6; }
8426else
8427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8428$as_echo "no" >&6; }
8429fi
8430
8431
8432          if test "x$HEAD" = x; then
8433            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8434          fi
8435        else
8436          # Otherwise we believe it is a complete path. Use it as it is.
8437          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8438$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8439          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8440$as_echo_n "checking for HEAD... " >&6; }
8441          if test ! -x "$tool_specified"; then
8442            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8443$as_echo "not found" >&6; }
8444            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8445          fi
8446          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8447$as_echo "$tool_specified" >&6; }
8448        fi
8449      fi
8450    fi
8451
8452  fi
8453
8454
8455
8456  if test "x$HEAD" = x; then
8457    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8458  fi
8459
8460
8461
8462
8463
8464  # Publish this variable in the help.
8465
8466
8467  if [ -z "${GUNZIP+x}" ]; then
8468    # The variable is not set by user, try to locate tool using the code snippet
8469    for ac_prog in gunzip
8470do
8471  # Extract the first word of "$ac_prog", so it can be a program name with args.
8472set dummy $ac_prog; ac_word=$2
8473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8474$as_echo_n "checking for $ac_word... " >&6; }
8475if ${ac_cv_path_GUNZIP+:} false; then :
8476  $as_echo_n "(cached) " >&6
8477else
8478  case $GUNZIP in
8479  [\\/]* | ?:[\\/]*)
8480  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8481  ;;
8482  *)
8483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8484for as_dir in $PATH
8485do
8486  IFS=$as_save_IFS
8487  test -z "$as_dir" && as_dir=.
8488    for ac_exec_ext in '' $ac_executable_extensions; do
8489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8490    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8492    break 2
8493  fi
8494done
8495  done
8496IFS=$as_save_IFS
8497
8498  ;;
8499esac
8500fi
8501GUNZIP=$ac_cv_path_GUNZIP
8502if test -n "$GUNZIP"; then
8503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8504$as_echo "$GUNZIP" >&6; }
8505else
8506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8507$as_echo "no" >&6; }
8508fi
8509
8510
8511  test -n "$GUNZIP" && break
8512done
8513
8514  else
8515    # The variable is set, but is it from the command line or the environment?
8516
8517    # Try to remove the string !GUNZIP! from our list.
8518    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8519    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8520      # If it failed, the variable was not from the command line. Ignore it,
8521      # but warn the user (except for BASH, which is always set by the calling BASH).
8522      if test "xGUNZIP" != xBASH; then
8523        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8524$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8525      fi
8526      # Try to locate tool using the code snippet
8527      for ac_prog in gunzip
8528do
8529  # Extract the first word of "$ac_prog", so it can be a program name with args.
8530set dummy $ac_prog; ac_word=$2
8531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8532$as_echo_n "checking for $ac_word... " >&6; }
8533if ${ac_cv_path_GUNZIP+:} false; then :
8534  $as_echo_n "(cached) " >&6
8535else
8536  case $GUNZIP in
8537  [\\/]* | ?:[\\/]*)
8538  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8539  ;;
8540  *)
8541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8542for as_dir in $PATH
8543do
8544  IFS=$as_save_IFS
8545  test -z "$as_dir" && as_dir=.
8546    for ac_exec_ext in '' $ac_executable_extensions; do
8547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8548    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8550    break 2
8551  fi
8552done
8553  done
8554IFS=$as_save_IFS
8555
8556  ;;
8557esac
8558fi
8559GUNZIP=$ac_cv_path_GUNZIP
8560if test -n "$GUNZIP"; then
8561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8562$as_echo "$GUNZIP" >&6; }
8563else
8564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8565$as_echo "no" >&6; }
8566fi
8567
8568
8569  test -n "$GUNZIP" && break
8570done
8571
8572    else
8573      # If it succeeded, then it was overridden by the user. We will use it
8574      # for the tool.
8575
8576      # First remove it from the list of overridden variables, so we can test
8577      # for unknown variables in the end.
8578      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8579
8580      # Check if we try to supply an empty value
8581      if test "x$GUNZIP" = x; then
8582        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8583$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8584        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8585$as_echo_n "checking for GUNZIP... " >&6; }
8586        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8587$as_echo "disabled" >&6; }
8588      else
8589        # Check if the provided tool contains a complete path.
8590        tool_specified="$GUNZIP"
8591        tool_basename="${tool_specified##*/}"
8592        if test "x$tool_basename" = "x$tool_specified"; then
8593          # A command without a complete path is provided, search $PATH.
8594          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8595$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8596          # Extract the first word of "$tool_basename", so it can be a program name with args.
8597set dummy $tool_basename; ac_word=$2
8598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8599$as_echo_n "checking for $ac_word... " >&6; }
8600if ${ac_cv_path_GUNZIP+:} false; then :
8601  $as_echo_n "(cached) " >&6
8602else
8603  case $GUNZIP in
8604  [\\/]* | ?:[\\/]*)
8605  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8606  ;;
8607  *)
8608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8609for as_dir in $PATH
8610do
8611  IFS=$as_save_IFS
8612  test -z "$as_dir" && as_dir=.
8613    for ac_exec_ext in '' $ac_executable_extensions; do
8614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8615    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8617    break 2
8618  fi
8619done
8620  done
8621IFS=$as_save_IFS
8622
8623  ;;
8624esac
8625fi
8626GUNZIP=$ac_cv_path_GUNZIP
8627if test -n "$GUNZIP"; then
8628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8629$as_echo "$GUNZIP" >&6; }
8630else
8631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8632$as_echo "no" >&6; }
8633fi
8634
8635
8636          if test "x$GUNZIP" = x; then
8637            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8638          fi
8639        else
8640          # Otherwise we believe it is a complete path. Use it as it is.
8641          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8642$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8643          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8644$as_echo_n "checking for GUNZIP... " >&6; }
8645          if test ! -x "$tool_specified"; then
8646            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8647$as_echo "not found" >&6; }
8648            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8649          fi
8650          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8651$as_echo "$tool_specified" >&6; }
8652        fi
8653      fi
8654    fi
8655
8656  fi
8657
8658
8659
8660  if test "x$GUNZIP" = x; then
8661    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8662  fi
8663
8664
8665
8666
8667
8668  # Publish this variable in the help.
8669
8670
8671  if [ -z "${GZIP+x}" ]; then
8672    # The variable is not set by user, try to locate tool using the code snippet
8673    for ac_prog in pigz gzip
8674do
8675  # Extract the first word of "$ac_prog", so it can be a program name with args.
8676set dummy $ac_prog; ac_word=$2
8677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8678$as_echo_n "checking for $ac_word... " >&6; }
8679if ${ac_cv_path_GZIP+:} false; then :
8680  $as_echo_n "(cached) " >&6
8681else
8682  case $GZIP in
8683  [\\/]* | ?:[\\/]*)
8684  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8685  ;;
8686  *)
8687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8688for as_dir in $PATH
8689do
8690  IFS=$as_save_IFS
8691  test -z "$as_dir" && as_dir=.
8692    for ac_exec_ext in '' $ac_executable_extensions; do
8693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8694    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8696    break 2
8697  fi
8698done
8699  done
8700IFS=$as_save_IFS
8701
8702  ;;
8703esac
8704fi
8705GZIP=$ac_cv_path_GZIP
8706if test -n "$GZIP"; then
8707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8708$as_echo "$GZIP" >&6; }
8709else
8710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8711$as_echo "no" >&6; }
8712fi
8713
8714
8715  test -n "$GZIP" && break
8716done
8717
8718  else
8719    # The variable is set, but is it from the command line or the environment?
8720
8721    # Try to remove the string !GZIP! from our list.
8722    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8723    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8724      # If it failed, the variable was not from the command line. Ignore it,
8725      # but warn the user (except for BASH, which is always set by the calling BASH).
8726      if test "xGZIP" != xBASH; then
8727        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8728$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8729      fi
8730      # Try to locate tool using the code snippet
8731      for ac_prog in pigz gzip
8732do
8733  # Extract the first word of "$ac_prog", so it can be a program name with args.
8734set dummy $ac_prog; ac_word=$2
8735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8736$as_echo_n "checking for $ac_word... " >&6; }
8737if ${ac_cv_path_GZIP+:} false; then :
8738  $as_echo_n "(cached) " >&6
8739else
8740  case $GZIP in
8741  [\\/]* | ?:[\\/]*)
8742  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8743  ;;
8744  *)
8745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8746for as_dir in $PATH
8747do
8748  IFS=$as_save_IFS
8749  test -z "$as_dir" && as_dir=.
8750    for ac_exec_ext in '' $ac_executable_extensions; do
8751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8752    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8754    break 2
8755  fi
8756done
8757  done
8758IFS=$as_save_IFS
8759
8760  ;;
8761esac
8762fi
8763GZIP=$ac_cv_path_GZIP
8764if test -n "$GZIP"; then
8765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8766$as_echo "$GZIP" >&6; }
8767else
8768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8769$as_echo "no" >&6; }
8770fi
8771
8772
8773  test -n "$GZIP" && break
8774done
8775
8776    else
8777      # If it succeeded, then it was overridden by the user. We will use it
8778      # for the tool.
8779
8780      # First remove it from the list of overridden variables, so we can test
8781      # for unknown variables in the end.
8782      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8783
8784      # Check if we try to supply an empty value
8785      if test "x$GZIP" = x; then
8786        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8787$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8788        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8789$as_echo_n "checking for GZIP... " >&6; }
8790        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8791$as_echo "disabled" >&6; }
8792      else
8793        # Check if the provided tool contains a complete path.
8794        tool_specified="$GZIP"
8795        tool_basename="${tool_specified##*/}"
8796        if test "x$tool_basename" = "x$tool_specified"; then
8797          # A command without a complete path is provided, search $PATH.
8798          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8799$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8800          # Extract the first word of "$tool_basename", so it can be a program name with args.
8801set dummy $tool_basename; ac_word=$2
8802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8803$as_echo_n "checking for $ac_word... " >&6; }
8804if ${ac_cv_path_GZIP+:} false; then :
8805  $as_echo_n "(cached) " >&6
8806else
8807  case $GZIP in
8808  [\\/]* | ?:[\\/]*)
8809  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8810  ;;
8811  *)
8812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8813for as_dir in $PATH
8814do
8815  IFS=$as_save_IFS
8816  test -z "$as_dir" && as_dir=.
8817    for ac_exec_ext in '' $ac_executable_extensions; do
8818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8819    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8821    break 2
8822  fi
8823done
8824  done
8825IFS=$as_save_IFS
8826
8827  ;;
8828esac
8829fi
8830GZIP=$ac_cv_path_GZIP
8831if test -n "$GZIP"; then
8832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8833$as_echo "$GZIP" >&6; }
8834else
8835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8836$as_echo "no" >&6; }
8837fi
8838
8839
8840          if test "x$GZIP" = x; then
8841            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8842          fi
8843        else
8844          # Otherwise we believe it is a complete path. Use it as it is.
8845          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8846$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8847          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8848$as_echo_n "checking for GZIP... " >&6; }
8849          if test ! -x "$tool_specified"; then
8850            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8851$as_echo "not found" >&6; }
8852            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8853          fi
8854          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8855$as_echo "$tool_specified" >&6; }
8856        fi
8857      fi
8858    fi
8859
8860  fi
8861
8862
8863
8864  if test "x$GZIP" = x; then
8865    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8866  fi
8867
8868
8869
8870
8871
8872  # Publish this variable in the help.
8873
8874
8875  if [ -z "${LN+x}" ]; then
8876    # The variable is not set by user, try to locate tool using the code snippet
8877    for ac_prog in ln
8878do
8879  # Extract the first word of "$ac_prog", so it can be a program name with args.
8880set dummy $ac_prog; ac_word=$2
8881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8882$as_echo_n "checking for $ac_word... " >&6; }
8883if ${ac_cv_path_LN+:} false; then :
8884  $as_echo_n "(cached) " >&6
8885else
8886  case $LN in
8887  [\\/]* | ?:[\\/]*)
8888  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8889  ;;
8890  *)
8891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8892for as_dir in $PATH
8893do
8894  IFS=$as_save_IFS
8895  test -z "$as_dir" && as_dir=.
8896    for ac_exec_ext in '' $ac_executable_extensions; do
8897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8898    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8900    break 2
8901  fi
8902done
8903  done
8904IFS=$as_save_IFS
8905
8906  ;;
8907esac
8908fi
8909LN=$ac_cv_path_LN
8910if test -n "$LN"; then
8911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8912$as_echo "$LN" >&6; }
8913else
8914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8915$as_echo "no" >&6; }
8916fi
8917
8918
8919  test -n "$LN" && break
8920done
8921
8922  else
8923    # The variable is set, but is it from the command line or the environment?
8924
8925    # Try to remove the string !LN! from our list.
8926    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8927    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8928      # If it failed, the variable was not from the command line. Ignore it,
8929      # but warn the user (except for BASH, which is always set by the calling BASH).
8930      if test "xLN" != xBASH; then
8931        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8932$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8933      fi
8934      # Try to locate tool using the code snippet
8935      for ac_prog in ln
8936do
8937  # Extract the first word of "$ac_prog", so it can be a program name with args.
8938set dummy $ac_prog; ac_word=$2
8939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8940$as_echo_n "checking for $ac_word... " >&6; }
8941if ${ac_cv_path_LN+:} false; then :
8942  $as_echo_n "(cached) " >&6
8943else
8944  case $LN in
8945  [\\/]* | ?:[\\/]*)
8946  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8947  ;;
8948  *)
8949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8950for as_dir in $PATH
8951do
8952  IFS=$as_save_IFS
8953  test -z "$as_dir" && as_dir=.
8954    for ac_exec_ext in '' $ac_executable_extensions; do
8955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8956    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8958    break 2
8959  fi
8960done
8961  done
8962IFS=$as_save_IFS
8963
8964  ;;
8965esac
8966fi
8967LN=$ac_cv_path_LN
8968if test -n "$LN"; then
8969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8970$as_echo "$LN" >&6; }
8971else
8972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8973$as_echo "no" >&6; }
8974fi
8975
8976
8977  test -n "$LN" && break
8978done
8979
8980    else
8981      # If it succeeded, then it was overridden by the user. We will use it
8982      # for the tool.
8983
8984      # First remove it from the list of overridden variables, so we can test
8985      # for unknown variables in the end.
8986      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8987
8988      # Check if we try to supply an empty value
8989      if test "x$LN" = x; then
8990        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8991$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8992        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8993$as_echo_n "checking for LN... " >&6; }
8994        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8995$as_echo "disabled" >&6; }
8996      else
8997        # Check if the provided tool contains a complete path.
8998        tool_specified="$LN"
8999        tool_basename="${tool_specified##*/}"
9000        if test "x$tool_basename" = "x$tool_specified"; then
9001          # A command without a complete path is provided, search $PATH.
9002          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9003$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9004          # Extract the first word of "$tool_basename", so it can be a program name with args.
9005set dummy $tool_basename; ac_word=$2
9006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9007$as_echo_n "checking for $ac_word... " >&6; }
9008if ${ac_cv_path_LN+:} false; then :
9009  $as_echo_n "(cached) " >&6
9010else
9011  case $LN in
9012  [\\/]* | ?:[\\/]*)
9013  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9014  ;;
9015  *)
9016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9017for as_dir in $PATH
9018do
9019  IFS=$as_save_IFS
9020  test -z "$as_dir" && as_dir=.
9021    for ac_exec_ext in '' $ac_executable_extensions; do
9022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9023    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9025    break 2
9026  fi
9027done
9028  done
9029IFS=$as_save_IFS
9030
9031  ;;
9032esac
9033fi
9034LN=$ac_cv_path_LN
9035if test -n "$LN"; then
9036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9037$as_echo "$LN" >&6; }
9038else
9039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9040$as_echo "no" >&6; }
9041fi
9042
9043
9044          if test "x$LN" = x; then
9045            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9046          fi
9047        else
9048          # Otherwise we believe it is a complete path. Use it as it is.
9049          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9050$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9051          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9052$as_echo_n "checking for LN... " >&6; }
9053          if test ! -x "$tool_specified"; then
9054            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9055$as_echo "not found" >&6; }
9056            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9057          fi
9058          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9059$as_echo "$tool_specified" >&6; }
9060        fi
9061      fi
9062    fi
9063
9064  fi
9065
9066
9067
9068  if test "x$LN" = x; then
9069    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9070  fi
9071
9072
9073
9074
9075
9076  # Publish this variable in the help.
9077
9078
9079  if [ -z "${LS+x}" ]; then
9080    # The variable is not set by user, try to locate tool using the code snippet
9081    for ac_prog in ls
9082do
9083  # Extract the first word of "$ac_prog", so it can be a program name with args.
9084set dummy $ac_prog; ac_word=$2
9085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9086$as_echo_n "checking for $ac_word... " >&6; }
9087if ${ac_cv_path_LS+:} false; then :
9088  $as_echo_n "(cached) " >&6
9089else
9090  case $LS in
9091  [\\/]* | ?:[\\/]*)
9092  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9093  ;;
9094  *)
9095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9096for as_dir in $PATH
9097do
9098  IFS=$as_save_IFS
9099  test -z "$as_dir" && as_dir=.
9100    for ac_exec_ext in '' $ac_executable_extensions; do
9101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9102    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9104    break 2
9105  fi
9106done
9107  done
9108IFS=$as_save_IFS
9109
9110  ;;
9111esac
9112fi
9113LS=$ac_cv_path_LS
9114if test -n "$LS"; then
9115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9116$as_echo "$LS" >&6; }
9117else
9118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9119$as_echo "no" >&6; }
9120fi
9121
9122
9123  test -n "$LS" && break
9124done
9125
9126  else
9127    # The variable is set, but is it from the command line or the environment?
9128
9129    # Try to remove the string !LS! from our list.
9130    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9131    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9132      # If it failed, the variable was not from the command line. Ignore it,
9133      # but warn the user (except for BASH, which is always set by the calling BASH).
9134      if test "xLS" != xBASH; then
9135        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9136$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9137      fi
9138      # Try to locate tool using the code snippet
9139      for ac_prog in ls
9140do
9141  # Extract the first word of "$ac_prog", so it can be a program name with args.
9142set dummy $ac_prog; ac_word=$2
9143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9144$as_echo_n "checking for $ac_word... " >&6; }
9145if ${ac_cv_path_LS+:} false; then :
9146  $as_echo_n "(cached) " >&6
9147else
9148  case $LS in
9149  [\\/]* | ?:[\\/]*)
9150  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9151  ;;
9152  *)
9153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9154for as_dir in $PATH
9155do
9156  IFS=$as_save_IFS
9157  test -z "$as_dir" && as_dir=.
9158    for ac_exec_ext in '' $ac_executable_extensions; do
9159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9160    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9162    break 2
9163  fi
9164done
9165  done
9166IFS=$as_save_IFS
9167
9168  ;;
9169esac
9170fi
9171LS=$ac_cv_path_LS
9172if test -n "$LS"; then
9173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9174$as_echo "$LS" >&6; }
9175else
9176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9177$as_echo "no" >&6; }
9178fi
9179
9180
9181  test -n "$LS" && break
9182done
9183
9184    else
9185      # If it succeeded, then it was overridden by the user. We will use it
9186      # for the tool.
9187
9188      # First remove it from the list of overridden variables, so we can test
9189      # for unknown variables in the end.
9190      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9191
9192      # Check if we try to supply an empty value
9193      if test "x$LS" = x; then
9194        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9195$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9196        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9197$as_echo_n "checking for LS... " >&6; }
9198        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9199$as_echo "disabled" >&6; }
9200      else
9201        # Check if the provided tool contains a complete path.
9202        tool_specified="$LS"
9203        tool_basename="${tool_specified##*/}"
9204        if test "x$tool_basename" = "x$tool_specified"; then
9205          # A command without a complete path is provided, search $PATH.
9206          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9207$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9208          # Extract the first word of "$tool_basename", so it can be a program name with args.
9209set dummy $tool_basename; ac_word=$2
9210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9211$as_echo_n "checking for $ac_word... " >&6; }
9212if ${ac_cv_path_LS+:} false; then :
9213  $as_echo_n "(cached) " >&6
9214else
9215  case $LS in
9216  [\\/]* | ?:[\\/]*)
9217  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9218  ;;
9219  *)
9220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9221for as_dir in $PATH
9222do
9223  IFS=$as_save_IFS
9224  test -z "$as_dir" && as_dir=.
9225    for ac_exec_ext in '' $ac_executable_extensions; do
9226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9227    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9229    break 2
9230  fi
9231done
9232  done
9233IFS=$as_save_IFS
9234
9235  ;;
9236esac
9237fi
9238LS=$ac_cv_path_LS
9239if test -n "$LS"; then
9240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9241$as_echo "$LS" >&6; }
9242else
9243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9244$as_echo "no" >&6; }
9245fi
9246
9247
9248          if test "x$LS" = x; then
9249            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9250          fi
9251        else
9252          # Otherwise we believe it is a complete path. Use it as it is.
9253          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9254$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9255          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9256$as_echo_n "checking for LS... " >&6; }
9257          if test ! -x "$tool_specified"; then
9258            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9259$as_echo "not found" >&6; }
9260            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9261          fi
9262          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9263$as_echo "$tool_specified" >&6; }
9264        fi
9265      fi
9266    fi
9267
9268  fi
9269
9270
9271
9272  if test "x$LS" = x; then
9273    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9274  fi
9275
9276
9277
9278
9279
9280  # Publish this variable in the help.
9281
9282
9283  if [ -z "${MKDIR+x}" ]; then
9284    # The variable is not set by user, try to locate tool using the code snippet
9285    for ac_prog in mkdir
9286do
9287  # Extract the first word of "$ac_prog", so it can be a program name with args.
9288set dummy $ac_prog; ac_word=$2
9289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9290$as_echo_n "checking for $ac_word... " >&6; }
9291if ${ac_cv_path_MKDIR+:} false; then :
9292  $as_echo_n "(cached) " >&6
9293else
9294  case $MKDIR in
9295  [\\/]* | ?:[\\/]*)
9296  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9297  ;;
9298  *)
9299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9300for as_dir in $PATH
9301do
9302  IFS=$as_save_IFS
9303  test -z "$as_dir" && as_dir=.
9304    for ac_exec_ext in '' $ac_executable_extensions; do
9305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9306    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9308    break 2
9309  fi
9310done
9311  done
9312IFS=$as_save_IFS
9313
9314  ;;
9315esac
9316fi
9317MKDIR=$ac_cv_path_MKDIR
9318if test -n "$MKDIR"; then
9319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9320$as_echo "$MKDIR" >&6; }
9321else
9322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9323$as_echo "no" >&6; }
9324fi
9325
9326
9327  test -n "$MKDIR" && break
9328done
9329
9330  else
9331    # The variable is set, but is it from the command line or the environment?
9332
9333    # Try to remove the string !MKDIR! from our list.
9334    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9335    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9336      # If it failed, the variable was not from the command line. Ignore it,
9337      # but warn the user (except for BASH, which is always set by the calling BASH).
9338      if test "xMKDIR" != xBASH; then
9339        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9340$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9341      fi
9342      # Try to locate tool using the code snippet
9343      for ac_prog in mkdir
9344do
9345  # Extract the first word of "$ac_prog", so it can be a program name with args.
9346set dummy $ac_prog; ac_word=$2
9347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9348$as_echo_n "checking for $ac_word... " >&6; }
9349if ${ac_cv_path_MKDIR+:} false; then :
9350  $as_echo_n "(cached) " >&6
9351else
9352  case $MKDIR in
9353  [\\/]* | ?:[\\/]*)
9354  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9355  ;;
9356  *)
9357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9358for as_dir in $PATH
9359do
9360  IFS=$as_save_IFS
9361  test -z "$as_dir" && as_dir=.
9362    for ac_exec_ext in '' $ac_executable_extensions; do
9363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9364    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9366    break 2
9367  fi
9368done
9369  done
9370IFS=$as_save_IFS
9371
9372  ;;
9373esac
9374fi
9375MKDIR=$ac_cv_path_MKDIR
9376if test -n "$MKDIR"; then
9377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9378$as_echo "$MKDIR" >&6; }
9379else
9380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9381$as_echo "no" >&6; }
9382fi
9383
9384
9385  test -n "$MKDIR" && break
9386done
9387
9388    else
9389      # If it succeeded, then it was overridden by the user. We will use it
9390      # for the tool.
9391
9392      # First remove it from the list of overridden variables, so we can test
9393      # for unknown variables in the end.
9394      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9395
9396      # Check if we try to supply an empty value
9397      if test "x$MKDIR" = x; then
9398        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9399$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9400        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9401$as_echo_n "checking for MKDIR... " >&6; }
9402        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9403$as_echo "disabled" >&6; }
9404      else
9405        # Check if the provided tool contains a complete path.
9406        tool_specified="$MKDIR"
9407        tool_basename="${tool_specified##*/}"
9408        if test "x$tool_basename" = "x$tool_specified"; then
9409          # A command without a complete path is provided, search $PATH.
9410          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9411$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9412          # Extract the first word of "$tool_basename", so it can be a program name with args.
9413set dummy $tool_basename; ac_word=$2
9414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9415$as_echo_n "checking for $ac_word... " >&6; }
9416if ${ac_cv_path_MKDIR+:} false; then :
9417  $as_echo_n "(cached) " >&6
9418else
9419  case $MKDIR in
9420  [\\/]* | ?:[\\/]*)
9421  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9422  ;;
9423  *)
9424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9425for as_dir in $PATH
9426do
9427  IFS=$as_save_IFS
9428  test -z "$as_dir" && as_dir=.
9429    for ac_exec_ext in '' $ac_executable_extensions; do
9430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9431    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9433    break 2
9434  fi
9435done
9436  done
9437IFS=$as_save_IFS
9438
9439  ;;
9440esac
9441fi
9442MKDIR=$ac_cv_path_MKDIR
9443if test -n "$MKDIR"; then
9444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9445$as_echo "$MKDIR" >&6; }
9446else
9447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9448$as_echo "no" >&6; }
9449fi
9450
9451
9452          if test "x$MKDIR" = x; then
9453            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9454          fi
9455        else
9456          # Otherwise we believe it is a complete path. Use it as it is.
9457          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9458$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9459          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9460$as_echo_n "checking for MKDIR... " >&6; }
9461          if test ! -x "$tool_specified"; then
9462            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9463$as_echo "not found" >&6; }
9464            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9465          fi
9466          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9467$as_echo "$tool_specified" >&6; }
9468        fi
9469      fi
9470    fi
9471
9472  fi
9473
9474
9475
9476  if test "x$MKDIR" = x; then
9477    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9478  fi
9479
9480
9481
9482
9483
9484  # Publish this variable in the help.
9485
9486
9487  if [ -z "${MKTEMP+x}" ]; then
9488    # The variable is not set by user, try to locate tool using the code snippet
9489    for ac_prog in mktemp
9490do
9491  # Extract the first word of "$ac_prog", so it can be a program name with args.
9492set dummy $ac_prog; ac_word=$2
9493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9494$as_echo_n "checking for $ac_word... " >&6; }
9495if ${ac_cv_path_MKTEMP+:} false; then :
9496  $as_echo_n "(cached) " >&6
9497else
9498  case $MKTEMP in
9499  [\\/]* | ?:[\\/]*)
9500  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9501  ;;
9502  *)
9503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9504for as_dir in $PATH
9505do
9506  IFS=$as_save_IFS
9507  test -z "$as_dir" && as_dir=.
9508    for ac_exec_ext in '' $ac_executable_extensions; do
9509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9510    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9512    break 2
9513  fi
9514done
9515  done
9516IFS=$as_save_IFS
9517
9518  ;;
9519esac
9520fi
9521MKTEMP=$ac_cv_path_MKTEMP
9522if test -n "$MKTEMP"; then
9523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9524$as_echo "$MKTEMP" >&6; }
9525else
9526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9527$as_echo "no" >&6; }
9528fi
9529
9530
9531  test -n "$MKTEMP" && break
9532done
9533
9534  else
9535    # The variable is set, but is it from the command line or the environment?
9536
9537    # Try to remove the string !MKTEMP! from our list.
9538    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9539    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9540      # If it failed, the variable was not from the command line. Ignore it,
9541      # but warn the user (except for BASH, which is always set by the calling BASH).
9542      if test "xMKTEMP" != xBASH; then
9543        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9544$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9545      fi
9546      # Try to locate tool using the code snippet
9547      for ac_prog in mktemp
9548do
9549  # Extract the first word of "$ac_prog", so it can be a program name with args.
9550set dummy $ac_prog; ac_word=$2
9551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9552$as_echo_n "checking for $ac_word... " >&6; }
9553if ${ac_cv_path_MKTEMP+:} false; then :
9554  $as_echo_n "(cached) " >&6
9555else
9556  case $MKTEMP in
9557  [\\/]* | ?:[\\/]*)
9558  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9559  ;;
9560  *)
9561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9562for as_dir in $PATH
9563do
9564  IFS=$as_save_IFS
9565  test -z "$as_dir" && as_dir=.
9566    for ac_exec_ext in '' $ac_executable_extensions; do
9567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9568    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9570    break 2
9571  fi
9572done
9573  done
9574IFS=$as_save_IFS
9575
9576  ;;
9577esac
9578fi
9579MKTEMP=$ac_cv_path_MKTEMP
9580if test -n "$MKTEMP"; then
9581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9582$as_echo "$MKTEMP" >&6; }
9583else
9584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9585$as_echo "no" >&6; }
9586fi
9587
9588
9589  test -n "$MKTEMP" && break
9590done
9591
9592    else
9593      # If it succeeded, then it was overridden by the user. We will use it
9594      # for the tool.
9595
9596      # First remove it from the list of overridden variables, so we can test
9597      # for unknown variables in the end.
9598      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9599
9600      # Check if we try to supply an empty value
9601      if test "x$MKTEMP" = x; then
9602        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9603$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9604        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9605$as_echo_n "checking for MKTEMP... " >&6; }
9606        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9607$as_echo "disabled" >&6; }
9608      else
9609        # Check if the provided tool contains a complete path.
9610        tool_specified="$MKTEMP"
9611        tool_basename="${tool_specified##*/}"
9612        if test "x$tool_basename" = "x$tool_specified"; then
9613          # A command without a complete path is provided, search $PATH.
9614          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9615$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9616          # Extract the first word of "$tool_basename", so it can be a program name with args.
9617set dummy $tool_basename; ac_word=$2
9618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9619$as_echo_n "checking for $ac_word... " >&6; }
9620if ${ac_cv_path_MKTEMP+:} false; then :
9621  $as_echo_n "(cached) " >&6
9622else
9623  case $MKTEMP in
9624  [\\/]* | ?:[\\/]*)
9625  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9626  ;;
9627  *)
9628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9629for as_dir in $PATH
9630do
9631  IFS=$as_save_IFS
9632  test -z "$as_dir" && as_dir=.
9633    for ac_exec_ext in '' $ac_executable_extensions; do
9634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9635    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9637    break 2
9638  fi
9639done
9640  done
9641IFS=$as_save_IFS
9642
9643  ;;
9644esac
9645fi
9646MKTEMP=$ac_cv_path_MKTEMP
9647if test -n "$MKTEMP"; then
9648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9649$as_echo "$MKTEMP" >&6; }
9650else
9651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9652$as_echo "no" >&6; }
9653fi
9654
9655
9656          if test "x$MKTEMP" = x; then
9657            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9658          fi
9659        else
9660          # Otherwise we believe it is a complete path. Use it as it is.
9661          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9662$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9663          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9664$as_echo_n "checking for MKTEMP... " >&6; }
9665          if test ! -x "$tool_specified"; then
9666            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9667$as_echo "not found" >&6; }
9668            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9669          fi
9670          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9671$as_echo "$tool_specified" >&6; }
9672        fi
9673      fi
9674    fi
9675
9676  fi
9677
9678
9679
9680  if test "x$MKTEMP" = x; then
9681    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9682  fi
9683
9684
9685
9686
9687
9688  # Publish this variable in the help.
9689
9690
9691  if [ -z "${MV+x}" ]; then
9692    # The variable is not set by user, try to locate tool using the code snippet
9693    for ac_prog in mv
9694do
9695  # Extract the first word of "$ac_prog", so it can be a program name with args.
9696set dummy $ac_prog; ac_word=$2
9697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9698$as_echo_n "checking for $ac_word... " >&6; }
9699if ${ac_cv_path_MV+:} false; then :
9700  $as_echo_n "(cached) " >&6
9701else
9702  case $MV in
9703  [\\/]* | ?:[\\/]*)
9704  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9705  ;;
9706  *)
9707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9708for as_dir in $PATH
9709do
9710  IFS=$as_save_IFS
9711  test -z "$as_dir" && as_dir=.
9712    for ac_exec_ext in '' $ac_executable_extensions; do
9713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9714    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9716    break 2
9717  fi
9718done
9719  done
9720IFS=$as_save_IFS
9721
9722  ;;
9723esac
9724fi
9725MV=$ac_cv_path_MV
9726if test -n "$MV"; then
9727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9728$as_echo "$MV" >&6; }
9729else
9730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9731$as_echo "no" >&6; }
9732fi
9733
9734
9735  test -n "$MV" && break
9736done
9737
9738  else
9739    # The variable is set, but is it from the command line or the environment?
9740
9741    # Try to remove the string !MV! from our list.
9742    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9743    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9744      # If it failed, the variable was not from the command line. Ignore it,
9745      # but warn the user (except for BASH, which is always set by the calling BASH).
9746      if test "xMV" != xBASH; then
9747        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9748$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9749      fi
9750      # Try to locate tool using the code snippet
9751      for ac_prog in mv
9752do
9753  # Extract the first word of "$ac_prog", so it can be a program name with args.
9754set dummy $ac_prog; ac_word=$2
9755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9756$as_echo_n "checking for $ac_word... " >&6; }
9757if ${ac_cv_path_MV+:} false; then :
9758  $as_echo_n "(cached) " >&6
9759else
9760  case $MV in
9761  [\\/]* | ?:[\\/]*)
9762  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9763  ;;
9764  *)
9765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9766for as_dir in $PATH
9767do
9768  IFS=$as_save_IFS
9769  test -z "$as_dir" && as_dir=.
9770    for ac_exec_ext in '' $ac_executable_extensions; do
9771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9772    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9774    break 2
9775  fi
9776done
9777  done
9778IFS=$as_save_IFS
9779
9780  ;;
9781esac
9782fi
9783MV=$ac_cv_path_MV
9784if test -n "$MV"; then
9785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9786$as_echo "$MV" >&6; }
9787else
9788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9789$as_echo "no" >&6; }
9790fi
9791
9792
9793  test -n "$MV" && break
9794done
9795
9796    else
9797      # If it succeeded, then it was overridden by the user. We will use it
9798      # for the tool.
9799
9800      # First remove it from the list of overridden variables, so we can test
9801      # for unknown variables in the end.
9802      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9803
9804      # Check if we try to supply an empty value
9805      if test "x$MV" = x; then
9806        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9807$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9808        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9809$as_echo_n "checking for MV... " >&6; }
9810        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9811$as_echo "disabled" >&6; }
9812      else
9813        # Check if the provided tool contains a complete path.
9814        tool_specified="$MV"
9815        tool_basename="${tool_specified##*/}"
9816        if test "x$tool_basename" = "x$tool_specified"; then
9817          # A command without a complete path is provided, search $PATH.
9818          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9819$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9820          # Extract the first word of "$tool_basename", so it can be a program name with args.
9821set dummy $tool_basename; ac_word=$2
9822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9823$as_echo_n "checking for $ac_word... " >&6; }
9824if ${ac_cv_path_MV+:} false; then :
9825  $as_echo_n "(cached) " >&6
9826else
9827  case $MV in
9828  [\\/]* | ?:[\\/]*)
9829  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9830  ;;
9831  *)
9832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9833for as_dir in $PATH
9834do
9835  IFS=$as_save_IFS
9836  test -z "$as_dir" && as_dir=.
9837    for ac_exec_ext in '' $ac_executable_extensions; do
9838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9839    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9841    break 2
9842  fi
9843done
9844  done
9845IFS=$as_save_IFS
9846
9847  ;;
9848esac
9849fi
9850MV=$ac_cv_path_MV
9851if test -n "$MV"; then
9852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9853$as_echo "$MV" >&6; }
9854else
9855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9856$as_echo "no" >&6; }
9857fi
9858
9859
9860          if test "x$MV" = x; then
9861            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9862          fi
9863        else
9864          # Otherwise we believe it is a complete path. Use it as it is.
9865          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9866$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9867          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9868$as_echo_n "checking for MV... " >&6; }
9869          if test ! -x "$tool_specified"; then
9870            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9871$as_echo "not found" >&6; }
9872            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9873          fi
9874          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9875$as_echo "$tool_specified" >&6; }
9876        fi
9877      fi
9878    fi
9879
9880  fi
9881
9882
9883
9884  if test "x$MV" = x; then
9885    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9886  fi
9887
9888
9889
9890
9891
9892  # Publish this variable in the help.
9893
9894
9895  if [ -z "${NAWK+x}" ]; then
9896    # The variable is not set by user, try to locate tool using the code snippet
9897    for ac_prog in nawk gawk awk
9898do
9899  # Extract the first word of "$ac_prog", so it can be a program name with args.
9900set dummy $ac_prog; ac_word=$2
9901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9902$as_echo_n "checking for $ac_word... " >&6; }
9903if ${ac_cv_path_NAWK+:} false; then :
9904  $as_echo_n "(cached) " >&6
9905else
9906  case $NAWK in
9907  [\\/]* | ?:[\\/]*)
9908  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9909  ;;
9910  *)
9911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9912for as_dir in $PATH
9913do
9914  IFS=$as_save_IFS
9915  test -z "$as_dir" && as_dir=.
9916    for ac_exec_ext in '' $ac_executable_extensions; do
9917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9918    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9920    break 2
9921  fi
9922done
9923  done
9924IFS=$as_save_IFS
9925
9926  ;;
9927esac
9928fi
9929NAWK=$ac_cv_path_NAWK
9930if test -n "$NAWK"; then
9931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9932$as_echo "$NAWK" >&6; }
9933else
9934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9935$as_echo "no" >&6; }
9936fi
9937
9938
9939  test -n "$NAWK" && break
9940done
9941
9942  else
9943    # The variable is set, but is it from the command line or the environment?
9944
9945    # Try to remove the string !NAWK! from our list.
9946    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9947    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9948      # If it failed, the variable was not from the command line. Ignore it,
9949      # but warn the user (except for BASH, which is always set by the calling BASH).
9950      if test "xNAWK" != xBASH; then
9951        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9952$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9953      fi
9954      # Try to locate tool using the code snippet
9955      for ac_prog in nawk gawk awk
9956do
9957  # Extract the first word of "$ac_prog", so it can be a program name with args.
9958set dummy $ac_prog; ac_word=$2
9959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9960$as_echo_n "checking for $ac_word... " >&6; }
9961if ${ac_cv_path_NAWK+:} false; then :
9962  $as_echo_n "(cached) " >&6
9963else
9964  case $NAWK in
9965  [\\/]* | ?:[\\/]*)
9966  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9967  ;;
9968  *)
9969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9970for as_dir in $PATH
9971do
9972  IFS=$as_save_IFS
9973  test -z "$as_dir" && as_dir=.
9974    for ac_exec_ext in '' $ac_executable_extensions; do
9975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9976    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9978    break 2
9979  fi
9980done
9981  done
9982IFS=$as_save_IFS
9983
9984  ;;
9985esac
9986fi
9987NAWK=$ac_cv_path_NAWK
9988if test -n "$NAWK"; then
9989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9990$as_echo "$NAWK" >&6; }
9991else
9992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9993$as_echo "no" >&6; }
9994fi
9995
9996
9997  test -n "$NAWK" && break
9998done
9999
10000    else
10001      # If it succeeded, then it was overridden by the user. We will use it
10002      # for the tool.
10003
10004      # First remove it from the list of overridden variables, so we can test
10005      # for unknown variables in the end.
10006      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10007
10008      # Check if we try to supply an empty value
10009      if test "x$NAWK" = x; then
10010        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10011$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10012        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10013$as_echo_n "checking for NAWK... " >&6; }
10014        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10015$as_echo "disabled" >&6; }
10016      else
10017        # Check if the provided tool contains a complete path.
10018        tool_specified="$NAWK"
10019        tool_basename="${tool_specified##*/}"
10020        if test "x$tool_basename" = "x$tool_specified"; then
10021          # A command without a complete path is provided, search $PATH.
10022          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10023$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10024          # Extract the first word of "$tool_basename", so it can be a program name with args.
10025set dummy $tool_basename; ac_word=$2
10026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10027$as_echo_n "checking for $ac_word... " >&6; }
10028if ${ac_cv_path_NAWK+:} false; then :
10029  $as_echo_n "(cached) " >&6
10030else
10031  case $NAWK in
10032  [\\/]* | ?:[\\/]*)
10033  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10034  ;;
10035  *)
10036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10037for as_dir in $PATH
10038do
10039  IFS=$as_save_IFS
10040  test -z "$as_dir" && as_dir=.
10041    for ac_exec_ext in '' $ac_executable_extensions; do
10042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10043    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10045    break 2
10046  fi
10047done
10048  done
10049IFS=$as_save_IFS
10050
10051  ;;
10052esac
10053fi
10054NAWK=$ac_cv_path_NAWK
10055if test -n "$NAWK"; then
10056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10057$as_echo "$NAWK" >&6; }
10058else
10059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10060$as_echo "no" >&6; }
10061fi
10062
10063
10064          if test "x$NAWK" = x; then
10065            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10066          fi
10067        else
10068          # Otherwise we believe it is a complete path. Use it as it is.
10069          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10070$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10071          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10072$as_echo_n "checking for NAWK... " >&6; }
10073          if test ! -x "$tool_specified"; then
10074            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10075$as_echo "not found" >&6; }
10076            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10077          fi
10078          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10079$as_echo "$tool_specified" >&6; }
10080        fi
10081      fi
10082    fi
10083
10084  fi
10085
10086
10087
10088  if test "x$NAWK" = x; then
10089    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10090  fi
10091
10092
10093
10094
10095
10096  # Publish this variable in the help.
10097
10098
10099  if [ -z "${PRINTF+x}" ]; then
10100    # The variable is not set by user, try to locate tool using the code snippet
10101    for ac_prog in printf
10102do
10103  # Extract the first word of "$ac_prog", so it can be a program name with args.
10104set dummy $ac_prog; ac_word=$2
10105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10106$as_echo_n "checking for $ac_word... " >&6; }
10107if ${ac_cv_path_PRINTF+:} false; then :
10108  $as_echo_n "(cached) " >&6
10109else
10110  case $PRINTF in
10111  [\\/]* | ?:[\\/]*)
10112  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10113  ;;
10114  *)
10115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10116for as_dir in $PATH
10117do
10118  IFS=$as_save_IFS
10119  test -z "$as_dir" && as_dir=.
10120    for ac_exec_ext in '' $ac_executable_extensions; do
10121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10122    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10124    break 2
10125  fi
10126done
10127  done
10128IFS=$as_save_IFS
10129
10130  ;;
10131esac
10132fi
10133PRINTF=$ac_cv_path_PRINTF
10134if test -n "$PRINTF"; then
10135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10136$as_echo "$PRINTF" >&6; }
10137else
10138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10139$as_echo "no" >&6; }
10140fi
10141
10142
10143  test -n "$PRINTF" && break
10144done
10145
10146  else
10147    # The variable is set, but is it from the command line or the environment?
10148
10149    # Try to remove the string !PRINTF! from our list.
10150    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10151    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10152      # If it failed, the variable was not from the command line. Ignore it,
10153      # but warn the user (except for BASH, which is always set by the calling BASH).
10154      if test "xPRINTF" != xBASH; then
10155        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10156$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10157      fi
10158      # Try to locate tool using the code snippet
10159      for ac_prog in printf
10160do
10161  # Extract the first word of "$ac_prog", so it can be a program name with args.
10162set dummy $ac_prog; ac_word=$2
10163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10164$as_echo_n "checking for $ac_word... " >&6; }
10165if ${ac_cv_path_PRINTF+:} false; then :
10166  $as_echo_n "(cached) " >&6
10167else
10168  case $PRINTF in
10169  [\\/]* | ?:[\\/]*)
10170  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10171  ;;
10172  *)
10173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10174for as_dir in $PATH
10175do
10176  IFS=$as_save_IFS
10177  test -z "$as_dir" && as_dir=.
10178    for ac_exec_ext in '' $ac_executable_extensions; do
10179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10180    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10182    break 2
10183  fi
10184done
10185  done
10186IFS=$as_save_IFS
10187
10188  ;;
10189esac
10190fi
10191PRINTF=$ac_cv_path_PRINTF
10192if test -n "$PRINTF"; then
10193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10194$as_echo "$PRINTF" >&6; }
10195else
10196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10197$as_echo "no" >&6; }
10198fi
10199
10200
10201  test -n "$PRINTF" && break
10202done
10203
10204    else
10205      # If it succeeded, then it was overridden by the user. We will use it
10206      # for the tool.
10207
10208      # First remove it from the list of overridden variables, so we can test
10209      # for unknown variables in the end.
10210      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10211
10212      # Check if we try to supply an empty value
10213      if test "x$PRINTF" = x; then
10214        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10215$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10216        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10217$as_echo_n "checking for PRINTF... " >&6; }
10218        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10219$as_echo "disabled" >&6; }
10220      else
10221        # Check if the provided tool contains a complete path.
10222        tool_specified="$PRINTF"
10223        tool_basename="${tool_specified##*/}"
10224        if test "x$tool_basename" = "x$tool_specified"; then
10225          # A command without a complete path is provided, search $PATH.
10226          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10227$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10228          # Extract the first word of "$tool_basename", so it can be a program name with args.
10229set dummy $tool_basename; ac_word=$2
10230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10231$as_echo_n "checking for $ac_word... " >&6; }
10232if ${ac_cv_path_PRINTF+:} false; then :
10233  $as_echo_n "(cached) " >&6
10234else
10235  case $PRINTF in
10236  [\\/]* | ?:[\\/]*)
10237  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10238  ;;
10239  *)
10240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10241for as_dir in $PATH
10242do
10243  IFS=$as_save_IFS
10244  test -z "$as_dir" && as_dir=.
10245    for ac_exec_ext in '' $ac_executable_extensions; do
10246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10247    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10249    break 2
10250  fi
10251done
10252  done
10253IFS=$as_save_IFS
10254
10255  ;;
10256esac
10257fi
10258PRINTF=$ac_cv_path_PRINTF
10259if test -n "$PRINTF"; then
10260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10261$as_echo "$PRINTF" >&6; }
10262else
10263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10264$as_echo "no" >&6; }
10265fi
10266
10267
10268          if test "x$PRINTF" = x; then
10269            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10270          fi
10271        else
10272          # Otherwise we believe it is a complete path. Use it as it is.
10273          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10274$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10275          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10276$as_echo_n "checking for PRINTF... " >&6; }
10277          if test ! -x "$tool_specified"; then
10278            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10279$as_echo "not found" >&6; }
10280            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10281          fi
10282          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10283$as_echo "$tool_specified" >&6; }
10284        fi
10285      fi
10286    fi
10287
10288  fi
10289
10290
10291
10292  if test "x$PRINTF" = x; then
10293    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10294  fi
10295
10296
10297
10298
10299
10300  # Publish this variable in the help.
10301
10302
10303  if [ -z "${RM+x}" ]; then
10304    # The variable is not set by user, try to locate tool using the code snippet
10305    for ac_prog in rm
10306do
10307  # Extract the first word of "$ac_prog", so it can be a program name with args.
10308set dummy $ac_prog; ac_word=$2
10309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10310$as_echo_n "checking for $ac_word... " >&6; }
10311if ${ac_cv_path_RM+:} false; then :
10312  $as_echo_n "(cached) " >&6
10313else
10314  case $RM in
10315  [\\/]* | ?:[\\/]*)
10316  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10317  ;;
10318  *)
10319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10320for as_dir in $PATH
10321do
10322  IFS=$as_save_IFS
10323  test -z "$as_dir" && as_dir=.
10324    for ac_exec_ext in '' $ac_executable_extensions; do
10325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10326    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10328    break 2
10329  fi
10330done
10331  done
10332IFS=$as_save_IFS
10333
10334  ;;
10335esac
10336fi
10337RM=$ac_cv_path_RM
10338if test -n "$RM"; then
10339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10340$as_echo "$RM" >&6; }
10341else
10342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10343$as_echo "no" >&6; }
10344fi
10345
10346
10347  test -n "$RM" && break
10348done
10349
10350  else
10351    # The variable is set, but is it from the command line or the environment?
10352
10353    # Try to remove the string !RM! from our list.
10354    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10355    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10356      # If it failed, the variable was not from the command line. Ignore it,
10357      # but warn the user (except for BASH, which is always set by the calling BASH).
10358      if test "xRM" != xBASH; then
10359        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10360$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10361      fi
10362      # Try to locate tool using the code snippet
10363      for ac_prog in rm
10364do
10365  # Extract the first word of "$ac_prog", so it can be a program name with args.
10366set dummy $ac_prog; ac_word=$2
10367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10368$as_echo_n "checking for $ac_word... " >&6; }
10369if ${ac_cv_path_RM+:} false; then :
10370  $as_echo_n "(cached) " >&6
10371else
10372  case $RM in
10373  [\\/]* | ?:[\\/]*)
10374  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10375  ;;
10376  *)
10377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10378for as_dir in $PATH
10379do
10380  IFS=$as_save_IFS
10381  test -z "$as_dir" && as_dir=.
10382    for ac_exec_ext in '' $ac_executable_extensions; do
10383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10384    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10386    break 2
10387  fi
10388done
10389  done
10390IFS=$as_save_IFS
10391
10392  ;;
10393esac
10394fi
10395RM=$ac_cv_path_RM
10396if test -n "$RM"; then
10397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10398$as_echo "$RM" >&6; }
10399else
10400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10401$as_echo "no" >&6; }
10402fi
10403
10404
10405  test -n "$RM" && break
10406done
10407
10408    else
10409      # If it succeeded, then it was overridden by the user. We will use it
10410      # for the tool.
10411
10412      # First remove it from the list of overridden variables, so we can test
10413      # for unknown variables in the end.
10414      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10415
10416      # Check if we try to supply an empty value
10417      if test "x$RM" = x; then
10418        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10419$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10420        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10421$as_echo_n "checking for RM... " >&6; }
10422        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10423$as_echo "disabled" >&6; }
10424      else
10425        # Check if the provided tool contains a complete path.
10426        tool_specified="$RM"
10427        tool_basename="${tool_specified##*/}"
10428        if test "x$tool_basename" = "x$tool_specified"; then
10429          # A command without a complete path is provided, search $PATH.
10430          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10431$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10432          # Extract the first word of "$tool_basename", so it can be a program name with args.
10433set dummy $tool_basename; ac_word=$2
10434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10435$as_echo_n "checking for $ac_word... " >&6; }
10436if ${ac_cv_path_RM+:} false; then :
10437  $as_echo_n "(cached) " >&6
10438else
10439  case $RM in
10440  [\\/]* | ?:[\\/]*)
10441  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10442  ;;
10443  *)
10444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10445for as_dir in $PATH
10446do
10447  IFS=$as_save_IFS
10448  test -z "$as_dir" && as_dir=.
10449    for ac_exec_ext in '' $ac_executable_extensions; do
10450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10451    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10453    break 2
10454  fi
10455done
10456  done
10457IFS=$as_save_IFS
10458
10459  ;;
10460esac
10461fi
10462RM=$ac_cv_path_RM
10463if test -n "$RM"; then
10464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10465$as_echo "$RM" >&6; }
10466else
10467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10468$as_echo "no" >&6; }
10469fi
10470
10471
10472          if test "x$RM" = x; then
10473            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10474          fi
10475        else
10476          # Otherwise we believe it is a complete path. Use it as it is.
10477          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10478$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10479          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10480$as_echo_n "checking for RM... " >&6; }
10481          if test ! -x "$tool_specified"; then
10482            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10483$as_echo "not found" >&6; }
10484            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10485          fi
10486          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10487$as_echo "$tool_specified" >&6; }
10488        fi
10489      fi
10490    fi
10491
10492  fi
10493
10494
10495
10496  if test "x$RM" = x; then
10497    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10498  fi
10499
10500
10501
10502
10503
10504  # Publish this variable in the help.
10505
10506
10507  if [ -z "${RMDIR+x}" ]; then
10508    # The variable is not set by user, try to locate tool using the code snippet
10509    for ac_prog in rmdir
10510do
10511  # Extract the first word of "$ac_prog", so it can be a program name with args.
10512set dummy $ac_prog; ac_word=$2
10513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10514$as_echo_n "checking for $ac_word... " >&6; }
10515if ${ac_cv_path_RMDIR+:} false; then :
10516  $as_echo_n "(cached) " >&6
10517else
10518  case $RMDIR in
10519  [\\/]* | ?:[\\/]*)
10520  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10521  ;;
10522  *)
10523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10524for as_dir in $PATH
10525do
10526  IFS=$as_save_IFS
10527  test -z "$as_dir" && as_dir=.
10528    for ac_exec_ext in '' $ac_executable_extensions; do
10529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10530    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10532    break 2
10533  fi
10534done
10535  done
10536IFS=$as_save_IFS
10537
10538  ;;
10539esac
10540fi
10541RMDIR=$ac_cv_path_RMDIR
10542if test -n "$RMDIR"; then
10543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10544$as_echo "$RMDIR" >&6; }
10545else
10546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10547$as_echo "no" >&6; }
10548fi
10549
10550
10551  test -n "$RMDIR" && break
10552done
10553
10554  else
10555    # The variable is set, but is it from the command line or the environment?
10556
10557    # Try to remove the string !RMDIR! from our list.
10558    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10559    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10560      # If it failed, the variable was not from the command line. Ignore it,
10561      # but warn the user (except for BASH, which is always set by the calling BASH).
10562      if test "xRMDIR" != xBASH; then
10563        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10564$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10565      fi
10566      # Try to locate tool using the code snippet
10567      for ac_prog in rmdir
10568do
10569  # Extract the first word of "$ac_prog", so it can be a program name with args.
10570set dummy $ac_prog; ac_word=$2
10571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10572$as_echo_n "checking for $ac_word... " >&6; }
10573if ${ac_cv_path_RMDIR+:} false; then :
10574  $as_echo_n "(cached) " >&6
10575else
10576  case $RMDIR in
10577  [\\/]* | ?:[\\/]*)
10578  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10579  ;;
10580  *)
10581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10582for as_dir in $PATH
10583do
10584  IFS=$as_save_IFS
10585  test -z "$as_dir" && as_dir=.
10586    for ac_exec_ext in '' $ac_executable_extensions; do
10587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10588    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10590    break 2
10591  fi
10592done
10593  done
10594IFS=$as_save_IFS
10595
10596  ;;
10597esac
10598fi
10599RMDIR=$ac_cv_path_RMDIR
10600if test -n "$RMDIR"; then
10601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10602$as_echo "$RMDIR" >&6; }
10603else
10604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10605$as_echo "no" >&6; }
10606fi
10607
10608
10609  test -n "$RMDIR" && break
10610done
10611
10612    else
10613      # If it succeeded, then it was overridden by the user. We will use it
10614      # for the tool.
10615
10616      # First remove it from the list of overridden variables, so we can test
10617      # for unknown variables in the end.
10618      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10619
10620      # Check if we try to supply an empty value
10621      if test "x$RMDIR" = x; then
10622        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10623$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10624        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10625$as_echo_n "checking for RMDIR... " >&6; }
10626        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10627$as_echo "disabled" >&6; }
10628      else
10629        # Check if the provided tool contains a complete path.
10630        tool_specified="$RMDIR"
10631        tool_basename="${tool_specified##*/}"
10632        if test "x$tool_basename" = "x$tool_specified"; then
10633          # A command without a complete path is provided, search $PATH.
10634          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10635$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10636          # Extract the first word of "$tool_basename", so it can be a program name with args.
10637set dummy $tool_basename; ac_word=$2
10638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10639$as_echo_n "checking for $ac_word... " >&6; }
10640if ${ac_cv_path_RMDIR+:} false; then :
10641  $as_echo_n "(cached) " >&6
10642else
10643  case $RMDIR in
10644  [\\/]* | ?:[\\/]*)
10645  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10646  ;;
10647  *)
10648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10649for as_dir in $PATH
10650do
10651  IFS=$as_save_IFS
10652  test -z "$as_dir" && as_dir=.
10653    for ac_exec_ext in '' $ac_executable_extensions; do
10654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10655    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10657    break 2
10658  fi
10659done
10660  done
10661IFS=$as_save_IFS
10662
10663  ;;
10664esac
10665fi
10666RMDIR=$ac_cv_path_RMDIR
10667if test -n "$RMDIR"; then
10668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10669$as_echo "$RMDIR" >&6; }
10670else
10671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10672$as_echo "no" >&6; }
10673fi
10674
10675
10676          if test "x$RMDIR" = x; then
10677            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10678          fi
10679        else
10680          # Otherwise we believe it is a complete path. Use it as it is.
10681          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10682$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10683          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10684$as_echo_n "checking for RMDIR... " >&6; }
10685          if test ! -x "$tool_specified"; then
10686            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10687$as_echo "not found" >&6; }
10688            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10689          fi
10690          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10691$as_echo "$tool_specified" >&6; }
10692        fi
10693      fi
10694    fi
10695
10696  fi
10697
10698
10699
10700  if test "x$RMDIR" = x; then
10701    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10702  fi
10703
10704
10705
10706
10707
10708  # Publish this variable in the help.
10709
10710
10711  if [ -z "${SH+x}" ]; then
10712    # The variable is not set by user, try to locate tool using the code snippet
10713    for ac_prog in sh
10714do
10715  # Extract the first word of "$ac_prog", so it can be a program name with args.
10716set dummy $ac_prog; ac_word=$2
10717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10718$as_echo_n "checking for $ac_word... " >&6; }
10719if ${ac_cv_path_SH+:} false; then :
10720  $as_echo_n "(cached) " >&6
10721else
10722  case $SH in
10723  [\\/]* | ?:[\\/]*)
10724  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10725  ;;
10726  *)
10727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10728for as_dir in $PATH
10729do
10730  IFS=$as_save_IFS
10731  test -z "$as_dir" && as_dir=.
10732    for ac_exec_ext in '' $ac_executable_extensions; do
10733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10734    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10736    break 2
10737  fi
10738done
10739  done
10740IFS=$as_save_IFS
10741
10742  ;;
10743esac
10744fi
10745SH=$ac_cv_path_SH
10746if test -n "$SH"; then
10747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10748$as_echo "$SH" >&6; }
10749else
10750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10751$as_echo "no" >&6; }
10752fi
10753
10754
10755  test -n "$SH" && break
10756done
10757
10758  else
10759    # The variable is set, but is it from the command line or the environment?
10760
10761    # Try to remove the string !SH! from our list.
10762    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10763    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10764      # If it failed, the variable was not from the command line. Ignore it,
10765      # but warn the user (except for BASH, which is always set by the calling BASH).
10766      if test "xSH" != xBASH; then
10767        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10768$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10769      fi
10770      # Try to locate tool using the code snippet
10771      for ac_prog in sh
10772do
10773  # Extract the first word of "$ac_prog", so it can be a program name with args.
10774set dummy $ac_prog; ac_word=$2
10775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10776$as_echo_n "checking for $ac_word... " >&6; }
10777if ${ac_cv_path_SH+:} false; then :
10778  $as_echo_n "(cached) " >&6
10779else
10780  case $SH in
10781  [\\/]* | ?:[\\/]*)
10782  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10783  ;;
10784  *)
10785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10786for as_dir in $PATH
10787do
10788  IFS=$as_save_IFS
10789  test -z "$as_dir" && as_dir=.
10790    for ac_exec_ext in '' $ac_executable_extensions; do
10791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10792    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10794    break 2
10795  fi
10796done
10797  done
10798IFS=$as_save_IFS
10799
10800  ;;
10801esac
10802fi
10803SH=$ac_cv_path_SH
10804if test -n "$SH"; then
10805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10806$as_echo "$SH" >&6; }
10807else
10808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10809$as_echo "no" >&6; }
10810fi
10811
10812
10813  test -n "$SH" && break
10814done
10815
10816    else
10817      # If it succeeded, then it was overridden by the user. We will use it
10818      # for the tool.
10819
10820      # First remove it from the list of overridden variables, so we can test
10821      # for unknown variables in the end.
10822      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10823
10824      # Check if we try to supply an empty value
10825      if test "x$SH" = x; then
10826        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10827$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10828        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10829$as_echo_n "checking for SH... " >&6; }
10830        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10831$as_echo "disabled" >&6; }
10832      else
10833        # Check if the provided tool contains a complete path.
10834        tool_specified="$SH"
10835        tool_basename="${tool_specified##*/}"
10836        if test "x$tool_basename" = "x$tool_specified"; then
10837          # A command without a complete path is provided, search $PATH.
10838          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10839$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10840          # Extract the first word of "$tool_basename", so it can be a program name with args.
10841set dummy $tool_basename; ac_word=$2
10842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10843$as_echo_n "checking for $ac_word... " >&6; }
10844if ${ac_cv_path_SH+:} false; then :
10845  $as_echo_n "(cached) " >&6
10846else
10847  case $SH in
10848  [\\/]* | ?:[\\/]*)
10849  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10850  ;;
10851  *)
10852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10853for as_dir in $PATH
10854do
10855  IFS=$as_save_IFS
10856  test -z "$as_dir" && as_dir=.
10857    for ac_exec_ext in '' $ac_executable_extensions; do
10858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10859    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10861    break 2
10862  fi
10863done
10864  done
10865IFS=$as_save_IFS
10866
10867  ;;
10868esac
10869fi
10870SH=$ac_cv_path_SH
10871if test -n "$SH"; then
10872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10873$as_echo "$SH" >&6; }
10874else
10875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10876$as_echo "no" >&6; }
10877fi
10878
10879
10880          if test "x$SH" = x; then
10881            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10882          fi
10883        else
10884          # Otherwise we believe it is a complete path. Use it as it is.
10885          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10886$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10887          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10888$as_echo_n "checking for SH... " >&6; }
10889          if test ! -x "$tool_specified"; then
10890            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10891$as_echo "not found" >&6; }
10892            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10893          fi
10894          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10895$as_echo "$tool_specified" >&6; }
10896        fi
10897      fi
10898    fi
10899
10900  fi
10901
10902
10903
10904  if test "x$SH" = x; then
10905    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10906  fi
10907
10908
10909
10910
10911
10912  # Publish this variable in the help.
10913
10914
10915  if [ -z "${SORT+x}" ]; then
10916    # The variable is not set by user, try to locate tool using the code snippet
10917    for ac_prog in sort
10918do
10919  # Extract the first word of "$ac_prog", so it can be a program name with args.
10920set dummy $ac_prog; ac_word=$2
10921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10922$as_echo_n "checking for $ac_word... " >&6; }
10923if ${ac_cv_path_SORT+:} false; then :
10924  $as_echo_n "(cached) " >&6
10925else
10926  case $SORT in
10927  [\\/]* | ?:[\\/]*)
10928  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10929  ;;
10930  *)
10931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10932for as_dir in $PATH
10933do
10934  IFS=$as_save_IFS
10935  test -z "$as_dir" && as_dir=.
10936    for ac_exec_ext in '' $ac_executable_extensions; do
10937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10938    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10940    break 2
10941  fi
10942done
10943  done
10944IFS=$as_save_IFS
10945
10946  ;;
10947esac
10948fi
10949SORT=$ac_cv_path_SORT
10950if test -n "$SORT"; then
10951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10952$as_echo "$SORT" >&6; }
10953else
10954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10955$as_echo "no" >&6; }
10956fi
10957
10958
10959  test -n "$SORT" && break
10960done
10961
10962  else
10963    # The variable is set, but is it from the command line or the environment?
10964
10965    # Try to remove the string !SORT! from our list.
10966    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10967    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10968      # If it failed, the variable was not from the command line. Ignore it,
10969      # but warn the user (except for BASH, which is always set by the calling BASH).
10970      if test "xSORT" != xBASH; then
10971        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10972$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10973      fi
10974      # Try to locate tool using the code snippet
10975      for ac_prog in sort
10976do
10977  # Extract the first word of "$ac_prog", so it can be a program name with args.
10978set dummy $ac_prog; ac_word=$2
10979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10980$as_echo_n "checking for $ac_word... " >&6; }
10981if ${ac_cv_path_SORT+:} false; then :
10982  $as_echo_n "(cached) " >&6
10983else
10984  case $SORT in
10985  [\\/]* | ?:[\\/]*)
10986  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10987  ;;
10988  *)
10989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10990for as_dir in $PATH
10991do
10992  IFS=$as_save_IFS
10993  test -z "$as_dir" && as_dir=.
10994    for ac_exec_ext in '' $ac_executable_extensions; do
10995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10996    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10998    break 2
10999  fi
11000done
11001  done
11002IFS=$as_save_IFS
11003
11004  ;;
11005esac
11006fi
11007SORT=$ac_cv_path_SORT
11008if test -n "$SORT"; then
11009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11010$as_echo "$SORT" >&6; }
11011else
11012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11013$as_echo "no" >&6; }
11014fi
11015
11016
11017  test -n "$SORT" && break
11018done
11019
11020    else
11021      # If it succeeded, then it was overridden by the user. We will use it
11022      # for the tool.
11023
11024      # First remove it from the list of overridden variables, so we can test
11025      # for unknown variables in the end.
11026      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11027
11028      # Check if we try to supply an empty value
11029      if test "x$SORT" = x; then
11030        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11031$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11032        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11033$as_echo_n "checking for SORT... " >&6; }
11034        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11035$as_echo "disabled" >&6; }
11036      else
11037        # Check if the provided tool contains a complete path.
11038        tool_specified="$SORT"
11039        tool_basename="${tool_specified##*/}"
11040        if test "x$tool_basename" = "x$tool_specified"; then
11041          # A command without a complete path is provided, search $PATH.
11042          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11043$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11044          # Extract the first word of "$tool_basename", so it can be a program name with args.
11045set dummy $tool_basename; ac_word=$2
11046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11047$as_echo_n "checking for $ac_word... " >&6; }
11048if ${ac_cv_path_SORT+:} false; then :
11049  $as_echo_n "(cached) " >&6
11050else
11051  case $SORT in
11052  [\\/]* | ?:[\\/]*)
11053  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11054  ;;
11055  *)
11056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11057for as_dir in $PATH
11058do
11059  IFS=$as_save_IFS
11060  test -z "$as_dir" && as_dir=.
11061    for ac_exec_ext in '' $ac_executable_extensions; do
11062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11063    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11065    break 2
11066  fi
11067done
11068  done
11069IFS=$as_save_IFS
11070
11071  ;;
11072esac
11073fi
11074SORT=$ac_cv_path_SORT
11075if test -n "$SORT"; then
11076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11077$as_echo "$SORT" >&6; }
11078else
11079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11080$as_echo "no" >&6; }
11081fi
11082
11083
11084          if test "x$SORT" = x; then
11085            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11086          fi
11087        else
11088          # Otherwise we believe it is a complete path. Use it as it is.
11089          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11090$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11091          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11092$as_echo_n "checking for SORT... " >&6; }
11093          if test ! -x "$tool_specified"; then
11094            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11095$as_echo "not found" >&6; }
11096            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11097          fi
11098          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11099$as_echo "$tool_specified" >&6; }
11100        fi
11101      fi
11102    fi
11103
11104  fi
11105
11106
11107
11108  if test "x$SORT" = x; then
11109    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11110  fi
11111
11112
11113
11114
11115
11116  # Publish this variable in the help.
11117
11118
11119  if [ -z "${TAIL+x}" ]; then
11120    # The variable is not set by user, try to locate tool using the code snippet
11121    for ac_prog in tail
11122do
11123  # Extract the first word of "$ac_prog", so it can be a program name with args.
11124set dummy $ac_prog; ac_word=$2
11125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11126$as_echo_n "checking for $ac_word... " >&6; }
11127if ${ac_cv_path_TAIL+:} false; then :
11128  $as_echo_n "(cached) " >&6
11129else
11130  case $TAIL in
11131  [\\/]* | ?:[\\/]*)
11132  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11133  ;;
11134  *)
11135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11136for as_dir in $PATH
11137do
11138  IFS=$as_save_IFS
11139  test -z "$as_dir" && as_dir=.
11140    for ac_exec_ext in '' $ac_executable_extensions; do
11141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11142    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11144    break 2
11145  fi
11146done
11147  done
11148IFS=$as_save_IFS
11149
11150  ;;
11151esac
11152fi
11153TAIL=$ac_cv_path_TAIL
11154if test -n "$TAIL"; then
11155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11156$as_echo "$TAIL" >&6; }
11157else
11158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11159$as_echo "no" >&6; }
11160fi
11161
11162
11163  test -n "$TAIL" && break
11164done
11165
11166  else
11167    # The variable is set, but is it from the command line or the environment?
11168
11169    # Try to remove the string !TAIL! from our list.
11170    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11171    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11172      # If it failed, the variable was not from the command line. Ignore it,
11173      # but warn the user (except for BASH, which is always set by the calling BASH).
11174      if test "xTAIL" != xBASH; then
11175        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11176$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11177      fi
11178      # Try to locate tool using the code snippet
11179      for ac_prog in tail
11180do
11181  # Extract the first word of "$ac_prog", so it can be a program name with args.
11182set dummy $ac_prog; ac_word=$2
11183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11184$as_echo_n "checking for $ac_word... " >&6; }
11185if ${ac_cv_path_TAIL+:} false; then :
11186  $as_echo_n "(cached) " >&6
11187else
11188  case $TAIL in
11189  [\\/]* | ?:[\\/]*)
11190  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11191  ;;
11192  *)
11193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11194for as_dir in $PATH
11195do
11196  IFS=$as_save_IFS
11197  test -z "$as_dir" && as_dir=.
11198    for ac_exec_ext in '' $ac_executable_extensions; do
11199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11200    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11202    break 2
11203  fi
11204done
11205  done
11206IFS=$as_save_IFS
11207
11208  ;;
11209esac
11210fi
11211TAIL=$ac_cv_path_TAIL
11212if test -n "$TAIL"; then
11213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11214$as_echo "$TAIL" >&6; }
11215else
11216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11217$as_echo "no" >&6; }
11218fi
11219
11220
11221  test -n "$TAIL" && break
11222done
11223
11224    else
11225      # If it succeeded, then it was overridden by the user. We will use it
11226      # for the tool.
11227
11228      # First remove it from the list of overridden variables, so we can test
11229      # for unknown variables in the end.
11230      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11231
11232      # Check if we try to supply an empty value
11233      if test "x$TAIL" = x; then
11234        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11235$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11236        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11237$as_echo_n "checking for TAIL... " >&6; }
11238        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11239$as_echo "disabled" >&6; }
11240      else
11241        # Check if the provided tool contains a complete path.
11242        tool_specified="$TAIL"
11243        tool_basename="${tool_specified##*/}"
11244        if test "x$tool_basename" = "x$tool_specified"; then
11245          # A command without a complete path is provided, search $PATH.
11246          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11247$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11248          # Extract the first word of "$tool_basename", so it can be a program name with args.
11249set dummy $tool_basename; ac_word=$2
11250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11251$as_echo_n "checking for $ac_word... " >&6; }
11252if ${ac_cv_path_TAIL+:} false; then :
11253  $as_echo_n "(cached) " >&6
11254else
11255  case $TAIL in
11256  [\\/]* | ?:[\\/]*)
11257  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11258  ;;
11259  *)
11260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11261for as_dir in $PATH
11262do
11263  IFS=$as_save_IFS
11264  test -z "$as_dir" && as_dir=.
11265    for ac_exec_ext in '' $ac_executable_extensions; do
11266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11267    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11269    break 2
11270  fi
11271done
11272  done
11273IFS=$as_save_IFS
11274
11275  ;;
11276esac
11277fi
11278TAIL=$ac_cv_path_TAIL
11279if test -n "$TAIL"; then
11280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11281$as_echo "$TAIL" >&6; }
11282else
11283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11284$as_echo "no" >&6; }
11285fi
11286
11287
11288          if test "x$TAIL" = x; then
11289            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11290          fi
11291        else
11292          # Otherwise we believe it is a complete path. Use it as it is.
11293          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11294$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11295          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11296$as_echo_n "checking for TAIL... " >&6; }
11297          if test ! -x "$tool_specified"; then
11298            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11299$as_echo "not found" >&6; }
11300            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11301          fi
11302          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11303$as_echo "$tool_specified" >&6; }
11304        fi
11305      fi
11306    fi
11307
11308  fi
11309
11310
11311
11312  if test "x$TAIL" = x; then
11313    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11314  fi
11315
11316
11317
11318
11319
11320  # Publish this variable in the help.
11321
11322
11323  if [ -z "${TAR+x}" ]; then
11324    # The variable is not set by user, try to locate tool using the code snippet
11325    for ac_prog in gtar tar
11326do
11327  # Extract the first word of "$ac_prog", so it can be a program name with args.
11328set dummy $ac_prog; ac_word=$2
11329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11330$as_echo_n "checking for $ac_word... " >&6; }
11331if ${ac_cv_path_TAR+:} false; then :
11332  $as_echo_n "(cached) " >&6
11333else
11334  case $TAR in
11335  [\\/]* | ?:[\\/]*)
11336  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11337  ;;
11338  *)
11339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11340for as_dir in $PATH
11341do
11342  IFS=$as_save_IFS
11343  test -z "$as_dir" && as_dir=.
11344    for ac_exec_ext in '' $ac_executable_extensions; do
11345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11346    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11348    break 2
11349  fi
11350done
11351  done
11352IFS=$as_save_IFS
11353
11354  ;;
11355esac
11356fi
11357TAR=$ac_cv_path_TAR
11358if test -n "$TAR"; then
11359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11360$as_echo "$TAR" >&6; }
11361else
11362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11363$as_echo "no" >&6; }
11364fi
11365
11366
11367  test -n "$TAR" && break
11368done
11369
11370  else
11371    # The variable is set, but is it from the command line or the environment?
11372
11373    # Try to remove the string !TAR! from our list.
11374    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11375    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11376      # If it failed, the variable was not from the command line. Ignore it,
11377      # but warn the user (except for BASH, which is always set by the calling BASH).
11378      if test "xTAR" != xBASH; then
11379        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11380$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11381      fi
11382      # Try to locate tool using the code snippet
11383      for ac_prog in gtar tar
11384do
11385  # Extract the first word of "$ac_prog", so it can be a program name with args.
11386set dummy $ac_prog; ac_word=$2
11387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11388$as_echo_n "checking for $ac_word... " >&6; }
11389if ${ac_cv_path_TAR+:} false; then :
11390  $as_echo_n "(cached) " >&6
11391else
11392  case $TAR in
11393  [\\/]* | ?:[\\/]*)
11394  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11395  ;;
11396  *)
11397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11398for as_dir in $PATH
11399do
11400  IFS=$as_save_IFS
11401  test -z "$as_dir" && as_dir=.
11402    for ac_exec_ext in '' $ac_executable_extensions; do
11403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11404    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11406    break 2
11407  fi
11408done
11409  done
11410IFS=$as_save_IFS
11411
11412  ;;
11413esac
11414fi
11415TAR=$ac_cv_path_TAR
11416if test -n "$TAR"; then
11417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11418$as_echo "$TAR" >&6; }
11419else
11420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11421$as_echo "no" >&6; }
11422fi
11423
11424
11425  test -n "$TAR" && break
11426done
11427
11428    else
11429      # If it succeeded, then it was overridden by the user. We will use it
11430      # for the tool.
11431
11432      # First remove it from the list of overridden variables, so we can test
11433      # for unknown variables in the end.
11434      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11435
11436      # Check if we try to supply an empty value
11437      if test "x$TAR" = x; then
11438        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11439$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11440        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11441$as_echo_n "checking for TAR... " >&6; }
11442        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11443$as_echo "disabled" >&6; }
11444      else
11445        # Check if the provided tool contains a complete path.
11446        tool_specified="$TAR"
11447        tool_basename="${tool_specified##*/}"
11448        if test "x$tool_basename" = "x$tool_specified"; then
11449          # A command without a complete path is provided, search $PATH.
11450          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11451$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11452          # Extract the first word of "$tool_basename", so it can be a program name with args.
11453set dummy $tool_basename; ac_word=$2
11454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11455$as_echo_n "checking for $ac_word... " >&6; }
11456if ${ac_cv_path_TAR+:} false; then :
11457  $as_echo_n "(cached) " >&6
11458else
11459  case $TAR in
11460  [\\/]* | ?:[\\/]*)
11461  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11462  ;;
11463  *)
11464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11465for as_dir in $PATH
11466do
11467  IFS=$as_save_IFS
11468  test -z "$as_dir" && as_dir=.
11469    for ac_exec_ext in '' $ac_executable_extensions; do
11470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11471    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11473    break 2
11474  fi
11475done
11476  done
11477IFS=$as_save_IFS
11478
11479  ;;
11480esac
11481fi
11482TAR=$ac_cv_path_TAR
11483if test -n "$TAR"; then
11484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11485$as_echo "$TAR" >&6; }
11486else
11487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11488$as_echo "no" >&6; }
11489fi
11490
11491
11492          if test "x$TAR" = x; then
11493            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11494          fi
11495        else
11496          # Otherwise we believe it is a complete path. Use it as it is.
11497          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11498$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11499          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11500$as_echo_n "checking for TAR... " >&6; }
11501          if test ! -x "$tool_specified"; then
11502            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11503$as_echo "not found" >&6; }
11504            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11505          fi
11506          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11507$as_echo "$tool_specified" >&6; }
11508        fi
11509      fi
11510    fi
11511
11512  fi
11513
11514
11515
11516  if test "x$TAR" = x; then
11517    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11518  fi
11519
11520
11521
11522
11523
11524  # Publish this variable in the help.
11525
11526
11527  if [ -z "${TEE+x}" ]; then
11528    # The variable is not set by user, try to locate tool using the code snippet
11529    for ac_prog in tee
11530do
11531  # Extract the first word of "$ac_prog", so it can be a program name with args.
11532set dummy $ac_prog; ac_word=$2
11533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11534$as_echo_n "checking for $ac_word... " >&6; }
11535if ${ac_cv_path_TEE+:} false; then :
11536  $as_echo_n "(cached) " >&6
11537else
11538  case $TEE in
11539  [\\/]* | ?:[\\/]*)
11540  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11541  ;;
11542  *)
11543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11544for as_dir in $PATH
11545do
11546  IFS=$as_save_IFS
11547  test -z "$as_dir" && as_dir=.
11548    for ac_exec_ext in '' $ac_executable_extensions; do
11549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11550    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11552    break 2
11553  fi
11554done
11555  done
11556IFS=$as_save_IFS
11557
11558  ;;
11559esac
11560fi
11561TEE=$ac_cv_path_TEE
11562if test -n "$TEE"; then
11563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11564$as_echo "$TEE" >&6; }
11565else
11566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11567$as_echo "no" >&6; }
11568fi
11569
11570
11571  test -n "$TEE" && break
11572done
11573
11574  else
11575    # The variable is set, but is it from the command line or the environment?
11576
11577    # Try to remove the string !TEE! from our list.
11578    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11579    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11580      # If it failed, the variable was not from the command line. Ignore it,
11581      # but warn the user (except for BASH, which is always set by the calling BASH).
11582      if test "xTEE" != xBASH; then
11583        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11584$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11585      fi
11586      # Try to locate tool using the code snippet
11587      for ac_prog in tee
11588do
11589  # Extract the first word of "$ac_prog", so it can be a program name with args.
11590set dummy $ac_prog; ac_word=$2
11591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11592$as_echo_n "checking for $ac_word... " >&6; }
11593if ${ac_cv_path_TEE+:} false; then :
11594  $as_echo_n "(cached) " >&6
11595else
11596  case $TEE in
11597  [\\/]* | ?:[\\/]*)
11598  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11599  ;;
11600  *)
11601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11602for as_dir in $PATH
11603do
11604  IFS=$as_save_IFS
11605  test -z "$as_dir" && as_dir=.
11606    for ac_exec_ext in '' $ac_executable_extensions; do
11607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11608    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11610    break 2
11611  fi
11612done
11613  done
11614IFS=$as_save_IFS
11615
11616  ;;
11617esac
11618fi
11619TEE=$ac_cv_path_TEE
11620if test -n "$TEE"; then
11621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11622$as_echo "$TEE" >&6; }
11623else
11624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11625$as_echo "no" >&6; }
11626fi
11627
11628
11629  test -n "$TEE" && break
11630done
11631
11632    else
11633      # If it succeeded, then it was overridden by the user. We will use it
11634      # for the tool.
11635
11636      # First remove it from the list of overridden variables, so we can test
11637      # for unknown variables in the end.
11638      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11639
11640      # Check if we try to supply an empty value
11641      if test "x$TEE" = x; then
11642        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11643$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11644        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11645$as_echo_n "checking for TEE... " >&6; }
11646        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11647$as_echo "disabled" >&6; }
11648      else
11649        # Check if the provided tool contains a complete path.
11650        tool_specified="$TEE"
11651        tool_basename="${tool_specified##*/}"
11652        if test "x$tool_basename" = "x$tool_specified"; then
11653          # A command without a complete path is provided, search $PATH.
11654          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11655$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11656          # Extract the first word of "$tool_basename", so it can be a program name with args.
11657set dummy $tool_basename; ac_word=$2
11658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11659$as_echo_n "checking for $ac_word... " >&6; }
11660if ${ac_cv_path_TEE+:} false; then :
11661  $as_echo_n "(cached) " >&6
11662else
11663  case $TEE in
11664  [\\/]* | ?:[\\/]*)
11665  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11666  ;;
11667  *)
11668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11669for as_dir in $PATH
11670do
11671  IFS=$as_save_IFS
11672  test -z "$as_dir" && as_dir=.
11673    for ac_exec_ext in '' $ac_executable_extensions; do
11674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11675    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11677    break 2
11678  fi
11679done
11680  done
11681IFS=$as_save_IFS
11682
11683  ;;
11684esac
11685fi
11686TEE=$ac_cv_path_TEE
11687if test -n "$TEE"; then
11688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11689$as_echo "$TEE" >&6; }
11690else
11691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11692$as_echo "no" >&6; }
11693fi
11694
11695
11696          if test "x$TEE" = x; then
11697            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11698          fi
11699        else
11700          # Otherwise we believe it is a complete path. Use it as it is.
11701          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11702$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11703          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11704$as_echo_n "checking for TEE... " >&6; }
11705          if test ! -x "$tool_specified"; then
11706            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11707$as_echo "not found" >&6; }
11708            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11709          fi
11710          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11711$as_echo "$tool_specified" >&6; }
11712        fi
11713      fi
11714    fi
11715
11716  fi
11717
11718
11719
11720  if test "x$TEE" = x; then
11721    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11722  fi
11723
11724
11725
11726
11727
11728  # Publish this variable in the help.
11729
11730
11731  if [ -z "${TOUCH+x}" ]; then
11732    # The variable is not set by user, try to locate tool using the code snippet
11733    for ac_prog in touch
11734do
11735  # Extract the first word of "$ac_prog", so it can be a program name with args.
11736set dummy $ac_prog; ac_word=$2
11737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11738$as_echo_n "checking for $ac_word... " >&6; }
11739if ${ac_cv_path_TOUCH+:} false; then :
11740  $as_echo_n "(cached) " >&6
11741else
11742  case $TOUCH in
11743  [\\/]* | ?:[\\/]*)
11744  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11745  ;;
11746  *)
11747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11748for as_dir in $PATH
11749do
11750  IFS=$as_save_IFS
11751  test -z "$as_dir" && as_dir=.
11752    for ac_exec_ext in '' $ac_executable_extensions; do
11753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11754    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11756    break 2
11757  fi
11758done
11759  done
11760IFS=$as_save_IFS
11761
11762  ;;
11763esac
11764fi
11765TOUCH=$ac_cv_path_TOUCH
11766if test -n "$TOUCH"; then
11767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11768$as_echo "$TOUCH" >&6; }
11769else
11770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11771$as_echo "no" >&6; }
11772fi
11773
11774
11775  test -n "$TOUCH" && break
11776done
11777
11778  else
11779    # The variable is set, but is it from the command line or the environment?
11780
11781    # Try to remove the string !TOUCH! from our list.
11782    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11783    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11784      # If it failed, the variable was not from the command line. Ignore it,
11785      # but warn the user (except for BASH, which is always set by the calling BASH).
11786      if test "xTOUCH" != xBASH; then
11787        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11788$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11789      fi
11790      # Try to locate tool using the code snippet
11791      for ac_prog in touch
11792do
11793  # Extract the first word of "$ac_prog", so it can be a program name with args.
11794set dummy $ac_prog; ac_word=$2
11795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11796$as_echo_n "checking for $ac_word... " >&6; }
11797if ${ac_cv_path_TOUCH+:} false; then :
11798  $as_echo_n "(cached) " >&6
11799else
11800  case $TOUCH in
11801  [\\/]* | ?:[\\/]*)
11802  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11803  ;;
11804  *)
11805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11806for as_dir in $PATH
11807do
11808  IFS=$as_save_IFS
11809  test -z "$as_dir" && as_dir=.
11810    for ac_exec_ext in '' $ac_executable_extensions; do
11811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11812    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11814    break 2
11815  fi
11816done
11817  done
11818IFS=$as_save_IFS
11819
11820  ;;
11821esac
11822fi
11823TOUCH=$ac_cv_path_TOUCH
11824if test -n "$TOUCH"; then
11825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11826$as_echo "$TOUCH" >&6; }
11827else
11828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11829$as_echo "no" >&6; }
11830fi
11831
11832
11833  test -n "$TOUCH" && break
11834done
11835
11836    else
11837      # If it succeeded, then it was overridden by the user. We will use it
11838      # for the tool.
11839
11840      # First remove it from the list of overridden variables, so we can test
11841      # for unknown variables in the end.
11842      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11843
11844      # Check if we try to supply an empty value
11845      if test "x$TOUCH" = x; then
11846        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11847$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11848        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11849$as_echo_n "checking for TOUCH... " >&6; }
11850        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11851$as_echo "disabled" >&6; }
11852      else
11853        # Check if the provided tool contains a complete path.
11854        tool_specified="$TOUCH"
11855        tool_basename="${tool_specified##*/}"
11856        if test "x$tool_basename" = "x$tool_specified"; then
11857          # A command without a complete path is provided, search $PATH.
11858          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11859$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11860          # Extract the first word of "$tool_basename", so it can be a program name with args.
11861set dummy $tool_basename; ac_word=$2
11862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11863$as_echo_n "checking for $ac_word... " >&6; }
11864if ${ac_cv_path_TOUCH+:} false; then :
11865  $as_echo_n "(cached) " >&6
11866else
11867  case $TOUCH in
11868  [\\/]* | ?:[\\/]*)
11869  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11870  ;;
11871  *)
11872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11873for as_dir in $PATH
11874do
11875  IFS=$as_save_IFS
11876  test -z "$as_dir" && as_dir=.
11877    for ac_exec_ext in '' $ac_executable_extensions; do
11878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11879    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11881    break 2
11882  fi
11883done
11884  done
11885IFS=$as_save_IFS
11886
11887  ;;
11888esac
11889fi
11890TOUCH=$ac_cv_path_TOUCH
11891if test -n "$TOUCH"; then
11892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11893$as_echo "$TOUCH" >&6; }
11894else
11895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11896$as_echo "no" >&6; }
11897fi
11898
11899
11900          if test "x$TOUCH" = x; then
11901            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11902          fi
11903        else
11904          # Otherwise we believe it is a complete path. Use it as it is.
11905          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11906$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11907          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11908$as_echo_n "checking for TOUCH... " >&6; }
11909          if test ! -x "$tool_specified"; then
11910            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11911$as_echo "not found" >&6; }
11912            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11913          fi
11914          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11915$as_echo "$tool_specified" >&6; }
11916        fi
11917      fi
11918    fi
11919
11920  fi
11921
11922
11923
11924  if test "x$TOUCH" = x; then
11925    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11926  fi
11927
11928
11929
11930
11931
11932  # Publish this variable in the help.
11933
11934
11935  if [ -z "${TR+x}" ]; then
11936    # The variable is not set by user, try to locate tool using the code snippet
11937    for ac_prog in tr
11938do
11939  # Extract the first word of "$ac_prog", so it can be a program name with args.
11940set dummy $ac_prog; ac_word=$2
11941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11942$as_echo_n "checking for $ac_word... " >&6; }
11943if ${ac_cv_path_TR+:} false; then :
11944  $as_echo_n "(cached) " >&6
11945else
11946  case $TR in
11947  [\\/]* | ?:[\\/]*)
11948  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11949  ;;
11950  *)
11951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11952for as_dir in $PATH
11953do
11954  IFS=$as_save_IFS
11955  test -z "$as_dir" && as_dir=.
11956    for ac_exec_ext in '' $ac_executable_extensions; do
11957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11958    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11960    break 2
11961  fi
11962done
11963  done
11964IFS=$as_save_IFS
11965
11966  ;;
11967esac
11968fi
11969TR=$ac_cv_path_TR
11970if test -n "$TR"; then
11971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11972$as_echo "$TR" >&6; }
11973else
11974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11975$as_echo "no" >&6; }
11976fi
11977
11978
11979  test -n "$TR" && break
11980done
11981
11982  else
11983    # The variable is set, but is it from the command line or the environment?
11984
11985    # Try to remove the string !TR! from our list.
11986    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11987    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11988      # If it failed, the variable was not from the command line. Ignore it,
11989      # but warn the user (except for BASH, which is always set by the calling BASH).
11990      if test "xTR" != xBASH; then
11991        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11992$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11993      fi
11994      # Try to locate tool using the code snippet
11995      for ac_prog in tr
11996do
11997  # Extract the first word of "$ac_prog", so it can be a program name with args.
11998set dummy $ac_prog; ac_word=$2
11999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12000$as_echo_n "checking for $ac_word... " >&6; }
12001if ${ac_cv_path_TR+:} false; then :
12002  $as_echo_n "(cached) " >&6
12003else
12004  case $TR in
12005  [\\/]* | ?:[\\/]*)
12006  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12007  ;;
12008  *)
12009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12010for as_dir in $PATH
12011do
12012  IFS=$as_save_IFS
12013  test -z "$as_dir" && as_dir=.
12014    for ac_exec_ext in '' $ac_executable_extensions; do
12015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12016    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12018    break 2
12019  fi
12020done
12021  done
12022IFS=$as_save_IFS
12023
12024  ;;
12025esac
12026fi
12027TR=$ac_cv_path_TR
12028if test -n "$TR"; then
12029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12030$as_echo "$TR" >&6; }
12031else
12032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12033$as_echo "no" >&6; }
12034fi
12035
12036
12037  test -n "$TR" && break
12038done
12039
12040    else
12041      # If it succeeded, then it was overridden by the user. We will use it
12042      # for the tool.
12043
12044      # First remove it from the list of overridden variables, so we can test
12045      # for unknown variables in the end.
12046      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12047
12048      # Check if we try to supply an empty value
12049      if test "x$TR" = x; then
12050        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12051$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12052        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12053$as_echo_n "checking for TR... " >&6; }
12054        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12055$as_echo "disabled" >&6; }
12056      else
12057        # Check if the provided tool contains a complete path.
12058        tool_specified="$TR"
12059        tool_basename="${tool_specified##*/}"
12060        if test "x$tool_basename" = "x$tool_specified"; then
12061          # A command without a complete path is provided, search $PATH.
12062          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12063$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12064          # Extract the first word of "$tool_basename", so it can be a program name with args.
12065set dummy $tool_basename; ac_word=$2
12066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12067$as_echo_n "checking for $ac_word... " >&6; }
12068if ${ac_cv_path_TR+:} false; then :
12069  $as_echo_n "(cached) " >&6
12070else
12071  case $TR in
12072  [\\/]* | ?:[\\/]*)
12073  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12074  ;;
12075  *)
12076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12077for as_dir in $PATH
12078do
12079  IFS=$as_save_IFS
12080  test -z "$as_dir" && as_dir=.
12081    for ac_exec_ext in '' $ac_executable_extensions; do
12082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12083    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12085    break 2
12086  fi
12087done
12088  done
12089IFS=$as_save_IFS
12090
12091  ;;
12092esac
12093fi
12094TR=$ac_cv_path_TR
12095if test -n "$TR"; then
12096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12097$as_echo "$TR" >&6; }
12098else
12099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12100$as_echo "no" >&6; }
12101fi
12102
12103
12104          if test "x$TR" = x; then
12105            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12106          fi
12107        else
12108          # Otherwise we believe it is a complete path. Use it as it is.
12109          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12110$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12111          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12112$as_echo_n "checking for TR... " >&6; }
12113          if test ! -x "$tool_specified"; then
12114            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12115$as_echo "not found" >&6; }
12116            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12117          fi
12118          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12119$as_echo "$tool_specified" >&6; }
12120        fi
12121      fi
12122    fi
12123
12124  fi
12125
12126
12127
12128  if test "x$TR" = x; then
12129    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12130  fi
12131
12132
12133
12134
12135
12136  # Publish this variable in the help.
12137
12138
12139  if [ -z "${UNAME+x}" ]; then
12140    # The variable is not set by user, try to locate tool using the code snippet
12141    for ac_prog in uname
12142do
12143  # Extract the first word of "$ac_prog", so it can be a program name with args.
12144set dummy $ac_prog; ac_word=$2
12145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12146$as_echo_n "checking for $ac_word... " >&6; }
12147if ${ac_cv_path_UNAME+:} false; then :
12148  $as_echo_n "(cached) " >&6
12149else
12150  case $UNAME in
12151  [\\/]* | ?:[\\/]*)
12152  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12153  ;;
12154  *)
12155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12156for as_dir in $PATH
12157do
12158  IFS=$as_save_IFS
12159  test -z "$as_dir" && as_dir=.
12160    for ac_exec_ext in '' $ac_executable_extensions; do
12161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12162    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12164    break 2
12165  fi
12166done
12167  done
12168IFS=$as_save_IFS
12169
12170  ;;
12171esac
12172fi
12173UNAME=$ac_cv_path_UNAME
12174if test -n "$UNAME"; then
12175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12176$as_echo "$UNAME" >&6; }
12177else
12178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12179$as_echo "no" >&6; }
12180fi
12181
12182
12183  test -n "$UNAME" && break
12184done
12185
12186  else
12187    # The variable is set, but is it from the command line or the environment?
12188
12189    # Try to remove the string !UNAME! from our list.
12190    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12191    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12192      # If it failed, the variable was not from the command line. Ignore it,
12193      # but warn the user (except for BASH, which is always set by the calling BASH).
12194      if test "xUNAME" != xBASH; then
12195        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12196$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12197      fi
12198      # Try to locate tool using the code snippet
12199      for ac_prog in uname
12200do
12201  # Extract the first word of "$ac_prog", so it can be a program name with args.
12202set dummy $ac_prog; ac_word=$2
12203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12204$as_echo_n "checking for $ac_word... " >&6; }
12205if ${ac_cv_path_UNAME+:} false; then :
12206  $as_echo_n "(cached) " >&6
12207else
12208  case $UNAME in
12209  [\\/]* | ?:[\\/]*)
12210  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12211  ;;
12212  *)
12213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12214for as_dir in $PATH
12215do
12216  IFS=$as_save_IFS
12217  test -z "$as_dir" && as_dir=.
12218    for ac_exec_ext in '' $ac_executable_extensions; do
12219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12220    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12222    break 2
12223  fi
12224done
12225  done
12226IFS=$as_save_IFS
12227
12228  ;;
12229esac
12230fi
12231UNAME=$ac_cv_path_UNAME
12232if test -n "$UNAME"; then
12233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12234$as_echo "$UNAME" >&6; }
12235else
12236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12237$as_echo "no" >&6; }
12238fi
12239
12240
12241  test -n "$UNAME" && break
12242done
12243
12244    else
12245      # If it succeeded, then it was overridden by the user. We will use it
12246      # for the tool.
12247
12248      # First remove it from the list of overridden variables, so we can test
12249      # for unknown variables in the end.
12250      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12251
12252      # Check if we try to supply an empty value
12253      if test "x$UNAME" = x; then
12254        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12255$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12256        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12257$as_echo_n "checking for UNAME... " >&6; }
12258        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12259$as_echo "disabled" >&6; }
12260      else
12261        # Check if the provided tool contains a complete path.
12262        tool_specified="$UNAME"
12263        tool_basename="${tool_specified##*/}"
12264        if test "x$tool_basename" = "x$tool_specified"; then
12265          # A command without a complete path is provided, search $PATH.
12266          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12267$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12268          # Extract the first word of "$tool_basename", so it can be a program name with args.
12269set dummy $tool_basename; ac_word=$2
12270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12271$as_echo_n "checking for $ac_word... " >&6; }
12272if ${ac_cv_path_UNAME+:} false; then :
12273  $as_echo_n "(cached) " >&6
12274else
12275  case $UNAME in
12276  [\\/]* | ?:[\\/]*)
12277  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12278  ;;
12279  *)
12280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12281for as_dir in $PATH
12282do
12283  IFS=$as_save_IFS
12284  test -z "$as_dir" && as_dir=.
12285    for ac_exec_ext in '' $ac_executable_extensions; do
12286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12287    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12289    break 2
12290  fi
12291done
12292  done
12293IFS=$as_save_IFS
12294
12295  ;;
12296esac
12297fi
12298UNAME=$ac_cv_path_UNAME
12299if test -n "$UNAME"; then
12300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12301$as_echo "$UNAME" >&6; }
12302else
12303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12304$as_echo "no" >&6; }
12305fi
12306
12307
12308          if test "x$UNAME" = x; then
12309            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12310          fi
12311        else
12312          # Otherwise we believe it is a complete path. Use it as it is.
12313          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12314$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12315          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12316$as_echo_n "checking for UNAME... " >&6; }
12317          if test ! -x "$tool_specified"; then
12318            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12319$as_echo "not found" >&6; }
12320            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12321          fi
12322          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12323$as_echo "$tool_specified" >&6; }
12324        fi
12325      fi
12326    fi
12327
12328  fi
12329
12330
12331
12332  if test "x$UNAME" = x; then
12333    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12334  fi
12335
12336
12337
12338
12339
12340  # Publish this variable in the help.
12341
12342
12343  if [ -z "${UNIQ+x}" ]; then
12344    # The variable is not set by user, try to locate tool using the code snippet
12345    for ac_prog in uniq
12346do
12347  # Extract the first word of "$ac_prog", so it can be a program name with args.
12348set dummy $ac_prog; ac_word=$2
12349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12350$as_echo_n "checking for $ac_word... " >&6; }
12351if ${ac_cv_path_UNIQ+:} false; then :
12352  $as_echo_n "(cached) " >&6
12353else
12354  case $UNIQ in
12355  [\\/]* | ?:[\\/]*)
12356  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12357  ;;
12358  *)
12359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12360for as_dir in $PATH
12361do
12362  IFS=$as_save_IFS
12363  test -z "$as_dir" && as_dir=.
12364    for ac_exec_ext in '' $ac_executable_extensions; do
12365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12366    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12368    break 2
12369  fi
12370done
12371  done
12372IFS=$as_save_IFS
12373
12374  ;;
12375esac
12376fi
12377UNIQ=$ac_cv_path_UNIQ
12378if test -n "$UNIQ"; then
12379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12380$as_echo "$UNIQ" >&6; }
12381else
12382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12383$as_echo "no" >&6; }
12384fi
12385
12386
12387  test -n "$UNIQ" && break
12388done
12389
12390  else
12391    # The variable is set, but is it from the command line or the environment?
12392
12393    # Try to remove the string !UNIQ! from our list.
12394    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12395    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12396      # If it failed, the variable was not from the command line. Ignore it,
12397      # but warn the user (except for BASH, which is always set by the calling BASH).
12398      if test "xUNIQ" != xBASH; then
12399        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12400$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12401      fi
12402      # Try to locate tool using the code snippet
12403      for ac_prog in uniq
12404do
12405  # Extract the first word of "$ac_prog", so it can be a program name with args.
12406set dummy $ac_prog; ac_word=$2
12407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12408$as_echo_n "checking for $ac_word... " >&6; }
12409if ${ac_cv_path_UNIQ+:} false; then :
12410  $as_echo_n "(cached) " >&6
12411else
12412  case $UNIQ in
12413  [\\/]* | ?:[\\/]*)
12414  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12415  ;;
12416  *)
12417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12418for as_dir in $PATH
12419do
12420  IFS=$as_save_IFS
12421  test -z "$as_dir" && as_dir=.
12422    for ac_exec_ext in '' $ac_executable_extensions; do
12423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12424    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12426    break 2
12427  fi
12428done
12429  done
12430IFS=$as_save_IFS
12431
12432  ;;
12433esac
12434fi
12435UNIQ=$ac_cv_path_UNIQ
12436if test -n "$UNIQ"; then
12437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12438$as_echo "$UNIQ" >&6; }
12439else
12440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12441$as_echo "no" >&6; }
12442fi
12443
12444
12445  test -n "$UNIQ" && break
12446done
12447
12448    else
12449      # If it succeeded, then it was overridden by the user. We will use it
12450      # for the tool.
12451
12452      # First remove it from the list of overridden variables, so we can test
12453      # for unknown variables in the end.
12454      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12455
12456      # Check if we try to supply an empty value
12457      if test "x$UNIQ" = x; then
12458        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12459$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12460        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12461$as_echo_n "checking for UNIQ... " >&6; }
12462        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12463$as_echo "disabled" >&6; }
12464      else
12465        # Check if the provided tool contains a complete path.
12466        tool_specified="$UNIQ"
12467        tool_basename="${tool_specified##*/}"
12468        if test "x$tool_basename" = "x$tool_specified"; then
12469          # A command without a complete path is provided, search $PATH.
12470          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12471$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12472          # Extract the first word of "$tool_basename", so it can be a program name with args.
12473set dummy $tool_basename; ac_word=$2
12474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12475$as_echo_n "checking for $ac_word... " >&6; }
12476if ${ac_cv_path_UNIQ+:} false; then :
12477  $as_echo_n "(cached) " >&6
12478else
12479  case $UNIQ in
12480  [\\/]* | ?:[\\/]*)
12481  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12482  ;;
12483  *)
12484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12485for as_dir in $PATH
12486do
12487  IFS=$as_save_IFS
12488  test -z "$as_dir" && as_dir=.
12489    for ac_exec_ext in '' $ac_executable_extensions; do
12490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12491    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12493    break 2
12494  fi
12495done
12496  done
12497IFS=$as_save_IFS
12498
12499  ;;
12500esac
12501fi
12502UNIQ=$ac_cv_path_UNIQ
12503if test -n "$UNIQ"; then
12504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12505$as_echo "$UNIQ" >&6; }
12506else
12507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12508$as_echo "no" >&6; }
12509fi
12510
12511
12512          if test "x$UNIQ" = x; then
12513            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12514          fi
12515        else
12516          # Otherwise we believe it is a complete path. Use it as it is.
12517          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12518$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12519          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12520$as_echo_n "checking for UNIQ... " >&6; }
12521          if test ! -x "$tool_specified"; then
12522            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12523$as_echo "not found" >&6; }
12524            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12525          fi
12526          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12527$as_echo "$tool_specified" >&6; }
12528        fi
12529      fi
12530    fi
12531
12532  fi
12533
12534
12535
12536  if test "x$UNIQ" = x; then
12537    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12538  fi
12539
12540
12541
12542
12543
12544  # Publish this variable in the help.
12545
12546
12547  if [ -z "${WC+x}" ]; then
12548    # The variable is not set by user, try to locate tool using the code snippet
12549    for ac_prog in wc
12550do
12551  # Extract the first word of "$ac_prog", so it can be a program name with args.
12552set dummy $ac_prog; ac_word=$2
12553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12554$as_echo_n "checking for $ac_word... " >&6; }
12555if ${ac_cv_path_WC+:} false; then :
12556  $as_echo_n "(cached) " >&6
12557else
12558  case $WC in
12559  [\\/]* | ?:[\\/]*)
12560  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12561  ;;
12562  *)
12563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12564for as_dir in $PATH
12565do
12566  IFS=$as_save_IFS
12567  test -z "$as_dir" && as_dir=.
12568    for ac_exec_ext in '' $ac_executable_extensions; do
12569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12570    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12572    break 2
12573  fi
12574done
12575  done
12576IFS=$as_save_IFS
12577
12578  ;;
12579esac
12580fi
12581WC=$ac_cv_path_WC
12582if test -n "$WC"; then
12583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12584$as_echo "$WC" >&6; }
12585else
12586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12587$as_echo "no" >&6; }
12588fi
12589
12590
12591  test -n "$WC" && break
12592done
12593
12594  else
12595    # The variable is set, but is it from the command line or the environment?
12596
12597    # Try to remove the string !WC! from our list.
12598    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12599    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12600      # If it failed, the variable was not from the command line. Ignore it,
12601      # but warn the user (except for BASH, which is always set by the calling BASH).
12602      if test "xWC" != xBASH; then
12603        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12604$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12605      fi
12606      # Try to locate tool using the code snippet
12607      for ac_prog in wc
12608do
12609  # Extract the first word of "$ac_prog", so it can be a program name with args.
12610set dummy $ac_prog; ac_word=$2
12611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12612$as_echo_n "checking for $ac_word... " >&6; }
12613if ${ac_cv_path_WC+:} false; then :
12614  $as_echo_n "(cached) " >&6
12615else
12616  case $WC in
12617  [\\/]* | ?:[\\/]*)
12618  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12619  ;;
12620  *)
12621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12622for as_dir in $PATH
12623do
12624  IFS=$as_save_IFS
12625  test -z "$as_dir" && as_dir=.
12626    for ac_exec_ext in '' $ac_executable_extensions; do
12627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12628    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12630    break 2
12631  fi
12632done
12633  done
12634IFS=$as_save_IFS
12635
12636  ;;
12637esac
12638fi
12639WC=$ac_cv_path_WC
12640if test -n "$WC"; then
12641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12642$as_echo "$WC" >&6; }
12643else
12644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12645$as_echo "no" >&6; }
12646fi
12647
12648
12649  test -n "$WC" && break
12650done
12651
12652    else
12653      # If it succeeded, then it was overridden by the user. We will use it
12654      # for the tool.
12655
12656      # First remove it from the list of overridden variables, so we can test
12657      # for unknown variables in the end.
12658      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12659
12660      # Check if we try to supply an empty value
12661      if test "x$WC" = x; then
12662        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12663$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12664        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12665$as_echo_n "checking for WC... " >&6; }
12666        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12667$as_echo "disabled" >&6; }
12668      else
12669        # Check if the provided tool contains a complete path.
12670        tool_specified="$WC"
12671        tool_basename="${tool_specified##*/}"
12672        if test "x$tool_basename" = "x$tool_specified"; then
12673          # A command without a complete path is provided, search $PATH.
12674          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12675$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12676          # Extract the first word of "$tool_basename", so it can be a program name with args.
12677set dummy $tool_basename; ac_word=$2
12678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12679$as_echo_n "checking for $ac_word... " >&6; }
12680if ${ac_cv_path_WC+:} false; then :
12681  $as_echo_n "(cached) " >&6
12682else
12683  case $WC in
12684  [\\/]* | ?:[\\/]*)
12685  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12686  ;;
12687  *)
12688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12689for as_dir in $PATH
12690do
12691  IFS=$as_save_IFS
12692  test -z "$as_dir" && as_dir=.
12693    for ac_exec_ext in '' $ac_executable_extensions; do
12694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12695    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12697    break 2
12698  fi
12699done
12700  done
12701IFS=$as_save_IFS
12702
12703  ;;
12704esac
12705fi
12706WC=$ac_cv_path_WC
12707if test -n "$WC"; then
12708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12709$as_echo "$WC" >&6; }
12710else
12711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12712$as_echo "no" >&6; }
12713fi
12714
12715
12716          if test "x$WC" = x; then
12717            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12718          fi
12719        else
12720          # Otherwise we believe it is a complete path. Use it as it is.
12721          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12722$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12723          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12724$as_echo_n "checking for WC... " >&6; }
12725          if test ! -x "$tool_specified"; then
12726            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12727$as_echo "not found" >&6; }
12728            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12729          fi
12730          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12731$as_echo "$tool_specified" >&6; }
12732        fi
12733      fi
12734    fi
12735
12736  fi
12737
12738
12739
12740  if test "x$WC" = x; then
12741    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12742  fi
12743
12744
12745
12746
12747
12748  # Publish this variable in the help.
12749
12750
12751  if [ -z "${WHICH+x}" ]; then
12752    # The variable is not set by user, try to locate tool using the code snippet
12753    for ac_prog in which
12754do
12755  # Extract the first word of "$ac_prog", so it can be a program name with args.
12756set dummy $ac_prog; ac_word=$2
12757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12758$as_echo_n "checking for $ac_word... " >&6; }
12759if ${ac_cv_path_WHICH+:} false; then :
12760  $as_echo_n "(cached) " >&6
12761else
12762  case $WHICH in
12763  [\\/]* | ?:[\\/]*)
12764  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12765  ;;
12766  *)
12767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12768for as_dir in $PATH
12769do
12770  IFS=$as_save_IFS
12771  test -z "$as_dir" && as_dir=.
12772    for ac_exec_ext in '' $ac_executable_extensions; do
12773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12774    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12776    break 2
12777  fi
12778done
12779  done
12780IFS=$as_save_IFS
12781
12782  ;;
12783esac
12784fi
12785WHICH=$ac_cv_path_WHICH
12786if test -n "$WHICH"; then
12787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12788$as_echo "$WHICH" >&6; }
12789else
12790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12791$as_echo "no" >&6; }
12792fi
12793
12794
12795  test -n "$WHICH" && break
12796done
12797
12798  else
12799    # The variable is set, but is it from the command line or the environment?
12800
12801    # Try to remove the string !WHICH! from our list.
12802    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12803    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12804      # If it failed, the variable was not from the command line. Ignore it,
12805      # but warn the user (except for BASH, which is always set by the calling BASH).
12806      if test "xWHICH" != xBASH; then
12807        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12808$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12809      fi
12810      # Try to locate tool using the code snippet
12811      for ac_prog in which
12812do
12813  # Extract the first word of "$ac_prog", so it can be a program name with args.
12814set dummy $ac_prog; ac_word=$2
12815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12816$as_echo_n "checking for $ac_word... " >&6; }
12817if ${ac_cv_path_WHICH+:} false; then :
12818  $as_echo_n "(cached) " >&6
12819else
12820  case $WHICH in
12821  [\\/]* | ?:[\\/]*)
12822  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12823  ;;
12824  *)
12825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12826for as_dir in $PATH
12827do
12828  IFS=$as_save_IFS
12829  test -z "$as_dir" && as_dir=.
12830    for ac_exec_ext in '' $ac_executable_extensions; do
12831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12832    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12834    break 2
12835  fi
12836done
12837  done
12838IFS=$as_save_IFS
12839
12840  ;;
12841esac
12842fi
12843WHICH=$ac_cv_path_WHICH
12844if test -n "$WHICH"; then
12845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12846$as_echo "$WHICH" >&6; }
12847else
12848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12849$as_echo "no" >&6; }
12850fi
12851
12852
12853  test -n "$WHICH" && break
12854done
12855
12856    else
12857      # If it succeeded, then it was overridden by the user. We will use it
12858      # for the tool.
12859
12860      # First remove it from the list of overridden variables, so we can test
12861      # for unknown variables in the end.
12862      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12863
12864      # Check if we try to supply an empty value
12865      if test "x$WHICH" = x; then
12866        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12867$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12868        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12869$as_echo_n "checking for WHICH... " >&6; }
12870        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12871$as_echo "disabled" >&6; }
12872      else
12873        # Check if the provided tool contains a complete path.
12874        tool_specified="$WHICH"
12875        tool_basename="${tool_specified##*/}"
12876        if test "x$tool_basename" = "x$tool_specified"; then
12877          # A command without a complete path is provided, search $PATH.
12878          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12879$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12880          # Extract the first word of "$tool_basename", so it can be a program name with args.
12881set dummy $tool_basename; ac_word=$2
12882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12883$as_echo_n "checking for $ac_word... " >&6; }
12884if ${ac_cv_path_WHICH+:} false; then :
12885  $as_echo_n "(cached) " >&6
12886else
12887  case $WHICH in
12888  [\\/]* | ?:[\\/]*)
12889  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12890  ;;
12891  *)
12892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12893for as_dir in $PATH
12894do
12895  IFS=$as_save_IFS
12896  test -z "$as_dir" && as_dir=.
12897    for ac_exec_ext in '' $ac_executable_extensions; do
12898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12899    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12901    break 2
12902  fi
12903done
12904  done
12905IFS=$as_save_IFS
12906
12907  ;;
12908esac
12909fi
12910WHICH=$ac_cv_path_WHICH
12911if test -n "$WHICH"; then
12912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12913$as_echo "$WHICH" >&6; }
12914else
12915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12916$as_echo "no" >&6; }
12917fi
12918
12919
12920          if test "x$WHICH" = x; then
12921            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12922          fi
12923        else
12924          # Otherwise we believe it is a complete path. Use it as it is.
12925          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12926$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12927          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12928$as_echo_n "checking for WHICH... " >&6; }
12929          if test ! -x "$tool_specified"; then
12930            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12931$as_echo "not found" >&6; }
12932            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12933          fi
12934          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12935$as_echo "$tool_specified" >&6; }
12936        fi
12937      fi
12938    fi
12939
12940  fi
12941
12942
12943
12944  if test "x$WHICH" = x; then
12945    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12946  fi
12947
12948
12949
12950
12951
12952  # Publish this variable in the help.
12953
12954
12955  if [ -z "${XARGS+x}" ]; then
12956    # The variable is not set by user, try to locate tool using the code snippet
12957    for ac_prog in xargs
12958do
12959  # Extract the first word of "$ac_prog", so it can be a program name with args.
12960set dummy $ac_prog; ac_word=$2
12961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12962$as_echo_n "checking for $ac_word... " >&6; }
12963if ${ac_cv_path_XARGS+:} false; then :
12964  $as_echo_n "(cached) " >&6
12965else
12966  case $XARGS in
12967  [\\/]* | ?:[\\/]*)
12968  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12969  ;;
12970  *)
12971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12972for as_dir in $PATH
12973do
12974  IFS=$as_save_IFS
12975  test -z "$as_dir" && as_dir=.
12976    for ac_exec_ext in '' $ac_executable_extensions; do
12977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12978    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12980    break 2
12981  fi
12982done
12983  done
12984IFS=$as_save_IFS
12985
12986  ;;
12987esac
12988fi
12989XARGS=$ac_cv_path_XARGS
12990if test -n "$XARGS"; then
12991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12992$as_echo "$XARGS" >&6; }
12993else
12994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12995$as_echo "no" >&6; }
12996fi
12997
12998
12999  test -n "$XARGS" && break
13000done
13001
13002  else
13003    # The variable is set, but is it from the command line or the environment?
13004
13005    # Try to remove the string !XARGS! from our list.
13006    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13007    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13008      # If it failed, the variable was not from the command line. Ignore it,
13009      # but warn the user (except for BASH, which is always set by the calling BASH).
13010      if test "xXARGS" != xBASH; then
13011        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13012$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13013      fi
13014      # Try to locate tool using the code snippet
13015      for ac_prog in xargs
13016do
13017  # Extract the first word of "$ac_prog", so it can be a program name with args.
13018set dummy $ac_prog; ac_word=$2
13019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13020$as_echo_n "checking for $ac_word... " >&6; }
13021if ${ac_cv_path_XARGS+:} false; then :
13022  $as_echo_n "(cached) " >&6
13023else
13024  case $XARGS in
13025  [\\/]* | ?:[\\/]*)
13026  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13027  ;;
13028  *)
13029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13030for as_dir in $PATH
13031do
13032  IFS=$as_save_IFS
13033  test -z "$as_dir" && as_dir=.
13034    for ac_exec_ext in '' $ac_executable_extensions; do
13035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13036    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13038    break 2
13039  fi
13040done
13041  done
13042IFS=$as_save_IFS
13043
13044  ;;
13045esac
13046fi
13047XARGS=$ac_cv_path_XARGS
13048if test -n "$XARGS"; then
13049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13050$as_echo "$XARGS" >&6; }
13051else
13052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13053$as_echo "no" >&6; }
13054fi
13055
13056
13057  test -n "$XARGS" && break
13058done
13059
13060    else
13061      # If it succeeded, then it was overridden by the user. We will use it
13062      # for the tool.
13063
13064      # First remove it from the list of overridden variables, so we can test
13065      # for unknown variables in the end.
13066      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13067
13068      # Check if we try to supply an empty value
13069      if test "x$XARGS" = x; then
13070        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13071$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13072        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13073$as_echo_n "checking for XARGS... " >&6; }
13074        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13075$as_echo "disabled" >&6; }
13076      else
13077        # Check if the provided tool contains a complete path.
13078        tool_specified="$XARGS"
13079        tool_basename="${tool_specified##*/}"
13080        if test "x$tool_basename" = "x$tool_specified"; then
13081          # A command without a complete path is provided, search $PATH.
13082          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13083$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13084          # Extract the first word of "$tool_basename", so it can be a program name with args.
13085set dummy $tool_basename; ac_word=$2
13086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13087$as_echo_n "checking for $ac_word... " >&6; }
13088if ${ac_cv_path_XARGS+:} false; then :
13089  $as_echo_n "(cached) " >&6
13090else
13091  case $XARGS in
13092  [\\/]* | ?:[\\/]*)
13093  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13094  ;;
13095  *)
13096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13097for as_dir in $PATH
13098do
13099  IFS=$as_save_IFS
13100  test -z "$as_dir" && as_dir=.
13101    for ac_exec_ext in '' $ac_executable_extensions; do
13102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13103    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13105    break 2
13106  fi
13107done
13108  done
13109IFS=$as_save_IFS
13110
13111  ;;
13112esac
13113fi
13114XARGS=$ac_cv_path_XARGS
13115if test -n "$XARGS"; then
13116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13117$as_echo "$XARGS" >&6; }
13118else
13119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13120$as_echo "no" >&6; }
13121fi
13122
13123
13124          if test "x$XARGS" = x; then
13125            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13126          fi
13127        else
13128          # Otherwise we believe it is a complete path. Use it as it is.
13129          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13130$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13131          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13132$as_echo_n "checking for XARGS... " >&6; }
13133          if test ! -x "$tool_specified"; then
13134            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13135$as_echo "not found" >&6; }
13136            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13137          fi
13138          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13139$as_echo "$tool_specified" >&6; }
13140        fi
13141      fi
13142    fi
13143
13144  fi
13145
13146
13147
13148  if test "x$XARGS" = x; then
13149    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13150  fi
13151
13152
13153
13154  # Then required tools that require some special treatment.
13155
13156
13157  # Publish this variable in the help.
13158
13159
13160  if [ -z "${AWK+x}" ]; then
13161    # The variable is not set by user, try to locate tool using the code snippet
13162    for ac_prog in gawk mawk nawk awk
13163do
13164  # Extract the first word of "$ac_prog", so it can be a program name with args.
13165set dummy $ac_prog; ac_word=$2
13166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13167$as_echo_n "checking for $ac_word... " >&6; }
13168if ${ac_cv_prog_AWK+:} false; then :
13169  $as_echo_n "(cached) " >&6
13170else
13171  if test -n "$AWK"; then
13172  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13173else
13174as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13175for as_dir in $PATH
13176do
13177  IFS=$as_save_IFS
13178  test -z "$as_dir" && as_dir=.
13179    for ac_exec_ext in '' $ac_executable_extensions; do
13180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13181    ac_cv_prog_AWK="$ac_prog"
13182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13183    break 2
13184  fi
13185done
13186  done
13187IFS=$as_save_IFS
13188
13189fi
13190fi
13191AWK=$ac_cv_prog_AWK
13192if test -n "$AWK"; then
13193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13194$as_echo "$AWK" >&6; }
13195else
13196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13197$as_echo "no" >&6; }
13198fi
13199
13200
13201  test -n "$AWK" && break
13202done
13203
13204  else
13205    # The variable is set, but is it from the command line or the environment?
13206
13207    # Try to remove the string !AWK! from our list.
13208    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13209    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13210      # If it failed, the variable was not from the command line. Ignore it,
13211      # but warn the user (except for BASH, which is always set by the calling BASH).
13212      if test "xAWK" != xBASH; then
13213        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13214$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13215      fi
13216      # Try to locate tool using the code snippet
13217      for ac_prog in gawk mawk nawk awk
13218do
13219  # Extract the first word of "$ac_prog", so it can be a program name with args.
13220set dummy $ac_prog; ac_word=$2
13221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13222$as_echo_n "checking for $ac_word... " >&6; }
13223if ${ac_cv_prog_AWK+:} false; then :
13224  $as_echo_n "(cached) " >&6
13225else
13226  if test -n "$AWK"; then
13227  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13228else
13229as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13230for as_dir in $PATH
13231do
13232  IFS=$as_save_IFS
13233  test -z "$as_dir" && as_dir=.
13234    for ac_exec_ext in '' $ac_executable_extensions; do
13235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13236    ac_cv_prog_AWK="$ac_prog"
13237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13238    break 2
13239  fi
13240done
13241  done
13242IFS=$as_save_IFS
13243
13244fi
13245fi
13246AWK=$ac_cv_prog_AWK
13247if test -n "$AWK"; then
13248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13249$as_echo "$AWK" >&6; }
13250else
13251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13252$as_echo "no" >&6; }
13253fi
13254
13255
13256  test -n "$AWK" && break
13257done
13258
13259    else
13260      # If it succeeded, then it was overridden by the user. We will use it
13261      # for the tool.
13262
13263      # First remove it from the list of overridden variables, so we can test
13264      # for unknown variables in the end.
13265      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13266
13267      # Check if we try to supply an empty value
13268      if test "x$AWK" = x; then
13269        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13270$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13271        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13272$as_echo_n "checking for AWK... " >&6; }
13273        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13274$as_echo "disabled" >&6; }
13275      else
13276        # Check if the provided tool contains a complete path.
13277        tool_specified="$AWK"
13278        tool_basename="${tool_specified##*/}"
13279        if test "x$tool_basename" = "x$tool_specified"; then
13280          # A command without a complete path is provided, search $PATH.
13281          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13282$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13283          # Extract the first word of "$tool_basename", so it can be a program name with args.
13284set dummy $tool_basename; ac_word=$2
13285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13286$as_echo_n "checking for $ac_word... " >&6; }
13287if ${ac_cv_path_AWK+:} false; then :
13288  $as_echo_n "(cached) " >&6
13289else
13290  case $AWK in
13291  [\\/]* | ?:[\\/]*)
13292  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13293  ;;
13294  *)
13295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13296for as_dir in $PATH
13297do
13298  IFS=$as_save_IFS
13299  test -z "$as_dir" && as_dir=.
13300    for ac_exec_ext in '' $ac_executable_extensions; do
13301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13302    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13304    break 2
13305  fi
13306done
13307  done
13308IFS=$as_save_IFS
13309
13310  ;;
13311esac
13312fi
13313AWK=$ac_cv_path_AWK
13314if test -n "$AWK"; then
13315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13316$as_echo "$AWK" >&6; }
13317else
13318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13319$as_echo "no" >&6; }
13320fi
13321
13322
13323          if test "x$AWK" = x; then
13324            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13325          fi
13326        else
13327          # Otherwise we believe it is a complete path. Use it as it is.
13328          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13329$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13330          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13331$as_echo_n "checking for AWK... " >&6; }
13332          if test ! -x "$tool_specified"; then
13333            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13334$as_echo "not found" >&6; }
13335            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13336          fi
13337          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13338$as_echo "$tool_specified" >&6; }
13339        fi
13340      fi
13341    fi
13342
13343  fi
13344
13345
13346  if test "x$AWK" = x; then
13347    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13348  fi
13349
13350
13351
13352
13353  # Publish this variable in the help.
13354
13355
13356  if [ -z "${GREP+x}" ]; then
13357    # The variable is not set by user, try to locate tool using the code snippet
13358    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13359$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13360if ${ac_cv_path_GREP+:} false; then :
13361  $as_echo_n "(cached) " >&6
13362else
13363  if test -z "$GREP"; then
13364  ac_path_GREP_found=false
13365  # Loop through the user's path and test for each of PROGNAME-LIST
13366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13367for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13368do
13369  IFS=$as_save_IFS
13370  test -z "$as_dir" && as_dir=.
13371    for ac_prog in grep ggrep; do
13372    for ac_exec_ext in '' $ac_executable_extensions; do
13373      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13374      as_fn_executable_p "$ac_path_GREP" || continue
13375# Check for GNU ac_path_GREP and select it if it is found.
13376  # Check for GNU $ac_path_GREP
13377case `"$ac_path_GREP" --version 2>&1` in
13378*GNU*)
13379  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13380*)
13381  ac_count=0
13382  $as_echo_n 0123456789 >"conftest.in"
13383  while :
13384  do
13385    cat "conftest.in" "conftest.in" >"conftest.tmp"
13386    mv "conftest.tmp" "conftest.in"
13387    cp "conftest.in" "conftest.nl"
13388    $as_echo 'GREP' >> "conftest.nl"
13389    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13390    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13391    as_fn_arith $ac_count + 1 && ac_count=$as_val
13392    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13393      # Best one so far, save it but keep looking for a better one
13394      ac_cv_path_GREP="$ac_path_GREP"
13395      ac_path_GREP_max=$ac_count
13396    fi
13397    # 10*(2^10) chars as input seems more than enough
13398    test $ac_count -gt 10 && break
13399  done
13400  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13401esac
13402
13403      $ac_path_GREP_found && break 3
13404    done
13405  done
13406  done
13407IFS=$as_save_IFS
13408  if test -z "$ac_cv_path_GREP"; then
13409    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13410  fi
13411else
13412  ac_cv_path_GREP=$GREP
13413fi
13414
13415fi
13416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13417$as_echo "$ac_cv_path_GREP" >&6; }
13418 GREP="$ac_cv_path_GREP"
13419
13420
13421  else
13422    # The variable is set, but is it from the command line or the environment?
13423
13424    # Try to remove the string !GREP! from our list.
13425    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13426    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13427      # If it failed, the variable was not from the command line. Ignore it,
13428      # but warn the user (except for BASH, which is always set by the calling BASH).
13429      if test "xGREP" != xBASH; then
13430        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13431$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13432      fi
13433      # Try to locate tool using the code snippet
13434      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13435$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13436if ${ac_cv_path_GREP+:} false; then :
13437  $as_echo_n "(cached) " >&6
13438else
13439  if test -z "$GREP"; then
13440  ac_path_GREP_found=false
13441  # Loop through the user's path and test for each of PROGNAME-LIST
13442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13443for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13444do
13445  IFS=$as_save_IFS
13446  test -z "$as_dir" && as_dir=.
13447    for ac_prog in grep ggrep; do
13448    for ac_exec_ext in '' $ac_executable_extensions; do
13449      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13450      as_fn_executable_p "$ac_path_GREP" || continue
13451# Check for GNU ac_path_GREP and select it if it is found.
13452  # Check for GNU $ac_path_GREP
13453case `"$ac_path_GREP" --version 2>&1` in
13454*GNU*)
13455  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13456*)
13457  ac_count=0
13458  $as_echo_n 0123456789 >"conftest.in"
13459  while :
13460  do
13461    cat "conftest.in" "conftest.in" >"conftest.tmp"
13462    mv "conftest.tmp" "conftest.in"
13463    cp "conftest.in" "conftest.nl"
13464    $as_echo 'GREP' >> "conftest.nl"
13465    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13466    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13467    as_fn_arith $ac_count + 1 && ac_count=$as_val
13468    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13469      # Best one so far, save it but keep looking for a better one
13470      ac_cv_path_GREP="$ac_path_GREP"
13471      ac_path_GREP_max=$ac_count
13472    fi
13473    # 10*(2^10) chars as input seems more than enough
13474    test $ac_count -gt 10 && break
13475  done
13476  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13477esac
13478
13479      $ac_path_GREP_found && break 3
13480    done
13481  done
13482  done
13483IFS=$as_save_IFS
13484  if test -z "$ac_cv_path_GREP"; then
13485    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13486  fi
13487else
13488  ac_cv_path_GREP=$GREP
13489fi
13490
13491fi
13492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13493$as_echo "$ac_cv_path_GREP" >&6; }
13494 GREP="$ac_cv_path_GREP"
13495
13496
13497    else
13498      # If it succeeded, then it was overridden by the user. We will use it
13499      # for the tool.
13500
13501      # First remove it from the list of overridden variables, so we can test
13502      # for unknown variables in the end.
13503      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13504
13505      # Check if we try to supply an empty value
13506      if test "x$GREP" = x; then
13507        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13508$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13509        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13510$as_echo_n "checking for GREP... " >&6; }
13511        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13512$as_echo "disabled" >&6; }
13513      else
13514        # Check if the provided tool contains a complete path.
13515        tool_specified="$GREP"
13516        tool_basename="${tool_specified##*/}"
13517        if test "x$tool_basename" = "x$tool_specified"; then
13518          # A command without a complete path is provided, search $PATH.
13519          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13520$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13521          # Extract the first word of "$tool_basename", so it can be a program name with args.
13522set dummy $tool_basename; ac_word=$2
13523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13524$as_echo_n "checking for $ac_word... " >&6; }
13525if ${ac_cv_path_GREP+:} false; then :
13526  $as_echo_n "(cached) " >&6
13527else
13528  case $GREP in
13529  [\\/]* | ?:[\\/]*)
13530  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13531  ;;
13532  *)
13533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13534for as_dir in $PATH
13535do
13536  IFS=$as_save_IFS
13537  test -z "$as_dir" && as_dir=.
13538    for ac_exec_ext in '' $ac_executable_extensions; do
13539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13540    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13542    break 2
13543  fi
13544done
13545  done
13546IFS=$as_save_IFS
13547
13548  ;;
13549esac
13550fi
13551GREP=$ac_cv_path_GREP
13552if test -n "$GREP"; then
13553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13554$as_echo "$GREP" >&6; }
13555else
13556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13557$as_echo "no" >&6; }
13558fi
13559
13560
13561          if test "x$GREP" = x; then
13562            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13563          fi
13564        else
13565          # Otherwise we believe it is a complete path. Use it as it is.
13566          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13567$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13568          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13569$as_echo_n "checking for GREP... " >&6; }
13570          if test ! -x "$tool_specified"; then
13571            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13572$as_echo "not found" >&6; }
13573            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13574          fi
13575          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13576$as_echo "$tool_specified" >&6; }
13577        fi
13578      fi
13579    fi
13580
13581  fi
13582
13583
13584  if test "x$GREP" = x; then
13585    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13586  fi
13587
13588
13589
13590
13591  # Publish this variable in the help.
13592
13593
13594  if [ -z "${EGREP+x}" ]; then
13595    # The variable is not set by user, try to locate tool using the code snippet
13596    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13597$as_echo_n "checking for egrep... " >&6; }
13598if ${ac_cv_path_EGREP+:} false; then :
13599  $as_echo_n "(cached) " >&6
13600else
13601  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13602   then ac_cv_path_EGREP="$GREP -E"
13603   else
13604     if test -z "$EGREP"; then
13605  ac_path_EGREP_found=false
13606  # Loop through the user's path and test for each of PROGNAME-LIST
13607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13608for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13609do
13610  IFS=$as_save_IFS
13611  test -z "$as_dir" && as_dir=.
13612    for ac_prog in egrep; do
13613    for ac_exec_ext in '' $ac_executable_extensions; do
13614      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13615      as_fn_executable_p "$ac_path_EGREP" || continue
13616# Check for GNU ac_path_EGREP and select it if it is found.
13617  # Check for GNU $ac_path_EGREP
13618case `"$ac_path_EGREP" --version 2>&1` in
13619*GNU*)
13620  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13621*)
13622  ac_count=0
13623  $as_echo_n 0123456789 >"conftest.in"
13624  while :
13625  do
13626    cat "conftest.in" "conftest.in" >"conftest.tmp"
13627    mv "conftest.tmp" "conftest.in"
13628    cp "conftest.in" "conftest.nl"
13629    $as_echo 'EGREP' >> "conftest.nl"
13630    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13631    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13632    as_fn_arith $ac_count + 1 && ac_count=$as_val
13633    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13634      # Best one so far, save it but keep looking for a better one
13635      ac_cv_path_EGREP="$ac_path_EGREP"
13636      ac_path_EGREP_max=$ac_count
13637    fi
13638    # 10*(2^10) chars as input seems more than enough
13639    test $ac_count -gt 10 && break
13640  done
13641  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13642esac
13643
13644      $ac_path_EGREP_found && break 3
13645    done
13646  done
13647  done
13648IFS=$as_save_IFS
13649  if test -z "$ac_cv_path_EGREP"; then
13650    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13651  fi
13652else
13653  ac_cv_path_EGREP=$EGREP
13654fi
13655
13656   fi
13657fi
13658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13659$as_echo "$ac_cv_path_EGREP" >&6; }
13660 EGREP="$ac_cv_path_EGREP"
13661
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 !EGREP! from our list.
13667    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
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 "xEGREP" != xBASH; then
13672        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13673$as_echo "$as_me: WARNING: Ignoring value of EGREP 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 egrep" >&5
13677$as_echo_n "checking for egrep... " >&6; }
13678if ${ac_cv_path_EGREP+:} false; then :
13679  $as_echo_n "(cached) " >&6
13680else
13681  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13682   then ac_cv_path_EGREP="$GREP -E"
13683   else
13684     if test -z "$EGREP"; then
13685  ac_path_EGREP_found=false
13686  # Loop through the user's path and test for each of PROGNAME-LIST
13687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13688for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13689do
13690  IFS=$as_save_IFS
13691  test -z "$as_dir" && as_dir=.
13692    for ac_prog in egrep; do
13693    for ac_exec_ext in '' $ac_executable_extensions; do
13694      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13695      as_fn_executable_p "$ac_path_EGREP" || continue
13696# Check for GNU ac_path_EGREP and select it if it is found.
13697  # Check for GNU $ac_path_EGREP
13698case `"$ac_path_EGREP" --version 2>&1` in
13699*GNU*)
13700  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13701*)
13702  ac_count=0
13703  $as_echo_n 0123456789 >"conftest.in"
13704  while :
13705  do
13706    cat "conftest.in" "conftest.in" >"conftest.tmp"
13707    mv "conftest.tmp" "conftest.in"
13708    cp "conftest.in" "conftest.nl"
13709    $as_echo 'EGREP' >> "conftest.nl"
13710    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13711    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13712    as_fn_arith $ac_count + 1 && ac_count=$as_val
13713    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13714      # Best one so far, save it but keep looking for a better one
13715      ac_cv_path_EGREP="$ac_path_EGREP"
13716      ac_path_EGREP_max=$ac_count
13717    fi
13718    # 10*(2^10) chars as input seems more than enough
13719    test $ac_count -gt 10 && break
13720  done
13721  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13722esac
13723
13724      $ac_path_EGREP_found && break 3
13725    done
13726  done
13727  done
13728IFS=$as_save_IFS
13729  if test -z "$ac_cv_path_EGREP"; then
13730    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13731  fi
13732else
13733  ac_cv_path_EGREP=$EGREP
13734fi
13735
13736   fi
13737fi
13738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13739$as_echo "$ac_cv_path_EGREP" >&6; }
13740 EGREP="$ac_cv_path_EGREP"
13741
13742
13743    else
13744      # If it succeeded, then it was overridden by the user. We will use it
13745      # for the tool.
13746
13747      # First remove it from the list of overridden variables, so we can test
13748      # for unknown variables in the end.
13749      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13750
13751      # Check if we try to supply an empty value
13752      if test "x$EGREP" = x; then
13753        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13754$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13755        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13756$as_echo_n "checking for EGREP... " >&6; }
13757        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13758$as_echo "disabled" >&6; }
13759      else
13760        # Check if the provided tool contains a complete path.
13761        tool_specified="$EGREP"
13762        tool_basename="${tool_specified##*/}"
13763        if test "x$tool_basename" = "x$tool_specified"; then
13764          # A command without a complete path is provided, search $PATH.
13765          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13766$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13767          # Extract the first word of "$tool_basename", so it can be a program name with args.
13768set dummy $tool_basename; ac_word=$2
13769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13770$as_echo_n "checking for $ac_word... " >&6; }
13771if ${ac_cv_path_EGREP+:} false; then :
13772  $as_echo_n "(cached) " >&6
13773else
13774  case $EGREP in
13775  [\\/]* | ?:[\\/]*)
13776  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13777  ;;
13778  *)
13779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13780for as_dir in $PATH
13781do
13782  IFS=$as_save_IFS
13783  test -z "$as_dir" && as_dir=.
13784    for ac_exec_ext in '' $ac_executable_extensions; do
13785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13786    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13788    break 2
13789  fi
13790done
13791  done
13792IFS=$as_save_IFS
13793
13794  ;;
13795esac
13796fi
13797EGREP=$ac_cv_path_EGREP
13798if test -n "$EGREP"; then
13799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13800$as_echo "$EGREP" >&6; }
13801else
13802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13803$as_echo "no" >&6; }
13804fi
13805
13806
13807          if test "x$EGREP" = x; then
13808            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13809          fi
13810        else
13811          # Otherwise we believe it is a complete path. Use it as it is.
13812          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13813$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13814          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13815$as_echo_n "checking for EGREP... " >&6; }
13816          if test ! -x "$tool_specified"; then
13817            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13818$as_echo "not found" >&6; }
13819            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13820          fi
13821          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13822$as_echo "$tool_specified" >&6; }
13823        fi
13824      fi
13825    fi
13826
13827  fi
13828
13829
13830  if test "x$EGREP" = x; then
13831    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13832  fi
13833
13834
13835
13836
13837  # Publish this variable in the help.
13838
13839
13840  if [ -z "${FGREP+x}" ]; then
13841    # The variable is not set by user, try to locate tool using the code snippet
13842    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13843$as_echo_n "checking for fgrep... " >&6; }
13844if ${ac_cv_path_FGREP+:} false; then :
13845  $as_echo_n "(cached) " >&6
13846else
13847  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13848   then ac_cv_path_FGREP="$GREP -F"
13849   else
13850     if test -z "$FGREP"; then
13851  ac_path_FGREP_found=false
13852  # Loop through the user's path and test for each of PROGNAME-LIST
13853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13854for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13855do
13856  IFS=$as_save_IFS
13857  test -z "$as_dir" && as_dir=.
13858    for ac_prog in fgrep; do
13859    for ac_exec_ext in '' $ac_executable_extensions; do
13860      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13861      as_fn_executable_p "$ac_path_FGREP" || continue
13862# Check for GNU ac_path_FGREP and select it if it is found.
13863  # Check for GNU $ac_path_FGREP
13864case `"$ac_path_FGREP" --version 2>&1` in
13865*GNU*)
13866  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13867*)
13868  ac_count=0
13869  $as_echo_n 0123456789 >"conftest.in"
13870  while :
13871  do
13872    cat "conftest.in" "conftest.in" >"conftest.tmp"
13873    mv "conftest.tmp" "conftest.in"
13874    cp "conftest.in" "conftest.nl"
13875    $as_echo 'FGREP' >> "conftest.nl"
13876    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13877    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13878    as_fn_arith $ac_count + 1 && ac_count=$as_val
13879    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13880      # Best one so far, save it but keep looking for a better one
13881      ac_cv_path_FGREP="$ac_path_FGREP"
13882      ac_path_FGREP_max=$ac_count
13883    fi
13884    # 10*(2^10) chars as input seems more than enough
13885    test $ac_count -gt 10 && break
13886  done
13887  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13888esac
13889
13890      $ac_path_FGREP_found && break 3
13891    done
13892  done
13893  done
13894IFS=$as_save_IFS
13895  if test -z "$ac_cv_path_FGREP"; then
13896    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13897  fi
13898else
13899  ac_cv_path_FGREP=$FGREP
13900fi
13901
13902   fi
13903fi
13904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13905$as_echo "$ac_cv_path_FGREP" >&6; }
13906 FGREP="$ac_cv_path_FGREP"
13907
13908
13909  else
13910    # The variable is set, but is it from the command line or the environment?
13911
13912    # Try to remove the string !FGREP! from our list.
13913    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13914    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13915      # If it failed, the variable was not from the command line. Ignore it,
13916      # but warn the user (except for BASH, which is always set by the calling BASH).
13917      if test "xFGREP" != xBASH; then
13918        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13919$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13920      fi
13921      # Try to locate tool using the code snippet
13922      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13923$as_echo_n "checking for fgrep... " >&6; }
13924if ${ac_cv_path_FGREP+:} false; then :
13925  $as_echo_n "(cached) " >&6
13926else
13927  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13928   then ac_cv_path_FGREP="$GREP -F"
13929   else
13930     if test -z "$FGREP"; then
13931  ac_path_FGREP_found=false
13932  # Loop through the user's path and test for each of PROGNAME-LIST
13933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13934for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13935do
13936  IFS=$as_save_IFS
13937  test -z "$as_dir" && as_dir=.
13938    for ac_prog in fgrep; do
13939    for ac_exec_ext in '' $ac_executable_extensions; do
13940      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13941      as_fn_executable_p "$ac_path_FGREP" || continue
13942# Check for GNU ac_path_FGREP and select it if it is found.
13943  # Check for GNU $ac_path_FGREP
13944case `"$ac_path_FGREP" --version 2>&1` in
13945*GNU*)
13946  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13947*)
13948  ac_count=0
13949  $as_echo_n 0123456789 >"conftest.in"
13950  while :
13951  do
13952    cat "conftest.in" "conftest.in" >"conftest.tmp"
13953    mv "conftest.tmp" "conftest.in"
13954    cp "conftest.in" "conftest.nl"
13955    $as_echo 'FGREP' >> "conftest.nl"
13956    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13957    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13958    as_fn_arith $ac_count + 1 && ac_count=$as_val
13959    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13960      # Best one so far, save it but keep looking for a better one
13961      ac_cv_path_FGREP="$ac_path_FGREP"
13962      ac_path_FGREP_max=$ac_count
13963    fi
13964    # 10*(2^10) chars as input seems more than enough
13965    test $ac_count -gt 10 && break
13966  done
13967  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13968esac
13969
13970      $ac_path_FGREP_found && break 3
13971    done
13972  done
13973  done
13974IFS=$as_save_IFS
13975  if test -z "$ac_cv_path_FGREP"; then
13976    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13977  fi
13978else
13979  ac_cv_path_FGREP=$FGREP
13980fi
13981
13982   fi
13983fi
13984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13985$as_echo "$ac_cv_path_FGREP" >&6; }
13986 FGREP="$ac_cv_path_FGREP"
13987
13988
13989    else
13990      # If it succeeded, then it was overridden by the user. We will use it
13991      # for the tool.
13992
13993      # First remove it from the list of overridden variables, so we can test
13994      # for unknown variables in the end.
13995      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13996
13997      # Check if we try to supply an empty value
13998      if test "x$FGREP" = x; then
13999        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14000$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14001        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14002$as_echo_n "checking for FGREP... " >&6; }
14003        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14004$as_echo "disabled" >&6; }
14005      else
14006        # Check if the provided tool contains a complete path.
14007        tool_specified="$FGREP"
14008        tool_basename="${tool_specified##*/}"
14009        if test "x$tool_basename" = "x$tool_specified"; then
14010          # A command without a complete path is provided, search $PATH.
14011          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14012$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14013          # Extract the first word of "$tool_basename", so it can be a program name with args.
14014set dummy $tool_basename; ac_word=$2
14015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14016$as_echo_n "checking for $ac_word... " >&6; }
14017if ${ac_cv_path_FGREP+:} false; then :
14018  $as_echo_n "(cached) " >&6
14019else
14020  case $FGREP in
14021  [\\/]* | ?:[\\/]*)
14022  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14023  ;;
14024  *)
14025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14026for as_dir in $PATH
14027do
14028  IFS=$as_save_IFS
14029  test -z "$as_dir" && as_dir=.
14030    for ac_exec_ext in '' $ac_executable_extensions; do
14031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14032    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14034    break 2
14035  fi
14036done
14037  done
14038IFS=$as_save_IFS
14039
14040  ;;
14041esac
14042fi
14043FGREP=$ac_cv_path_FGREP
14044if test -n "$FGREP"; then
14045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14046$as_echo "$FGREP" >&6; }
14047else
14048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14049$as_echo "no" >&6; }
14050fi
14051
14052
14053          if test "x$FGREP" = x; then
14054            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14055          fi
14056        else
14057          # Otherwise we believe it is a complete path. Use it as it is.
14058          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14059$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14060          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14061$as_echo_n "checking for FGREP... " >&6; }
14062          if test ! -x "$tool_specified"; then
14063            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14064$as_echo "not found" >&6; }
14065            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14066          fi
14067          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14068$as_echo "$tool_specified" >&6; }
14069        fi
14070      fi
14071    fi
14072
14073  fi
14074
14075
14076  if test "x$FGREP" = x; then
14077    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14078  fi
14079
14080
14081
14082
14083  # Publish this variable in the help.
14084
14085
14086  if [ -z "${SED+x}" ]; then
14087    # The variable is not set by user, try to locate tool using the code snippet
14088    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14089$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14090if ${ac_cv_path_SED+:} false; then :
14091  $as_echo_n "(cached) " >&6
14092else
14093            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14094     for ac_i in 1 2 3 4 5 6 7; do
14095       ac_script="$ac_script$as_nl$ac_script"
14096     done
14097     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14098     { ac_script=; unset ac_script;}
14099     if test -z "$SED"; then
14100  ac_path_SED_found=false
14101  # Loop through the user's path and test for each of PROGNAME-LIST
14102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14103for as_dir in $PATH
14104do
14105  IFS=$as_save_IFS
14106  test -z "$as_dir" && as_dir=.
14107    for ac_prog in sed gsed; do
14108    for ac_exec_ext in '' $ac_executable_extensions; do
14109      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14110      as_fn_executable_p "$ac_path_SED" || continue
14111# Check for GNU ac_path_SED and select it if it is found.
14112  # Check for GNU $ac_path_SED
14113case `"$ac_path_SED" --version 2>&1` in
14114*GNU*)
14115  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14116*)
14117  ac_count=0
14118  $as_echo_n 0123456789 >"conftest.in"
14119  while :
14120  do
14121    cat "conftest.in" "conftest.in" >"conftest.tmp"
14122    mv "conftest.tmp" "conftest.in"
14123    cp "conftest.in" "conftest.nl"
14124    $as_echo '' >> "conftest.nl"
14125    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14126    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14127    as_fn_arith $ac_count + 1 && ac_count=$as_val
14128    if test $ac_count -gt ${ac_path_SED_max-0}; then
14129      # Best one so far, save it but keep looking for a better one
14130      ac_cv_path_SED="$ac_path_SED"
14131      ac_path_SED_max=$ac_count
14132    fi
14133    # 10*(2^10) chars as input seems more than enough
14134    test $ac_count -gt 10 && break
14135  done
14136  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14137esac
14138
14139      $ac_path_SED_found && break 3
14140    done
14141  done
14142  done
14143IFS=$as_save_IFS
14144  if test -z "$ac_cv_path_SED"; then
14145    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14146  fi
14147else
14148  ac_cv_path_SED=$SED
14149fi
14150
14151fi
14152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14153$as_echo "$ac_cv_path_SED" >&6; }
14154 SED="$ac_cv_path_SED"
14155  rm -f conftest.sed
14156
14157  else
14158    # The variable is set, but is it from the command line or the environment?
14159
14160    # Try to remove the string !SED! from our list.
14161    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14162    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14163      # If it failed, the variable was not from the command line. Ignore it,
14164      # but warn the user (except for BASH, which is always set by the calling BASH).
14165      if test "xSED" != xBASH; then
14166        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14167$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14168      fi
14169      # Try to locate tool using the code snippet
14170      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14171$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14172if ${ac_cv_path_SED+:} false; then :
14173  $as_echo_n "(cached) " >&6
14174else
14175            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14176     for ac_i in 1 2 3 4 5 6 7; do
14177       ac_script="$ac_script$as_nl$ac_script"
14178     done
14179     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14180     { ac_script=; unset ac_script;}
14181     if test -z "$SED"; then
14182  ac_path_SED_found=false
14183  # Loop through the user's path and test for each of PROGNAME-LIST
14184  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14185for as_dir in $PATH
14186do
14187  IFS=$as_save_IFS
14188  test -z "$as_dir" && as_dir=.
14189    for ac_prog in sed gsed; do
14190    for ac_exec_ext in '' $ac_executable_extensions; do
14191      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14192      as_fn_executable_p "$ac_path_SED" || continue
14193# Check for GNU ac_path_SED and select it if it is found.
14194  # Check for GNU $ac_path_SED
14195case `"$ac_path_SED" --version 2>&1` in
14196*GNU*)
14197  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14198*)
14199  ac_count=0
14200  $as_echo_n 0123456789 >"conftest.in"
14201  while :
14202  do
14203    cat "conftest.in" "conftest.in" >"conftest.tmp"
14204    mv "conftest.tmp" "conftest.in"
14205    cp "conftest.in" "conftest.nl"
14206    $as_echo '' >> "conftest.nl"
14207    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14208    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14209    as_fn_arith $ac_count + 1 && ac_count=$as_val
14210    if test $ac_count -gt ${ac_path_SED_max-0}; then
14211      # Best one so far, save it but keep looking for a better one
14212      ac_cv_path_SED="$ac_path_SED"
14213      ac_path_SED_max=$ac_count
14214    fi
14215    # 10*(2^10) chars as input seems more than enough
14216    test $ac_count -gt 10 && break
14217  done
14218  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14219esac
14220
14221      $ac_path_SED_found && break 3
14222    done
14223  done
14224  done
14225IFS=$as_save_IFS
14226  if test -z "$ac_cv_path_SED"; then
14227    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14228  fi
14229else
14230  ac_cv_path_SED=$SED
14231fi
14232
14233fi
14234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14235$as_echo "$ac_cv_path_SED" >&6; }
14236 SED="$ac_cv_path_SED"
14237  rm -f conftest.sed
14238
14239    else
14240      # If it succeeded, then it was overridden by the user. We will use it
14241      # for the tool.
14242
14243      # First remove it from the list of overridden variables, so we can test
14244      # for unknown variables in the end.
14245      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14246
14247      # Check if we try to supply an empty value
14248      if test "x$SED" = x; then
14249        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14250$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14251        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14252$as_echo_n "checking for SED... " >&6; }
14253        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14254$as_echo "disabled" >&6; }
14255      else
14256        # Check if the provided tool contains a complete path.
14257        tool_specified="$SED"
14258        tool_basename="${tool_specified##*/}"
14259        if test "x$tool_basename" = "x$tool_specified"; then
14260          # A command without a complete path is provided, search $PATH.
14261          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14262$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14263          # Extract the first word of "$tool_basename", so it can be a program name with args.
14264set dummy $tool_basename; ac_word=$2
14265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14266$as_echo_n "checking for $ac_word... " >&6; }
14267if ${ac_cv_path_SED+:} false; then :
14268  $as_echo_n "(cached) " >&6
14269else
14270  case $SED in
14271  [\\/]* | ?:[\\/]*)
14272  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14273  ;;
14274  *)
14275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14276for as_dir in $PATH
14277do
14278  IFS=$as_save_IFS
14279  test -z "$as_dir" && as_dir=.
14280    for ac_exec_ext in '' $ac_executable_extensions; do
14281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14282    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14284    break 2
14285  fi
14286done
14287  done
14288IFS=$as_save_IFS
14289
14290  ;;
14291esac
14292fi
14293SED=$ac_cv_path_SED
14294if test -n "$SED"; then
14295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14296$as_echo "$SED" >&6; }
14297else
14298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14299$as_echo "no" >&6; }
14300fi
14301
14302
14303          if test "x$SED" = x; then
14304            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14305          fi
14306        else
14307          # Otherwise we believe it is a complete path. Use it as it is.
14308          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14309$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14310          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14311$as_echo_n "checking for SED... " >&6; }
14312          if test ! -x "$tool_specified"; then
14313            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14314$as_echo "not found" >&6; }
14315            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14316          fi
14317          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14318$as_echo "$tool_specified" >&6; }
14319        fi
14320      fi
14321    fi
14322
14323  fi
14324
14325
14326  if test "x$SED" = x; then
14327    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14328  fi
14329
14330
14331
14332  # Always force rm.
14333  RM="$RM -f"
14334
14335  # pwd behaves differently on various platforms and some don't support the -L flag.
14336  # Always use the bash builtin pwd to get uniform behavior.
14337  THEPWDCMD=pwd
14338
14339  # These are not required on all platforms
14340
14341
14342  # Publish this variable in the help.
14343
14344
14345  if [ -z "${CYGPATH+x}" ]; then
14346    # The variable is not set by user, try to locate tool using the code snippet
14347    for ac_prog in cygpath
14348do
14349  # Extract the first word of "$ac_prog", so it can be a program name with args.
14350set dummy $ac_prog; ac_word=$2
14351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14352$as_echo_n "checking for $ac_word... " >&6; }
14353if ${ac_cv_path_CYGPATH+:} false; then :
14354  $as_echo_n "(cached) " >&6
14355else
14356  case $CYGPATH in
14357  [\\/]* | ?:[\\/]*)
14358  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14359  ;;
14360  *)
14361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14362for as_dir in $PATH
14363do
14364  IFS=$as_save_IFS
14365  test -z "$as_dir" && as_dir=.
14366    for ac_exec_ext in '' $ac_executable_extensions; do
14367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14368    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14370    break 2
14371  fi
14372done
14373  done
14374IFS=$as_save_IFS
14375
14376  ;;
14377esac
14378fi
14379CYGPATH=$ac_cv_path_CYGPATH
14380if test -n "$CYGPATH"; then
14381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14382$as_echo "$CYGPATH" >&6; }
14383else
14384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14385$as_echo "no" >&6; }
14386fi
14387
14388
14389  test -n "$CYGPATH" && break
14390done
14391
14392  else
14393    # The variable is set, but is it from the command line or the environment?
14394
14395    # Try to remove the string !CYGPATH! from our list.
14396    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14397    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14398      # If it failed, the variable was not from the command line. Ignore it,
14399      # but warn the user (except for BASH, which is always set by the calling BASH).
14400      if test "xCYGPATH" != xBASH; then
14401        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14402$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14403      fi
14404      # Try to locate tool using the code snippet
14405      for ac_prog in cygpath
14406do
14407  # Extract the first word of "$ac_prog", so it can be a program name with args.
14408set dummy $ac_prog; ac_word=$2
14409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14410$as_echo_n "checking for $ac_word... " >&6; }
14411if ${ac_cv_path_CYGPATH+:} false; then :
14412  $as_echo_n "(cached) " >&6
14413else
14414  case $CYGPATH in
14415  [\\/]* | ?:[\\/]*)
14416  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14417  ;;
14418  *)
14419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14420for as_dir in $PATH
14421do
14422  IFS=$as_save_IFS
14423  test -z "$as_dir" && as_dir=.
14424    for ac_exec_ext in '' $ac_executable_extensions; do
14425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14426    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14428    break 2
14429  fi
14430done
14431  done
14432IFS=$as_save_IFS
14433
14434  ;;
14435esac
14436fi
14437CYGPATH=$ac_cv_path_CYGPATH
14438if test -n "$CYGPATH"; then
14439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14440$as_echo "$CYGPATH" >&6; }
14441else
14442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14443$as_echo "no" >&6; }
14444fi
14445
14446
14447  test -n "$CYGPATH" && break
14448done
14449
14450    else
14451      # If it succeeded, then it was overridden by the user. We will use it
14452      # for the tool.
14453
14454      # First remove it from the list of overridden variables, so we can test
14455      # for unknown variables in the end.
14456      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14457
14458      # Check if we try to supply an empty value
14459      if test "x$CYGPATH" = x; then
14460        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14461$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14462        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14463$as_echo_n "checking for CYGPATH... " >&6; }
14464        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14465$as_echo "disabled" >&6; }
14466      else
14467        # Check if the provided tool contains a complete path.
14468        tool_specified="$CYGPATH"
14469        tool_basename="${tool_specified##*/}"
14470        if test "x$tool_basename" = "x$tool_specified"; then
14471          # A command without a complete path is provided, search $PATH.
14472          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14473$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14474          # Extract the first word of "$tool_basename", so it can be a program name with args.
14475set dummy $tool_basename; ac_word=$2
14476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14477$as_echo_n "checking for $ac_word... " >&6; }
14478if ${ac_cv_path_CYGPATH+:} false; then :
14479  $as_echo_n "(cached) " >&6
14480else
14481  case $CYGPATH in
14482  [\\/]* | ?:[\\/]*)
14483  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14484  ;;
14485  *)
14486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14487for as_dir in $PATH
14488do
14489  IFS=$as_save_IFS
14490  test -z "$as_dir" && as_dir=.
14491    for ac_exec_ext in '' $ac_executable_extensions; do
14492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14493    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14495    break 2
14496  fi
14497done
14498  done
14499IFS=$as_save_IFS
14500
14501  ;;
14502esac
14503fi
14504CYGPATH=$ac_cv_path_CYGPATH
14505if test -n "$CYGPATH"; then
14506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14507$as_echo "$CYGPATH" >&6; }
14508else
14509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14510$as_echo "no" >&6; }
14511fi
14512
14513
14514          if test "x$CYGPATH" = x; then
14515            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14516          fi
14517        else
14518          # Otherwise we believe it is a complete path. Use it as it is.
14519          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14520$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14521          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14522$as_echo_n "checking for CYGPATH... " >&6; }
14523          if test ! -x "$tool_specified"; then
14524            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14525$as_echo "not found" >&6; }
14526            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14527          fi
14528          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14529$as_echo "$tool_specified" >&6; }
14530        fi
14531      fi
14532    fi
14533
14534  fi
14535
14536
14537
14538
14539  # Publish this variable in the help.
14540
14541
14542  if [ -z "${READLINK+x}" ]; then
14543    # The variable is not set by user, try to locate tool using the code snippet
14544    for ac_prog in greadlink readlink
14545do
14546  # Extract the first word of "$ac_prog", so it can be a program name with args.
14547set dummy $ac_prog; ac_word=$2
14548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14549$as_echo_n "checking for $ac_word... " >&6; }
14550if ${ac_cv_path_READLINK+:} false; then :
14551  $as_echo_n "(cached) " >&6
14552else
14553  case $READLINK in
14554  [\\/]* | ?:[\\/]*)
14555  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14556  ;;
14557  *)
14558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14559for as_dir in $PATH
14560do
14561  IFS=$as_save_IFS
14562  test -z "$as_dir" && as_dir=.
14563    for ac_exec_ext in '' $ac_executable_extensions; do
14564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14565    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14567    break 2
14568  fi
14569done
14570  done
14571IFS=$as_save_IFS
14572
14573  ;;
14574esac
14575fi
14576READLINK=$ac_cv_path_READLINK
14577if test -n "$READLINK"; then
14578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14579$as_echo "$READLINK" >&6; }
14580else
14581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14582$as_echo "no" >&6; }
14583fi
14584
14585
14586  test -n "$READLINK" && break
14587done
14588
14589  else
14590    # The variable is set, but is it from the command line or the environment?
14591
14592    # Try to remove the string !READLINK! from our list.
14593    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14594    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14595      # If it failed, the variable was not from the command line. Ignore it,
14596      # but warn the user (except for BASH, which is always set by the calling BASH).
14597      if test "xREADLINK" != xBASH; then
14598        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14599$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14600      fi
14601      # Try to locate tool using the code snippet
14602      for ac_prog in greadlink readlink
14603do
14604  # Extract the first word of "$ac_prog", so it can be a program name with args.
14605set dummy $ac_prog; ac_word=$2
14606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14607$as_echo_n "checking for $ac_word... " >&6; }
14608if ${ac_cv_path_READLINK+:} false; then :
14609  $as_echo_n "(cached) " >&6
14610else
14611  case $READLINK in
14612  [\\/]* | ?:[\\/]*)
14613  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14614  ;;
14615  *)
14616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14617for as_dir in $PATH
14618do
14619  IFS=$as_save_IFS
14620  test -z "$as_dir" && as_dir=.
14621    for ac_exec_ext in '' $ac_executable_extensions; do
14622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14623    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14625    break 2
14626  fi
14627done
14628  done
14629IFS=$as_save_IFS
14630
14631  ;;
14632esac
14633fi
14634READLINK=$ac_cv_path_READLINK
14635if test -n "$READLINK"; then
14636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14637$as_echo "$READLINK" >&6; }
14638else
14639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14640$as_echo "no" >&6; }
14641fi
14642
14643
14644  test -n "$READLINK" && break
14645done
14646
14647    else
14648      # If it succeeded, then it was overridden by the user. We will use it
14649      # for the tool.
14650
14651      # First remove it from the list of overridden variables, so we can test
14652      # for unknown variables in the end.
14653      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14654
14655      # Check if we try to supply an empty value
14656      if test "x$READLINK" = x; then
14657        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14658$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14659        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14660$as_echo_n "checking for READLINK... " >&6; }
14661        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14662$as_echo "disabled" >&6; }
14663      else
14664        # Check if the provided tool contains a complete path.
14665        tool_specified="$READLINK"
14666        tool_basename="${tool_specified##*/}"
14667        if test "x$tool_basename" = "x$tool_specified"; then
14668          # A command without a complete path is provided, search $PATH.
14669          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14670$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14671          # Extract the first word of "$tool_basename", so it can be a program name with args.
14672set dummy $tool_basename; ac_word=$2
14673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14674$as_echo_n "checking for $ac_word... " >&6; }
14675if ${ac_cv_path_READLINK+:} false; then :
14676  $as_echo_n "(cached) " >&6
14677else
14678  case $READLINK in
14679  [\\/]* | ?:[\\/]*)
14680  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14681  ;;
14682  *)
14683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14684for as_dir in $PATH
14685do
14686  IFS=$as_save_IFS
14687  test -z "$as_dir" && as_dir=.
14688    for ac_exec_ext in '' $ac_executable_extensions; do
14689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14690    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14692    break 2
14693  fi
14694done
14695  done
14696IFS=$as_save_IFS
14697
14698  ;;
14699esac
14700fi
14701READLINK=$ac_cv_path_READLINK
14702if test -n "$READLINK"; then
14703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14704$as_echo "$READLINK" >&6; }
14705else
14706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14707$as_echo "no" >&6; }
14708fi
14709
14710
14711          if test "x$READLINK" = x; then
14712            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14713          fi
14714        else
14715          # Otherwise we believe it is a complete path. Use it as it is.
14716          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14717$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14718          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14719$as_echo_n "checking for READLINK... " >&6; }
14720          if test ! -x "$tool_specified"; then
14721            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14722$as_echo "not found" >&6; }
14723            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14724          fi
14725          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14726$as_echo "$tool_specified" >&6; }
14727        fi
14728      fi
14729    fi
14730
14731  fi
14732
14733
14734
14735
14736  # Publish this variable in the help.
14737
14738
14739  if [ -z "${DF+x}" ]; then
14740    # The variable is not set by user, try to locate tool using the code snippet
14741    for ac_prog in df
14742do
14743  # Extract the first word of "$ac_prog", so it can be a program name with args.
14744set dummy $ac_prog; ac_word=$2
14745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14746$as_echo_n "checking for $ac_word... " >&6; }
14747if ${ac_cv_path_DF+:} false; then :
14748  $as_echo_n "(cached) " >&6
14749else
14750  case $DF in
14751  [\\/]* | ?:[\\/]*)
14752  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14753  ;;
14754  *)
14755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14756for as_dir in $PATH
14757do
14758  IFS=$as_save_IFS
14759  test -z "$as_dir" && as_dir=.
14760    for ac_exec_ext in '' $ac_executable_extensions; do
14761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14762    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14764    break 2
14765  fi
14766done
14767  done
14768IFS=$as_save_IFS
14769
14770  ;;
14771esac
14772fi
14773DF=$ac_cv_path_DF
14774if test -n "$DF"; then
14775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14776$as_echo "$DF" >&6; }
14777else
14778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14779$as_echo "no" >&6; }
14780fi
14781
14782
14783  test -n "$DF" && break
14784done
14785
14786  else
14787    # The variable is set, but is it from the command line or the environment?
14788
14789    # Try to remove the string !DF! from our list.
14790    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14791    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14792      # If it failed, the variable was not from the command line. Ignore it,
14793      # but warn the user (except for BASH, which is always set by the calling BASH).
14794      if test "xDF" != xBASH; then
14795        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14796$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14797      fi
14798      # Try to locate tool using the code snippet
14799      for ac_prog in df
14800do
14801  # Extract the first word of "$ac_prog", so it can be a program name with args.
14802set dummy $ac_prog; ac_word=$2
14803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14804$as_echo_n "checking for $ac_word... " >&6; }
14805if ${ac_cv_path_DF+:} false; then :
14806  $as_echo_n "(cached) " >&6
14807else
14808  case $DF in
14809  [\\/]* | ?:[\\/]*)
14810  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14811  ;;
14812  *)
14813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14814for as_dir in $PATH
14815do
14816  IFS=$as_save_IFS
14817  test -z "$as_dir" && as_dir=.
14818    for ac_exec_ext in '' $ac_executable_extensions; do
14819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14820    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14822    break 2
14823  fi
14824done
14825  done
14826IFS=$as_save_IFS
14827
14828  ;;
14829esac
14830fi
14831DF=$ac_cv_path_DF
14832if test -n "$DF"; then
14833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14834$as_echo "$DF" >&6; }
14835else
14836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14837$as_echo "no" >&6; }
14838fi
14839
14840
14841  test -n "$DF" && break
14842done
14843
14844    else
14845      # If it succeeded, then it was overridden by the user. We will use it
14846      # for the tool.
14847
14848      # First remove it from the list of overridden variables, so we can test
14849      # for unknown variables in the end.
14850      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14851
14852      # Check if we try to supply an empty value
14853      if test "x$DF" = x; then
14854        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14855$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14856        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14857$as_echo_n "checking for DF... " >&6; }
14858        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14859$as_echo "disabled" >&6; }
14860      else
14861        # Check if the provided tool contains a complete path.
14862        tool_specified="$DF"
14863        tool_basename="${tool_specified##*/}"
14864        if test "x$tool_basename" = "x$tool_specified"; then
14865          # A command without a complete path is provided, search $PATH.
14866          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14867$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14868          # Extract the first word of "$tool_basename", so it can be a program name with args.
14869set dummy $tool_basename; ac_word=$2
14870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14871$as_echo_n "checking for $ac_word... " >&6; }
14872if ${ac_cv_path_DF+:} false; then :
14873  $as_echo_n "(cached) " >&6
14874else
14875  case $DF in
14876  [\\/]* | ?:[\\/]*)
14877  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14878  ;;
14879  *)
14880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14881for as_dir in $PATH
14882do
14883  IFS=$as_save_IFS
14884  test -z "$as_dir" && as_dir=.
14885    for ac_exec_ext in '' $ac_executable_extensions; do
14886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14887    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14889    break 2
14890  fi
14891done
14892  done
14893IFS=$as_save_IFS
14894
14895  ;;
14896esac
14897fi
14898DF=$ac_cv_path_DF
14899if test -n "$DF"; then
14900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14901$as_echo "$DF" >&6; }
14902else
14903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14904$as_echo "no" >&6; }
14905fi
14906
14907
14908          if test "x$DF" = x; then
14909            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14910          fi
14911        else
14912          # Otherwise we believe it is a complete path. Use it as it is.
14913          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14914$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14915          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14916$as_echo_n "checking for DF... " >&6; }
14917          if test ! -x "$tool_specified"; then
14918            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14919$as_echo "not found" >&6; }
14920            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14921          fi
14922          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14923$as_echo "$tool_specified" >&6; }
14924        fi
14925      fi
14926    fi
14927
14928  fi
14929
14930
14931
14932
14933  # Publish this variable in the help.
14934
14935
14936  if [ -z "${CPIO+x}" ]; then
14937    # The variable is not set by user, try to locate tool using the code snippet
14938    for ac_prog in cpio bsdcpio
14939do
14940  # Extract the first word of "$ac_prog", so it can be a program name with args.
14941set dummy $ac_prog; ac_word=$2
14942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14943$as_echo_n "checking for $ac_word... " >&6; }
14944if ${ac_cv_path_CPIO+:} false; then :
14945  $as_echo_n "(cached) " >&6
14946else
14947  case $CPIO in
14948  [\\/]* | ?:[\\/]*)
14949  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14950  ;;
14951  *)
14952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14953for as_dir in $PATH
14954do
14955  IFS=$as_save_IFS
14956  test -z "$as_dir" && as_dir=.
14957    for ac_exec_ext in '' $ac_executable_extensions; do
14958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14959    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14961    break 2
14962  fi
14963done
14964  done
14965IFS=$as_save_IFS
14966
14967  ;;
14968esac
14969fi
14970CPIO=$ac_cv_path_CPIO
14971if test -n "$CPIO"; then
14972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14973$as_echo "$CPIO" >&6; }
14974else
14975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14976$as_echo "no" >&6; }
14977fi
14978
14979
14980  test -n "$CPIO" && break
14981done
14982
14983  else
14984    # The variable is set, but is it from the command line or the environment?
14985
14986    # Try to remove the string !CPIO! from our list.
14987    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14988    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14989      # If it failed, the variable was not from the command line. Ignore it,
14990      # but warn the user (except for BASH, which is always set by the calling BASH).
14991      if test "xCPIO" != xBASH; then
14992        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14993$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14994      fi
14995      # Try to locate tool using the code snippet
14996      for ac_prog in cpio bsdcpio
14997do
14998  # Extract the first word of "$ac_prog", so it can be a program name with args.
14999set dummy $ac_prog; ac_word=$2
15000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15001$as_echo_n "checking for $ac_word... " >&6; }
15002if ${ac_cv_path_CPIO+:} false; then :
15003  $as_echo_n "(cached) " >&6
15004else
15005  case $CPIO in
15006  [\\/]* | ?:[\\/]*)
15007  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15008  ;;
15009  *)
15010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15011for as_dir in $PATH
15012do
15013  IFS=$as_save_IFS
15014  test -z "$as_dir" && as_dir=.
15015    for ac_exec_ext in '' $ac_executable_extensions; do
15016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15017    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15019    break 2
15020  fi
15021done
15022  done
15023IFS=$as_save_IFS
15024
15025  ;;
15026esac
15027fi
15028CPIO=$ac_cv_path_CPIO
15029if test -n "$CPIO"; then
15030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15031$as_echo "$CPIO" >&6; }
15032else
15033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15034$as_echo "no" >&6; }
15035fi
15036
15037
15038  test -n "$CPIO" && break
15039done
15040
15041    else
15042      # If it succeeded, then it was overridden by the user. We will use it
15043      # for the tool.
15044
15045      # First remove it from the list of overridden variables, so we can test
15046      # for unknown variables in the end.
15047      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15048
15049      # Check if we try to supply an empty value
15050      if test "x$CPIO" = x; then
15051        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15052$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15053        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15054$as_echo_n "checking for CPIO... " >&6; }
15055        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15056$as_echo "disabled" >&6; }
15057      else
15058        # Check if the provided tool contains a complete path.
15059        tool_specified="$CPIO"
15060        tool_basename="${tool_specified##*/}"
15061        if test "x$tool_basename" = "x$tool_specified"; then
15062          # A command without a complete path is provided, search $PATH.
15063          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15064$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15065          # Extract the first word of "$tool_basename", so it can be a program name with args.
15066set dummy $tool_basename; ac_word=$2
15067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15068$as_echo_n "checking for $ac_word... " >&6; }
15069if ${ac_cv_path_CPIO+:} false; then :
15070  $as_echo_n "(cached) " >&6
15071else
15072  case $CPIO in
15073  [\\/]* | ?:[\\/]*)
15074  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15075  ;;
15076  *)
15077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15078for as_dir in $PATH
15079do
15080  IFS=$as_save_IFS
15081  test -z "$as_dir" && as_dir=.
15082    for ac_exec_ext in '' $ac_executable_extensions; do
15083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15084    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15086    break 2
15087  fi
15088done
15089  done
15090IFS=$as_save_IFS
15091
15092  ;;
15093esac
15094fi
15095CPIO=$ac_cv_path_CPIO
15096if test -n "$CPIO"; then
15097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15098$as_echo "$CPIO" >&6; }
15099else
15100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15101$as_echo "no" >&6; }
15102fi
15103
15104
15105          if test "x$CPIO" = x; then
15106            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15107          fi
15108        else
15109          # Otherwise we believe it is a complete path. Use it as it is.
15110          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15111$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15112          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15113$as_echo_n "checking for CPIO... " >&6; }
15114          if test ! -x "$tool_specified"; then
15115            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15116$as_echo "not found" >&6; }
15117            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15118          fi
15119          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15120$as_echo "$tool_specified" >&6; }
15121        fi
15122      fi
15123    fi
15124
15125  fi
15126
15127
15128
15129
15130  # Publish this variable in the help.
15131
15132
15133  if [ -z "${NICE+x}" ]; then
15134    # The variable is not set by user, try to locate tool using the code snippet
15135    for ac_prog in nice
15136do
15137  # Extract the first word of "$ac_prog", so it can be a program name with args.
15138set dummy $ac_prog; ac_word=$2
15139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15140$as_echo_n "checking for $ac_word... " >&6; }
15141if ${ac_cv_path_NICE+:} false; then :
15142  $as_echo_n "(cached) " >&6
15143else
15144  case $NICE in
15145  [\\/]* | ?:[\\/]*)
15146  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15147  ;;
15148  *)
15149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15150for as_dir in $PATH
15151do
15152  IFS=$as_save_IFS
15153  test -z "$as_dir" && as_dir=.
15154    for ac_exec_ext in '' $ac_executable_extensions; do
15155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15156    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15158    break 2
15159  fi
15160done
15161  done
15162IFS=$as_save_IFS
15163
15164  ;;
15165esac
15166fi
15167NICE=$ac_cv_path_NICE
15168if test -n "$NICE"; then
15169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15170$as_echo "$NICE" >&6; }
15171else
15172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15173$as_echo "no" >&6; }
15174fi
15175
15176
15177  test -n "$NICE" && break
15178done
15179
15180  else
15181    # The variable is set, but is it from the command line or the environment?
15182
15183    # Try to remove the string !NICE! from our list.
15184    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15185    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15186      # If it failed, the variable was not from the command line. Ignore it,
15187      # but warn the user (except for BASH, which is always set by the calling BASH).
15188      if test "xNICE" != xBASH; then
15189        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15190$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15191      fi
15192      # Try to locate tool using the code snippet
15193      for ac_prog in nice
15194do
15195  # Extract the first word of "$ac_prog", so it can be a program name with args.
15196set dummy $ac_prog; ac_word=$2
15197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15198$as_echo_n "checking for $ac_word... " >&6; }
15199if ${ac_cv_path_NICE+:} false; then :
15200  $as_echo_n "(cached) " >&6
15201else
15202  case $NICE in
15203  [\\/]* | ?:[\\/]*)
15204  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15205  ;;
15206  *)
15207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15208for as_dir in $PATH
15209do
15210  IFS=$as_save_IFS
15211  test -z "$as_dir" && as_dir=.
15212    for ac_exec_ext in '' $ac_executable_extensions; do
15213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15214    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15216    break 2
15217  fi
15218done
15219  done
15220IFS=$as_save_IFS
15221
15222  ;;
15223esac
15224fi
15225NICE=$ac_cv_path_NICE
15226if test -n "$NICE"; then
15227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15228$as_echo "$NICE" >&6; }
15229else
15230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15231$as_echo "no" >&6; }
15232fi
15233
15234
15235  test -n "$NICE" && break
15236done
15237
15238    else
15239      # If it succeeded, then it was overridden by the user. We will use it
15240      # for the tool.
15241
15242      # First remove it from the list of overridden variables, so we can test
15243      # for unknown variables in the end.
15244      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15245
15246      # Check if we try to supply an empty value
15247      if test "x$NICE" = x; then
15248        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15249$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15250        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15251$as_echo_n "checking for NICE... " >&6; }
15252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15253$as_echo "disabled" >&6; }
15254      else
15255        # Check if the provided tool contains a complete path.
15256        tool_specified="$NICE"
15257        tool_basename="${tool_specified##*/}"
15258        if test "x$tool_basename" = "x$tool_specified"; then
15259          # A command without a complete path is provided, search $PATH.
15260          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15261$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15262          # Extract the first word of "$tool_basename", so it can be a program name with args.
15263set dummy $tool_basename; ac_word=$2
15264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15265$as_echo_n "checking for $ac_word... " >&6; }
15266if ${ac_cv_path_NICE+:} false; then :
15267  $as_echo_n "(cached) " >&6
15268else
15269  case $NICE in
15270  [\\/]* | ?:[\\/]*)
15271  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15272  ;;
15273  *)
15274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15275for as_dir in $PATH
15276do
15277  IFS=$as_save_IFS
15278  test -z "$as_dir" && as_dir=.
15279    for ac_exec_ext in '' $ac_executable_extensions; do
15280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15281    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15283    break 2
15284  fi
15285done
15286  done
15287IFS=$as_save_IFS
15288
15289  ;;
15290esac
15291fi
15292NICE=$ac_cv_path_NICE
15293if test -n "$NICE"; then
15294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15295$as_echo "$NICE" >&6; }
15296else
15297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15298$as_echo "no" >&6; }
15299fi
15300
15301
15302          if test "x$NICE" = x; then
15303            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15304          fi
15305        else
15306          # Otherwise we believe it is a complete path. Use it as it is.
15307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15308$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15309          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15310$as_echo_n "checking for NICE... " >&6; }
15311          if test ! -x "$tool_specified"; then
15312            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15313$as_echo "not found" >&6; }
15314            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15315          fi
15316          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15317$as_echo "$tool_specified" >&6; }
15318        fi
15319      fi
15320    fi
15321
15322  fi
15323
15324
15325
15326
15327# Now we can determine OpenJDK build and target platforms. This is required to
15328# have early on.
15329# Make sure we can run config.sub.
15330$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15331  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15332
15333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15334$as_echo_n "checking build system type... " >&6; }
15335if ${ac_cv_build+:} false; then :
15336  $as_echo_n "(cached) " >&6
15337else
15338  ac_build_alias=$build_alias
15339test "x$ac_build_alias" = x &&
15340  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15341test "x$ac_build_alias" = x &&
15342  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15343ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15344  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15345
15346fi
15347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15348$as_echo "$ac_cv_build" >&6; }
15349case $ac_cv_build in
15350*-*-*) ;;
15351*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15352esac
15353build=$ac_cv_build
15354ac_save_IFS=$IFS; IFS='-'
15355set x $ac_cv_build
15356shift
15357build_cpu=$1
15358build_vendor=$2
15359shift; shift
15360# Remember, the first character of IFS is used to create $*,
15361# except with old shells:
15362build_os=$*
15363IFS=$ac_save_IFS
15364case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15365
15366
15367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15368$as_echo_n "checking host system type... " >&6; }
15369if ${ac_cv_host+:} false; then :
15370  $as_echo_n "(cached) " >&6
15371else
15372  if test "x$host_alias" = x; then
15373  ac_cv_host=$ac_cv_build
15374else
15375  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15376    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15377fi
15378
15379fi
15380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15381$as_echo "$ac_cv_host" >&6; }
15382case $ac_cv_host in
15383*-*-*) ;;
15384*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15385esac
15386host=$ac_cv_host
15387ac_save_IFS=$IFS; IFS='-'
15388set x $ac_cv_host
15389shift
15390host_cpu=$1
15391host_vendor=$2
15392shift; shift
15393# Remember, the first character of IFS is used to create $*,
15394# except with old shells:
15395host_os=$*
15396IFS=$ac_save_IFS
15397case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15398
15399
15400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15401$as_echo_n "checking target system type... " >&6; }
15402if ${ac_cv_target+:} false; then :
15403  $as_echo_n "(cached) " >&6
15404else
15405  if test "x$target_alias" = x; then
15406  ac_cv_target=$ac_cv_host
15407else
15408  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15409    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15410fi
15411
15412fi
15413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15414$as_echo "$ac_cv_target" >&6; }
15415case $ac_cv_target in
15416*-*-*) ;;
15417*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15418esac
15419target=$ac_cv_target
15420ac_save_IFS=$IFS; IFS='-'
15421set x $ac_cv_target
15422shift
15423target_cpu=$1
15424target_vendor=$2
15425shift; shift
15426# Remember, the first character of IFS is used to create $*,
15427# except with old shells:
15428target_os=$*
15429IFS=$ac_save_IFS
15430case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15431
15432
15433# The aliases save the names the user supplied, while $host etc.
15434# will get canonicalized.
15435test -n "$target_alias" &&
15436  test "$program_prefix$program_suffix$program_transform_name" = \
15437    NONENONEs,x,x, &&
15438  program_prefix=${target_alias}-
15439
15440  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15441  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15442  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15443  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15444  # to use the configure naming style.
15445
15446
15447
15448
15449
15450  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15451  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15452  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15453  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15454  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15455  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15456
15457
15458
15459  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15460
15461  case "$build_os" in
15462    *linux*)
15463      VAR_OS=linux
15464      VAR_OS_TYPE=unix
15465      ;;
15466    *solaris*)
15467      VAR_OS=solaris
15468      VAR_OS_TYPE=unix
15469      ;;
15470    *darwin*)
15471      VAR_OS=macosx
15472      VAR_OS_TYPE=unix
15473      ;;
15474    *bsd*)
15475      VAR_OS=bsd
15476      VAR_OS_TYPE=unix
15477      ;;
15478    *cygwin*)
15479      VAR_OS=windows
15480      VAR_OS_ENV=windows.cygwin
15481      ;;
15482    *mingw*)
15483      VAR_OS=windows
15484      VAR_OS_ENV=windows.msys
15485      ;;
15486    *aix*)
15487      VAR_OS=aix
15488      VAR_OS_TYPE=unix
15489      ;;
15490    *)
15491      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15492      ;;
15493  esac
15494
15495
15496  # First argument is the cpu name from the trip/quad
15497  case "$build_cpu" in
15498    x86_64)
15499      VAR_CPU=x86_64
15500      VAR_CPU_ARCH=x86
15501      VAR_CPU_BITS=64
15502      VAR_CPU_ENDIAN=little
15503      ;;
15504    i?86)
15505      VAR_CPU=x86
15506      VAR_CPU_ARCH=x86
15507      VAR_CPU_BITS=32
15508      VAR_CPU_ENDIAN=little
15509      ;;
15510    arm*)
15511      VAR_CPU=arm
15512      VAR_CPU_ARCH=arm
15513      VAR_CPU_BITS=32
15514      VAR_CPU_ENDIAN=little
15515      ;;
15516    aarch64)
15517      VAR_CPU=aarch64
15518      VAR_CPU_ARCH=aarch64
15519      VAR_CPU_BITS=64
15520      VAR_CPU_ENDIAN=little
15521      ;;
15522    powerpc)
15523      VAR_CPU=ppc
15524      VAR_CPU_ARCH=ppc
15525      VAR_CPU_BITS=32
15526      VAR_CPU_ENDIAN=big
15527      ;;
15528    powerpc64)
15529      VAR_CPU=ppc64
15530      VAR_CPU_ARCH=ppc
15531      VAR_CPU_BITS=64
15532      VAR_CPU_ENDIAN=big
15533      ;;
15534    powerpc64le)
15535      VAR_CPU=ppc64le
15536      VAR_CPU_ARCH=ppc
15537      VAR_CPU_BITS=64
15538      VAR_CPU_ENDIAN=little
15539      ;;
15540    s390)
15541      VAR_CPU=s390
15542      VAR_CPU_ARCH=s390
15543      VAR_CPU_BITS=32
15544      VAR_CPU_ENDIAN=big
15545      ;;
15546    s390x)
15547      VAR_CPU=s390x
15548      VAR_CPU_ARCH=s390
15549      VAR_CPU_BITS=64
15550      VAR_CPU_ENDIAN=big
15551      ;;
15552    sparc)
15553      VAR_CPU=sparc
15554      VAR_CPU_ARCH=sparc
15555      VAR_CPU_BITS=32
15556      VAR_CPU_ENDIAN=big
15557      ;;
15558    sparcv9|sparc64)
15559      VAR_CPU=sparcv9
15560      VAR_CPU_ARCH=sparc
15561      VAR_CPU_BITS=64
15562      VAR_CPU_ENDIAN=big
15563      ;;
15564    *)
15565      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15566      ;;
15567  esac
15568
15569  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15570  OPENJDK_BUILD_OS="$VAR_OS"
15571  if test "x$VAR_OS_TYPE" != x; then
15572    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15573  else
15574    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15575  fi
15576  if test "x$VAR_OS_ENV" != x; then
15577    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15578  else
15579    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15580  fi
15581  OPENJDK_BUILD_CPU="$VAR_CPU"
15582  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15583  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15584  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15585
15586
15587
15588
15589
15590
15591
15592
15593  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15594$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15596$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15597
15598  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15599
15600  case "$host_os" in
15601    *linux*)
15602      VAR_OS=linux
15603      VAR_OS_TYPE=unix
15604      ;;
15605    *solaris*)
15606      VAR_OS=solaris
15607      VAR_OS_TYPE=unix
15608      ;;
15609    *darwin*)
15610      VAR_OS=macosx
15611      VAR_OS_TYPE=unix
15612      ;;
15613    *bsd*)
15614      VAR_OS=bsd
15615      VAR_OS_TYPE=unix
15616      ;;
15617    *cygwin*)
15618      VAR_OS=windows
15619      VAR_OS_ENV=windows.cygwin
15620      ;;
15621    *mingw*)
15622      VAR_OS=windows
15623      VAR_OS_ENV=windows.msys
15624      ;;
15625    *aix*)
15626      VAR_OS=aix
15627      VAR_OS_TYPE=unix
15628      ;;
15629    *)
15630      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15631      ;;
15632  esac
15633
15634
15635  # First argument is the cpu name from the trip/quad
15636  case "$host_cpu" in
15637    x86_64)
15638      VAR_CPU=x86_64
15639      VAR_CPU_ARCH=x86
15640      VAR_CPU_BITS=64
15641      VAR_CPU_ENDIAN=little
15642      ;;
15643    i?86)
15644      VAR_CPU=x86
15645      VAR_CPU_ARCH=x86
15646      VAR_CPU_BITS=32
15647      VAR_CPU_ENDIAN=little
15648      ;;
15649    arm*)
15650      VAR_CPU=arm
15651      VAR_CPU_ARCH=arm
15652      VAR_CPU_BITS=32
15653      VAR_CPU_ENDIAN=little
15654      ;;
15655    aarch64)
15656      VAR_CPU=aarch64
15657      VAR_CPU_ARCH=aarch64
15658      VAR_CPU_BITS=64
15659      VAR_CPU_ENDIAN=little
15660      ;;
15661    powerpc)
15662      VAR_CPU=ppc
15663      VAR_CPU_ARCH=ppc
15664      VAR_CPU_BITS=32
15665      VAR_CPU_ENDIAN=big
15666      ;;
15667    powerpc64)
15668      VAR_CPU=ppc64
15669      VAR_CPU_ARCH=ppc
15670      VAR_CPU_BITS=64
15671      VAR_CPU_ENDIAN=big
15672      ;;
15673    powerpc64le)
15674      VAR_CPU=ppc64le
15675      VAR_CPU_ARCH=ppc
15676      VAR_CPU_BITS=64
15677      VAR_CPU_ENDIAN=little
15678      ;;
15679    s390)
15680      VAR_CPU=s390
15681      VAR_CPU_ARCH=s390
15682      VAR_CPU_BITS=32
15683      VAR_CPU_ENDIAN=big
15684      ;;
15685    s390x)
15686      VAR_CPU=s390x
15687      VAR_CPU_ARCH=s390
15688      VAR_CPU_BITS=64
15689      VAR_CPU_ENDIAN=big
15690      ;;
15691    sparc)
15692      VAR_CPU=sparc
15693      VAR_CPU_ARCH=sparc
15694      VAR_CPU_BITS=32
15695      VAR_CPU_ENDIAN=big
15696      ;;
15697    sparcv9|sparc64)
15698      VAR_CPU=sparcv9
15699      VAR_CPU_ARCH=sparc
15700      VAR_CPU_BITS=64
15701      VAR_CPU_ENDIAN=big
15702      ;;
15703    *)
15704      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15705      ;;
15706  esac
15707
15708  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15709  OPENJDK_TARGET_OS="$VAR_OS"
15710  if test "x$VAR_OS_TYPE" != x; then
15711    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15712  else
15713    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15714  fi
15715  if test "x$VAR_OS_ENV" != x; then
15716    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15717  else
15718    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15719  fi
15720  OPENJDK_TARGET_CPU="$VAR_CPU"
15721  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15722  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15723  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15724
15725
15726
15727
15728
15729
15730
15731
15732  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15733$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15735$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15736
15737
15738
15739# Check whether --with-target-bits was given.
15740if test "${with_target_bits+set}" = set; then :
15741  withval=$with_target_bits;
15742fi
15743
15744
15745  # We have three types of compiles:
15746  # native  == normal compilation, target system == build system
15747  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15748  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15749  #
15750  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15751    # We're doing a proper cross-compilation
15752    COMPILE_TYPE="cross"
15753  else
15754    COMPILE_TYPE="native"
15755  fi
15756
15757  if test "x$with_target_bits" != x; then
15758    if test "x$COMPILE_TYPE" = "xcross"; then
15759      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15760    fi
15761
15762    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15763      # A reduced build is requested
15764      COMPILE_TYPE="reduced"
15765      OPENJDK_TARGET_CPU_BITS=32
15766      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15767        OPENJDK_TARGET_CPU=x86
15768      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15769        OPENJDK_TARGET_CPU=sparc
15770      else
15771        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15772      fi
15773    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15774      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
15775    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15776      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15777$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15778    else
15779      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15780    fi
15781  fi
15782
15783
15784  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15785$as_echo_n "checking compilation type... " >&6; }
15786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15787$as_echo "$COMPILE_TYPE" >&6; }
15788
15789
15790  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15791    REQUIRED_OS_NAME=SunOS
15792    REQUIRED_OS_VERSION=5.10
15793  fi
15794  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15795    REQUIRED_OS_NAME=Linux
15796    REQUIRED_OS_VERSION=2.6
15797  fi
15798  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15799    REQUIRED_OS_NAME=Windows
15800    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15801      REQUIRED_OS_VERSION=5.2
15802    else
15803      REQUIRED_OS_VERSION=5.1
15804    fi
15805  fi
15806  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15807    REQUIRED_OS_NAME=Darwin
15808    REQUIRED_OS_VERSION=11.2
15809  fi
15810  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15811    REQUIRED_OS_NAME=AIX
15812    REQUIRED_OS_VERSION=7.1
15813  fi
15814
15815
15816
15817
15818
15819
15820  # Also store the legacy naming of the cpu.
15821  # Ie i586 and amd64 instead of x86 and x86_64
15822  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15823  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15824    OPENJDK_TARGET_CPU_LEGACY="i586"
15825  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15826    # On all platforms except MacOSX replace x86_64 with amd64.
15827    OPENJDK_TARGET_CPU_LEGACY="amd64"
15828  fi
15829
15830
15831  # And the second legacy naming of the cpu.
15832  # Ie i386 and amd64 instead of x86 and x86_64.
15833  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15834  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15835    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15836  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15837    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15838  fi
15839
15840
15841  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15842  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15843  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15844  OPENJDK_TARGET_CPU_ISADIR=""
15845  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15846    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15847      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15848    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15849      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15850    fi
15851  fi
15852
15853
15854  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15855  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15856  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15857    # On linux only, we replace x86 with i386.
15858    OPENJDK_TARGET_CPU_OSARCH="i386"
15859  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15860    # On all platforms except macosx, we replace x86_64 with amd64.
15861    OPENJDK_TARGET_CPU_OSARCH="amd64"
15862  fi
15863
15864
15865  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15866  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15867    OPENJDK_TARGET_CPU_JLI="i386"
15868  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15869    # On all platforms except macosx, we replace x86_64 with amd64.
15870    OPENJDK_TARGET_CPU_JLI="amd64"
15871  fi
15872
15873  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15874      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15875  else
15876      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15877  fi
15878
15879
15880  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15881  # Macosx is osx and x86_64 is x64
15882  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15883    OPENJDK_TARGET_OS_BUNDLE="osx"
15884  else
15885    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15886  fi
15887  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15888    OPENJDK_TARGET_CPU_BUNDLE="x64"
15889  else
15890    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15891  fi
15892  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15893
15894
15895
15896
15897  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15898    A_LP64="LP64:="
15899    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15900    # unpack200.exe
15901    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15902      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15903    fi
15904  fi
15905  LP64=$A_LP64
15906
15907
15908  if test "x$COMPILE_TYPE" = "xcross"; then
15909    # FIXME: ... or should this include reduced builds..?
15910    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15911  else
15912    DEFINE_CROSS_COMPILE_ARCH=""
15913  fi
15914
15915
15916  # Convert openjdk platform names to hotspot names
15917
15918  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15919  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15920    HOTSPOT_TARGET_OS=bsd
15921  fi
15922
15923
15924  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15925  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15926    HOTSPOT_TARGET_OS_TYPE=posix
15927  fi
15928
15929
15930  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15931  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15932    HOTSPOT_TARGET_CPU=x86_32
15933  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15934    HOTSPOT_TARGET_CPU=sparc
15935  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15936    HOTSPOT_TARGET_CPU=ppc_64
15937  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15938    HOTSPOT_TARGET_CPU=ppc_64
15939  fi
15940
15941
15942  # This is identical with OPENJDK_*, but define anyway for consistency.
15943  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15944
15945
15946  # Setup HOTSPOT_TARGET_CPU_DEFINE
15947  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15948    HOTSPOT_TARGET_CPU_DEFINE=IA32
15949  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15950    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15951  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15952    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15953  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15954    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15955  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15956    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15957  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15958    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15959
15960  # The cpu defines below are for zero, we don't support them directly.
15961  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15962    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15963  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15964    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15965  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15966    HOTSPOT_TARGET_CPU_DEFINE=S390
15967  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15968    HOTSPOT_TARGET_CPU_DEFINE=S390
15969  elif test "x$OPENJDK_TARGET_CPU" != x; then
15970    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
15971  fi
15972
15973
15974
15975
15976  # Also store the legacy naming of the cpu.
15977  # Ie i586 and amd64 instead of x86 and x86_64
15978  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15979  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15980    OPENJDK_BUILD_CPU_LEGACY="i586"
15981  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15982    # On all platforms except MacOSX replace x86_64 with amd64.
15983    OPENJDK_BUILD_CPU_LEGACY="amd64"
15984  fi
15985
15986
15987  # And the second legacy naming of the cpu.
15988  # Ie i386 and amd64 instead of x86 and x86_64.
15989  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15990  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15991    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15992  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15993    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15994  fi
15995
15996
15997  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15998  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15999  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16000  OPENJDK_BUILD_CPU_ISADIR=""
16001  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16002    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16003      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16004    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16005      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16006    fi
16007  fi
16008
16009
16010  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16011  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16012  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16013    # On linux only, we replace x86 with i386.
16014    OPENJDK_BUILD_CPU_OSARCH="i386"
16015  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16016    # On all platforms except macosx, we replace x86_64 with amd64.
16017    OPENJDK_BUILD_CPU_OSARCH="amd64"
16018  fi
16019
16020
16021  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16022  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16023    OPENJDK_BUILD_CPU_JLI="i386"
16024  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16025    # On all platforms except macosx, we replace x86_64 with amd64.
16026    OPENJDK_BUILD_CPU_JLI="amd64"
16027  fi
16028
16029  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16030      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16031  else
16032      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16033  fi
16034
16035
16036  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16037  # Macosx is osx and x86_64 is x64
16038  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16039    OPENJDK_BUILD_OS_BUNDLE="osx"
16040  else
16041    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16042  fi
16043  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16044    OPENJDK_BUILD_CPU_BUNDLE="x64"
16045  else
16046    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16047  fi
16048  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16049
16050
16051
16052
16053  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16054    A_LP64="LP64:="
16055    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16056    # unpack200.exe
16057    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16058      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16059    fi
16060  fi
16061  LP64=$A_LP64
16062
16063
16064  if test "x$COMPILE_TYPE" = "xcross"; then
16065    # FIXME: ... or should this include reduced builds..?
16066    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16067  else
16068    DEFINE_CROSS_COMPILE_ARCH=""
16069  fi
16070
16071
16072  # Convert openjdk platform names to hotspot names
16073
16074  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16075  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16076    HOTSPOT_BUILD_OS=bsd
16077  fi
16078
16079
16080  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16081  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16082    HOTSPOT_BUILD_OS_TYPE=posix
16083  fi
16084
16085
16086  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16087  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16088    HOTSPOT_BUILD_CPU=x86_32
16089  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16090    HOTSPOT_BUILD_CPU=sparc
16091  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16092    HOTSPOT_BUILD_CPU=ppc_64
16093  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16094    HOTSPOT_BUILD_CPU=ppc_64
16095  fi
16096
16097
16098  # This is identical with OPENJDK_*, but define anyway for consistency.
16099  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16100
16101
16102  # Setup HOTSPOT_BUILD_CPU_DEFINE
16103  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16104    HOTSPOT_BUILD_CPU_DEFINE=IA32
16105  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16106    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16107  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16108    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16109  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16110    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16111  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16112    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16113  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16114    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16115
16116  # The cpu defines below are for zero, we don't support them directly.
16117  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16118    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16119  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16120    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16121  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16122    HOTSPOT_BUILD_CPU_DEFINE=S390
16123  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16124    HOTSPOT_BUILD_CPU_DEFINE=S390
16125  elif test "x$OPENJDK_BUILD_CPU" != x; then
16126    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16127  fi
16128
16129
16130
16131
16132  # ZERO_ARCHDEF is used to enable architecture-specific code.
16133  # This is used in legacy hotspot build.
16134  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16135
16136
16137
16138
16139
16140# Continue setting up basic stuff. Most remaining code require fundamental tools.
16141
16142  # Save the current directory this script was started from
16143  CURDIR="$PWD"
16144
16145  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16146  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16147  # was not available at that time.
16148  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16149  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16150    ORIGINAL_PATH="$REWRITTEN_PATH"
16151    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16152$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16153  fi
16154
16155  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16156    PATH_SEP=";"
16157
16158  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16159  if test $SRC_ROOT_LENGTH -gt 100; then
16160    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16161  fi
16162
16163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16165$as_echo_n "checking cygwin release... " >&6; }
16166    CYGWIN_VERSION=`$UNAME -r`
16167    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16168$as_echo "$CYGWIN_VERSION" >&6; }
16169    WINDOWS_ENV_VENDOR='cygwin'
16170    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16171
16172    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16173    if test "x$CYGWIN_VERSION_OLD" != x; then
16174      { $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
16175$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;}
16176      as_fn_error $? "Cannot continue" "$LINENO" 5
16177    fi
16178    if test "x$CYGPATH" = x; then
16179      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16180    fi
16181    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16182$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16183    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16184    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16185    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16186    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16188$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16189    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16190    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16191    if test "x$test_cygdrive_prefix" = x; then
16192      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16193    fi
16194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16195    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16196$as_echo_n "checking msys release... " >&6; }
16197    MSYS_VERSION=`$UNAME -r`
16198    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16199$as_echo "$MSYS_VERSION" >&6; }
16200
16201    WINDOWS_ENV_VENDOR='msys'
16202    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16203
16204    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16205$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16206    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16207    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16208
16209  windows_path="$MSYS_ROOT_PATH"
16210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16211    unix_path=`$CYGPATH -u "$windows_path"`
16212    MSYS_ROOT_PATH="$unix_path"
16213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16215    MSYS_ROOT_PATH="$unix_path"
16216  fi
16217
16218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16219$as_echo "$MSYS_ROOT_PATH" >&6; }
16220    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16221  else
16222    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16223  fi
16224
16225  # Test if windows or unix (cygwin/msys) find is first in path.
16226  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16227$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16228  FIND_BINARY_OUTPUT=`find --version 2>&1`
16229  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16230    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16231$as_echo "unix style" >&6; }
16232  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16234$as_echo "Windows" >&6; }
16235    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16236$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16237    { $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
16238$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16239    as_fn_error $? "Cannot continue" "$LINENO" 5
16240  else
16241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16242$as_echo "unknown" >&6; }
16243    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16244$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16245  fi
16246
16247  else
16248    PATH_SEP=":"
16249  fi
16250
16251
16252  # We get the top-level directory from the supporting wrappers.
16253  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16254$as_echo_n "checking for top-level directory... " >&6; }
16255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16256$as_echo "$TOPDIR" >&6; }
16257
16258
16259  # Save the original version of TOPDIR for string comparisons
16260  ORIGINAL_TOPDIR="$TOPDIR"
16261
16262
16263  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16264
16265  # Only process if variable expands to non-empty
16266
16267  if test "x$CURDIR" != x; then
16268    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16269
16270  # Input might be given as Windows format, start by converting to
16271  # unix format.
16272  path="$CURDIR"
16273  new_path=`$CYGPATH -u "$path"`
16274
16275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16278  # "foo.exe" is OK but "foo" is an error.
16279  #
16280  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16281  # It is also a way to make sure we got the proper file name for the real test later on.
16282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16283  if test "x$test_shortpath" = x; then
16284    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16285$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16286    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16287  fi
16288
16289  # Call helper function which possibly converts this using DOS-style short mode.
16290  # If so, the updated path is stored in $new_path.
16291
16292  input_path="$new_path"
16293  # Check if we need to convert this using DOS-style short mode. If the path
16294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16295  # take no chances and rewrite it.
16296  # Note: m4 eats our [], so we need to use [ and ] instead.
16297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16298  if test "x$has_forbidden_chars" != x; then
16299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16303      # Going to short mode and back again did indeed matter. Since short mode is
16304      # case insensitive, let's make it lowercase to improve readability.
16305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16306      # Now convert it back to Unix-style (cygpath)
16307      input_path=`$CYGPATH -u "$shortmode_path"`
16308      new_path="$input_path"
16309    fi
16310  fi
16311
16312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16313  if test "x$test_cygdrive_prefix" = x; then
16314    # As a simple fix, exclude /usr/bin since it's not a real path.
16315    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16317      # a path prefixed by /cygdrive for fixpath to work.
16318      new_path="$CYGWIN_ROOT_PATH$input_path"
16319    fi
16320  fi
16321
16322
16323  if test "x$path" != "x$new_path"; then
16324    CURDIR="$new_path"
16325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16326$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16327  fi
16328
16329    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16330
16331  path="$CURDIR"
16332  has_colon=`$ECHO $path | $GREP ^.:`
16333  new_path="$path"
16334  if test "x$has_colon" = x; then
16335    # Not in mixed or Windows style, start by that.
16336    new_path=`cmd //c echo $path`
16337  fi
16338
16339
16340  input_path="$new_path"
16341  # Check if we need to convert this using DOS-style short mode. If the path
16342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16343  # take no chances and rewrite it.
16344  # Note: m4 eats our [], so we need to use [ and ] instead.
16345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16346  if test "x$has_forbidden_chars" != x; then
16347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16348    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16349  fi
16350
16351
16352  windows_path="$new_path"
16353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16354    unix_path=`$CYGPATH -u "$windows_path"`
16355    new_path="$unix_path"
16356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16358    new_path="$unix_path"
16359  fi
16360
16361  if test "x$path" != "x$new_path"; then
16362    CURDIR="$new_path"
16363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16364$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16365  fi
16366
16367  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16368  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16369
16370    else
16371      # We're on a unix platform. Hooray! :)
16372      path="$CURDIR"
16373      has_space=`$ECHO "$path" | $GREP " "`
16374      if test "x$has_space" != x; then
16375        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16376$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16377        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16378      fi
16379
16380      # Use eval to expand a potential ~
16381      eval path="$path"
16382      if test ! -f "$path" && test ! -d "$path"; then
16383        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16384      fi
16385
16386      if test -d "$path"; then
16387        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16388      else
16389        dir="`$DIRNAME "$path"`"
16390        base="`$BASENAME "$path"`"
16391        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16392      fi
16393    fi
16394  fi
16395
16396
16397  # Only process if variable expands to non-empty
16398
16399  if test "x$TOPDIR" != x; then
16400    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16401
16402  # Input might be given as Windows format, start by converting to
16403  # unix format.
16404  path="$TOPDIR"
16405  new_path=`$CYGPATH -u "$path"`
16406
16407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16410  # "foo.exe" is OK but "foo" is an error.
16411  #
16412  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16413  # It is also a way to make sure we got the proper file name for the real test later on.
16414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16415  if test "x$test_shortpath" = x; then
16416    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16417$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16418    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16419  fi
16420
16421  # Call helper function which possibly converts this using DOS-style short mode.
16422  # If so, the updated path is stored in $new_path.
16423
16424  input_path="$new_path"
16425  # Check if we need to convert this using DOS-style short mode. If the path
16426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16427  # take no chances and rewrite it.
16428  # Note: m4 eats our [], so we need to use [ and ] instead.
16429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16430  if test "x$has_forbidden_chars" != x; then
16431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16435      # Going to short mode and back again did indeed matter. Since short mode is
16436      # case insensitive, let's make it lowercase to improve readability.
16437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16438      # Now convert it back to Unix-style (cygpath)
16439      input_path=`$CYGPATH -u "$shortmode_path"`
16440      new_path="$input_path"
16441    fi
16442  fi
16443
16444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16445  if test "x$test_cygdrive_prefix" = x; then
16446    # As a simple fix, exclude /usr/bin since it's not a real path.
16447    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16449      # a path prefixed by /cygdrive for fixpath to work.
16450      new_path="$CYGWIN_ROOT_PATH$input_path"
16451    fi
16452  fi
16453
16454
16455  if test "x$path" != "x$new_path"; then
16456    TOPDIR="$new_path"
16457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16458$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16459  fi
16460
16461    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16462
16463  path="$TOPDIR"
16464  has_colon=`$ECHO $path | $GREP ^.:`
16465  new_path="$path"
16466  if test "x$has_colon" = x; then
16467    # Not in mixed or Windows style, start by that.
16468    new_path=`cmd //c echo $path`
16469  fi
16470
16471
16472  input_path="$new_path"
16473  # Check if we need to convert this using DOS-style short mode. If the path
16474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16475  # take no chances and rewrite it.
16476  # Note: m4 eats our [], so we need to use [ and ] instead.
16477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16478  if test "x$has_forbidden_chars" != x; then
16479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16481  fi
16482
16483
16484  windows_path="$new_path"
16485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16486    unix_path=`$CYGPATH -u "$windows_path"`
16487    new_path="$unix_path"
16488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16490    new_path="$unix_path"
16491  fi
16492
16493  if test "x$path" != "x$new_path"; then
16494    TOPDIR="$new_path"
16495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16496$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16497  fi
16498
16499  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16500  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16501
16502    else
16503      # We're on a unix platform. Hooray! :)
16504      path="$TOPDIR"
16505      has_space=`$ECHO "$path" | $GREP " "`
16506      if test "x$has_space" != x; then
16507        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16508$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16509        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16510      fi
16511
16512      # Use eval to expand a potential ~
16513      eval path="$path"
16514      if test ! -f "$path" && test ! -d "$path"; then
16515        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16516      fi
16517
16518      if test -d "$path"; then
16519        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16520      else
16521        dir="`$DIRNAME "$path"`"
16522        base="`$BASENAME "$path"`"
16523        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16524      fi
16525    fi
16526  fi
16527
16528  # SRC_ROOT is a traditional alias for TOPDIR.
16529  SRC_ROOT=$TOPDIR
16530
16531  # Calculate a canonical version of TOPDIR for string comparisons
16532  CANONICAL_TOPDIR=$TOPDIR
16533
16534  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16535    # Follow a chain of symbolic links. Use readlink
16536    # where it exists, else fall back to horribly
16537    # complicated shell code.
16538    if test "x$READLINK_TESTED" != yes; then
16539      # On MacOSX there is a readlink tool with a different
16540      # purpose than the GNU readlink tool. Check the found readlink.
16541      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16542      if test "x$ISGNU" = x; then
16543        # A readlink that we do not know how to use.
16544        # Are there other non-GNU readlinks out there?
16545        READLINK_TESTED=yes
16546        READLINK=
16547      fi
16548    fi
16549
16550    if test "x$READLINK" != x; then
16551      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16552    else
16553      # Save the current directory for restoring afterwards
16554      STARTDIR=$PWD
16555      COUNTER=0
16556      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16557      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16558      cd $sym_link_dir
16559      # Use -P flag to resolve symlinks in directories.
16560      cd `$THEPWDCMD -P`
16561      sym_link_dir=`$THEPWDCMD -P`
16562      # Resolve file symlinks
16563      while test $COUNTER -lt 20; do
16564        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16565        if test "x$ISLINK" == x; then
16566          # This is not a symbolic link! We are done!
16567          break
16568        fi
16569        # Again resolve directory symlinks since the target of the just found
16570        # link could be in a different directory
16571        cd `$DIRNAME $ISLINK`
16572        sym_link_dir=`$THEPWDCMD -P`
16573        sym_link_file=`$BASENAME $ISLINK`
16574        let COUNTER=COUNTER+1
16575      done
16576      cd $STARTDIR
16577      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16578    fi
16579  fi
16580
16581
16582
16583  # Locate the directory of this script.
16584  AUTOCONF_DIR=$TOPDIR/common/autoconf
16585
16586  # Setup username (for use in adhoc version strings etc)
16587  # Outer [ ] to quote m4.
16588   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16589
16590
16591
16592# Check if it's a pure open build or if custom sources are to be used.
16593
16594  # Check whether --enable-openjdk-only was given.
16595if test "${enable_openjdk_only+set}" = set; then :
16596  enableval=$enable_openjdk_only;
16597else
16598  enable_openjdk_only="no"
16599fi
16600
16601
16602  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16603$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16605$as_echo "$enable_openjdk_only" >&6; }
16606  if test "x$enable_openjdk_only" = "xyes"; then
16607    SUPPRESS_CUSTOM_EXTENSIONS="true"
16608  elif test "x$enable_openjdk_only" = "xno"; then
16609    SUPPRESS_CUSTOM_EXTENSIONS="false"
16610  else
16611    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16612  fi
16613
16614  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16615  # the IncludeCustomExtension macro.
16616
16617
16618# Check whether --with-custom-make-dir was given.
16619if test "${with_custom_make_dir+set}" = set; then :
16620  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
16621$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16622fi
16623
16624
16625
16626
16627# These are needed to be able to create a configuration name (and thus the output directory)
16628
16629  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16630$as_echo_n "checking which variant of the JDK to build... " >&6; }
16631
16632# Check whether --with-jdk-variant was given.
16633if test "${with_jdk_variant+set}" = set; then :
16634  withval=$with_jdk_variant;
16635fi
16636
16637
16638  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16639    JDK_VARIANT="normal"
16640  else
16641    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16642  fi
16643
16644
16645
16646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16647$as_echo "$JDK_VARIANT" >&6; }
16648
16649
16650  DEBUG_LEVEL="release"
16651  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16652$as_echo_n "checking which debug level to use... " >&6; }
16653  # Check whether --enable-debug was given.
16654if test "${enable_debug+set}" = set; then :
16655  enableval=$enable_debug;
16656        ENABLE_DEBUG="${enableval}"
16657        DEBUG_LEVEL="fastdebug"
16658
16659else
16660  ENABLE_DEBUG="no"
16661fi
16662
16663
16664
16665# Check whether --with-debug-level was given.
16666if test "${with_debug_level+set}" = set; then :
16667  withval=$with_debug_level;
16668        DEBUG_LEVEL="${withval}"
16669        if test "x$ENABLE_DEBUG" = xyes; then
16670          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16671        fi
16672
16673fi
16674
16675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16676$as_echo "$DEBUG_LEVEL" >&6; }
16677
16678  if test "x$DEBUG_LEVEL" != xrelease && \
16679      test "x$DEBUG_LEVEL" != xoptimized && \
16680      test "x$DEBUG_LEVEL" != xfastdebug && \
16681      test "x$DEBUG_LEVEL" != xslowdebug; then
16682    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16683  fi
16684
16685  # Translate DEBUG_LEVEL to debug level used by Hotspot
16686  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16687  if test "x$DEBUG_LEVEL" = xrelease; then
16688    HOTSPOT_DEBUG_LEVEL="product"
16689  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16690    HOTSPOT_DEBUG_LEVEL="debug"
16691  fi
16692
16693  if test "x$DEBUG_LEVEL" = xoptimized; then
16694    # The debug level 'optimized' is a little special because it is currently only
16695    # applicable to the HotSpot build where it means to build a completely
16696    # optimized version of the VM without any debugging code (like for the
16697    # 'release' debug level which is called 'product' in the HotSpot build) but
16698    # with the exception that it can contain additional code which is otherwise
16699    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16700    # test new and/or experimental features which are not intended for customer
16701    # shipment. Because these new features need to be tested and benchmarked in
16702    # real world scenarios, we want to build the containing JDK at the 'release'
16703    # debug level.
16704    DEBUG_LEVEL="release"
16705  fi
16706
16707
16708
16709
16710
16711
16712# Check whether --with-jvm-variants was given.
16713if test "${with_jvm_variants+set}" = set; then :
16714  withval=$with_jvm_variants;
16715fi
16716
16717
16718
16719
16720# Check whether --with-cpu-port was given.
16721if test "${with_cpu_port+set}" = set; then :
16722  withval=$with_cpu_port;
16723fi
16724
16725
16726  if test "x$with_cpu_port" != x; then
16727    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16728      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16729    fi
16730    if test "x$with_cpu_port" != xarm64 && \
16731        test "x$with_cpu_port" != xaarch64; then
16732      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16733    fi
16734    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16735  fi
16736
16737
16738  if test "x$with_jvm_variants" = x; then
16739    with_jvm_variants="server"
16740  fi
16741  JVM_VARIANTS_OPT="$with_jvm_variants"
16742
16743  # Has the user listed more than one variant?
16744  # Additional [] needed to keep m4 from mangling shell constructs.
16745  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16746    BUILDING_MULTIPLE_JVM_VARIANTS=true
16747  else
16748    BUILDING_MULTIPLE_JVM_VARIANTS=false
16749  fi
16750  # Replace the commas with AND for use in the build directory name.
16751  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16752
16753  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16754$as_echo_n "checking which variants of the JVM to build... " >&6; }
16755  # JVM_VARIANTS is a space-separated list.
16756  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16757  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16759$as_echo "$JVM_VARIANTS" >&6; }
16760
16761  # Check that the selected variants are valid
16762
16763  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16764  # Notice that the original variant failes on SLES 10 and 11
16765  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16766  STACK=${JVM_VARIANTS// /$'\n'}
16767  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16768  if test "x$INVALID_VARIANTS" != x; then
16769    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16770$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16771    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16772  fi
16773
16774  # All "special" variants share the same output directory ("server")
16775  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16776  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16777  STACK=${JVM_VARIANTS// /$'\n'}
16778  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16779  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16780    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16781  fi
16782
16783  # The "main" variant is the one used by other libs to link against during the
16784  # build.
16785  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16786    MAIN_VARIANT_PRIO_ORDER="server client minimal"
16787    for variant in $MAIN_VARIANT_PRIO_ORDER; do
16788      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16789        JVM_VARIANT_MAIN="$variant"
16790        break
16791      fi
16792    done
16793  else
16794    JVM_VARIANT_MAIN="$JVM_VARIANTS"
16795  fi
16796
16797
16798
16799
16800
16801  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16802    # zero behaves as a platform and rewrites these values. This is really weird. :(
16803    # We are guaranteed that we do not build any other variants when building zero.
16804    HOTSPOT_TARGET_CPU=zero
16805    HOTSPOT_TARGET_CPU_ARCH=zero
16806  fi
16807
16808
16809# With basic setup done, call the custom early hook.
16810
16811
16812# Check if we have devkits, extra paths or sysroot set.
16813
16814
16815# Check whether --with-devkit was given.
16816if test "${with_devkit+set}" = set; then :
16817  withval=$with_devkit;
16818
16819  # Only process if variable expands to non-empty
16820
16821  if test "x$with_devkit" != x; then
16822    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16823
16824  # Input might be given as Windows format, start by converting to
16825  # unix format.
16826  path="$with_devkit"
16827  new_path=`$CYGPATH -u "$path"`
16828
16829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16832  # "foo.exe" is OK but "foo" is an error.
16833  #
16834  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16835  # It is also a way to make sure we got the proper file name for the real test later on.
16836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16837  if test "x$test_shortpath" = x; then
16838    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16839$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16840    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16841  fi
16842
16843  # Call helper function which possibly converts this using DOS-style short mode.
16844  # If so, the updated path is stored in $new_path.
16845
16846  input_path="$new_path"
16847  # Check if we need to convert this using DOS-style short mode. If the path
16848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16849  # take no chances and rewrite it.
16850  # Note: m4 eats our [], so we need to use [ and ] instead.
16851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16852  if test "x$has_forbidden_chars" != x; then
16853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16857      # Going to short mode and back again did indeed matter. Since short mode is
16858      # case insensitive, let's make it lowercase to improve readability.
16859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16860      # Now convert it back to Unix-style (cygpath)
16861      input_path=`$CYGPATH -u "$shortmode_path"`
16862      new_path="$input_path"
16863    fi
16864  fi
16865
16866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16867  if test "x$test_cygdrive_prefix" = x; then
16868    # As a simple fix, exclude /usr/bin since it's not a real path.
16869    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16871      # a path prefixed by /cygdrive for fixpath to work.
16872      new_path="$CYGWIN_ROOT_PATH$input_path"
16873    fi
16874  fi
16875
16876
16877  if test "x$path" != "x$new_path"; then
16878    with_devkit="$new_path"
16879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16880$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16881  fi
16882
16883    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16884
16885  path="$with_devkit"
16886  has_colon=`$ECHO $path | $GREP ^.:`
16887  new_path="$path"
16888  if test "x$has_colon" = x; then
16889    # Not in mixed or Windows style, start by that.
16890    new_path=`cmd //c echo $path`
16891  fi
16892
16893
16894  input_path="$new_path"
16895  # Check if we need to convert this using DOS-style short mode. If the path
16896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16897  # take no chances and rewrite it.
16898  # Note: m4 eats our [], so we need to use [ and ] instead.
16899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16900  if test "x$has_forbidden_chars" != x; then
16901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16903  fi
16904
16905
16906  windows_path="$new_path"
16907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16908    unix_path=`$CYGPATH -u "$windows_path"`
16909    new_path="$unix_path"
16910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16912    new_path="$unix_path"
16913  fi
16914
16915  if test "x$path" != "x$new_path"; then
16916    with_devkit="$new_path"
16917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16918$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16919  fi
16920
16921  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16922  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16923
16924    else
16925      # We're on a unix platform. Hooray! :)
16926      path="$with_devkit"
16927      has_space=`$ECHO "$path" | $GREP " "`
16928      if test "x$has_space" != x; then
16929        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16930$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16931        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16932      fi
16933
16934      # Use eval to expand a potential ~
16935      eval path="$path"
16936      if test ! -f "$path" && test ! -d "$path"; then
16937        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16938      fi
16939
16940      if test -d "$path"; then
16941        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16942      else
16943        dir="`$DIRNAME "$path"`"
16944        base="`$BASENAME "$path"`"
16945        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16946      fi
16947    fi
16948  fi
16949
16950        DEVKIT_ROOT="$with_devkit"
16951        # Check for a meta data info file in the root of the devkit
16952        if test -f "$DEVKIT_ROOT/devkit.info"; then
16953          . $DEVKIT_ROOT/devkit.info
16954          # This potentially sets the following:
16955          # A descriptive name of the devkit
16956
16957  if test "x$DEVKIT_NAME" = x; then
16958    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16959  fi
16960
16961          # Corresponds to --with-extra-path
16962
16963  if test "x$DEVKIT_EXTRA_PATH" = x; then
16964    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16965  fi
16966
16967          # Corresponds to --with-toolchain-path
16968
16969  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16970    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16971  fi
16972
16973          # Corresponds to --with-sysroot
16974
16975  if test "x$DEVKIT_SYSROOT" = x; then
16976    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16977  fi
16978
16979
16980          # Identifies the Visual Studio version in the devkit
16981
16982  if test "x$DEVKIT_VS_VERSION" = x; then
16983    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16984  fi
16985
16986          # The Visual Studio include environment variable
16987
16988  if test "x$DEVKIT_VS_INCLUDE" = x; then
16989    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16990  fi
16991
16992          # The Visual Studio lib environment variable
16993
16994  if test "x$DEVKIT_VS_LIB" = x; then
16995    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16996  fi
16997
16998          # Corresponds to --with-msvcr-dll
16999
17000  if test "x$DEVKIT_MSVCR_DLL" = x; then
17001    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17002  fi
17003
17004          # Corresponds to --with-msvcp-dll
17005
17006  if test "x$DEVKIT_MSVCP_DLL" = x; then
17007    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17008  fi
17009
17010        fi
17011
17012        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17013$as_echo_n "checking for devkit... " >&6; }
17014        if test "x$DEVKIT_NAME" != x; then
17015          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17016$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17017        else
17018          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17019$as_echo "$DEVKIT_ROOT" >&6; }
17020        fi
17021
17022
17023  if test "x$DEVKIT_EXTRA_PATH" != x; then
17024    if test "x$EXTRA_PATH" = x; then
17025      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17026    else
17027      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17028    fi
17029  fi
17030
17031
17032        # Fallback default of just /bin if DEVKIT_PATH is not defined
17033        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17034          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17035        fi
17036
17037  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17038    if test "x$TOOLCHAIN_PATH" = x; then
17039      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17040    else
17041      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17042    fi
17043  fi
17044
17045
17046        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17047        # places for backwards compatiblity.
17048        if test "x$DEVKIT_SYSROOT" != x; then
17049          SYSROOT="$DEVKIT_SYSROOT"
17050        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17051          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17052        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17053          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17054        fi
17055
17056
17057fi
17058
17059
17060  # You can force the sysroot if the sysroot encoded into the compiler tools
17061  # is not correct.
17062
17063# Check whether --with-sys-root was given.
17064if test "${with_sys_root+set}" = set; then :
17065  withval=$with_sys_root; SYSROOT=$with_sys_root
17066
17067fi
17068
17069
17070
17071# Check whether --with-sysroot was given.
17072if test "${with_sysroot+set}" = set; then :
17073  withval=$with_sysroot; SYSROOT=$with_sysroot
17074
17075fi
17076
17077
17078
17079# Check whether --with-tools-dir was given.
17080if test "${with_tools_dir+set}" = set; then :
17081  withval=$with_tools_dir;
17082  if test "x$with_tools_dir" != x; then
17083    if test "x$TOOLCHAIN_PATH" = x; then
17084      TOOLCHAIN_PATH="$with_tools_dir"
17085    else
17086      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17087    fi
17088  fi
17089
17090
17091fi
17092
17093
17094
17095# Check whether --with-toolchain-path was given.
17096if test "${with_toolchain_path+set}" = set; then :
17097  withval=$with_toolchain_path;
17098  if test "x$with_toolchain_path" != x; then
17099    if test "x$TOOLCHAIN_PATH" = x; then
17100      TOOLCHAIN_PATH="$with_toolchain_path"
17101    else
17102      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17103    fi
17104  fi
17105
17106
17107fi
17108
17109
17110
17111# Check whether --with-extra-path was given.
17112if test "${with_extra_path+set}" = set; then :
17113  withval=$with_extra_path;
17114  if test "x$with_extra_path" != x; then
17115    if test "x$EXTRA_PATH" = x; then
17116      EXTRA_PATH="$with_extra_path"
17117    else
17118      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17119    fi
17120  fi
17121
17122
17123fi
17124
17125
17126  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17127    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17128    # If not, detect if Xcode is installed by running xcodebuild -version
17129    # if no Xcode installed, xcodebuild exits with 1
17130    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17131    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17132      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17133      # fall back on the stub binary in /usr/bin/xcodebuild
17134      # Extract the first word of "xcodebuild", so it can be a program name with args.
17135set dummy xcodebuild; ac_word=$2
17136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17137$as_echo_n "checking for $ac_word... " >&6; }
17138if ${ac_cv_path_XCODEBUILD+:} false; then :
17139  $as_echo_n "(cached) " >&6
17140else
17141  case $XCODEBUILD in
17142  [\\/]* | ?:[\\/]*)
17143  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17144  ;;
17145  *)
17146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17147for as_dir in $TOOLCHAIN_PATH
17148do
17149  IFS=$as_save_IFS
17150  test -z "$as_dir" && as_dir=.
17151    for ac_exec_ext in '' $ac_executable_extensions; do
17152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17153    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17155    break 2
17156  fi
17157done
17158  done
17159IFS=$as_save_IFS
17160
17161  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17162  ;;
17163esac
17164fi
17165XCODEBUILD=$ac_cv_path_XCODEBUILD
17166if test -n "$XCODEBUILD"; then
17167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17168$as_echo "$XCODEBUILD" >&6; }
17169else
17170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17171$as_echo "no" >&6; }
17172fi
17173
17174
17175    else
17176      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17177      # when only the command line tools are installed there are no SDKs, so headers
17178      # are copied into the system frameworks
17179      XCODEBUILD=
17180
17181    fi
17182
17183    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17184$as_echo_n "checking for sdk name... " >&6; }
17185
17186# Check whether --with-sdk-name was given.
17187if test "${with_sdk_name+set}" = set; then :
17188  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17189
17190fi
17191
17192    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17193$as_echo "$SDKNAME" >&6; }
17194
17195    # if toolchain path is specified then don't rely on system headers, they may not compile
17196    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17197    test -z "$TOOLCHAIN_PATH" && \
17198      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17199
17200    if test -z "$SYSROOT"; then
17201      if test -n "$XCODEBUILD"; then
17202        # if we don't have system headers, use default SDK name (last resort)
17203        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17204          SDKNAME=${SDKNAME:-macosx}
17205        fi
17206
17207        if test -n "$SDKNAME"; then
17208          # Call xcodebuild to determine SYSROOT
17209          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17210        fi
17211      else
17212        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17213          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
17214        fi
17215      fi
17216    else
17217      # warn user if --with-sdk-name was also set
17218      if test -n "$with_sdk_name"; then
17219        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17220$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17221      fi
17222    fi
17223
17224    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17225      # If no system framework headers, then SYSROOT must be set, or we won't build
17226      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
17227    fi
17228
17229    # Perform a basic sanity test
17230    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17231      if test -z "$SYSROOT"; then
17232        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
17233      else
17234        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17235      fi
17236    fi
17237
17238    # set SDKROOT too, Xcode tools will pick it up
17239    SDKROOT=$SYSROOT
17240
17241  fi
17242
17243  # Prepend the extra path to the global path
17244
17245  if test "x$EXTRA_PATH" != x; then
17246    if test "x$PATH" = x; then
17247      PATH="$EXTRA_PATH"
17248    else
17249      PATH="$EXTRA_PATH:$PATH"
17250    fi
17251  fi
17252
17253
17254  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17255$as_echo_n "checking for sysroot... " >&6; }
17256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17257$as_echo "$SYSROOT" >&6; }
17258  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17259$as_echo_n "checking for toolchain path... " >&6; }
17260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17261$as_echo "$TOOLCHAIN_PATH" >&6; }
17262  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17263$as_echo_n "checking for extra path... " >&6; }
17264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17265$as_echo "$EXTRA_PATH" >&6; }
17266
17267
17268# To properly create a configuration name, we need to have the OpenJDK target
17269# and options (variants and debug level) parsed.
17270
17271
17272
17273# Check whether --with-conf-name was given.
17274if test "${with_conf_name+set}" = set; then :
17275  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17276fi
17277
17278
17279  # Test from where we are running configure, in or outside of src root.
17280  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17281$as_echo_n "checking where to store configuration... " >&6; }
17282  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17283      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17284      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17285    # We are running configure from the src root.
17286    # Create a default ./build/target-variant-debuglevel output root.
17287    if test "x${CONF_NAME}" = x; then
17288      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17289$as_echo "in default location" >&6; }
17290      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17291    else
17292      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17293$as_echo "in build directory with custom name" >&6; }
17294    fi
17295    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17296    $MKDIR -p "$OUTPUT_ROOT"
17297    if test ! -d "$OUTPUT_ROOT"; then
17298      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17299    fi
17300  else
17301    # We are running configure from outside of the src dir.
17302    # Then use the current directory as output dir!
17303    # If configuration is situated in normal build directory, just use the build
17304    # directory name as configuration name, otherwise use the complete path.
17305    if test "x${CONF_NAME}" = x; then
17306      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17307    fi
17308    OUTPUT_ROOT="$CURDIR"
17309    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17310$as_echo "in current directory" >&6; }
17311
17312    # WARNING: This might be a bad thing to do. You need to be sure you want to
17313    # have a configuration in this directory. Do some sanity checks!
17314
17315    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17316      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17317      # other files
17318      files_present=`$LS $OUTPUT_ROOT`
17319      # Configure has already touched config.log and confdefs.h in the current dir when this check
17320      # is performed.
17321      filtered_files=`$ECHO "$files_present" \
17322          | $SED -e 's/config.log//g' \
17323              -e 's/configure.log//g' \
17324              -e 's/confdefs.h//g' \
17325              -e 's/ //g' \
17326          | $TR -d '\n'`
17327      if test "x$filtered_files" != x; then
17328        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17329$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17330        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17331$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17332        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17333$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17334        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17335$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17336        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17337$as_echo "$as_me: seriously mess up just about everything." >&6;}
17338        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17339$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17340        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17341$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17342        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17343      fi
17344    fi
17345  fi
17346  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17347$as_echo_n "checking what configuration name to use... " >&6; }
17348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17349$as_echo "$CONF_NAME" >&6; }
17350
17351
17352  # Only process if variable expands to non-empty
17353
17354  if test "x$OUTPUT_ROOT" != x; then
17355    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17356
17357  # Input might be given as Windows format, start by converting to
17358  # unix format.
17359  path="$OUTPUT_ROOT"
17360  new_path=`$CYGPATH -u "$path"`
17361
17362  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17363  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17364  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17365  # "foo.exe" is OK but "foo" is an error.
17366  #
17367  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17368  # It is also a way to make sure we got the proper file name for the real test later on.
17369  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17370  if test "x$test_shortpath" = x; then
17371    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17372$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17373    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17374  fi
17375
17376  # Call helper function which possibly converts this using DOS-style short mode.
17377  # If so, the updated path is stored in $new_path.
17378
17379  input_path="$new_path"
17380  # Check if we need to convert this using DOS-style short mode. If the path
17381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17382  # take no chances and rewrite it.
17383  # Note: m4 eats our [], so we need to use [ and ] instead.
17384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17385  if test "x$has_forbidden_chars" != x; then
17386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17387    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17388    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17389    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17390      # Going to short mode and back again did indeed matter. Since short mode is
17391      # case insensitive, let's make it lowercase to improve readability.
17392      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17393      # Now convert it back to Unix-style (cygpath)
17394      input_path=`$CYGPATH -u "$shortmode_path"`
17395      new_path="$input_path"
17396    fi
17397  fi
17398
17399  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17400  if test "x$test_cygdrive_prefix" = x; then
17401    # As a simple fix, exclude /usr/bin since it's not a real path.
17402    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17403      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17404      # a path prefixed by /cygdrive for fixpath to work.
17405      new_path="$CYGWIN_ROOT_PATH$input_path"
17406    fi
17407  fi
17408
17409
17410  if test "x$path" != "x$new_path"; then
17411    OUTPUT_ROOT="$new_path"
17412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17413$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17414  fi
17415
17416    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17417
17418  path="$OUTPUT_ROOT"
17419  has_colon=`$ECHO $path | $GREP ^.:`
17420  new_path="$path"
17421  if test "x$has_colon" = x; then
17422    # Not in mixed or Windows style, start by that.
17423    new_path=`cmd //c echo $path`
17424  fi
17425
17426
17427  input_path="$new_path"
17428  # Check if we need to convert this using DOS-style short mode. If the path
17429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17430  # take no chances and rewrite it.
17431  # Note: m4 eats our [], so we need to use [ and ] instead.
17432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17433  if test "x$has_forbidden_chars" != x; then
17434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17436  fi
17437
17438
17439  windows_path="$new_path"
17440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17441    unix_path=`$CYGPATH -u "$windows_path"`
17442    new_path="$unix_path"
17443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17445    new_path="$unix_path"
17446  fi
17447
17448  if test "x$path" != "x$new_path"; then
17449    OUTPUT_ROOT="$new_path"
17450    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17451$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17452  fi
17453
17454  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17455  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17456
17457    else
17458      # We're on a unix platform. Hooray! :)
17459      path="$OUTPUT_ROOT"
17460      has_space=`$ECHO "$path" | $GREP " "`
17461      if test "x$has_space" != x; then
17462        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17463$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17464        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17465      fi
17466
17467      # Use eval to expand a potential ~
17468      eval path="$path"
17469      if test ! -f "$path" && test ! -d "$path"; then
17470        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17471      fi
17472
17473      if test -d "$path"; then
17474        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17475      else
17476        dir="`$DIRNAME "$path"`"
17477        base="`$BASENAME "$path"`"
17478        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17479      fi
17480    fi
17481  fi
17482
17483
17484  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17485  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17486
17487  SPEC=$OUTPUT_ROOT/spec.gmk
17488
17489  CONF_NAME=$CONF_NAME
17490
17491  OUTPUT_ROOT=$OUTPUT_ROOT
17492
17493
17494
17495  # The spec.gmk file contains all variables for the make system.
17496  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17497
17498  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17499  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17500
17501  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17502  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17503
17504  # The compare.sh is used to compare the build output to other builds.
17505  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17506
17507  # The generated Makefile knows where the spec.gmk is and where the source is.
17508  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17509  # which will look for generated configurations
17510  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17511
17512
17513
17514# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17515
17516  for ac_prog in apt-get yum brew port pkgutil pkgadd
17517do
17518  # Extract the first word of "$ac_prog", so it can be a program name with args.
17519set dummy $ac_prog; ac_word=$2
17520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17521$as_echo_n "checking for $ac_word... " >&6; }
17522if ${ac_cv_prog_PKGHANDLER+:} false; then :
17523  $as_echo_n "(cached) " >&6
17524else
17525  if test -n "$PKGHANDLER"; then
17526  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17527else
17528as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17529for as_dir in $PATH
17530do
17531  IFS=$as_save_IFS
17532  test -z "$as_dir" && as_dir=.
17533    for ac_exec_ext in '' $ac_executable_extensions; do
17534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17535    ac_cv_prog_PKGHANDLER="$ac_prog"
17536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17537    break 2
17538  fi
17539done
17540  done
17541IFS=$as_save_IFS
17542
17543fi
17544fi
17545PKGHANDLER=$ac_cv_prog_PKGHANDLER
17546if test -n "$PKGHANDLER"; then
17547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17548$as_echo "$PKGHANDLER" >&6; }
17549else
17550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17551$as_echo "no" >&6; }
17552fi
17553
17554
17555  test -n "$PKGHANDLER" && break
17556done
17557
17558
17559
17560# Setup tools that requires more complex handling, or that is not needed by the configure script.
17561
17562
17563
17564  # Publish this variable in the help.
17565
17566
17567  if [ -z "${MAKE+x}" ]; then
17568    # The variable is not set by user, try to locate tool using the code snippet
17569
17570    # Try our hardest to locate a correct version of GNU make
17571    for ac_prog in gmake
17572do
17573  # Extract the first word of "$ac_prog", so it can be a program name with args.
17574set dummy $ac_prog; ac_word=$2
17575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17576$as_echo_n "checking for $ac_word... " >&6; }
17577if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17578  $as_echo_n "(cached) " >&6
17579else
17580  case $CHECK_GMAKE in
17581  [\\/]* | ?:[\\/]*)
17582  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17583  ;;
17584  *)
17585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17586for as_dir in $PATH
17587do
17588  IFS=$as_save_IFS
17589  test -z "$as_dir" && as_dir=.
17590    for ac_exec_ext in '' $ac_executable_extensions; do
17591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17592    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17594    break 2
17595  fi
17596done
17597  done
17598IFS=$as_save_IFS
17599
17600  ;;
17601esac
17602fi
17603CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17604if test -n "$CHECK_GMAKE"; then
17605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17606$as_echo "$CHECK_GMAKE" >&6; }
17607else
17608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17609$as_echo "no" >&6; }
17610fi
17611
17612
17613  test -n "$CHECK_GMAKE" && break
17614done
17615
17616
17617  MAKE_CANDIDATE=""$CHECK_GMAKE""
17618  DESCRIPTION="gmake in PATH"
17619
17620  # On Cygwin, we require a newer version of make than on other platforms
17621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17622    MAKE_VERSION_EXPR="-e 4\."
17623    MAKE_REQUIRED_VERSION="4.0"
17624   else
17625    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17626    MAKE_REQUIRED_VERSION="3.81"
17627  fi
17628
17629  if test "x$MAKE_CANDIDATE" != x; then
17630    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17631$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17632    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17633    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17634    if test "x$IS_GNU_MAKE" = x; then
17635      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17636$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17637    else
17638      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17639      if test "x$IS_MODERN_MAKE" = x; then
17640        { $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
17641$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;}
17642      else
17643        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17644          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17645            MAKE_EXPECTED_ENV='cygwin'
17646          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17647            MAKE_EXPECTED_ENV='msys'
17648          else
17649            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17650          fi
17651          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17652          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17653        else
17654          # Not relevant for non-Windows
17655          IS_MAKE_CORRECT_ENV=true
17656        fi
17657        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17658          { $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
17659$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;}
17660        else
17661          FOUND_MAKE=$MAKE_CANDIDATE
17662
17663  # Only process if variable expands to non-empty
17664
17665  if test "x$FOUND_MAKE" != x; then
17666    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17667
17668  # First separate the path from the arguments. This will split at the first
17669  # space.
17670  complete="$FOUND_MAKE"
17671  path="${complete%% *}"
17672  tmp="$complete EOL"
17673  arguments="${tmp#* }"
17674
17675  # Input might be given as Windows format, start by converting to
17676  # unix format.
17677  new_path=`$CYGPATH -u "$path"`
17678
17679  # Now try to locate executable using which
17680  new_path=`$WHICH "$new_path" 2> /dev/null`
17681  # bat and cmd files are not always considered executable in cygwin causing which
17682  # to not find them
17683  if test "x$new_path" = x \
17684      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17685      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17686    new_path=`$CYGPATH -u "$path"`
17687  fi
17688  if test "x$new_path" = x; then
17689    # Oops. Which didn't find the executable.
17690    # The splitting of arguments from the executable at a space might have been incorrect,
17691    # since paths with space are more likely in Windows. Give it another try with the whole
17692    # argument.
17693    path="$complete"
17694    arguments="EOL"
17695    new_path=`$CYGPATH -u "$path"`
17696    new_path=`$WHICH "$new_path" 2> /dev/null`
17697    # bat and cmd files are not always considered executable in cygwin causing which
17698    # to not find them
17699    if test "x$new_path" = x \
17700        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17701        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17702      new_path=`$CYGPATH -u "$path"`
17703    fi
17704    if test "x$new_path" = x; then
17705      # It's still not found. Now this is an unrecoverable error.
17706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17707$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17708      has_space=`$ECHO "$complete" | $GREP " "`
17709      if test "x$has_space" != x; then
17710        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17711$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17712      fi
17713      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17714    fi
17715  fi
17716
17717  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17718  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17719  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17720  # "foo.exe" is OK but "foo" is an error.
17721  #
17722  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17723  # It is also a way to make sure we got the proper file name for the real test later on.
17724  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17725  if test "x$test_shortpath" = x; then
17726    # Short path failed, file does not exist as specified.
17727    # Try adding .exe or .cmd
17728    if test -f "${new_path}.exe"; then
17729      input_to_shortpath="${new_path}.exe"
17730    elif test -f "${new_path}.cmd"; then
17731      input_to_shortpath="${new_path}.cmd"
17732    else
17733      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17734$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17735      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17736$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17737      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17738    fi
17739  else
17740    input_to_shortpath="$new_path"
17741  fi
17742
17743  # Call helper function which possibly converts this using DOS-style short mode.
17744  # If so, the updated path is stored in $new_path.
17745  new_path="$input_to_shortpath"
17746
17747  input_path="$input_to_shortpath"
17748  # Check if we need to convert this using DOS-style short mode. If the path
17749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17750  # take no chances and rewrite it.
17751  # Note: m4 eats our [], so we need to use [ and ] instead.
17752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17753  if test "x$has_forbidden_chars" != x; then
17754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17758      # Going to short mode and back again did indeed matter. Since short mode is
17759      # case insensitive, let's make it lowercase to improve readability.
17760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17761      # Now convert it back to Unix-style (cygpath)
17762      input_path=`$CYGPATH -u "$shortmode_path"`
17763      new_path="$input_path"
17764    fi
17765  fi
17766
17767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17768  if test "x$test_cygdrive_prefix" = x; then
17769    # As a simple fix, exclude /usr/bin since it's not a real path.
17770    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17772      # a path prefixed by /cygdrive for fixpath to work.
17773      new_path="$CYGWIN_ROOT_PATH$input_path"
17774    fi
17775  fi
17776
17777  # remove trailing .exe if any
17778  new_path="${new_path/%.exe/}"
17779
17780    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17781
17782  # First separate the path from the arguments. This will split at the first
17783  # space.
17784  complete="$FOUND_MAKE"
17785  path="${complete%% *}"
17786  tmp="$complete EOL"
17787  arguments="${tmp#* }"
17788
17789  # Input might be given as Windows format, start by converting to
17790  # unix format.
17791  new_path="$path"
17792
17793  windows_path="$new_path"
17794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17795    unix_path=`$CYGPATH -u "$windows_path"`
17796    new_path="$unix_path"
17797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17799    new_path="$unix_path"
17800  fi
17801
17802
17803  # Now try to locate executable using which
17804  new_path=`$WHICH "$new_path" 2> /dev/null`
17805
17806  if test "x$new_path" = x; then
17807    # Oops. Which didn't find the executable.
17808    # The splitting of arguments from the executable at a space might have been incorrect,
17809    # since paths with space are more likely in Windows. Give it another try with the whole
17810    # argument.
17811    path="$complete"
17812    arguments="EOL"
17813    new_path="$path"
17814
17815  windows_path="$new_path"
17816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17817    unix_path=`$CYGPATH -u "$windows_path"`
17818    new_path="$unix_path"
17819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17821    new_path="$unix_path"
17822  fi
17823
17824
17825    new_path=`$WHICH "$new_path" 2> /dev/null`
17826    # bat and cmd files are not always considered executable in MSYS causing which
17827    # to not find them
17828    if test "x$new_path" = x \
17829        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17830        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17831      new_path="$path"
17832
17833  windows_path="$new_path"
17834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17835    unix_path=`$CYGPATH -u "$windows_path"`
17836    new_path="$unix_path"
17837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17839    new_path="$unix_path"
17840  fi
17841
17842    fi
17843
17844    if test "x$new_path" = x; then
17845      # It's still not found. Now this is an unrecoverable error.
17846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17847$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17848      has_space=`$ECHO "$complete" | $GREP " "`
17849      if test "x$has_space" != x; then
17850        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17851$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17852      fi
17853      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17854    fi
17855  fi
17856
17857  # Now new_path has a complete unix path to the binary
17858  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17859    # Keep paths in /bin as-is, but remove trailing .exe if any
17860    new_path="${new_path/%.exe/}"
17861    # Do not save /bin paths to all_fixpath_prefixes!
17862  else
17863    # Not in mixed or Windows style, start by that.
17864    new_path=`cmd //c echo $new_path`
17865
17866  input_path="$new_path"
17867  # Check if we need to convert this using DOS-style short mode. If the path
17868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17869  # take no chances and rewrite it.
17870  # Note: m4 eats our [], so we need to use [ and ] instead.
17871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17872  if test "x$has_forbidden_chars" != x; then
17873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17875  fi
17876
17877    # Output is in $new_path
17878
17879  windows_path="$new_path"
17880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17881    unix_path=`$CYGPATH -u "$windows_path"`
17882    new_path="$unix_path"
17883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17885    new_path="$unix_path"
17886  fi
17887
17888    # remove trailing .exe if any
17889    new_path="${new_path/%.exe/}"
17890
17891    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17892    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17893  fi
17894
17895    else
17896      # We're on a unix platform. Hooray! :)
17897      # First separate the path from the arguments. This will split at the first
17898      # space.
17899      complete="$FOUND_MAKE"
17900      path="${complete%% *}"
17901      tmp="$complete EOL"
17902      arguments="${tmp#* }"
17903
17904      # Cannot rely on the command "which" here since it doesn't always work.
17905      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17906      if test -z "$is_absolute_path"; then
17907        # Path to executable is not absolute. Find it.
17908        IFS_save="$IFS"
17909        IFS=:
17910        for p in $PATH; do
17911          if test -f "$p/$path" && test -x "$p/$path"; then
17912            new_path="$p/$path"
17913            break
17914          fi
17915        done
17916        IFS="$IFS_save"
17917      else
17918        # This is an absolute path, we can use it without further modifications.
17919        new_path="$path"
17920      fi
17921
17922      if test "x$new_path" = x; then
17923        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17924$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17925        has_space=`$ECHO "$complete" | $GREP " "`
17926        if test "x$has_space" != x; then
17927          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17928$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17929        fi
17930        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17931      fi
17932    fi
17933
17934    # Now join together the path and the arguments once again
17935    if test "x$arguments" != xEOL; then
17936      new_complete="$new_path ${arguments% *}"
17937    else
17938      new_complete="$new_path"
17939    fi
17940
17941    if test "x$complete" != "x$new_complete"; then
17942      FOUND_MAKE="$new_complete"
17943      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17944$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17945    fi
17946  fi
17947
17948        fi
17949      fi
17950    fi
17951  fi
17952
17953
17954    if test "x$FOUND_MAKE" = x; then
17955      for ac_prog in make
17956do
17957  # Extract the first word of "$ac_prog", so it can be a program name with args.
17958set dummy $ac_prog; ac_word=$2
17959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17960$as_echo_n "checking for $ac_word... " >&6; }
17961if ${ac_cv_path_CHECK_MAKE+:} false; then :
17962  $as_echo_n "(cached) " >&6
17963else
17964  case $CHECK_MAKE in
17965  [\\/]* | ?:[\\/]*)
17966  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17967  ;;
17968  *)
17969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17970for as_dir in $PATH
17971do
17972  IFS=$as_save_IFS
17973  test -z "$as_dir" && as_dir=.
17974    for ac_exec_ext in '' $ac_executable_extensions; do
17975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17976    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17978    break 2
17979  fi
17980done
17981  done
17982IFS=$as_save_IFS
17983
17984  ;;
17985esac
17986fi
17987CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17988if test -n "$CHECK_MAKE"; then
17989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17990$as_echo "$CHECK_MAKE" >&6; }
17991else
17992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17993$as_echo "no" >&6; }
17994fi
17995
17996
17997  test -n "$CHECK_MAKE" && break
17998done
17999
18000
18001  MAKE_CANDIDATE=""$CHECK_MAKE""
18002  DESCRIPTION="make in PATH"
18003
18004  # On Cygwin, we require a newer version of make than on other platforms
18005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18006    MAKE_VERSION_EXPR="-e 4\."
18007    MAKE_REQUIRED_VERSION="4.0"
18008   else
18009    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18010    MAKE_REQUIRED_VERSION="3.81"
18011  fi
18012
18013  if test "x$MAKE_CANDIDATE" != x; then
18014    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18015$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18016    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18017    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18018    if test "x$IS_GNU_MAKE" = x; then
18019      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18020$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18021    else
18022      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18023      if test "x$IS_MODERN_MAKE" = x; then
18024        { $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
18025$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;}
18026      else
18027        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18028          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18029            MAKE_EXPECTED_ENV='cygwin'
18030          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18031            MAKE_EXPECTED_ENV='msys'
18032          else
18033            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18034          fi
18035          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18036          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18037        else
18038          # Not relevant for non-Windows
18039          IS_MAKE_CORRECT_ENV=true
18040        fi
18041        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18042          { $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
18043$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;}
18044        else
18045          FOUND_MAKE=$MAKE_CANDIDATE
18046
18047  # Only process if variable expands to non-empty
18048
18049  if test "x$FOUND_MAKE" != x; then
18050    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18051
18052  # First separate the path from the arguments. This will split at the first
18053  # space.
18054  complete="$FOUND_MAKE"
18055  path="${complete%% *}"
18056  tmp="$complete EOL"
18057  arguments="${tmp#* }"
18058
18059  # Input might be given as Windows format, start by converting to
18060  # unix format.
18061  new_path=`$CYGPATH -u "$path"`
18062
18063  # Now try to locate executable using which
18064  new_path=`$WHICH "$new_path" 2> /dev/null`
18065  # bat and cmd files are not always considered executable in cygwin causing which
18066  # to not find them
18067  if test "x$new_path" = x \
18068      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18069      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18070    new_path=`$CYGPATH -u "$path"`
18071  fi
18072  if test "x$new_path" = x; then
18073    # Oops. Which didn't find the executable.
18074    # The splitting of arguments from the executable at a space might have been incorrect,
18075    # since paths with space are more likely in Windows. Give it another try with the whole
18076    # argument.
18077    path="$complete"
18078    arguments="EOL"
18079    new_path=`$CYGPATH -u "$path"`
18080    new_path=`$WHICH "$new_path" 2> /dev/null`
18081    # bat and cmd files are not always considered executable in cygwin causing which
18082    # to not find them
18083    if test "x$new_path" = x \
18084        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18085        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18086      new_path=`$CYGPATH -u "$path"`
18087    fi
18088    if test "x$new_path" = x; then
18089      # It's still not found. Now this is an unrecoverable error.
18090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18091$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18092      has_space=`$ECHO "$complete" | $GREP " "`
18093      if test "x$has_space" != x; then
18094        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18095$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18096      fi
18097      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18098    fi
18099  fi
18100
18101  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18102  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18103  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18104  # "foo.exe" is OK but "foo" is an error.
18105  #
18106  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18107  # It is also a way to make sure we got the proper file name for the real test later on.
18108  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18109  if test "x$test_shortpath" = x; then
18110    # Short path failed, file does not exist as specified.
18111    # Try adding .exe or .cmd
18112    if test -f "${new_path}.exe"; then
18113      input_to_shortpath="${new_path}.exe"
18114    elif test -f "${new_path}.cmd"; then
18115      input_to_shortpath="${new_path}.cmd"
18116    else
18117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18118$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18119      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18120$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18121      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18122    fi
18123  else
18124    input_to_shortpath="$new_path"
18125  fi
18126
18127  # Call helper function which possibly converts this using DOS-style short mode.
18128  # If so, the updated path is stored in $new_path.
18129  new_path="$input_to_shortpath"
18130
18131  input_path="$input_to_shortpath"
18132  # Check if we need to convert this using DOS-style short mode. If the path
18133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18134  # take no chances and rewrite it.
18135  # Note: m4 eats our [], so we need to use [ and ] instead.
18136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18137  if test "x$has_forbidden_chars" != x; then
18138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18139    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18140    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18141    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18142      # Going to short mode and back again did indeed matter. Since short mode is
18143      # case insensitive, let's make it lowercase to improve readability.
18144      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18145      # Now convert it back to Unix-style (cygpath)
18146      input_path=`$CYGPATH -u "$shortmode_path"`
18147      new_path="$input_path"
18148    fi
18149  fi
18150
18151  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18152  if test "x$test_cygdrive_prefix" = x; then
18153    # As a simple fix, exclude /usr/bin since it's not a real path.
18154    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18155      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18156      # a path prefixed by /cygdrive for fixpath to work.
18157      new_path="$CYGWIN_ROOT_PATH$input_path"
18158    fi
18159  fi
18160
18161  # remove trailing .exe if any
18162  new_path="${new_path/%.exe/}"
18163
18164    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18165
18166  # First separate the path from the arguments. This will split at the first
18167  # space.
18168  complete="$FOUND_MAKE"
18169  path="${complete%% *}"
18170  tmp="$complete EOL"
18171  arguments="${tmp#* }"
18172
18173  # Input might be given as Windows format, start by converting to
18174  # unix format.
18175  new_path="$path"
18176
18177  windows_path="$new_path"
18178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18179    unix_path=`$CYGPATH -u "$windows_path"`
18180    new_path="$unix_path"
18181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18183    new_path="$unix_path"
18184  fi
18185
18186
18187  # Now try to locate executable using which
18188  new_path=`$WHICH "$new_path" 2> /dev/null`
18189
18190  if test "x$new_path" = x; then
18191    # Oops. Which didn't find the executable.
18192    # The splitting of arguments from the executable at a space might have been incorrect,
18193    # since paths with space are more likely in Windows. Give it another try with the whole
18194    # argument.
18195    path="$complete"
18196    arguments="EOL"
18197    new_path="$path"
18198
18199  windows_path="$new_path"
18200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18201    unix_path=`$CYGPATH -u "$windows_path"`
18202    new_path="$unix_path"
18203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18205    new_path="$unix_path"
18206  fi
18207
18208
18209    new_path=`$WHICH "$new_path" 2> /dev/null`
18210    # bat and cmd files are not always considered executable in MSYS causing which
18211    # to not find them
18212    if test "x$new_path" = x \
18213        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18214        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18215      new_path="$path"
18216
18217  windows_path="$new_path"
18218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18219    unix_path=`$CYGPATH -u "$windows_path"`
18220    new_path="$unix_path"
18221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18223    new_path="$unix_path"
18224  fi
18225
18226    fi
18227
18228    if test "x$new_path" = x; then
18229      # It's still not found. Now this is an unrecoverable error.
18230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18231$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18232      has_space=`$ECHO "$complete" | $GREP " "`
18233      if test "x$has_space" != x; then
18234        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18235$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18236      fi
18237      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18238    fi
18239  fi
18240
18241  # Now new_path has a complete unix path to the binary
18242  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18243    # Keep paths in /bin as-is, but remove trailing .exe if any
18244    new_path="${new_path/%.exe/}"
18245    # Do not save /bin paths to all_fixpath_prefixes!
18246  else
18247    # Not in mixed or Windows style, start by that.
18248    new_path=`cmd //c echo $new_path`
18249
18250  input_path="$new_path"
18251  # Check if we need to convert this using DOS-style short mode. If the path
18252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18253  # take no chances and rewrite it.
18254  # Note: m4 eats our [], so we need to use [ and ] instead.
18255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18256  if test "x$has_forbidden_chars" != x; then
18257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18258    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18259  fi
18260
18261    # Output is in $new_path
18262
18263  windows_path="$new_path"
18264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18265    unix_path=`$CYGPATH -u "$windows_path"`
18266    new_path="$unix_path"
18267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18269    new_path="$unix_path"
18270  fi
18271
18272    # remove trailing .exe if any
18273    new_path="${new_path/%.exe/}"
18274
18275    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18276    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18277  fi
18278
18279    else
18280      # We're on a unix platform. Hooray! :)
18281      # First separate the path from the arguments. This will split at the first
18282      # space.
18283      complete="$FOUND_MAKE"
18284      path="${complete%% *}"
18285      tmp="$complete EOL"
18286      arguments="${tmp#* }"
18287
18288      # Cannot rely on the command "which" here since it doesn't always work.
18289      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18290      if test -z "$is_absolute_path"; then
18291        # Path to executable is not absolute. Find it.
18292        IFS_save="$IFS"
18293        IFS=:
18294        for p in $PATH; do
18295          if test -f "$p/$path" && test -x "$p/$path"; then
18296            new_path="$p/$path"
18297            break
18298          fi
18299        done
18300        IFS="$IFS_save"
18301      else
18302        # This is an absolute path, we can use it without further modifications.
18303        new_path="$path"
18304      fi
18305
18306      if test "x$new_path" = x; then
18307        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18308$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18309        has_space=`$ECHO "$complete" | $GREP " "`
18310        if test "x$has_space" != x; then
18311          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18312$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18313        fi
18314        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18315      fi
18316    fi
18317
18318    # Now join together the path and the arguments once again
18319    if test "x$arguments" != xEOL; then
18320      new_complete="$new_path ${arguments% *}"
18321    else
18322      new_complete="$new_path"
18323    fi
18324
18325    if test "x$complete" != "x$new_complete"; then
18326      FOUND_MAKE="$new_complete"
18327      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18328$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18329    fi
18330  fi
18331
18332        fi
18333      fi
18334    fi
18335  fi
18336
18337    fi
18338
18339    if test "x$FOUND_MAKE" = x; then
18340      if test "x$TOOLCHAIN_PATH" != x; then
18341        # We have a toolchain path, check that as well before giving up.
18342        OLD_PATH=$PATH
18343        PATH=$TOOLCHAIN_PATH:$PATH
18344        for ac_prog in gmake
18345do
18346  # Extract the first word of "$ac_prog", so it can be a program name with args.
18347set dummy $ac_prog; ac_word=$2
18348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18349$as_echo_n "checking for $ac_word... " >&6; }
18350if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18351  $as_echo_n "(cached) " >&6
18352else
18353  case $CHECK_TOOLSDIR_GMAKE in
18354  [\\/]* | ?:[\\/]*)
18355  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18356  ;;
18357  *)
18358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18359for as_dir in $PATH
18360do
18361  IFS=$as_save_IFS
18362  test -z "$as_dir" && as_dir=.
18363    for ac_exec_ext in '' $ac_executable_extensions; do
18364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18365    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18367    break 2
18368  fi
18369done
18370  done
18371IFS=$as_save_IFS
18372
18373  ;;
18374esac
18375fi
18376CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18377if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18379$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18380else
18381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18382$as_echo "no" >&6; }
18383fi
18384
18385
18386  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18387done
18388
18389
18390  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18391  DESCRIPTION="gmake in tools-dir"
18392
18393  # On Cygwin, we require a newer version of make than on other platforms
18394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18395    MAKE_VERSION_EXPR="-e 4\."
18396    MAKE_REQUIRED_VERSION="4.0"
18397   else
18398    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18399    MAKE_REQUIRED_VERSION="3.81"
18400  fi
18401
18402  if test "x$MAKE_CANDIDATE" != x; then
18403    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18404$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18405    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18406    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18407    if test "x$IS_GNU_MAKE" = x; then
18408      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18409$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18410    else
18411      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18412      if test "x$IS_MODERN_MAKE" = x; then
18413        { $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
18414$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;}
18415      else
18416        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18417          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18418            MAKE_EXPECTED_ENV='cygwin'
18419          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18420            MAKE_EXPECTED_ENV='msys'
18421          else
18422            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18423          fi
18424          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18425          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18426        else
18427          # Not relevant for non-Windows
18428          IS_MAKE_CORRECT_ENV=true
18429        fi
18430        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18431          { $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
18432$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;}
18433        else
18434          FOUND_MAKE=$MAKE_CANDIDATE
18435
18436  # Only process if variable expands to non-empty
18437
18438  if test "x$FOUND_MAKE" != x; then
18439    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18440
18441  # First separate the path from the arguments. This will split at the first
18442  # space.
18443  complete="$FOUND_MAKE"
18444  path="${complete%% *}"
18445  tmp="$complete EOL"
18446  arguments="${tmp#* }"
18447
18448  # Input might be given as Windows format, start by converting to
18449  # unix format.
18450  new_path=`$CYGPATH -u "$path"`
18451
18452  # Now try to locate executable using which
18453  new_path=`$WHICH "$new_path" 2> /dev/null`
18454  # bat and cmd files are not always considered executable in cygwin causing which
18455  # to not find them
18456  if test "x$new_path" = x \
18457      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18458      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18459    new_path=`$CYGPATH -u "$path"`
18460  fi
18461  if test "x$new_path" = x; then
18462    # Oops. Which didn't find the executable.
18463    # The splitting of arguments from the executable at a space might have been incorrect,
18464    # since paths with space are more likely in Windows. Give it another try with the whole
18465    # argument.
18466    path="$complete"
18467    arguments="EOL"
18468    new_path=`$CYGPATH -u "$path"`
18469    new_path=`$WHICH "$new_path" 2> /dev/null`
18470    # bat and cmd files are not always considered executable in cygwin causing which
18471    # to not find them
18472    if test "x$new_path" = x \
18473        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18474        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18475      new_path=`$CYGPATH -u "$path"`
18476    fi
18477    if test "x$new_path" = x; then
18478      # It's still not found. Now this is an unrecoverable error.
18479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18480$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18481      has_space=`$ECHO "$complete" | $GREP " "`
18482      if test "x$has_space" != x; then
18483        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18484$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18485      fi
18486      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18487    fi
18488  fi
18489
18490  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18491  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18492  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18493  # "foo.exe" is OK but "foo" is an error.
18494  #
18495  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18496  # It is also a way to make sure we got the proper file name for the real test later on.
18497  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18498  if test "x$test_shortpath" = x; then
18499    # Short path failed, file does not exist as specified.
18500    # Try adding .exe or .cmd
18501    if test -f "${new_path}.exe"; then
18502      input_to_shortpath="${new_path}.exe"
18503    elif test -f "${new_path}.cmd"; then
18504      input_to_shortpath="${new_path}.cmd"
18505    else
18506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18507$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18508      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18509$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18510      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18511    fi
18512  else
18513    input_to_shortpath="$new_path"
18514  fi
18515
18516  # Call helper function which possibly converts this using DOS-style short mode.
18517  # If so, the updated path is stored in $new_path.
18518  new_path="$input_to_shortpath"
18519
18520  input_path="$input_to_shortpath"
18521  # Check if we need to convert this using DOS-style short mode. If the path
18522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18523  # take no chances and rewrite it.
18524  # Note: m4 eats our [], so we need to use [ and ] instead.
18525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18526  if test "x$has_forbidden_chars" != x; then
18527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18528    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18529    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18530    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18531      # Going to short mode and back again did indeed matter. Since short mode is
18532      # case insensitive, let's make it lowercase to improve readability.
18533      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18534      # Now convert it back to Unix-style (cygpath)
18535      input_path=`$CYGPATH -u "$shortmode_path"`
18536      new_path="$input_path"
18537    fi
18538  fi
18539
18540  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18541  if test "x$test_cygdrive_prefix" = x; then
18542    # As a simple fix, exclude /usr/bin since it's not a real path.
18543    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18544      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18545      # a path prefixed by /cygdrive for fixpath to work.
18546      new_path="$CYGWIN_ROOT_PATH$input_path"
18547    fi
18548  fi
18549
18550  # remove trailing .exe if any
18551  new_path="${new_path/%.exe/}"
18552
18553    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18554
18555  # First separate the path from the arguments. This will split at the first
18556  # space.
18557  complete="$FOUND_MAKE"
18558  path="${complete%% *}"
18559  tmp="$complete EOL"
18560  arguments="${tmp#* }"
18561
18562  # Input might be given as Windows format, start by converting to
18563  # unix format.
18564  new_path="$path"
18565
18566  windows_path="$new_path"
18567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18568    unix_path=`$CYGPATH -u "$windows_path"`
18569    new_path="$unix_path"
18570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18572    new_path="$unix_path"
18573  fi
18574
18575
18576  # Now try to locate executable using which
18577  new_path=`$WHICH "$new_path" 2> /dev/null`
18578
18579  if test "x$new_path" = x; then
18580    # Oops. Which didn't find the executable.
18581    # The splitting of arguments from the executable at a space might have been incorrect,
18582    # since paths with space are more likely in Windows. Give it another try with the whole
18583    # argument.
18584    path="$complete"
18585    arguments="EOL"
18586    new_path="$path"
18587
18588  windows_path="$new_path"
18589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18590    unix_path=`$CYGPATH -u "$windows_path"`
18591    new_path="$unix_path"
18592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18594    new_path="$unix_path"
18595  fi
18596
18597
18598    new_path=`$WHICH "$new_path" 2> /dev/null`
18599    # bat and cmd files are not always considered executable in MSYS causing which
18600    # to not find them
18601    if test "x$new_path" = x \
18602        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18603        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18604      new_path="$path"
18605
18606  windows_path="$new_path"
18607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18608    unix_path=`$CYGPATH -u "$windows_path"`
18609    new_path="$unix_path"
18610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18612    new_path="$unix_path"
18613  fi
18614
18615    fi
18616
18617    if test "x$new_path" = x; then
18618      # It's still not found. Now this is an unrecoverable error.
18619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18620$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18621      has_space=`$ECHO "$complete" | $GREP " "`
18622      if test "x$has_space" != x; then
18623        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18624$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18625      fi
18626      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18627    fi
18628  fi
18629
18630  # Now new_path has a complete unix path to the binary
18631  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18632    # Keep paths in /bin as-is, but remove trailing .exe if any
18633    new_path="${new_path/%.exe/}"
18634    # Do not save /bin paths to all_fixpath_prefixes!
18635  else
18636    # Not in mixed or Windows style, start by that.
18637    new_path=`cmd //c echo $new_path`
18638
18639  input_path="$new_path"
18640  # Check if we need to convert this using DOS-style short mode. If the path
18641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18642  # take no chances and rewrite it.
18643  # Note: m4 eats our [], so we need to use [ and ] instead.
18644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18645  if test "x$has_forbidden_chars" != x; then
18646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18647    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18648  fi
18649
18650    # Output is in $new_path
18651
18652  windows_path="$new_path"
18653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18654    unix_path=`$CYGPATH -u "$windows_path"`
18655    new_path="$unix_path"
18656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18658    new_path="$unix_path"
18659  fi
18660
18661    # remove trailing .exe if any
18662    new_path="${new_path/%.exe/}"
18663
18664    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18665    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18666  fi
18667
18668    else
18669      # We're on a unix platform. Hooray! :)
18670      # First separate the path from the arguments. This will split at the first
18671      # space.
18672      complete="$FOUND_MAKE"
18673      path="${complete%% *}"
18674      tmp="$complete EOL"
18675      arguments="${tmp#* }"
18676
18677      # Cannot rely on the command "which" here since it doesn't always work.
18678      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18679      if test -z "$is_absolute_path"; then
18680        # Path to executable is not absolute. Find it.
18681        IFS_save="$IFS"
18682        IFS=:
18683        for p in $PATH; do
18684          if test -f "$p/$path" && test -x "$p/$path"; then
18685            new_path="$p/$path"
18686            break
18687          fi
18688        done
18689        IFS="$IFS_save"
18690      else
18691        # This is an absolute path, we can use it without further modifications.
18692        new_path="$path"
18693      fi
18694
18695      if test "x$new_path" = x; then
18696        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18697$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18698        has_space=`$ECHO "$complete" | $GREP " "`
18699        if test "x$has_space" != x; then
18700          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18701$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18702        fi
18703        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18704      fi
18705    fi
18706
18707    # Now join together the path and the arguments once again
18708    if test "x$arguments" != xEOL; then
18709      new_complete="$new_path ${arguments% *}"
18710    else
18711      new_complete="$new_path"
18712    fi
18713
18714    if test "x$complete" != "x$new_complete"; then
18715      FOUND_MAKE="$new_complete"
18716      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18717$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18718    fi
18719  fi
18720
18721        fi
18722      fi
18723    fi
18724  fi
18725
18726        if test "x$FOUND_MAKE" = x; then
18727          for ac_prog in make
18728do
18729  # Extract the first word of "$ac_prog", so it can be a program name with args.
18730set dummy $ac_prog; ac_word=$2
18731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18732$as_echo_n "checking for $ac_word... " >&6; }
18733if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18734  $as_echo_n "(cached) " >&6
18735else
18736  case $CHECK_TOOLSDIR_MAKE in
18737  [\\/]* | ?:[\\/]*)
18738  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18739  ;;
18740  *)
18741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18742for as_dir in $PATH
18743do
18744  IFS=$as_save_IFS
18745  test -z "$as_dir" && as_dir=.
18746    for ac_exec_ext in '' $ac_executable_extensions; do
18747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18748    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18750    break 2
18751  fi
18752done
18753  done
18754IFS=$as_save_IFS
18755
18756  ;;
18757esac
18758fi
18759CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18760if test -n "$CHECK_TOOLSDIR_MAKE"; then
18761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18762$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18763else
18764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18765$as_echo "no" >&6; }
18766fi
18767
18768
18769  test -n "$CHECK_TOOLSDIR_MAKE" && break
18770done
18771
18772
18773  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18774  DESCRIPTION="make in tools-dir"
18775
18776  # On Cygwin, we require a newer version of make than on other platforms
18777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18778    MAKE_VERSION_EXPR="-e 4\."
18779    MAKE_REQUIRED_VERSION="4.0"
18780   else
18781    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18782    MAKE_REQUIRED_VERSION="3.81"
18783  fi
18784
18785  if test "x$MAKE_CANDIDATE" != x; then
18786    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18787$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18788    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18789    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18790    if test "x$IS_GNU_MAKE" = x; then
18791      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18792$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18793    else
18794      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18795      if test "x$IS_MODERN_MAKE" = x; then
18796        { $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
18797$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;}
18798      else
18799        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18800          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18801            MAKE_EXPECTED_ENV='cygwin'
18802          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18803            MAKE_EXPECTED_ENV='msys'
18804          else
18805            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18806          fi
18807          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18808          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18809        else
18810          # Not relevant for non-Windows
18811          IS_MAKE_CORRECT_ENV=true
18812        fi
18813        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18814          { $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
18815$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;}
18816        else
18817          FOUND_MAKE=$MAKE_CANDIDATE
18818
18819  # Only process if variable expands to non-empty
18820
18821  if test "x$FOUND_MAKE" != x; then
18822    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18823
18824  # First separate the path from the arguments. This will split at the first
18825  # space.
18826  complete="$FOUND_MAKE"
18827  path="${complete%% *}"
18828  tmp="$complete EOL"
18829  arguments="${tmp#* }"
18830
18831  # Input might be given as Windows format, start by converting to
18832  # unix format.
18833  new_path=`$CYGPATH -u "$path"`
18834
18835  # Now try to locate executable using which
18836  new_path=`$WHICH "$new_path" 2> /dev/null`
18837  # bat and cmd files are not always considered executable in cygwin causing which
18838  # to not find them
18839  if test "x$new_path" = x \
18840      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18841      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18842    new_path=`$CYGPATH -u "$path"`
18843  fi
18844  if test "x$new_path" = x; then
18845    # Oops. Which didn't find the executable.
18846    # The splitting of arguments from the executable at a space might have been incorrect,
18847    # since paths with space are more likely in Windows. Give it another try with the whole
18848    # argument.
18849    path="$complete"
18850    arguments="EOL"
18851    new_path=`$CYGPATH -u "$path"`
18852    new_path=`$WHICH "$new_path" 2> /dev/null`
18853    # bat and cmd files are not always considered executable in cygwin causing which
18854    # to not find them
18855    if test "x$new_path" = x \
18856        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18857        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18858      new_path=`$CYGPATH -u "$path"`
18859    fi
18860    if test "x$new_path" = x; then
18861      # It's still not found. Now this is an unrecoverable error.
18862      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18863$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18864      has_space=`$ECHO "$complete" | $GREP " "`
18865      if test "x$has_space" != x; then
18866        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18867$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18868      fi
18869      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18870    fi
18871  fi
18872
18873  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18874  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18875  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18876  # "foo.exe" is OK but "foo" is an error.
18877  #
18878  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18879  # It is also a way to make sure we got the proper file name for the real test later on.
18880  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18881  if test "x$test_shortpath" = x; then
18882    # Short path failed, file does not exist as specified.
18883    # Try adding .exe or .cmd
18884    if test -f "${new_path}.exe"; then
18885      input_to_shortpath="${new_path}.exe"
18886    elif test -f "${new_path}.cmd"; then
18887      input_to_shortpath="${new_path}.cmd"
18888    else
18889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18890$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18891      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18892$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18893      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18894    fi
18895  else
18896    input_to_shortpath="$new_path"
18897  fi
18898
18899  # Call helper function which possibly converts this using DOS-style short mode.
18900  # If so, the updated path is stored in $new_path.
18901  new_path="$input_to_shortpath"
18902
18903  input_path="$input_to_shortpath"
18904  # Check if we need to convert this using DOS-style short mode. If the path
18905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18906  # take no chances and rewrite it.
18907  # Note: m4 eats our [], so we need to use [ and ] instead.
18908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18909  if test "x$has_forbidden_chars" != x; then
18910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18911    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18912    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18913    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18914      # Going to short mode and back again did indeed matter. Since short mode is
18915      # case insensitive, let's make it lowercase to improve readability.
18916      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18917      # Now convert it back to Unix-style (cygpath)
18918      input_path=`$CYGPATH -u "$shortmode_path"`
18919      new_path="$input_path"
18920    fi
18921  fi
18922
18923  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18924  if test "x$test_cygdrive_prefix" = x; then
18925    # As a simple fix, exclude /usr/bin since it's not a real path.
18926    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18927      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18928      # a path prefixed by /cygdrive for fixpath to work.
18929      new_path="$CYGWIN_ROOT_PATH$input_path"
18930    fi
18931  fi
18932
18933  # remove trailing .exe if any
18934  new_path="${new_path/%.exe/}"
18935
18936    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18937
18938  # First separate the path from the arguments. This will split at the first
18939  # space.
18940  complete="$FOUND_MAKE"
18941  path="${complete%% *}"
18942  tmp="$complete EOL"
18943  arguments="${tmp#* }"
18944
18945  # Input might be given as Windows format, start by converting to
18946  # unix format.
18947  new_path="$path"
18948
18949  windows_path="$new_path"
18950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18951    unix_path=`$CYGPATH -u "$windows_path"`
18952    new_path="$unix_path"
18953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18955    new_path="$unix_path"
18956  fi
18957
18958
18959  # Now try to locate executable using which
18960  new_path=`$WHICH "$new_path" 2> /dev/null`
18961
18962  if test "x$new_path" = x; then
18963    # Oops. Which didn't find the executable.
18964    # The splitting of arguments from the executable at a space might have been incorrect,
18965    # since paths with space are more likely in Windows. Give it another try with the whole
18966    # argument.
18967    path="$complete"
18968    arguments="EOL"
18969    new_path="$path"
18970
18971  windows_path="$new_path"
18972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18973    unix_path=`$CYGPATH -u "$windows_path"`
18974    new_path="$unix_path"
18975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18977    new_path="$unix_path"
18978  fi
18979
18980
18981    new_path=`$WHICH "$new_path" 2> /dev/null`
18982    # bat and cmd files are not always considered executable in MSYS causing which
18983    # to not find them
18984    if test "x$new_path" = x \
18985        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18986        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18987      new_path="$path"
18988
18989  windows_path="$new_path"
18990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18991    unix_path=`$CYGPATH -u "$windows_path"`
18992    new_path="$unix_path"
18993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18995    new_path="$unix_path"
18996  fi
18997
18998    fi
18999
19000    if test "x$new_path" = x; then
19001      # It's still not found. Now this is an unrecoverable error.
19002      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19003$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19004      has_space=`$ECHO "$complete" | $GREP " "`
19005      if test "x$has_space" != x; then
19006        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19007$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19008      fi
19009      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19010    fi
19011  fi
19012
19013  # Now new_path has a complete unix path to the binary
19014  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19015    # Keep paths in /bin as-is, but remove trailing .exe if any
19016    new_path="${new_path/%.exe/}"
19017    # Do not save /bin paths to all_fixpath_prefixes!
19018  else
19019    # Not in mixed or Windows style, start by that.
19020    new_path=`cmd //c echo $new_path`
19021
19022  input_path="$new_path"
19023  # Check if we need to convert this using DOS-style short mode. If the path
19024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19025  # take no chances and rewrite it.
19026  # Note: m4 eats our [], so we need to use [ and ] instead.
19027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19028  if test "x$has_forbidden_chars" != x; then
19029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19030    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19031  fi
19032
19033    # Output is in $new_path
19034
19035  windows_path="$new_path"
19036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19037    unix_path=`$CYGPATH -u "$windows_path"`
19038    new_path="$unix_path"
19039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19041    new_path="$unix_path"
19042  fi
19043
19044    # remove trailing .exe if any
19045    new_path="${new_path/%.exe/}"
19046
19047    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19048    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19049  fi
19050
19051    else
19052      # We're on a unix platform. Hooray! :)
19053      # First separate the path from the arguments. This will split at the first
19054      # space.
19055      complete="$FOUND_MAKE"
19056      path="${complete%% *}"
19057      tmp="$complete EOL"
19058      arguments="${tmp#* }"
19059
19060      # Cannot rely on the command "which" here since it doesn't always work.
19061      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19062      if test -z "$is_absolute_path"; then
19063        # Path to executable is not absolute. Find it.
19064        IFS_save="$IFS"
19065        IFS=:
19066        for p in $PATH; do
19067          if test -f "$p/$path" && test -x "$p/$path"; then
19068            new_path="$p/$path"
19069            break
19070          fi
19071        done
19072        IFS="$IFS_save"
19073      else
19074        # This is an absolute path, we can use it without further modifications.
19075        new_path="$path"
19076      fi
19077
19078      if test "x$new_path" = x; then
19079        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19080$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19081        has_space=`$ECHO "$complete" | $GREP " "`
19082        if test "x$has_space" != x; then
19083          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19084$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19085        fi
19086        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19087      fi
19088    fi
19089
19090    # Now join together the path and the arguments once again
19091    if test "x$arguments" != xEOL; then
19092      new_complete="$new_path ${arguments% *}"
19093    else
19094      new_complete="$new_path"
19095    fi
19096
19097    if test "x$complete" != "x$new_complete"; then
19098      FOUND_MAKE="$new_complete"
19099      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19100$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19101    fi
19102  fi
19103
19104        fi
19105      fi
19106    fi
19107  fi
19108
19109        fi
19110        PATH=$OLD_PATH
19111      fi
19112    fi
19113
19114    if test "x$FOUND_MAKE" = x; then
19115      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
19116    fi
19117
19118  else
19119    # The variable is set, but is it from the command line or the environment?
19120
19121    # Try to remove the string !MAKE! from our list.
19122    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19123    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19124      # If it failed, the variable was not from the command line. Ignore it,
19125      # but warn the user (except for BASH, which is always set by the calling BASH).
19126      if test "xMAKE" != xBASH; then
19127        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19128$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19129      fi
19130      # Try to locate tool using the code snippet
19131
19132    # Try our hardest to locate a correct version of GNU make
19133    for ac_prog in gmake
19134do
19135  # Extract the first word of "$ac_prog", so it can be a program name with args.
19136set dummy $ac_prog; ac_word=$2
19137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19138$as_echo_n "checking for $ac_word... " >&6; }
19139if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19140  $as_echo_n "(cached) " >&6
19141else
19142  case $CHECK_GMAKE in
19143  [\\/]* | ?:[\\/]*)
19144  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19145  ;;
19146  *)
19147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19148for as_dir in $PATH
19149do
19150  IFS=$as_save_IFS
19151  test -z "$as_dir" && as_dir=.
19152    for ac_exec_ext in '' $ac_executable_extensions; do
19153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19154    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19156    break 2
19157  fi
19158done
19159  done
19160IFS=$as_save_IFS
19161
19162  ;;
19163esac
19164fi
19165CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19166if test -n "$CHECK_GMAKE"; then
19167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19168$as_echo "$CHECK_GMAKE" >&6; }
19169else
19170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19171$as_echo "no" >&6; }
19172fi
19173
19174
19175  test -n "$CHECK_GMAKE" && break
19176done
19177
19178
19179  MAKE_CANDIDATE=""$CHECK_GMAKE""
19180  DESCRIPTION="gmake in PATH"
19181
19182  # On Cygwin, we require a newer version of make than on other platforms
19183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19184    MAKE_VERSION_EXPR="-e 4\."
19185    MAKE_REQUIRED_VERSION="4.0"
19186   else
19187    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19188    MAKE_REQUIRED_VERSION="3.81"
19189  fi
19190
19191  if test "x$MAKE_CANDIDATE" != x; then
19192    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19193$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19194    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19195    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19196    if test "x$IS_GNU_MAKE" = x; then
19197      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19198$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19199    else
19200      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19201      if test "x$IS_MODERN_MAKE" = x; then
19202        { $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
19203$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;}
19204      else
19205        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19206          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19207            MAKE_EXPECTED_ENV='cygwin'
19208          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19209            MAKE_EXPECTED_ENV='msys'
19210          else
19211            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19212          fi
19213          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19214          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19215        else
19216          # Not relevant for non-Windows
19217          IS_MAKE_CORRECT_ENV=true
19218        fi
19219        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19220          { $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
19221$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;}
19222        else
19223          FOUND_MAKE=$MAKE_CANDIDATE
19224
19225  # Only process if variable expands to non-empty
19226
19227  if test "x$FOUND_MAKE" != x; then
19228    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19229
19230  # First separate the path from the arguments. This will split at the first
19231  # space.
19232  complete="$FOUND_MAKE"
19233  path="${complete%% *}"
19234  tmp="$complete EOL"
19235  arguments="${tmp#* }"
19236
19237  # Input might be given as Windows format, start by converting to
19238  # unix format.
19239  new_path=`$CYGPATH -u "$path"`
19240
19241  # Now try to locate executable using which
19242  new_path=`$WHICH "$new_path" 2> /dev/null`
19243  # bat and cmd files are not always considered executable in cygwin causing which
19244  # to not find them
19245  if test "x$new_path" = x \
19246      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19247      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19248    new_path=`$CYGPATH -u "$path"`
19249  fi
19250  if test "x$new_path" = x; then
19251    # Oops. Which didn't find the executable.
19252    # The splitting of arguments from the executable at a space might have been incorrect,
19253    # since paths with space are more likely in Windows. Give it another try with the whole
19254    # argument.
19255    path="$complete"
19256    arguments="EOL"
19257    new_path=`$CYGPATH -u "$path"`
19258    new_path=`$WHICH "$new_path" 2> /dev/null`
19259    # bat and cmd files are not always considered executable in cygwin causing which
19260    # to not find them
19261    if test "x$new_path" = x \
19262        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19263        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19264      new_path=`$CYGPATH -u "$path"`
19265    fi
19266    if test "x$new_path" = x; then
19267      # It's still not found. Now this is an unrecoverable error.
19268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19269$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19270      has_space=`$ECHO "$complete" | $GREP " "`
19271      if test "x$has_space" != x; then
19272        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19273$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19274      fi
19275      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19276    fi
19277  fi
19278
19279  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19280  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19281  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19282  # "foo.exe" is OK but "foo" is an error.
19283  #
19284  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19285  # It is also a way to make sure we got the proper file name for the real test later on.
19286  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19287  if test "x$test_shortpath" = x; then
19288    # Short path failed, file does not exist as specified.
19289    # Try adding .exe or .cmd
19290    if test -f "${new_path}.exe"; then
19291      input_to_shortpath="${new_path}.exe"
19292    elif test -f "${new_path}.cmd"; then
19293      input_to_shortpath="${new_path}.cmd"
19294    else
19295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19296$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19297      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19298$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19299      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19300    fi
19301  else
19302    input_to_shortpath="$new_path"
19303  fi
19304
19305  # Call helper function which possibly converts this using DOS-style short mode.
19306  # If so, the updated path is stored in $new_path.
19307  new_path="$input_to_shortpath"
19308
19309  input_path="$input_to_shortpath"
19310  # Check if we need to convert this using DOS-style short mode. If the path
19311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19312  # take no chances and rewrite it.
19313  # Note: m4 eats our [], so we need to use [ and ] instead.
19314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19315  if test "x$has_forbidden_chars" != x; then
19316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19317    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19318    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19319    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19320      # Going to short mode and back again did indeed matter. Since short mode is
19321      # case insensitive, let's make it lowercase to improve readability.
19322      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19323      # Now convert it back to Unix-style (cygpath)
19324      input_path=`$CYGPATH -u "$shortmode_path"`
19325      new_path="$input_path"
19326    fi
19327  fi
19328
19329  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19330  if test "x$test_cygdrive_prefix" = x; then
19331    # As a simple fix, exclude /usr/bin since it's not a real path.
19332    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19333      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19334      # a path prefixed by /cygdrive for fixpath to work.
19335      new_path="$CYGWIN_ROOT_PATH$input_path"
19336    fi
19337  fi
19338
19339  # remove trailing .exe if any
19340  new_path="${new_path/%.exe/}"
19341
19342    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19343
19344  # First separate the path from the arguments. This will split at the first
19345  # space.
19346  complete="$FOUND_MAKE"
19347  path="${complete%% *}"
19348  tmp="$complete EOL"
19349  arguments="${tmp#* }"
19350
19351  # Input might be given as Windows format, start by converting to
19352  # unix format.
19353  new_path="$path"
19354
19355  windows_path="$new_path"
19356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19357    unix_path=`$CYGPATH -u "$windows_path"`
19358    new_path="$unix_path"
19359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19361    new_path="$unix_path"
19362  fi
19363
19364
19365  # Now try to locate executable using which
19366  new_path=`$WHICH "$new_path" 2> /dev/null`
19367
19368  if test "x$new_path" = x; then
19369    # Oops. Which didn't find the executable.
19370    # The splitting of arguments from the executable at a space might have been incorrect,
19371    # since paths with space are more likely in Windows. Give it another try with the whole
19372    # argument.
19373    path="$complete"
19374    arguments="EOL"
19375    new_path="$path"
19376
19377  windows_path="$new_path"
19378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19379    unix_path=`$CYGPATH -u "$windows_path"`
19380    new_path="$unix_path"
19381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19383    new_path="$unix_path"
19384  fi
19385
19386
19387    new_path=`$WHICH "$new_path" 2> /dev/null`
19388    # bat and cmd files are not always considered executable in MSYS causing which
19389    # to not find them
19390    if test "x$new_path" = x \
19391        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19392        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19393      new_path="$path"
19394
19395  windows_path="$new_path"
19396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19397    unix_path=`$CYGPATH -u "$windows_path"`
19398    new_path="$unix_path"
19399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19401    new_path="$unix_path"
19402  fi
19403
19404    fi
19405
19406    if test "x$new_path" = x; then
19407      # It's still not found. Now this is an unrecoverable error.
19408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19409$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19410      has_space=`$ECHO "$complete" | $GREP " "`
19411      if test "x$has_space" != x; then
19412        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19413$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19414      fi
19415      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19416    fi
19417  fi
19418
19419  # Now new_path has a complete unix path to the binary
19420  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19421    # Keep paths in /bin as-is, but remove trailing .exe if any
19422    new_path="${new_path/%.exe/}"
19423    # Do not save /bin paths to all_fixpath_prefixes!
19424  else
19425    # Not in mixed or Windows style, start by that.
19426    new_path=`cmd //c echo $new_path`
19427
19428  input_path="$new_path"
19429  # Check if we need to convert this using DOS-style short mode. If the path
19430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19431  # take no chances and rewrite it.
19432  # Note: m4 eats our [], so we need to use [ and ] instead.
19433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19434  if test "x$has_forbidden_chars" != x; then
19435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19436    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19437  fi
19438
19439    # Output is in $new_path
19440
19441  windows_path="$new_path"
19442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19443    unix_path=`$CYGPATH -u "$windows_path"`
19444    new_path="$unix_path"
19445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19447    new_path="$unix_path"
19448  fi
19449
19450    # remove trailing .exe if any
19451    new_path="${new_path/%.exe/}"
19452
19453    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19454    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19455  fi
19456
19457    else
19458      # We're on a unix platform. Hooray! :)
19459      # First separate the path from the arguments. This will split at the first
19460      # space.
19461      complete="$FOUND_MAKE"
19462      path="${complete%% *}"
19463      tmp="$complete EOL"
19464      arguments="${tmp#* }"
19465
19466      # Cannot rely on the command "which" here since it doesn't always work.
19467      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19468      if test -z "$is_absolute_path"; then
19469        # Path to executable is not absolute. Find it.
19470        IFS_save="$IFS"
19471        IFS=:
19472        for p in $PATH; do
19473          if test -f "$p/$path" && test -x "$p/$path"; then
19474            new_path="$p/$path"
19475            break
19476          fi
19477        done
19478        IFS="$IFS_save"
19479      else
19480        # This is an absolute path, we can use it without further modifications.
19481        new_path="$path"
19482      fi
19483
19484      if test "x$new_path" = x; then
19485        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19486$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19487        has_space=`$ECHO "$complete" | $GREP " "`
19488        if test "x$has_space" != x; then
19489          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19490$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19491        fi
19492        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19493      fi
19494    fi
19495
19496    # Now join together the path and the arguments once again
19497    if test "x$arguments" != xEOL; then
19498      new_complete="$new_path ${arguments% *}"
19499    else
19500      new_complete="$new_path"
19501    fi
19502
19503    if test "x$complete" != "x$new_complete"; then
19504      FOUND_MAKE="$new_complete"
19505      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19506$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19507    fi
19508  fi
19509
19510        fi
19511      fi
19512    fi
19513  fi
19514
19515
19516    if test "x$FOUND_MAKE" = x; then
19517      for ac_prog in make
19518do
19519  # Extract the first word of "$ac_prog", so it can be a program name with args.
19520set dummy $ac_prog; ac_word=$2
19521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19522$as_echo_n "checking for $ac_word... " >&6; }
19523if ${ac_cv_path_CHECK_MAKE+:} false; then :
19524  $as_echo_n "(cached) " >&6
19525else
19526  case $CHECK_MAKE in
19527  [\\/]* | ?:[\\/]*)
19528  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19529  ;;
19530  *)
19531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19532for as_dir in $PATH
19533do
19534  IFS=$as_save_IFS
19535  test -z "$as_dir" && as_dir=.
19536    for ac_exec_ext in '' $ac_executable_extensions; do
19537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19538    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19540    break 2
19541  fi
19542done
19543  done
19544IFS=$as_save_IFS
19545
19546  ;;
19547esac
19548fi
19549CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19550if test -n "$CHECK_MAKE"; then
19551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19552$as_echo "$CHECK_MAKE" >&6; }
19553else
19554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19555$as_echo "no" >&6; }
19556fi
19557
19558
19559  test -n "$CHECK_MAKE" && break
19560done
19561
19562
19563  MAKE_CANDIDATE=""$CHECK_MAKE""
19564  DESCRIPTION="make in PATH"
19565
19566  # On Cygwin, we require a newer version of make than on other platforms
19567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19568    MAKE_VERSION_EXPR="-e 4\."
19569    MAKE_REQUIRED_VERSION="4.0"
19570   else
19571    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19572    MAKE_REQUIRED_VERSION="3.81"
19573  fi
19574
19575  if test "x$MAKE_CANDIDATE" != x; then
19576    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19577$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19578    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19579    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19580    if test "x$IS_GNU_MAKE" = x; then
19581      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19582$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19583    else
19584      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19585      if test "x$IS_MODERN_MAKE" = x; then
19586        { $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
19587$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;}
19588      else
19589        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19590          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19591            MAKE_EXPECTED_ENV='cygwin'
19592          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19593            MAKE_EXPECTED_ENV='msys'
19594          else
19595            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19596          fi
19597          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19598          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19599        else
19600          # Not relevant for non-Windows
19601          IS_MAKE_CORRECT_ENV=true
19602        fi
19603        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19604          { $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
19605$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;}
19606        else
19607          FOUND_MAKE=$MAKE_CANDIDATE
19608
19609  # Only process if variable expands to non-empty
19610
19611  if test "x$FOUND_MAKE" != x; then
19612    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19613
19614  # First separate the path from the arguments. This will split at the first
19615  # space.
19616  complete="$FOUND_MAKE"
19617  path="${complete%% *}"
19618  tmp="$complete EOL"
19619  arguments="${tmp#* }"
19620
19621  # Input might be given as Windows format, start by converting to
19622  # unix format.
19623  new_path=`$CYGPATH -u "$path"`
19624
19625  # Now try to locate executable using which
19626  new_path=`$WHICH "$new_path" 2> /dev/null`
19627  # bat and cmd files are not always considered executable in cygwin causing which
19628  # to not find them
19629  if test "x$new_path" = x \
19630      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19631      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19632    new_path=`$CYGPATH -u "$path"`
19633  fi
19634  if test "x$new_path" = x; then
19635    # Oops. Which didn't find the executable.
19636    # The splitting of arguments from the executable at a space might have been incorrect,
19637    # since paths with space are more likely in Windows. Give it another try with the whole
19638    # argument.
19639    path="$complete"
19640    arguments="EOL"
19641    new_path=`$CYGPATH -u "$path"`
19642    new_path=`$WHICH "$new_path" 2> /dev/null`
19643    # bat and cmd files are not always considered executable in cygwin causing which
19644    # to not find them
19645    if test "x$new_path" = x \
19646        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19647        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19648      new_path=`$CYGPATH -u "$path"`
19649    fi
19650    if test "x$new_path" = x; then
19651      # It's still not found. Now this is an unrecoverable error.
19652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19653$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19654      has_space=`$ECHO "$complete" | $GREP " "`
19655      if test "x$has_space" != x; then
19656        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19657$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19658      fi
19659      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19660    fi
19661  fi
19662
19663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19666  # "foo.exe" is OK but "foo" is an error.
19667  #
19668  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19669  # It is also a way to make sure we got the proper file name for the real test later on.
19670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19671  if test "x$test_shortpath" = x; then
19672    # Short path failed, file does not exist as specified.
19673    # Try adding .exe or .cmd
19674    if test -f "${new_path}.exe"; then
19675      input_to_shortpath="${new_path}.exe"
19676    elif test -f "${new_path}.cmd"; then
19677      input_to_shortpath="${new_path}.cmd"
19678    else
19679      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19680$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19681      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19682$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19683      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19684    fi
19685  else
19686    input_to_shortpath="$new_path"
19687  fi
19688
19689  # Call helper function which possibly converts this using DOS-style short mode.
19690  # If so, the updated path is stored in $new_path.
19691  new_path="$input_to_shortpath"
19692
19693  input_path="$input_to_shortpath"
19694  # Check if we need to convert this using DOS-style short mode. If the path
19695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19696  # take no chances and rewrite it.
19697  # Note: m4 eats our [], so we need to use [ and ] instead.
19698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19699  if test "x$has_forbidden_chars" != x; then
19700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19701    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19702    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19703    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19704      # Going to short mode and back again did indeed matter. Since short mode is
19705      # case insensitive, let's make it lowercase to improve readability.
19706      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19707      # Now convert it back to Unix-style (cygpath)
19708      input_path=`$CYGPATH -u "$shortmode_path"`
19709      new_path="$input_path"
19710    fi
19711  fi
19712
19713  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19714  if test "x$test_cygdrive_prefix" = x; then
19715    # As a simple fix, exclude /usr/bin since it's not a real path.
19716    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19717      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19718      # a path prefixed by /cygdrive for fixpath to work.
19719      new_path="$CYGWIN_ROOT_PATH$input_path"
19720    fi
19721  fi
19722
19723  # remove trailing .exe if any
19724  new_path="${new_path/%.exe/}"
19725
19726    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19727
19728  # First separate the path from the arguments. This will split at the first
19729  # space.
19730  complete="$FOUND_MAKE"
19731  path="${complete%% *}"
19732  tmp="$complete EOL"
19733  arguments="${tmp#* }"
19734
19735  # Input might be given as Windows format, start by converting to
19736  # unix format.
19737  new_path="$path"
19738
19739  windows_path="$new_path"
19740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19741    unix_path=`$CYGPATH -u "$windows_path"`
19742    new_path="$unix_path"
19743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19745    new_path="$unix_path"
19746  fi
19747
19748
19749  # Now try to locate executable using which
19750  new_path=`$WHICH "$new_path" 2> /dev/null`
19751
19752  if test "x$new_path" = x; then
19753    # Oops. Which didn't find the executable.
19754    # The splitting of arguments from the executable at a space might have been incorrect,
19755    # since paths with space are more likely in Windows. Give it another try with the whole
19756    # argument.
19757    path="$complete"
19758    arguments="EOL"
19759    new_path="$path"
19760
19761  windows_path="$new_path"
19762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19763    unix_path=`$CYGPATH -u "$windows_path"`
19764    new_path="$unix_path"
19765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19767    new_path="$unix_path"
19768  fi
19769
19770
19771    new_path=`$WHICH "$new_path" 2> /dev/null`
19772    # bat and cmd files are not always considered executable in MSYS causing which
19773    # to not find them
19774    if test "x$new_path" = x \
19775        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19776        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19777      new_path="$path"
19778
19779  windows_path="$new_path"
19780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19781    unix_path=`$CYGPATH -u "$windows_path"`
19782    new_path="$unix_path"
19783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19785    new_path="$unix_path"
19786  fi
19787
19788    fi
19789
19790    if test "x$new_path" = x; then
19791      # It's still not found. Now this is an unrecoverable error.
19792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19793$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19794      has_space=`$ECHO "$complete" | $GREP " "`
19795      if test "x$has_space" != x; then
19796        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19797$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19798      fi
19799      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19800    fi
19801  fi
19802
19803  # Now new_path has a complete unix path to the binary
19804  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19805    # Keep paths in /bin as-is, but remove trailing .exe if any
19806    new_path="${new_path/%.exe/}"
19807    # Do not save /bin paths to all_fixpath_prefixes!
19808  else
19809    # Not in mixed or Windows style, start by that.
19810    new_path=`cmd //c echo $new_path`
19811
19812  input_path="$new_path"
19813  # Check if we need to convert this using DOS-style short mode. If the path
19814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19815  # take no chances and rewrite it.
19816  # Note: m4 eats our [], so we need to use [ and ] instead.
19817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19818  if test "x$has_forbidden_chars" != x; then
19819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19820    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19821  fi
19822
19823    # Output is in $new_path
19824
19825  windows_path="$new_path"
19826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19827    unix_path=`$CYGPATH -u "$windows_path"`
19828    new_path="$unix_path"
19829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19831    new_path="$unix_path"
19832  fi
19833
19834    # remove trailing .exe if any
19835    new_path="${new_path/%.exe/}"
19836
19837    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19838    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19839  fi
19840
19841    else
19842      # We're on a unix platform. Hooray! :)
19843      # First separate the path from the arguments. This will split at the first
19844      # space.
19845      complete="$FOUND_MAKE"
19846      path="${complete%% *}"
19847      tmp="$complete EOL"
19848      arguments="${tmp#* }"
19849
19850      # Cannot rely on the command "which" here since it doesn't always work.
19851      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19852      if test -z "$is_absolute_path"; then
19853        # Path to executable is not absolute. Find it.
19854        IFS_save="$IFS"
19855        IFS=:
19856        for p in $PATH; do
19857          if test -f "$p/$path" && test -x "$p/$path"; then
19858            new_path="$p/$path"
19859            break
19860          fi
19861        done
19862        IFS="$IFS_save"
19863      else
19864        # This is an absolute path, we can use it without further modifications.
19865        new_path="$path"
19866      fi
19867
19868      if test "x$new_path" = x; then
19869        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19870$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19871        has_space=`$ECHO "$complete" | $GREP " "`
19872        if test "x$has_space" != x; then
19873          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19874$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19875        fi
19876        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19877      fi
19878    fi
19879
19880    # Now join together the path and the arguments once again
19881    if test "x$arguments" != xEOL; then
19882      new_complete="$new_path ${arguments% *}"
19883    else
19884      new_complete="$new_path"
19885    fi
19886
19887    if test "x$complete" != "x$new_complete"; then
19888      FOUND_MAKE="$new_complete"
19889      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19890$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19891    fi
19892  fi
19893
19894        fi
19895      fi
19896    fi
19897  fi
19898
19899    fi
19900
19901    if test "x$FOUND_MAKE" = x; then
19902      if test "x$TOOLCHAIN_PATH" != x; then
19903        # We have a toolchain path, check that as well before giving up.
19904        OLD_PATH=$PATH
19905        PATH=$TOOLCHAIN_PATH:$PATH
19906        for ac_prog in gmake
19907do
19908  # Extract the first word of "$ac_prog", so it can be a program name with args.
19909set dummy $ac_prog; ac_word=$2
19910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19911$as_echo_n "checking for $ac_word... " >&6; }
19912if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19913  $as_echo_n "(cached) " >&6
19914else
19915  case $CHECK_TOOLSDIR_GMAKE in
19916  [\\/]* | ?:[\\/]*)
19917  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19918  ;;
19919  *)
19920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19921for as_dir in $PATH
19922do
19923  IFS=$as_save_IFS
19924  test -z "$as_dir" && as_dir=.
19925    for ac_exec_ext in '' $ac_executable_extensions; do
19926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19927    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19929    break 2
19930  fi
19931done
19932  done
19933IFS=$as_save_IFS
19934
19935  ;;
19936esac
19937fi
19938CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19939if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19941$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19942else
19943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19944$as_echo "no" >&6; }
19945fi
19946
19947
19948  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19949done
19950
19951
19952  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19953  DESCRIPTION="gmake in tools-dir"
19954
19955  # On Cygwin, we require a newer version of make than on other platforms
19956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19957    MAKE_VERSION_EXPR="-e 4\."
19958    MAKE_REQUIRED_VERSION="4.0"
19959   else
19960    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19961    MAKE_REQUIRED_VERSION="3.81"
19962  fi
19963
19964  if test "x$MAKE_CANDIDATE" != x; then
19965    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19966$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19967    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19968    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19969    if test "x$IS_GNU_MAKE" = x; then
19970      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19971$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19972    else
19973      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19974      if test "x$IS_MODERN_MAKE" = x; then
19975        { $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
19976$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;}
19977      else
19978        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19979          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19980            MAKE_EXPECTED_ENV='cygwin'
19981          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19982            MAKE_EXPECTED_ENV='msys'
19983          else
19984            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19985          fi
19986          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19987          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19988        else
19989          # Not relevant for non-Windows
19990          IS_MAKE_CORRECT_ENV=true
19991        fi
19992        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19993          { $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
19994$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;}
19995        else
19996          FOUND_MAKE=$MAKE_CANDIDATE
19997
19998  # Only process if variable expands to non-empty
19999
20000  if test "x$FOUND_MAKE" != x; then
20001    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20002
20003  # First separate the path from the arguments. This will split at the first
20004  # space.
20005  complete="$FOUND_MAKE"
20006  path="${complete%% *}"
20007  tmp="$complete EOL"
20008  arguments="${tmp#* }"
20009
20010  # Input might be given as Windows format, start by converting to
20011  # unix format.
20012  new_path=`$CYGPATH -u "$path"`
20013
20014  # Now try to locate executable using which
20015  new_path=`$WHICH "$new_path" 2> /dev/null`
20016  # bat and cmd files are not always considered executable in cygwin causing which
20017  # to not find them
20018  if test "x$new_path" = x \
20019      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20020      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20021    new_path=`$CYGPATH -u "$path"`
20022  fi
20023  if test "x$new_path" = x; then
20024    # Oops. Which didn't find the executable.
20025    # The splitting of arguments from the executable at a space might have been incorrect,
20026    # since paths with space are more likely in Windows. Give it another try with the whole
20027    # argument.
20028    path="$complete"
20029    arguments="EOL"
20030    new_path=`$CYGPATH -u "$path"`
20031    new_path=`$WHICH "$new_path" 2> /dev/null`
20032    # bat and cmd files are not always considered executable in cygwin causing which
20033    # to not find them
20034    if test "x$new_path" = x \
20035        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20036        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20037      new_path=`$CYGPATH -u "$path"`
20038    fi
20039    if test "x$new_path" = x; then
20040      # It's still not found. Now this is an unrecoverable error.
20041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20042$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20043      has_space=`$ECHO "$complete" | $GREP " "`
20044      if test "x$has_space" != x; then
20045        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20046$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20047      fi
20048      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20049    fi
20050  fi
20051
20052  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20053  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20054  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20055  # "foo.exe" is OK but "foo" is an error.
20056  #
20057  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20058  # It is also a way to make sure we got the proper file name for the real test later on.
20059  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20060  if test "x$test_shortpath" = x; then
20061    # Short path failed, file does not exist as specified.
20062    # Try adding .exe or .cmd
20063    if test -f "${new_path}.exe"; then
20064      input_to_shortpath="${new_path}.exe"
20065    elif test -f "${new_path}.cmd"; then
20066      input_to_shortpath="${new_path}.cmd"
20067    else
20068      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20069$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20070      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20071$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20072      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20073    fi
20074  else
20075    input_to_shortpath="$new_path"
20076  fi
20077
20078  # Call helper function which possibly converts this using DOS-style short mode.
20079  # If so, the updated path is stored in $new_path.
20080  new_path="$input_to_shortpath"
20081
20082  input_path="$input_to_shortpath"
20083  # Check if we need to convert this using DOS-style short mode. If the path
20084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20085  # take no chances and rewrite it.
20086  # Note: m4 eats our [], so we need to use [ and ] instead.
20087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20088  if test "x$has_forbidden_chars" != x; then
20089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20090    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20091    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20092    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20093      # Going to short mode and back again did indeed matter. Since short mode is
20094      # case insensitive, let's make it lowercase to improve readability.
20095      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20096      # Now convert it back to Unix-style (cygpath)
20097      input_path=`$CYGPATH -u "$shortmode_path"`
20098      new_path="$input_path"
20099    fi
20100  fi
20101
20102  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20103  if test "x$test_cygdrive_prefix" = x; then
20104    # As a simple fix, exclude /usr/bin since it's not a real path.
20105    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20106      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20107      # a path prefixed by /cygdrive for fixpath to work.
20108      new_path="$CYGWIN_ROOT_PATH$input_path"
20109    fi
20110  fi
20111
20112  # remove trailing .exe if any
20113  new_path="${new_path/%.exe/}"
20114
20115    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20116
20117  # First separate the path from the arguments. This will split at the first
20118  # space.
20119  complete="$FOUND_MAKE"
20120  path="${complete%% *}"
20121  tmp="$complete EOL"
20122  arguments="${tmp#* }"
20123
20124  # Input might be given as Windows format, start by converting to
20125  # unix format.
20126  new_path="$path"
20127
20128  windows_path="$new_path"
20129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20130    unix_path=`$CYGPATH -u "$windows_path"`
20131    new_path="$unix_path"
20132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20134    new_path="$unix_path"
20135  fi
20136
20137
20138  # Now try to locate executable using which
20139  new_path=`$WHICH "$new_path" 2> /dev/null`
20140
20141  if test "x$new_path" = x; then
20142    # Oops. Which didn't find the executable.
20143    # The splitting of arguments from the executable at a space might have been incorrect,
20144    # since paths with space are more likely in Windows. Give it another try with the whole
20145    # argument.
20146    path="$complete"
20147    arguments="EOL"
20148    new_path="$path"
20149
20150  windows_path="$new_path"
20151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20152    unix_path=`$CYGPATH -u "$windows_path"`
20153    new_path="$unix_path"
20154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20156    new_path="$unix_path"
20157  fi
20158
20159
20160    new_path=`$WHICH "$new_path" 2> /dev/null`
20161    # bat and cmd files are not always considered executable in MSYS causing which
20162    # to not find them
20163    if test "x$new_path" = x \
20164        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20165        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20166      new_path="$path"
20167
20168  windows_path="$new_path"
20169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20170    unix_path=`$CYGPATH -u "$windows_path"`
20171    new_path="$unix_path"
20172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20174    new_path="$unix_path"
20175  fi
20176
20177    fi
20178
20179    if test "x$new_path" = x; then
20180      # It's still not found. Now this is an unrecoverable error.
20181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20182$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20183      has_space=`$ECHO "$complete" | $GREP " "`
20184      if test "x$has_space" != x; then
20185        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20186$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20187      fi
20188      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20189    fi
20190  fi
20191
20192  # Now new_path has a complete unix path to the binary
20193  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20194    # Keep paths in /bin as-is, but remove trailing .exe if any
20195    new_path="${new_path/%.exe/}"
20196    # Do not save /bin paths to all_fixpath_prefixes!
20197  else
20198    # Not in mixed or Windows style, start by that.
20199    new_path=`cmd //c echo $new_path`
20200
20201  input_path="$new_path"
20202  # Check if we need to convert this using DOS-style short mode. If the path
20203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20204  # take no chances and rewrite it.
20205  # Note: m4 eats our [], so we need to use [ and ] instead.
20206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20207  if test "x$has_forbidden_chars" != x; then
20208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20209    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20210  fi
20211
20212    # Output is in $new_path
20213
20214  windows_path="$new_path"
20215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20216    unix_path=`$CYGPATH -u "$windows_path"`
20217    new_path="$unix_path"
20218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20220    new_path="$unix_path"
20221  fi
20222
20223    # remove trailing .exe if any
20224    new_path="${new_path/%.exe/}"
20225
20226    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20227    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20228  fi
20229
20230    else
20231      # We're on a unix platform. Hooray! :)
20232      # First separate the path from the arguments. This will split at the first
20233      # space.
20234      complete="$FOUND_MAKE"
20235      path="${complete%% *}"
20236      tmp="$complete EOL"
20237      arguments="${tmp#* }"
20238
20239      # Cannot rely on the command "which" here since it doesn't always work.
20240      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20241      if test -z "$is_absolute_path"; then
20242        # Path to executable is not absolute. Find it.
20243        IFS_save="$IFS"
20244        IFS=:
20245        for p in $PATH; do
20246          if test -f "$p/$path" && test -x "$p/$path"; then
20247            new_path="$p/$path"
20248            break
20249          fi
20250        done
20251        IFS="$IFS_save"
20252      else
20253        # This is an absolute path, we can use it without further modifications.
20254        new_path="$path"
20255      fi
20256
20257      if test "x$new_path" = x; then
20258        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20259$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20260        has_space=`$ECHO "$complete" | $GREP " "`
20261        if test "x$has_space" != x; then
20262          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20263$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20264        fi
20265        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20266      fi
20267    fi
20268
20269    # Now join together the path and the arguments once again
20270    if test "x$arguments" != xEOL; then
20271      new_complete="$new_path ${arguments% *}"
20272    else
20273      new_complete="$new_path"
20274    fi
20275
20276    if test "x$complete" != "x$new_complete"; then
20277      FOUND_MAKE="$new_complete"
20278      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20279$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20280    fi
20281  fi
20282
20283        fi
20284      fi
20285    fi
20286  fi
20287
20288        if test "x$FOUND_MAKE" = x; then
20289          for ac_prog in make
20290do
20291  # Extract the first word of "$ac_prog", so it can be a program name with args.
20292set dummy $ac_prog; ac_word=$2
20293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20294$as_echo_n "checking for $ac_word... " >&6; }
20295if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20296  $as_echo_n "(cached) " >&6
20297else
20298  case $CHECK_TOOLSDIR_MAKE in
20299  [\\/]* | ?:[\\/]*)
20300  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20301  ;;
20302  *)
20303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20304for as_dir in $PATH
20305do
20306  IFS=$as_save_IFS
20307  test -z "$as_dir" && as_dir=.
20308    for ac_exec_ext in '' $ac_executable_extensions; do
20309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20310    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20312    break 2
20313  fi
20314done
20315  done
20316IFS=$as_save_IFS
20317
20318  ;;
20319esac
20320fi
20321CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20322if test -n "$CHECK_TOOLSDIR_MAKE"; then
20323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20324$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20325else
20326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20327$as_echo "no" >&6; }
20328fi
20329
20330
20331  test -n "$CHECK_TOOLSDIR_MAKE" && break
20332done
20333
20334
20335  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20336  DESCRIPTION="make in tools-dir"
20337
20338  # On Cygwin, we require a newer version of make than on other platforms
20339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20340    MAKE_VERSION_EXPR="-e 4\."
20341    MAKE_REQUIRED_VERSION="4.0"
20342   else
20343    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20344    MAKE_REQUIRED_VERSION="3.81"
20345  fi
20346
20347  if test "x$MAKE_CANDIDATE" != x; then
20348    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20349$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20350    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20351    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20352    if test "x$IS_GNU_MAKE" = x; then
20353      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20354$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20355    else
20356      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20357      if test "x$IS_MODERN_MAKE" = x; then
20358        { $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
20359$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;}
20360      else
20361        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20362          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20363            MAKE_EXPECTED_ENV='cygwin'
20364          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20365            MAKE_EXPECTED_ENV='msys'
20366          else
20367            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20368          fi
20369          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20370          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20371        else
20372          # Not relevant for non-Windows
20373          IS_MAKE_CORRECT_ENV=true
20374        fi
20375        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20376          { $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
20377$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;}
20378        else
20379          FOUND_MAKE=$MAKE_CANDIDATE
20380
20381  # Only process if variable expands to non-empty
20382
20383  if test "x$FOUND_MAKE" != x; then
20384    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20385
20386  # First separate the path from the arguments. This will split at the first
20387  # space.
20388  complete="$FOUND_MAKE"
20389  path="${complete%% *}"
20390  tmp="$complete EOL"
20391  arguments="${tmp#* }"
20392
20393  # Input might be given as Windows format, start by converting to
20394  # unix format.
20395  new_path=`$CYGPATH -u "$path"`
20396
20397  # Now try to locate executable using which
20398  new_path=`$WHICH "$new_path" 2> /dev/null`
20399  # bat and cmd files are not always considered executable in cygwin causing which
20400  # to not find them
20401  if test "x$new_path" = x \
20402      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20403      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20404    new_path=`$CYGPATH -u "$path"`
20405  fi
20406  if test "x$new_path" = x; then
20407    # Oops. Which didn't find the executable.
20408    # The splitting of arguments from the executable at a space might have been incorrect,
20409    # since paths with space are more likely in Windows. Give it another try with the whole
20410    # argument.
20411    path="$complete"
20412    arguments="EOL"
20413    new_path=`$CYGPATH -u "$path"`
20414    new_path=`$WHICH "$new_path" 2> /dev/null`
20415    # bat and cmd files are not always considered executable in cygwin causing which
20416    # to not find them
20417    if test "x$new_path" = x \
20418        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20419        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20420      new_path=`$CYGPATH -u "$path"`
20421    fi
20422    if test "x$new_path" = x; then
20423      # It's still not found. Now this is an unrecoverable error.
20424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20425$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20426      has_space=`$ECHO "$complete" | $GREP " "`
20427      if test "x$has_space" != x; then
20428        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20429$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20430      fi
20431      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20432    fi
20433  fi
20434
20435  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20436  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20437  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20438  # "foo.exe" is OK but "foo" is an error.
20439  #
20440  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20441  # It is also a way to make sure we got the proper file name for the real test later on.
20442  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20443  if test "x$test_shortpath" = x; then
20444    # Short path failed, file does not exist as specified.
20445    # Try adding .exe or .cmd
20446    if test -f "${new_path}.exe"; then
20447      input_to_shortpath="${new_path}.exe"
20448    elif test -f "${new_path}.cmd"; then
20449      input_to_shortpath="${new_path}.cmd"
20450    else
20451      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20452$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20453      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20454$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20455      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20456    fi
20457  else
20458    input_to_shortpath="$new_path"
20459  fi
20460
20461  # Call helper function which possibly converts this using DOS-style short mode.
20462  # If so, the updated path is stored in $new_path.
20463  new_path="$input_to_shortpath"
20464
20465  input_path="$input_to_shortpath"
20466  # Check if we need to convert this using DOS-style short mode. If the path
20467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20468  # take no chances and rewrite it.
20469  # Note: m4 eats our [], so we need to use [ and ] instead.
20470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20471  if test "x$has_forbidden_chars" != x; then
20472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20473    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20474    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20475    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20476      # Going to short mode and back again did indeed matter. Since short mode is
20477      # case insensitive, let's make it lowercase to improve readability.
20478      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20479      # Now convert it back to Unix-style (cygpath)
20480      input_path=`$CYGPATH -u "$shortmode_path"`
20481      new_path="$input_path"
20482    fi
20483  fi
20484
20485  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20486  if test "x$test_cygdrive_prefix" = x; then
20487    # As a simple fix, exclude /usr/bin since it's not a real path.
20488    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20489      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20490      # a path prefixed by /cygdrive for fixpath to work.
20491      new_path="$CYGWIN_ROOT_PATH$input_path"
20492    fi
20493  fi
20494
20495  # remove trailing .exe if any
20496  new_path="${new_path/%.exe/}"
20497
20498    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20499
20500  # First separate the path from the arguments. This will split at the first
20501  # space.
20502  complete="$FOUND_MAKE"
20503  path="${complete%% *}"
20504  tmp="$complete EOL"
20505  arguments="${tmp#* }"
20506
20507  # Input might be given as Windows format, start by converting to
20508  # unix format.
20509  new_path="$path"
20510
20511  windows_path="$new_path"
20512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20513    unix_path=`$CYGPATH -u "$windows_path"`
20514    new_path="$unix_path"
20515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20517    new_path="$unix_path"
20518  fi
20519
20520
20521  # Now try to locate executable using which
20522  new_path=`$WHICH "$new_path" 2> /dev/null`
20523
20524  if test "x$new_path" = x; then
20525    # Oops. Which didn't find the executable.
20526    # The splitting of arguments from the executable at a space might have been incorrect,
20527    # since paths with space are more likely in Windows. Give it another try with the whole
20528    # argument.
20529    path="$complete"
20530    arguments="EOL"
20531    new_path="$path"
20532
20533  windows_path="$new_path"
20534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20535    unix_path=`$CYGPATH -u "$windows_path"`
20536    new_path="$unix_path"
20537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20539    new_path="$unix_path"
20540  fi
20541
20542
20543    new_path=`$WHICH "$new_path" 2> /dev/null`
20544    # bat and cmd files are not always considered executable in MSYS causing which
20545    # to not find them
20546    if test "x$new_path" = x \
20547        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20548        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20549      new_path="$path"
20550
20551  windows_path="$new_path"
20552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20553    unix_path=`$CYGPATH -u "$windows_path"`
20554    new_path="$unix_path"
20555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20557    new_path="$unix_path"
20558  fi
20559
20560    fi
20561
20562    if test "x$new_path" = x; then
20563      # It's still not found. Now this is an unrecoverable error.
20564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20565$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20566      has_space=`$ECHO "$complete" | $GREP " "`
20567      if test "x$has_space" != x; then
20568        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20569$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20570      fi
20571      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20572    fi
20573  fi
20574
20575  # Now new_path has a complete unix path to the binary
20576  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20577    # Keep paths in /bin as-is, but remove trailing .exe if any
20578    new_path="${new_path/%.exe/}"
20579    # Do not save /bin paths to all_fixpath_prefixes!
20580  else
20581    # Not in mixed or Windows style, start by that.
20582    new_path=`cmd //c echo $new_path`
20583
20584  input_path="$new_path"
20585  # Check if we need to convert this using DOS-style short mode. If the path
20586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20587  # take no chances and rewrite it.
20588  # Note: m4 eats our [], so we need to use [ and ] instead.
20589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20590  if test "x$has_forbidden_chars" != x; then
20591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20592    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20593  fi
20594
20595    # Output is in $new_path
20596
20597  windows_path="$new_path"
20598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20599    unix_path=`$CYGPATH -u "$windows_path"`
20600    new_path="$unix_path"
20601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20603    new_path="$unix_path"
20604  fi
20605
20606    # remove trailing .exe if any
20607    new_path="${new_path/%.exe/}"
20608
20609    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20610    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20611  fi
20612
20613    else
20614      # We're on a unix platform. Hooray! :)
20615      # First separate the path from the arguments. This will split at the first
20616      # space.
20617      complete="$FOUND_MAKE"
20618      path="${complete%% *}"
20619      tmp="$complete EOL"
20620      arguments="${tmp#* }"
20621
20622      # Cannot rely on the command "which" here since it doesn't always work.
20623      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20624      if test -z "$is_absolute_path"; then
20625        # Path to executable is not absolute. Find it.
20626        IFS_save="$IFS"
20627        IFS=:
20628        for p in $PATH; do
20629          if test -f "$p/$path" && test -x "$p/$path"; then
20630            new_path="$p/$path"
20631            break
20632          fi
20633        done
20634        IFS="$IFS_save"
20635      else
20636        # This is an absolute path, we can use it without further modifications.
20637        new_path="$path"
20638      fi
20639
20640      if test "x$new_path" = x; then
20641        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20642$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20643        has_space=`$ECHO "$complete" | $GREP " "`
20644        if test "x$has_space" != x; then
20645          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20646$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20647        fi
20648        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20649      fi
20650    fi
20651
20652    # Now join together the path and the arguments once again
20653    if test "x$arguments" != xEOL; then
20654      new_complete="$new_path ${arguments% *}"
20655    else
20656      new_complete="$new_path"
20657    fi
20658
20659    if test "x$complete" != "x$new_complete"; then
20660      FOUND_MAKE="$new_complete"
20661      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20662$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20663    fi
20664  fi
20665
20666        fi
20667      fi
20668    fi
20669  fi
20670
20671        fi
20672        PATH=$OLD_PATH
20673      fi
20674    fi
20675
20676    if test "x$FOUND_MAKE" = x; then
20677      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
20678    fi
20679
20680    else
20681      # If it succeeded, then it was overridden by the user. We will use it
20682      # for the tool.
20683
20684      # First remove it from the list of overridden variables, so we can test
20685      # for unknown variables in the end.
20686      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20687
20688      # Check if we try to supply an empty value
20689      if test "x$MAKE" = x; then
20690        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20691$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20692        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20693$as_echo_n "checking for MAKE... " >&6; }
20694        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20695$as_echo "disabled" >&6; }
20696      else
20697        # Check if the provided tool contains a complete path.
20698        tool_specified="$MAKE"
20699        tool_basename="${tool_specified##*/}"
20700        if test "x$tool_basename" = "x$tool_specified"; then
20701          # A command without a complete path is provided, search $PATH.
20702          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20703$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20704          # Extract the first word of "$tool_basename", so it can be a program name with args.
20705set dummy $tool_basename; ac_word=$2
20706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20707$as_echo_n "checking for $ac_word... " >&6; }
20708if ${ac_cv_path_MAKE+:} false; then :
20709  $as_echo_n "(cached) " >&6
20710else
20711  case $MAKE in
20712  [\\/]* | ?:[\\/]*)
20713  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20714  ;;
20715  *)
20716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20717for as_dir in $PATH
20718do
20719  IFS=$as_save_IFS
20720  test -z "$as_dir" && as_dir=.
20721    for ac_exec_ext in '' $ac_executable_extensions; do
20722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20723    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20725    break 2
20726  fi
20727done
20728  done
20729IFS=$as_save_IFS
20730
20731  ;;
20732esac
20733fi
20734MAKE=$ac_cv_path_MAKE
20735if test -n "$MAKE"; then
20736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20737$as_echo "$MAKE" >&6; }
20738else
20739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20740$as_echo "no" >&6; }
20741fi
20742
20743
20744          if test "x$MAKE" = x; then
20745            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20746          fi
20747        else
20748          # Otherwise we believe it is a complete path. Use it as it is.
20749          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20750$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20751          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20752$as_echo_n "checking for MAKE... " >&6; }
20753          if test ! -x "$tool_specified"; then
20754            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20755$as_echo "not found" >&6; }
20756            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20757          fi
20758          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20759$as_echo "$tool_specified" >&6; }
20760        fi
20761      fi
20762    fi
20763
20764    # If MAKE was set by user, verify the version
20765
20766  MAKE_CANDIDATE=""$MAKE""
20767  DESCRIPTION="user supplied MAKE=$MAKE"
20768
20769  # On Cygwin, we require a newer version of make than on other platforms
20770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20771    MAKE_VERSION_EXPR="-e 4\."
20772    MAKE_REQUIRED_VERSION="4.0"
20773   else
20774    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20775    MAKE_REQUIRED_VERSION="3.81"
20776  fi
20777
20778  if test "x$MAKE_CANDIDATE" != x; then
20779    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20780$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20781    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20782    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20783    if test "x$IS_GNU_MAKE" = x; then
20784      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20785$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20786    else
20787      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20788      if test "x$IS_MODERN_MAKE" = x; then
20789        { $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
20790$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;}
20791      else
20792        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20793          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20794            MAKE_EXPECTED_ENV='cygwin'
20795          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20796            MAKE_EXPECTED_ENV='msys'
20797          else
20798            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20799          fi
20800          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20801          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20802        else
20803          # Not relevant for non-Windows
20804          IS_MAKE_CORRECT_ENV=true
20805        fi
20806        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20807          { $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
20808$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;}
20809        else
20810          FOUND_MAKE=$MAKE_CANDIDATE
20811
20812  # Only process if variable expands to non-empty
20813
20814  if test "x$FOUND_MAKE" != x; then
20815    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20816
20817  # First separate the path from the arguments. This will split at the first
20818  # space.
20819  complete="$FOUND_MAKE"
20820  path="${complete%% *}"
20821  tmp="$complete EOL"
20822  arguments="${tmp#* }"
20823
20824  # Input might be given as Windows format, start by converting to
20825  # unix format.
20826  new_path=`$CYGPATH -u "$path"`
20827
20828  # Now try to locate executable using which
20829  new_path=`$WHICH "$new_path" 2> /dev/null`
20830  # bat and cmd files are not always considered executable in cygwin causing which
20831  # to not find them
20832  if test "x$new_path" = x \
20833      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20834      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20835    new_path=`$CYGPATH -u "$path"`
20836  fi
20837  if test "x$new_path" = x; then
20838    # Oops. Which didn't find the executable.
20839    # The splitting of arguments from the executable at a space might have been incorrect,
20840    # since paths with space are more likely in Windows. Give it another try with the whole
20841    # argument.
20842    path="$complete"
20843    arguments="EOL"
20844    new_path=`$CYGPATH -u "$path"`
20845    new_path=`$WHICH "$new_path" 2> /dev/null`
20846    # bat and cmd files are not always considered executable in cygwin causing which
20847    # to not find them
20848    if test "x$new_path" = x \
20849        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20850        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20851      new_path=`$CYGPATH -u "$path"`
20852    fi
20853    if test "x$new_path" = x; then
20854      # It's still not found. Now this is an unrecoverable error.
20855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20856$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20857      has_space=`$ECHO "$complete" | $GREP " "`
20858      if test "x$has_space" != x; then
20859        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20860$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20861      fi
20862      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20863    fi
20864  fi
20865
20866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20869  # "foo.exe" is OK but "foo" is an error.
20870  #
20871  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20872  # It is also a way to make sure we got the proper file name for the real test later on.
20873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20874  if test "x$test_shortpath" = x; then
20875    # Short path failed, file does not exist as specified.
20876    # Try adding .exe or .cmd
20877    if test -f "${new_path}.exe"; then
20878      input_to_shortpath="${new_path}.exe"
20879    elif test -f "${new_path}.cmd"; then
20880      input_to_shortpath="${new_path}.cmd"
20881    else
20882      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20883$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20884      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20885$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20886      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20887    fi
20888  else
20889    input_to_shortpath="$new_path"
20890  fi
20891
20892  # Call helper function which possibly converts this using DOS-style short mode.
20893  # If so, the updated path is stored in $new_path.
20894  new_path="$input_to_shortpath"
20895
20896  input_path="$input_to_shortpath"
20897  # Check if we need to convert this using DOS-style short mode. If the path
20898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20899  # take no chances and rewrite it.
20900  # Note: m4 eats our [], so we need to use [ and ] instead.
20901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20902  if test "x$has_forbidden_chars" != x; then
20903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20904    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20905    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20906    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20907      # Going to short mode and back again did indeed matter. Since short mode is
20908      # case insensitive, let's make it lowercase to improve readability.
20909      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20910      # Now convert it back to Unix-style (cygpath)
20911      input_path=`$CYGPATH -u "$shortmode_path"`
20912      new_path="$input_path"
20913    fi
20914  fi
20915
20916  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20917  if test "x$test_cygdrive_prefix" = x; then
20918    # As a simple fix, exclude /usr/bin since it's not a real path.
20919    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20920      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20921      # a path prefixed by /cygdrive for fixpath to work.
20922      new_path="$CYGWIN_ROOT_PATH$input_path"
20923    fi
20924  fi
20925
20926  # remove trailing .exe if any
20927  new_path="${new_path/%.exe/}"
20928
20929    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20930
20931  # First separate the path from the arguments. This will split at the first
20932  # space.
20933  complete="$FOUND_MAKE"
20934  path="${complete%% *}"
20935  tmp="$complete EOL"
20936  arguments="${tmp#* }"
20937
20938  # Input might be given as Windows format, start by converting to
20939  # unix format.
20940  new_path="$path"
20941
20942  windows_path="$new_path"
20943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20944    unix_path=`$CYGPATH -u "$windows_path"`
20945    new_path="$unix_path"
20946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20948    new_path="$unix_path"
20949  fi
20950
20951
20952  # Now try to locate executable using which
20953  new_path=`$WHICH "$new_path" 2> /dev/null`
20954
20955  if test "x$new_path" = x; then
20956    # Oops. Which didn't find the executable.
20957    # The splitting of arguments from the executable at a space might have been incorrect,
20958    # since paths with space are more likely in Windows. Give it another try with the whole
20959    # argument.
20960    path="$complete"
20961    arguments="EOL"
20962    new_path="$path"
20963
20964  windows_path="$new_path"
20965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20966    unix_path=`$CYGPATH -u "$windows_path"`
20967    new_path="$unix_path"
20968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20970    new_path="$unix_path"
20971  fi
20972
20973
20974    new_path=`$WHICH "$new_path" 2> /dev/null`
20975    # bat and cmd files are not always considered executable in MSYS causing which
20976    # to not find them
20977    if test "x$new_path" = x \
20978        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20979        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20980      new_path="$path"
20981
20982  windows_path="$new_path"
20983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20984    unix_path=`$CYGPATH -u "$windows_path"`
20985    new_path="$unix_path"
20986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20988    new_path="$unix_path"
20989  fi
20990
20991    fi
20992
20993    if test "x$new_path" = x; then
20994      # It's still not found. Now this is an unrecoverable error.
20995      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20996$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20997      has_space=`$ECHO "$complete" | $GREP " "`
20998      if test "x$has_space" != x; then
20999        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21000$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21001      fi
21002      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21003    fi
21004  fi
21005
21006  # Now new_path has a complete unix path to the binary
21007  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21008    # Keep paths in /bin as-is, but remove trailing .exe if any
21009    new_path="${new_path/%.exe/}"
21010    # Do not save /bin paths to all_fixpath_prefixes!
21011  else
21012    # Not in mixed or Windows style, start by that.
21013    new_path=`cmd //c echo $new_path`
21014
21015  input_path="$new_path"
21016  # Check if we need to convert this using DOS-style short mode. If the path
21017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21018  # take no chances and rewrite it.
21019  # Note: m4 eats our [], so we need to use [ and ] instead.
21020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21021  if test "x$has_forbidden_chars" != x; then
21022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21023    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21024  fi
21025
21026    # Output is in $new_path
21027
21028  windows_path="$new_path"
21029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21030    unix_path=`$CYGPATH -u "$windows_path"`
21031    new_path="$unix_path"
21032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21034    new_path="$unix_path"
21035  fi
21036
21037    # remove trailing .exe if any
21038    new_path="${new_path/%.exe/}"
21039
21040    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21041    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21042  fi
21043
21044    else
21045      # We're on a unix platform. Hooray! :)
21046      # First separate the path from the arguments. This will split at the first
21047      # space.
21048      complete="$FOUND_MAKE"
21049      path="${complete%% *}"
21050      tmp="$complete EOL"
21051      arguments="${tmp#* }"
21052
21053      # Cannot rely on the command "which" here since it doesn't always work.
21054      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21055      if test -z "$is_absolute_path"; then
21056        # Path to executable is not absolute. Find it.
21057        IFS_save="$IFS"
21058        IFS=:
21059        for p in $PATH; do
21060          if test -f "$p/$path" && test -x "$p/$path"; then
21061            new_path="$p/$path"
21062            break
21063          fi
21064        done
21065        IFS="$IFS_save"
21066      else
21067        # This is an absolute path, we can use it without further modifications.
21068        new_path="$path"
21069      fi
21070
21071      if test "x$new_path" = x; then
21072        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21073$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21074        has_space=`$ECHO "$complete" | $GREP " "`
21075        if test "x$has_space" != x; then
21076          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21077$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21078        fi
21079        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21080      fi
21081    fi
21082
21083    # Now join together the path and the arguments once again
21084    if test "x$arguments" != xEOL; then
21085      new_complete="$new_path ${arguments% *}"
21086    else
21087      new_complete="$new_path"
21088    fi
21089
21090    if test "x$complete" != "x$new_complete"; then
21091      FOUND_MAKE="$new_complete"
21092      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21093$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21094    fi
21095  fi
21096
21097        fi
21098      fi
21099    fi
21100  fi
21101
21102    if test "x$FOUND_MAKE" = x; then
21103      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21104    fi
21105
21106  fi
21107
21108
21109  MAKE=$FOUND_MAKE
21110
21111  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21112$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21113
21114
21115  # Check if make supports the output sync option and if so, setup using it.
21116  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21117$as_echo_n "checking if make --output-sync is supported... " >&6; }
21118  if $MAKE --version -O > /dev/null 2>&1; then
21119    OUTPUT_SYNC_SUPPORTED=true
21120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21121$as_echo "yes" >&6; }
21122    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21123$as_echo_n "checking for output-sync value... " >&6; }
21124
21125# Check whether --with-output-sync was given.
21126if test "${with_output_sync+set}" = set; then :
21127  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21128fi
21129
21130    if test "x$OUTPUT_SYNC" = "x"; then
21131      OUTPUT_SYNC=none
21132    fi
21133    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21134$as_echo "$OUTPUT_SYNC" >&6; }
21135    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21136      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21137    fi
21138  else
21139    OUTPUT_SYNC_SUPPORTED=false
21140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21141$as_echo "no" >&6; }
21142  fi
21143
21144
21145
21146
21147
21148
21149  # Test if find supports -delete
21150  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21151$as_echo_n "checking if find supports -delete... " >&6; }
21152  FIND_DELETE="-delete"
21153
21154  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21155
21156  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21157
21158  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21159  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21160    # No, it does not.
21161    $RM $DELETEDIR/TestIfFindSupportsDelete
21162    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21163      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21164      FIND_DELETE="-print | $XARGS $RM"
21165    else
21166      FIND_DELETE="-exec $RM \{\} \+"
21167    fi
21168    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21169$as_echo "no" >&6; }
21170  else
21171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21172$as_echo "yes" >&6; }
21173  fi
21174  $RMDIR $DELETEDIR
21175
21176
21177
21178  # Test which kind of tar was found
21179  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21180    TAR_TYPE="gnu"
21181  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21182    TAR_TYPE="bsd"
21183  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21184    TAR_TYPE="bsd"
21185  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21186    TAR_TYPE="solaris"
21187  fi
21188  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21189$as_echo_n "checking what type of tar was found... " >&6; }
21190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21191$as_echo "$TAR_TYPE" >&6; }
21192
21193  TAR_CREATE_FILE_PARAM=""
21194
21195  if test "x$TAR_TYPE" = "xgnu"; then
21196    TAR_INCLUDE_PARAM="T"
21197    TAR_SUPPORTS_TRANSFORM="true"
21198    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21199      # When using gnu tar for Solaris targets, need to use compatibility mode
21200      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21201    fi
21202  else
21203    TAR_INCLUDE_PARAM="I"
21204    TAR_SUPPORTS_TRANSFORM="false"
21205  fi
21206
21207
21208
21209
21210
21211
21212  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21213  # This is a problem for the grep resident on AIX.
21214  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21215$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21216  # Multiple subsequent spaces..
21217  STACK_SPACES='aaa   bbb   ccc'
21218  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21219  # patterns in it.
21220  STACK_LIST=${STACK_SPACES// /$'\n'}
21221  NEEDLE_SPACES='ccc bbb aaa'
21222  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21223  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21224  if test "x$RESULT" == "x"; then
21225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21226$as_echo "yes" >&6; }
21227  else
21228    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21229      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21230    fi
21231    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21232  fi
21233
21234
21235  # These tools might not be installed by default,
21236  # need hint on how to install them.
21237
21238
21239
21240  # Publish this variable in the help.
21241
21242
21243  if [ -z "${UNZIP+x}" ]; then
21244    # The variable is not set by user, try to locate tool using the code snippet
21245    for ac_prog in unzip
21246do
21247  # Extract the first word of "$ac_prog", so it can be a program name with args.
21248set dummy $ac_prog; ac_word=$2
21249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21250$as_echo_n "checking for $ac_word... " >&6; }
21251if ${ac_cv_path_UNZIP+:} false; then :
21252  $as_echo_n "(cached) " >&6
21253else
21254  case $UNZIP in
21255  [\\/]* | ?:[\\/]*)
21256  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21257  ;;
21258  *)
21259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21260for as_dir in $PATH
21261do
21262  IFS=$as_save_IFS
21263  test -z "$as_dir" && as_dir=.
21264    for ac_exec_ext in '' $ac_executable_extensions; do
21265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21266    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21268    break 2
21269  fi
21270done
21271  done
21272IFS=$as_save_IFS
21273
21274  ;;
21275esac
21276fi
21277UNZIP=$ac_cv_path_UNZIP
21278if test -n "$UNZIP"; then
21279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21280$as_echo "$UNZIP" >&6; }
21281else
21282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21283$as_echo "no" >&6; }
21284fi
21285
21286
21287  test -n "$UNZIP" && break
21288done
21289
21290  else
21291    # The variable is set, but is it from the command line or the environment?
21292
21293    # Try to remove the string !UNZIP! from our list.
21294    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21295    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21296      # If it failed, the variable was not from the command line. Ignore it,
21297      # but warn the user (except for BASH, which is always set by the calling BASH).
21298      if test "xUNZIP" != xBASH; then
21299        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21300$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21301      fi
21302      # Try to locate tool using the code snippet
21303      for ac_prog in unzip
21304do
21305  # Extract the first word of "$ac_prog", so it can be a program name with args.
21306set dummy $ac_prog; ac_word=$2
21307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21308$as_echo_n "checking for $ac_word... " >&6; }
21309if ${ac_cv_path_UNZIP+:} false; then :
21310  $as_echo_n "(cached) " >&6
21311else
21312  case $UNZIP in
21313  [\\/]* | ?:[\\/]*)
21314  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21315  ;;
21316  *)
21317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21318for as_dir in $PATH
21319do
21320  IFS=$as_save_IFS
21321  test -z "$as_dir" && as_dir=.
21322    for ac_exec_ext in '' $ac_executable_extensions; do
21323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21324    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21326    break 2
21327  fi
21328done
21329  done
21330IFS=$as_save_IFS
21331
21332  ;;
21333esac
21334fi
21335UNZIP=$ac_cv_path_UNZIP
21336if test -n "$UNZIP"; then
21337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21338$as_echo "$UNZIP" >&6; }
21339else
21340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21341$as_echo "no" >&6; }
21342fi
21343
21344
21345  test -n "$UNZIP" && break
21346done
21347
21348    else
21349      # If it succeeded, then it was overridden by the user. We will use it
21350      # for the tool.
21351
21352      # First remove it from the list of overridden variables, so we can test
21353      # for unknown variables in the end.
21354      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21355
21356      # Check if we try to supply an empty value
21357      if test "x$UNZIP" = x; then
21358        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21359$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21360        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21361$as_echo_n "checking for UNZIP... " >&6; }
21362        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21363$as_echo "disabled" >&6; }
21364      else
21365        # Check if the provided tool contains a complete path.
21366        tool_specified="$UNZIP"
21367        tool_basename="${tool_specified##*/}"
21368        if test "x$tool_basename" = "x$tool_specified"; then
21369          # A command without a complete path is provided, search $PATH.
21370          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21371$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21372          # Extract the first word of "$tool_basename", so it can be a program name with args.
21373set dummy $tool_basename; ac_word=$2
21374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21375$as_echo_n "checking for $ac_word... " >&6; }
21376if ${ac_cv_path_UNZIP+:} false; then :
21377  $as_echo_n "(cached) " >&6
21378else
21379  case $UNZIP in
21380  [\\/]* | ?:[\\/]*)
21381  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21382  ;;
21383  *)
21384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21385for as_dir in $PATH
21386do
21387  IFS=$as_save_IFS
21388  test -z "$as_dir" && as_dir=.
21389    for ac_exec_ext in '' $ac_executable_extensions; do
21390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21391    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21393    break 2
21394  fi
21395done
21396  done
21397IFS=$as_save_IFS
21398
21399  ;;
21400esac
21401fi
21402UNZIP=$ac_cv_path_UNZIP
21403if test -n "$UNZIP"; then
21404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21405$as_echo "$UNZIP" >&6; }
21406else
21407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21408$as_echo "no" >&6; }
21409fi
21410
21411
21412          if test "x$UNZIP" = x; then
21413            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21414          fi
21415        else
21416          # Otherwise we believe it is a complete path. Use it as it is.
21417          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21418$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21419          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21420$as_echo_n "checking for UNZIP... " >&6; }
21421          if test ! -x "$tool_specified"; then
21422            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21423$as_echo "not found" >&6; }
21424            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21425          fi
21426          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21427$as_echo "$tool_specified" >&6; }
21428        fi
21429      fi
21430    fi
21431
21432  fi
21433
21434
21435
21436  if test "x$UNZIP" = x; then
21437    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21438  fi
21439
21440
21441  # Since zip uses "ZIP" as a environment variable for passing options, we need
21442  # to name our variable differently, hence ZIPEXE.
21443
21444
21445
21446  # Publish this variable in the help.
21447
21448
21449  if [ -z "${ZIPEXE+x}" ]; then
21450    # The variable is not set by user, try to locate tool using the code snippet
21451    for ac_prog in zip
21452do
21453  # Extract the first word of "$ac_prog", so it can be a program name with args.
21454set dummy $ac_prog; ac_word=$2
21455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21456$as_echo_n "checking for $ac_word... " >&6; }
21457if ${ac_cv_path_ZIPEXE+:} false; then :
21458  $as_echo_n "(cached) " >&6
21459else
21460  case $ZIPEXE in
21461  [\\/]* | ?:[\\/]*)
21462  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21463  ;;
21464  *)
21465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21466for as_dir in $PATH
21467do
21468  IFS=$as_save_IFS
21469  test -z "$as_dir" && as_dir=.
21470    for ac_exec_ext in '' $ac_executable_extensions; do
21471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21472    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21474    break 2
21475  fi
21476done
21477  done
21478IFS=$as_save_IFS
21479
21480  ;;
21481esac
21482fi
21483ZIPEXE=$ac_cv_path_ZIPEXE
21484if test -n "$ZIPEXE"; then
21485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21486$as_echo "$ZIPEXE" >&6; }
21487else
21488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21489$as_echo "no" >&6; }
21490fi
21491
21492
21493  test -n "$ZIPEXE" && break
21494done
21495
21496  else
21497    # The variable is set, but is it from the command line or the environment?
21498
21499    # Try to remove the string !ZIPEXE! from our list.
21500    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21501    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21502      # If it failed, the variable was not from the command line. Ignore it,
21503      # but warn the user (except for BASH, which is always set by the calling BASH).
21504      if test "xZIPEXE" != xBASH; then
21505        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21506$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21507      fi
21508      # Try to locate tool using the code snippet
21509      for ac_prog in zip
21510do
21511  # Extract the first word of "$ac_prog", so it can be a program name with args.
21512set dummy $ac_prog; ac_word=$2
21513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21514$as_echo_n "checking for $ac_word... " >&6; }
21515if ${ac_cv_path_ZIPEXE+:} false; then :
21516  $as_echo_n "(cached) " >&6
21517else
21518  case $ZIPEXE in
21519  [\\/]* | ?:[\\/]*)
21520  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21521  ;;
21522  *)
21523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21524for as_dir in $PATH
21525do
21526  IFS=$as_save_IFS
21527  test -z "$as_dir" && as_dir=.
21528    for ac_exec_ext in '' $ac_executable_extensions; do
21529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21530    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21532    break 2
21533  fi
21534done
21535  done
21536IFS=$as_save_IFS
21537
21538  ;;
21539esac
21540fi
21541ZIPEXE=$ac_cv_path_ZIPEXE
21542if test -n "$ZIPEXE"; then
21543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21544$as_echo "$ZIPEXE" >&6; }
21545else
21546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21547$as_echo "no" >&6; }
21548fi
21549
21550
21551  test -n "$ZIPEXE" && break
21552done
21553
21554    else
21555      # If it succeeded, then it was overridden by the user. We will use it
21556      # for the tool.
21557
21558      # First remove it from the list of overridden variables, so we can test
21559      # for unknown variables in the end.
21560      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21561
21562      # Check if we try to supply an empty value
21563      if test "x$ZIPEXE" = x; then
21564        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21565$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21566        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21567$as_echo_n "checking for ZIPEXE... " >&6; }
21568        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21569$as_echo "disabled" >&6; }
21570      else
21571        # Check if the provided tool contains a complete path.
21572        tool_specified="$ZIPEXE"
21573        tool_basename="${tool_specified##*/}"
21574        if test "x$tool_basename" = "x$tool_specified"; then
21575          # A command without a complete path is provided, search $PATH.
21576          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21577$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21578          # Extract the first word of "$tool_basename", so it can be a program name with args.
21579set dummy $tool_basename; ac_word=$2
21580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21581$as_echo_n "checking for $ac_word... " >&6; }
21582if ${ac_cv_path_ZIPEXE+:} false; then :
21583  $as_echo_n "(cached) " >&6
21584else
21585  case $ZIPEXE in
21586  [\\/]* | ?:[\\/]*)
21587  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21588  ;;
21589  *)
21590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21591for as_dir in $PATH
21592do
21593  IFS=$as_save_IFS
21594  test -z "$as_dir" && as_dir=.
21595    for ac_exec_ext in '' $ac_executable_extensions; do
21596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21597    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21599    break 2
21600  fi
21601done
21602  done
21603IFS=$as_save_IFS
21604
21605  ;;
21606esac
21607fi
21608ZIPEXE=$ac_cv_path_ZIPEXE
21609if test -n "$ZIPEXE"; then
21610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21611$as_echo "$ZIPEXE" >&6; }
21612else
21613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21614$as_echo "no" >&6; }
21615fi
21616
21617
21618          if test "x$ZIPEXE" = x; then
21619            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21620          fi
21621        else
21622          # Otherwise we believe it is a complete path. Use it as it is.
21623          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21624$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21625          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21626$as_echo_n "checking for ZIPEXE... " >&6; }
21627          if test ! -x "$tool_specified"; then
21628            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21629$as_echo "not found" >&6; }
21630            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21631          fi
21632          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21633$as_echo "$tool_specified" >&6; }
21634        fi
21635      fi
21636    fi
21637
21638  fi
21639
21640
21641
21642  if test "x$ZIPEXE" = x; then
21643    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21644  fi
21645
21646
21647
21648  # Non-required basic tools
21649
21650
21651
21652  # Publish this variable in the help.
21653
21654
21655  if [ -z "${LDD+x}" ]; then
21656    # The variable is not set by user, try to locate tool using the code snippet
21657    for ac_prog in ldd
21658do
21659  # Extract the first word of "$ac_prog", so it can be a program name with args.
21660set dummy $ac_prog; ac_word=$2
21661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21662$as_echo_n "checking for $ac_word... " >&6; }
21663if ${ac_cv_path_LDD+:} false; then :
21664  $as_echo_n "(cached) " >&6
21665else
21666  case $LDD in
21667  [\\/]* | ?:[\\/]*)
21668  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21669  ;;
21670  *)
21671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21672for as_dir in $PATH
21673do
21674  IFS=$as_save_IFS
21675  test -z "$as_dir" && as_dir=.
21676    for ac_exec_ext in '' $ac_executable_extensions; do
21677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21678    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21680    break 2
21681  fi
21682done
21683  done
21684IFS=$as_save_IFS
21685
21686  ;;
21687esac
21688fi
21689LDD=$ac_cv_path_LDD
21690if test -n "$LDD"; then
21691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21692$as_echo "$LDD" >&6; }
21693else
21694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21695$as_echo "no" >&6; }
21696fi
21697
21698
21699  test -n "$LDD" && break
21700done
21701
21702  else
21703    # The variable is set, but is it from the command line or the environment?
21704
21705    # Try to remove the string !LDD! from our list.
21706    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21707    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21708      # If it failed, the variable was not from the command line. Ignore it,
21709      # but warn the user (except for BASH, which is always set by the calling BASH).
21710      if test "xLDD" != xBASH; then
21711        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21712$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21713      fi
21714      # Try to locate tool using the code snippet
21715      for ac_prog in ldd
21716do
21717  # Extract the first word of "$ac_prog", so it can be a program name with args.
21718set dummy $ac_prog; ac_word=$2
21719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21720$as_echo_n "checking for $ac_word... " >&6; }
21721if ${ac_cv_path_LDD+:} false; then :
21722  $as_echo_n "(cached) " >&6
21723else
21724  case $LDD in
21725  [\\/]* | ?:[\\/]*)
21726  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21727  ;;
21728  *)
21729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21730for as_dir in $PATH
21731do
21732  IFS=$as_save_IFS
21733  test -z "$as_dir" && as_dir=.
21734    for ac_exec_ext in '' $ac_executable_extensions; do
21735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21736    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21738    break 2
21739  fi
21740done
21741  done
21742IFS=$as_save_IFS
21743
21744  ;;
21745esac
21746fi
21747LDD=$ac_cv_path_LDD
21748if test -n "$LDD"; then
21749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21750$as_echo "$LDD" >&6; }
21751else
21752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21753$as_echo "no" >&6; }
21754fi
21755
21756
21757  test -n "$LDD" && break
21758done
21759
21760    else
21761      # If it succeeded, then it was overridden by the user. We will use it
21762      # for the tool.
21763
21764      # First remove it from the list of overridden variables, so we can test
21765      # for unknown variables in the end.
21766      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21767
21768      # Check if we try to supply an empty value
21769      if test "x$LDD" = x; then
21770        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21771$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21772        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21773$as_echo_n "checking for LDD... " >&6; }
21774        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21775$as_echo "disabled" >&6; }
21776      else
21777        # Check if the provided tool contains a complete path.
21778        tool_specified="$LDD"
21779        tool_basename="${tool_specified##*/}"
21780        if test "x$tool_basename" = "x$tool_specified"; then
21781          # A command without a complete path is provided, search $PATH.
21782          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21783$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21784          # Extract the first word of "$tool_basename", so it can be a program name with args.
21785set dummy $tool_basename; ac_word=$2
21786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21787$as_echo_n "checking for $ac_word... " >&6; }
21788if ${ac_cv_path_LDD+:} false; then :
21789  $as_echo_n "(cached) " >&6
21790else
21791  case $LDD in
21792  [\\/]* | ?:[\\/]*)
21793  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21794  ;;
21795  *)
21796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21797for as_dir in $PATH
21798do
21799  IFS=$as_save_IFS
21800  test -z "$as_dir" && as_dir=.
21801    for ac_exec_ext in '' $ac_executable_extensions; do
21802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21803    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21805    break 2
21806  fi
21807done
21808  done
21809IFS=$as_save_IFS
21810
21811  ;;
21812esac
21813fi
21814LDD=$ac_cv_path_LDD
21815if test -n "$LDD"; then
21816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21817$as_echo "$LDD" >&6; }
21818else
21819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21820$as_echo "no" >&6; }
21821fi
21822
21823
21824          if test "x$LDD" = x; then
21825            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21826          fi
21827        else
21828          # Otherwise we believe it is a complete path. Use it as it is.
21829          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21830$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21831          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21832$as_echo_n "checking for LDD... " >&6; }
21833          if test ! -x "$tool_specified"; then
21834            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21835$as_echo "not found" >&6; }
21836            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21837          fi
21838          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21839$as_echo "$tool_specified" >&6; }
21840        fi
21841      fi
21842    fi
21843
21844  fi
21845
21846
21847  if test "x$LDD" = "x"; then
21848    # List shared lib dependencies is used for
21849    # debug output and checking for forbidden dependencies.
21850    # We can build without it.
21851    LDD="true"
21852  fi
21853
21854
21855  # Publish this variable in the help.
21856
21857
21858  if [ -z "${OTOOL+x}" ]; then
21859    # The variable is not set by user, try to locate tool using the code snippet
21860    for ac_prog in otool
21861do
21862  # Extract the first word of "$ac_prog", so it can be a program name with args.
21863set dummy $ac_prog; ac_word=$2
21864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21865$as_echo_n "checking for $ac_word... " >&6; }
21866if ${ac_cv_path_OTOOL+:} false; then :
21867  $as_echo_n "(cached) " >&6
21868else
21869  case $OTOOL in
21870  [\\/]* | ?:[\\/]*)
21871  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21872  ;;
21873  *)
21874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21875for as_dir in $PATH
21876do
21877  IFS=$as_save_IFS
21878  test -z "$as_dir" && as_dir=.
21879    for ac_exec_ext in '' $ac_executable_extensions; do
21880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21881    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21883    break 2
21884  fi
21885done
21886  done
21887IFS=$as_save_IFS
21888
21889  ;;
21890esac
21891fi
21892OTOOL=$ac_cv_path_OTOOL
21893if test -n "$OTOOL"; then
21894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21895$as_echo "$OTOOL" >&6; }
21896else
21897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21898$as_echo "no" >&6; }
21899fi
21900
21901
21902  test -n "$OTOOL" && break
21903done
21904
21905  else
21906    # The variable is set, but is it from the command line or the environment?
21907
21908    # Try to remove the string !OTOOL! from our list.
21909    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21910    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21911      # If it failed, the variable was not from the command line. Ignore it,
21912      # but warn the user (except for BASH, which is always set by the calling BASH).
21913      if test "xOTOOL" != xBASH; then
21914        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21915$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21916      fi
21917      # Try to locate tool using the code snippet
21918      for ac_prog in otool
21919do
21920  # Extract the first word of "$ac_prog", so it can be a program name with args.
21921set dummy $ac_prog; ac_word=$2
21922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21923$as_echo_n "checking for $ac_word... " >&6; }
21924if ${ac_cv_path_OTOOL+:} false; then :
21925  $as_echo_n "(cached) " >&6
21926else
21927  case $OTOOL in
21928  [\\/]* | ?:[\\/]*)
21929  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21930  ;;
21931  *)
21932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21933for as_dir in $PATH
21934do
21935  IFS=$as_save_IFS
21936  test -z "$as_dir" && as_dir=.
21937    for ac_exec_ext in '' $ac_executable_extensions; do
21938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21939    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21941    break 2
21942  fi
21943done
21944  done
21945IFS=$as_save_IFS
21946
21947  ;;
21948esac
21949fi
21950OTOOL=$ac_cv_path_OTOOL
21951if test -n "$OTOOL"; then
21952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21953$as_echo "$OTOOL" >&6; }
21954else
21955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21956$as_echo "no" >&6; }
21957fi
21958
21959
21960  test -n "$OTOOL" && break
21961done
21962
21963    else
21964      # If it succeeded, then it was overridden by the user. We will use it
21965      # for the tool.
21966
21967      # First remove it from the list of overridden variables, so we can test
21968      # for unknown variables in the end.
21969      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21970
21971      # Check if we try to supply an empty value
21972      if test "x$OTOOL" = x; then
21973        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21974$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21975        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21976$as_echo_n "checking for OTOOL... " >&6; }
21977        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21978$as_echo "disabled" >&6; }
21979      else
21980        # Check if the provided tool contains a complete path.
21981        tool_specified="$OTOOL"
21982        tool_basename="${tool_specified##*/}"
21983        if test "x$tool_basename" = "x$tool_specified"; then
21984          # A command without a complete path is provided, search $PATH.
21985          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21986$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21987          # Extract the first word of "$tool_basename", so it can be a program name with args.
21988set dummy $tool_basename; ac_word=$2
21989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21990$as_echo_n "checking for $ac_word... " >&6; }
21991if ${ac_cv_path_OTOOL+:} false; then :
21992  $as_echo_n "(cached) " >&6
21993else
21994  case $OTOOL in
21995  [\\/]* | ?:[\\/]*)
21996  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21997  ;;
21998  *)
21999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22000for as_dir in $PATH
22001do
22002  IFS=$as_save_IFS
22003  test -z "$as_dir" && as_dir=.
22004    for ac_exec_ext in '' $ac_executable_extensions; do
22005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22006    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22008    break 2
22009  fi
22010done
22011  done
22012IFS=$as_save_IFS
22013
22014  ;;
22015esac
22016fi
22017OTOOL=$ac_cv_path_OTOOL
22018if test -n "$OTOOL"; then
22019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22020$as_echo "$OTOOL" >&6; }
22021else
22022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22023$as_echo "no" >&6; }
22024fi
22025
22026
22027          if test "x$OTOOL" = x; then
22028            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22029          fi
22030        else
22031          # Otherwise we believe it is a complete path. Use it as it is.
22032          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22033$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22034          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22035$as_echo_n "checking for OTOOL... " >&6; }
22036          if test ! -x "$tool_specified"; then
22037            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22038$as_echo "not found" >&6; }
22039            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22040          fi
22041          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22042$as_echo "$tool_specified" >&6; }
22043        fi
22044      fi
22045    fi
22046
22047  fi
22048
22049
22050  if test "x$OTOOL" = "x"; then
22051    OTOOL="true"
22052  fi
22053
22054
22055  # Publish this variable in the help.
22056
22057
22058  if [ -z "${READELF+x}" ]; then
22059    # The variable is not set by user, try to locate tool using the code snippet
22060    for ac_prog in greadelf readelf
22061do
22062  # Extract the first word of "$ac_prog", so it can be a program name with args.
22063set dummy $ac_prog; ac_word=$2
22064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22065$as_echo_n "checking for $ac_word... " >&6; }
22066if ${ac_cv_path_READELF+:} false; then :
22067  $as_echo_n "(cached) " >&6
22068else
22069  case $READELF in
22070  [\\/]* | ?:[\\/]*)
22071  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22072  ;;
22073  *)
22074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22075for as_dir in $PATH
22076do
22077  IFS=$as_save_IFS
22078  test -z "$as_dir" && as_dir=.
22079    for ac_exec_ext in '' $ac_executable_extensions; do
22080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22081    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22083    break 2
22084  fi
22085done
22086  done
22087IFS=$as_save_IFS
22088
22089  ;;
22090esac
22091fi
22092READELF=$ac_cv_path_READELF
22093if test -n "$READELF"; then
22094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22095$as_echo "$READELF" >&6; }
22096else
22097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22098$as_echo "no" >&6; }
22099fi
22100
22101
22102  test -n "$READELF" && break
22103done
22104
22105  else
22106    # The variable is set, but is it from the command line or the environment?
22107
22108    # Try to remove the string !READELF! from our list.
22109    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22110    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22111      # If it failed, the variable was not from the command line. Ignore it,
22112      # but warn the user (except for BASH, which is always set by the calling BASH).
22113      if test "xREADELF" != xBASH; then
22114        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22115$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22116      fi
22117      # Try to locate tool using the code snippet
22118      for ac_prog in greadelf readelf
22119do
22120  # Extract the first word of "$ac_prog", so it can be a program name with args.
22121set dummy $ac_prog; ac_word=$2
22122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22123$as_echo_n "checking for $ac_word... " >&6; }
22124if ${ac_cv_path_READELF+:} false; then :
22125  $as_echo_n "(cached) " >&6
22126else
22127  case $READELF in
22128  [\\/]* | ?:[\\/]*)
22129  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22130  ;;
22131  *)
22132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22133for as_dir in $PATH
22134do
22135  IFS=$as_save_IFS
22136  test -z "$as_dir" && as_dir=.
22137    for ac_exec_ext in '' $ac_executable_extensions; do
22138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22139    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22141    break 2
22142  fi
22143done
22144  done
22145IFS=$as_save_IFS
22146
22147  ;;
22148esac
22149fi
22150READELF=$ac_cv_path_READELF
22151if test -n "$READELF"; then
22152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22153$as_echo "$READELF" >&6; }
22154else
22155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22156$as_echo "no" >&6; }
22157fi
22158
22159
22160  test -n "$READELF" && break
22161done
22162
22163    else
22164      # If it succeeded, then it was overridden by the user. We will use it
22165      # for the tool.
22166
22167      # First remove it from the list of overridden variables, so we can test
22168      # for unknown variables in the end.
22169      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22170
22171      # Check if we try to supply an empty value
22172      if test "x$READELF" = x; then
22173        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22174$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22175        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22176$as_echo_n "checking for READELF... " >&6; }
22177        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22178$as_echo "disabled" >&6; }
22179      else
22180        # Check if the provided tool contains a complete path.
22181        tool_specified="$READELF"
22182        tool_basename="${tool_specified##*/}"
22183        if test "x$tool_basename" = "x$tool_specified"; then
22184          # A command without a complete path is provided, search $PATH.
22185          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22186$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22187          # Extract the first word of "$tool_basename", so it can be a program name with args.
22188set dummy $tool_basename; ac_word=$2
22189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22190$as_echo_n "checking for $ac_word... " >&6; }
22191if ${ac_cv_path_READELF+:} false; then :
22192  $as_echo_n "(cached) " >&6
22193else
22194  case $READELF in
22195  [\\/]* | ?:[\\/]*)
22196  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22197  ;;
22198  *)
22199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22200for as_dir in $PATH
22201do
22202  IFS=$as_save_IFS
22203  test -z "$as_dir" && as_dir=.
22204    for ac_exec_ext in '' $ac_executable_extensions; do
22205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22206    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22208    break 2
22209  fi
22210done
22211  done
22212IFS=$as_save_IFS
22213
22214  ;;
22215esac
22216fi
22217READELF=$ac_cv_path_READELF
22218if test -n "$READELF"; then
22219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22220$as_echo "$READELF" >&6; }
22221else
22222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22223$as_echo "no" >&6; }
22224fi
22225
22226
22227          if test "x$READELF" = x; then
22228            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22229          fi
22230        else
22231          # Otherwise we believe it is a complete path. Use it as it is.
22232          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22233$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22234          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22235$as_echo_n "checking for READELF... " >&6; }
22236          if test ! -x "$tool_specified"; then
22237            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22238$as_echo "not found" >&6; }
22239            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22240          fi
22241          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22242$as_echo "$tool_specified" >&6; }
22243        fi
22244      fi
22245    fi
22246
22247  fi
22248
22249
22250
22251
22252  # Publish this variable in the help.
22253
22254
22255  if [ -z "${HG+x}" ]; then
22256    # The variable is not set by user, try to locate tool using the code snippet
22257    for ac_prog in hg
22258do
22259  # Extract the first word of "$ac_prog", so it can be a program name with args.
22260set dummy $ac_prog; ac_word=$2
22261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22262$as_echo_n "checking for $ac_word... " >&6; }
22263if ${ac_cv_path_HG+:} false; then :
22264  $as_echo_n "(cached) " >&6
22265else
22266  case $HG in
22267  [\\/]* | ?:[\\/]*)
22268  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22269  ;;
22270  *)
22271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22272for as_dir in $PATH
22273do
22274  IFS=$as_save_IFS
22275  test -z "$as_dir" && as_dir=.
22276    for ac_exec_ext in '' $ac_executable_extensions; do
22277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22278    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22280    break 2
22281  fi
22282done
22283  done
22284IFS=$as_save_IFS
22285
22286  ;;
22287esac
22288fi
22289HG=$ac_cv_path_HG
22290if test -n "$HG"; then
22291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22292$as_echo "$HG" >&6; }
22293else
22294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22295$as_echo "no" >&6; }
22296fi
22297
22298
22299  test -n "$HG" && break
22300done
22301
22302  else
22303    # The variable is set, but is it from the command line or the environment?
22304
22305    # Try to remove the string !HG! from our list.
22306    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22307    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22308      # If it failed, the variable was not from the command line. Ignore it,
22309      # but warn the user (except for BASH, which is always set by the calling BASH).
22310      if test "xHG" != xBASH; then
22311        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22312$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22313      fi
22314      # Try to locate tool using the code snippet
22315      for ac_prog in hg
22316do
22317  # Extract the first word of "$ac_prog", so it can be a program name with args.
22318set dummy $ac_prog; ac_word=$2
22319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22320$as_echo_n "checking for $ac_word... " >&6; }
22321if ${ac_cv_path_HG+:} false; then :
22322  $as_echo_n "(cached) " >&6
22323else
22324  case $HG in
22325  [\\/]* | ?:[\\/]*)
22326  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22327  ;;
22328  *)
22329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22330for as_dir in $PATH
22331do
22332  IFS=$as_save_IFS
22333  test -z "$as_dir" && as_dir=.
22334    for ac_exec_ext in '' $ac_executable_extensions; do
22335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22336    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22338    break 2
22339  fi
22340done
22341  done
22342IFS=$as_save_IFS
22343
22344  ;;
22345esac
22346fi
22347HG=$ac_cv_path_HG
22348if test -n "$HG"; then
22349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22350$as_echo "$HG" >&6; }
22351else
22352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22353$as_echo "no" >&6; }
22354fi
22355
22356
22357  test -n "$HG" && break
22358done
22359
22360    else
22361      # If it succeeded, then it was overridden by the user. We will use it
22362      # for the tool.
22363
22364      # First remove it from the list of overridden variables, so we can test
22365      # for unknown variables in the end.
22366      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22367
22368      # Check if we try to supply an empty value
22369      if test "x$HG" = x; then
22370        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22371$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22372        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22373$as_echo_n "checking for HG... " >&6; }
22374        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22375$as_echo "disabled" >&6; }
22376      else
22377        # Check if the provided tool contains a complete path.
22378        tool_specified="$HG"
22379        tool_basename="${tool_specified##*/}"
22380        if test "x$tool_basename" = "x$tool_specified"; then
22381          # A command without a complete path is provided, search $PATH.
22382          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22383$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22384          # Extract the first word of "$tool_basename", so it can be a program name with args.
22385set dummy $tool_basename; ac_word=$2
22386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22387$as_echo_n "checking for $ac_word... " >&6; }
22388if ${ac_cv_path_HG+:} false; then :
22389  $as_echo_n "(cached) " >&6
22390else
22391  case $HG in
22392  [\\/]* | ?:[\\/]*)
22393  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22394  ;;
22395  *)
22396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22397for as_dir in $PATH
22398do
22399  IFS=$as_save_IFS
22400  test -z "$as_dir" && as_dir=.
22401    for ac_exec_ext in '' $ac_executable_extensions; do
22402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22403    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22405    break 2
22406  fi
22407done
22408  done
22409IFS=$as_save_IFS
22410
22411  ;;
22412esac
22413fi
22414HG=$ac_cv_path_HG
22415if test -n "$HG"; then
22416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22417$as_echo "$HG" >&6; }
22418else
22419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22420$as_echo "no" >&6; }
22421fi
22422
22423
22424          if test "x$HG" = x; then
22425            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22426          fi
22427        else
22428          # Otherwise we believe it is a complete path. Use it as it is.
22429          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22430$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22431          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22432$as_echo_n "checking for HG... " >&6; }
22433          if test ! -x "$tool_specified"; then
22434            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22435$as_echo "not found" >&6; }
22436            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22437          fi
22438          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22439$as_echo "$tool_specified" >&6; }
22440        fi
22441      fi
22442    fi
22443
22444  fi
22445
22446
22447
22448
22449  # Publish this variable in the help.
22450
22451
22452  if [ -z "${STAT+x}" ]; then
22453    # The variable is not set by user, try to locate tool using the code snippet
22454    for ac_prog in stat
22455do
22456  # Extract the first word of "$ac_prog", so it can be a program name with args.
22457set dummy $ac_prog; ac_word=$2
22458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22459$as_echo_n "checking for $ac_word... " >&6; }
22460if ${ac_cv_path_STAT+:} false; then :
22461  $as_echo_n "(cached) " >&6
22462else
22463  case $STAT in
22464  [\\/]* | ?:[\\/]*)
22465  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22466  ;;
22467  *)
22468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22469for as_dir in $PATH
22470do
22471  IFS=$as_save_IFS
22472  test -z "$as_dir" && as_dir=.
22473    for ac_exec_ext in '' $ac_executable_extensions; do
22474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22475    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22477    break 2
22478  fi
22479done
22480  done
22481IFS=$as_save_IFS
22482
22483  ;;
22484esac
22485fi
22486STAT=$ac_cv_path_STAT
22487if test -n "$STAT"; then
22488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22489$as_echo "$STAT" >&6; }
22490else
22491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22492$as_echo "no" >&6; }
22493fi
22494
22495
22496  test -n "$STAT" && break
22497done
22498
22499  else
22500    # The variable is set, but is it from the command line or the environment?
22501
22502    # Try to remove the string !STAT! from our list.
22503    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22504    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22505      # If it failed, the variable was not from the command line. Ignore it,
22506      # but warn the user (except for BASH, which is always set by the calling BASH).
22507      if test "xSTAT" != xBASH; then
22508        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22509$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22510      fi
22511      # Try to locate tool using the code snippet
22512      for ac_prog in stat
22513do
22514  # Extract the first word of "$ac_prog", so it can be a program name with args.
22515set dummy $ac_prog; ac_word=$2
22516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22517$as_echo_n "checking for $ac_word... " >&6; }
22518if ${ac_cv_path_STAT+:} false; then :
22519  $as_echo_n "(cached) " >&6
22520else
22521  case $STAT in
22522  [\\/]* | ?:[\\/]*)
22523  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22524  ;;
22525  *)
22526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22527for as_dir in $PATH
22528do
22529  IFS=$as_save_IFS
22530  test -z "$as_dir" && as_dir=.
22531    for ac_exec_ext in '' $ac_executable_extensions; do
22532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22533    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22535    break 2
22536  fi
22537done
22538  done
22539IFS=$as_save_IFS
22540
22541  ;;
22542esac
22543fi
22544STAT=$ac_cv_path_STAT
22545if test -n "$STAT"; then
22546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22547$as_echo "$STAT" >&6; }
22548else
22549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22550$as_echo "no" >&6; }
22551fi
22552
22553
22554  test -n "$STAT" && break
22555done
22556
22557    else
22558      # If it succeeded, then it was overridden by the user. We will use it
22559      # for the tool.
22560
22561      # First remove it from the list of overridden variables, so we can test
22562      # for unknown variables in the end.
22563      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22564
22565      # Check if we try to supply an empty value
22566      if test "x$STAT" = x; then
22567        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22568$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22569        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22570$as_echo_n "checking for STAT... " >&6; }
22571        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22572$as_echo "disabled" >&6; }
22573      else
22574        # Check if the provided tool contains a complete path.
22575        tool_specified="$STAT"
22576        tool_basename="${tool_specified##*/}"
22577        if test "x$tool_basename" = "x$tool_specified"; then
22578          # A command without a complete path is provided, search $PATH.
22579          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22580$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22581          # Extract the first word of "$tool_basename", so it can be a program name with args.
22582set dummy $tool_basename; ac_word=$2
22583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22584$as_echo_n "checking for $ac_word... " >&6; }
22585if ${ac_cv_path_STAT+:} false; then :
22586  $as_echo_n "(cached) " >&6
22587else
22588  case $STAT in
22589  [\\/]* | ?:[\\/]*)
22590  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22591  ;;
22592  *)
22593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22594for as_dir in $PATH
22595do
22596  IFS=$as_save_IFS
22597  test -z "$as_dir" && as_dir=.
22598    for ac_exec_ext in '' $ac_executable_extensions; do
22599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22600    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22602    break 2
22603  fi
22604done
22605  done
22606IFS=$as_save_IFS
22607
22608  ;;
22609esac
22610fi
22611STAT=$ac_cv_path_STAT
22612if test -n "$STAT"; then
22613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22614$as_echo "$STAT" >&6; }
22615else
22616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22617$as_echo "no" >&6; }
22618fi
22619
22620
22621          if test "x$STAT" = x; then
22622            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22623          fi
22624        else
22625          # Otherwise we believe it is a complete path. Use it as it is.
22626          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22627$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22628          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22629$as_echo_n "checking for STAT... " >&6; }
22630          if test ! -x "$tool_specified"; then
22631            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22632$as_echo "not found" >&6; }
22633            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22634          fi
22635          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22636$as_echo "$tool_specified" >&6; }
22637        fi
22638      fi
22639    fi
22640
22641  fi
22642
22643
22644
22645
22646  # Publish this variable in the help.
22647
22648
22649  if [ -z "${TIME+x}" ]; then
22650    # The variable is not set by user, try to locate tool using the code snippet
22651    for ac_prog in time
22652do
22653  # Extract the first word of "$ac_prog", so it can be a program name with args.
22654set dummy $ac_prog; ac_word=$2
22655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22656$as_echo_n "checking for $ac_word... " >&6; }
22657if ${ac_cv_path_TIME+:} false; then :
22658  $as_echo_n "(cached) " >&6
22659else
22660  case $TIME in
22661  [\\/]* | ?:[\\/]*)
22662  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22663  ;;
22664  *)
22665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22666for as_dir in $PATH
22667do
22668  IFS=$as_save_IFS
22669  test -z "$as_dir" && as_dir=.
22670    for ac_exec_ext in '' $ac_executable_extensions; do
22671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22672    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22674    break 2
22675  fi
22676done
22677  done
22678IFS=$as_save_IFS
22679
22680  ;;
22681esac
22682fi
22683TIME=$ac_cv_path_TIME
22684if test -n "$TIME"; then
22685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22686$as_echo "$TIME" >&6; }
22687else
22688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22689$as_echo "no" >&6; }
22690fi
22691
22692
22693  test -n "$TIME" && break
22694done
22695
22696  else
22697    # The variable is set, but is it from the command line or the environment?
22698
22699    # Try to remove the string !TIME! from our list.
22700    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22701    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22702      # If it failed, the variable was not from the command line. Ignore it,
22703      # but warn the user (except for BASH, which is always set by the calling BASH).
22704      if test "xTIME" != xBASH; then
22705        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22706$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22707      fi
22708      # Try to locate tool using the code snippet
22709      for ac_prog in time
22710do
22711  # Extract the first word of "$ac_prog", so it can be a program name with args.
22712set dummy $ac_prog; ac_word=$2
22713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22714$as_echo_n "checking for $ac_word... " >&6; }
22715if ${ac_cv_path_TIME+:} false; then :
22716  $as_echo_n "(cached) " >&6
22717else
22718  case $TIME in
22719  [\\/]* | ?:[\\/]*)
22720  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22721  ;;
22722  *)
22723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22724for as_dir in $PATH
22725do
22726  IFS=$as_save_IFS
22727  test -z "$as_dir" && as_dir=.
22728    for ac_exec_ext in '' $ac_executable_extensions; do
22729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22730    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22732    break 2
22733  fi
22734done
22735  done
22736IFS=$as_save_IFS
22737
22738  ;;
22739esac
22740fi
22741TIME=$ac_cv_path_TIME
22742if test -n "$TIME"; then
22743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22744$as_echo "$TIME" >&6; }
22745else
22746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22747$as_echo "no" >&6; }
22748fi
22749
22750
22751  test -n "$TIME" && break
22752done
22753
22754    else
22755      # If it succeeded, then it was overridden by the user. We will use it
22756      # for the tool.
22757
22758      # First remove it from the list of overridden variables, so we can test
22759      # for unknown variables in the end.
22760      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22761
22762      # Check if we try to supply an empty value
22763      if test "x$TIME" = x; then
22764        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22765$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22766        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22767$as_echo_n "checking for TIME... " >&6; }
22768        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22769$as_echo "disabled" >&6; }
22770      else
22771        # Check if the provided tool contains a complete path.
22772        tool_specified="$TIME"
22773        tool_basename="${tool_specified##*/}"
22774        if test "x$tool_basename" = "x$tool_specified"; then
22775          # A command without a complete path is provided, search $PATH.
22776          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22777$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22778          # Extract the first word of "$tool_basename", so it can be a program name with args.
22779set dummy $tool_basename; ac_word=$2
22780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22781$as_echo_n "checking for $ac_word... " >&6; }
22782if ${ac_cv_path_TIME+:} false; then :
22783  $as_echo_n "(cached) " >&6
22784else
22785  case $TIME in
22786  [\\/]* | ?:[\\/]*)
22787  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22788  ;;
22789  *)
22790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22791for as_dir in $PATH
22792do
22793  IFS=$as_save_IFS
22794  test -z "$as_dir" && as_dir=.
22795    for ac_exec_ext in '' $ac_executable_extensions; do
22796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22797    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22799    break 2
22800  fi
22801done
22802  done
22803IFS=$as_save_IFS
22804
22805  ;;
22806esac
22807fi
22808TIME=$ac_cv_path_TIME
22809if test -n "$TIME"; then
22810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22811$as_echo "$TIME" >&6; }
22812else
22813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22814$as_echo "no" >&6; }
22815fi
22816
22817
22818          if test "x$TIME" = x; then
22819            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22820          fi
22821        else
22822          # Otherwise we believe it is a complete path. Use it as it is.
22823          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22824$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22825          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22826$as_echo_n "checking for TIME... " >&6; }
22827          if test ! -x "$tool_specified"; then
22828            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22829$as_echo "not found" >&6; }
22830            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22831          fi
22832          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22833$as_echo "$tool_specified" >&6; }
22834        fi
22835      fi
22836    fi
22837
22838  fi
22839
22840
22841  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22842  # be in the user path.
22843
22844
22845  # Publish this variable in the help.
22846
22847
22848  if [ -z "${DTRACE+x}" ]; then
22849    # The variable is not set by user, try to locate tool using the code snippet
22850    for ac_prog in dtrace
22851do
22852  # Extract the first word of "$ac_prog", so it can be a program name with args.
22853set dummy $ac_prog; ac_word=$2
22854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22855$as_echo_n "checking for $ac_word... " >&6; }
22856if ${ac_cv_path_DTRACE+:} false; then :
22857  $as_echo_n "(cached) " >&6
22858else
22859  case $DTRACE in
22860  [\\/]* | ?:[\\/]*)
22861  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22862  ;;
22863  *)
22864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22865as_dummy="$PATH:/usr/sbin"
22866for as_dir in $as_dummy
22867do
22868  IFS=$as_save_IFS
22869  test -z "$as_dir" && as_dir=.
22870    for ac_exec_ext in '' $ac_executable_extensions; do
22871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22872    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22874    break 2
22875  fi
22876done
22877  done
22878IFS=$as_save_IFS
22879
22880  ;;
22881esac
22882fi
22883DTRACE=$ac_cv_path_DTRACE
22884if test -n "$DTRACE"; then
22885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22886$as_echo "$DTRACE" >&6; }
22887else
22888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22889$as_echo "no" >&6; }
22890fi
22891
22892
22893  test -n "$DTRACE" && break
22894done
22895
22896  else
22897    # The variable is set, but is it from the command line or the environment?
22898
22899    # Try to remove the string !DTRACE! from our list.
22900    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22901    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22902      # If it failed, the variable was not from the command line. Ignore it,
22903      # but warn the user (except for BASH, which is always set by the calling BASH).
22904      if test "xDTRACE" != xBASH; then
22905        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22906$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22907      fi
22908      # Try to locate tool using the code snippet
22909      for ac_prog in dtrace
22910do
22911  # Extract the first word of "$ac_prog", so it can be a program name with args.
22912set dummy $ac_prog; ac_word=$2
22913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22914$as_echo_n "checking for $ac_word... " >&6; }
22915if ${ac_cv_path_DTRACE+:} false; then :
22916  $as_echo_n "(cached) " >&6
22917else
22918  case $DTRACE in
22919  [\\/]* | ?:[\\/]*)
22920  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22921  ;;
22922  *)
22923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22924as_dummy="$PATH:/usr/sbin"
22925for as_dir in $as_dummy
22926do
22927  IFS=$as_save_IFS
22928  test -z "$as_dir" && as_dir=.
22929    for ac_exec_ext in '' $ac_executable_extensions; do
22930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22931    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22933    break 2
22934  fi
22935done
22936  done
22937IFS=$as_save_IFS
22938
22939  ;;
22940esac
22941fi
22942DTRACE=$ac_cv_path_DTRACE
22943if test -n "$DTRACE"; then
22944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22945$as_echo "$DTRACE" >&6; }
22946else
22947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22948$as_echo "no" >&6; }
22949fi
22950
22951
22952  test -n "$DTRACE" && break
22953done
22954
22955    else
22956      # If it succeeded, then it was overridden by the user. We will use it
22957      # for the tool.
22958
22959      # First remove it from the list of overridden variables, so we can test
22960      # for unknown variables in the end.
22961      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22962
22963      # Check if we try to supply an empty value
22964      if test "x$DTRACE" = x; then
22965        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22966$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22967        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22968$as_echo_n "checking for DTRACE... " >&6; }
22969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22970$as_echo "disabled" >&6; }
22971      else
22972        # Check if the provided tool contains a complete path.
22973        tool_specified="$DTRACE"
22974        tool_basename="${tool_specified##*/}"
22975        if test "x$tool_basename" = "x$tool_specified"; then
22976          # A command without a complete path is provided, search $PATH.
22977          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22978$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22979          # Extract the first word of "$tool_basename", so it can be a program name with args.
22980set dummy $tool_basename; ac_word=$2
22981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22982$as_echo_n "checking for $ac_word... " >&6; }
22983if ${ac_cv_path_DTRACE+:} false; then :
22984  $as_echo_n "(cached) " >&6
22985else
22986  case $DTRACE in
22987  [\\/]* | ?:[\\/]*)
22988  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22989  ;;
22990  *)
22991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22992for as_dir in $PATH
22993do
22994  IFS=$as_save_IFS
22995  test -z "$as_dir" && as_dir=.
22996    for ac_exec_ext in '' $ac_executable_extensions; do
22997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22998    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23000    break 2
23001  fi
23002done
23003  done
23004IFS=$as_save_IFS
23005
23006  ;;
23007esac
23008fi
23009DTRACE=$ac_cv_path_DTRACE
23010if test -n "$DTRACE"; then
23011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23012$as_echo "$DTRACE" >&6; }
23013else
23014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23015$as_echo "no" >&6; }
23016fi
23017
23018
23019          if test "x$DTRACE" = x; then
23020            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23021          fi
23022        else
23023          # Otherwise we believe it is a complete path. Use it as it is.
23024          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23025$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23026          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23027$as_echo_n "checking for DTRACE... " >&6; }
23028          if test ! -x "$tool_specified"; then
23029            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23030$as_echo "not found" >&6; }
23031            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23032          fi
23033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23034$as_echo "$tool_specified" >&6; }
23035        fi
23036      fi
23037    fi
23038
23039  fi
23040
23041
23042
23043
23044  # Publish this variable in the help.
23045
23046
23047  if [ -z "${PATCH+x}" ]; then
23048    # The variable is not set by user, try to locate tool using the code snippet
23049    for ac_prog in gpatch patch
23050do
23051  # Extract the first word of "$ac_prog", so it can be a program name with args.
23052set dummy $ac_prog; ac_word=$2
23053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23054$as_echo_n "checking for $ac_word... " >&6; }
23055if ${ac_cv_path_PATCH+:} false; then :
23056  $as_echo_n "(cached) " >&6
23057else
23058  case $PATCH in
23059  [\\/]* | ?:[\\/]*)
23060  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23061  ;;
23062  *)
23063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23064for as_dir in $PATH
23065do
23066  IFS=$as_save_IFS
23067  test -z "$as_dir" && as_dir=.
23068    for ac_exec_ext in '' $ac_executable_extensions; do
23069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23070    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23072    break 2
23073  fi
23074done
23075  done
23076IFS=$as_save_IFS
23077
23078  ;;
23079esac
23080fi
23081PATCH=$ac_cv_path_PATCH
23082if test -n "$PATCH"; then
23083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23084$as_echo "$PATCH" >&6; }
23085else
23086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23087$as_echo "no" >&6; }
23088fi
23089
23090
23091  test -n "$PATCH" && break
23092done
23093
23094  else
23095    # The variable is set, but is it from the command line or the environment?
23096
23097    # Try to remove the string !PATCH! from our list.
23098    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23099    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23100      # If it failed, the variable was not from the command line. Ignore it,
23101      # but warn the user (except for BASH, which is always set by the calling BASH).
23102      if test "xPATCH" != xBASH; then
23103        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23104$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23105      fi
23106      # Try to locate tool using the code snippet
23107      for ac_prog in gpatch patch
23108do
23109  # Extract the first word of "$ac_prog", so it can be a program name with args.
23110set dummy $ac_prog; ac_word=$2
23111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23112$as_echo_n "checking for $ac_word... " >&6; }
23113if ${ac_cv_path_PATCH+:} false; then :
23114  $as_echo_n "(cached) " >&6
23115else
23116  case $PATCH in
23117  [\\/]* | ?:[\\/]*)
23118  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23119  ;;
23120  *)
23121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23122for as_dir in $PATH
23123do
23124  IFS=$as_save_IFS
23125  test -z "$as_dir" && as_dir=.
23126    for ac_exec_ext in '' $ac_executable_extensions; do
23127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23128    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23130    break 2
23131  fi
23132done
23133  done
23134IFS=$as_save_IFS
23135
23136  ;;
23137esac
23138fi
23139PATCH=$ac_cv_path_PATCH
23140if test -n "$PATCH"; then
23141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23142$as_echo "$PATCH" >&6; }
23143else
23144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23145$as_echo "no" >&6; }
23146fi
23147
23148
23149  test -n "$PATCH" && break
23150done
23151
23152    else
23153      # If it succeeded, then it was overridden by the user. We will use it
23154      # for the tool.
23155
23156      # First remove it from the list of overridden variables, so we can test
23157      # for unknown variables in the end.
23158      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23159
23160      # Check if we try to supply an empty value
23161      if test "x$PATCH" = x; then
23162        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23163$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23164        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23165$as_echo_n "checking for PATCH... " >&6; }
23166        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23167$as_echo "disabled" >&6; }
23168      else
23169        # Check if the provided tool contains a complete path.
23170        tool_specified="$PATCH"
23171        tool_basename="${tool_specified##*/}"
23172        if test "x$tool_basename" = "x$tool_specified"; then
23173          # A command without a complete path is provided, search $PATH.
23174          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23175$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23176          # Extract the first word of "$tool_basename", so it can be a program name with args.
23177set dummy $tool_basename; ac_word=$2
23178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23179$as_echo_n "checking for $ac_word... " >&6; }
23180if ${ac_cv_path_PATCH+:} false; then :
23181  $as_echo_n "(cached) " >&6
23182else
23183  case $PATCH in
23184  [\\/]* | ?:[\\/]*)
23185  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23186  ;;
23187  *)
23188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23189for as_dir in $PATH
23190do
23191  IFS=$as_save_IFS
23192  test -z "$as_dir" && as_dir=.
23193    for ac_exec_ext in '' $ac_executable_extensions; do
23194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23195    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23197    break 2
23198  fi
23199done
23200  done
23201IFS=$as_save_IFS
23202
23203  ;;
23204esac
23205fi
23206PATCH=$ac_cv_path_PATCH
23207if test -n "$PATCH"; then
23208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23209$as_echo "$PATCH" >&6; }
23210else
23211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23212$as_echo "no" >&6; }
23213fi
23214
23215
23216          if test "x$PATCH" = x; then
23217            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23218          fi
23219        else
23220          # Otherwise we believe it is a complete path. Use it as it is.
23221          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23222$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23223          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23224$as_echo_n "checking for PATCH... " >&6; }
23225          if test ! -x "$tool_specified"; then
23226            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23227$as_echo "not found" >&6; }
23228            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23229          fi
23230          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23231$as_echo "$tool_specified" >&6; }
23232        fi
23233      fi
23234    fi
23235
23236  fi
23237
23238
23239  # Check if it's GNU time
23240  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23241  if test "x$IS_GNU_TIME" != x; then
23242    IS_GNU_TIME=yes
23243  else
23244    IS_GNU_TIME=no
23245  fi
23246
23247
23248  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23249
23250
23251
23252  # Publish this variable in the help.
23253
23254
23255  if [ -z "${DSYMUTIL+x}" ]; then
23256    # The variable is not set by user, try to locate tool using the code snippet
23257    for ac_prog in dsymutil
23258do
23259  # Extract the first word of "$ac_prog", so it can be a program name with args.
23260set dummy $ac_prog; ac_word=$2
23261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23262$as_echo_n "checking for $ac_word... " >&6; }
23263if ${ac_cv_path_DSYMUTIL+:} false; then :
23264  $as_echo_n "(cached) " >&6
23265else
23266  case $DSYMUTIL in
23267  [\\/]* | ?:[\\/]*)
23268  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23269  ;;
23270  *)
23271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23272for as_dir in $PATH
23273do
23274  IFS=$as_save_IFS
23275  test -z "$as_dir" && as_dir=.
23276    for ac_exec_ext in '' $ac_executable_extensions; do
23277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23278    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23280    break 2
23281  fi
23282done
23283  done
23284IFS=$as_save_IFS
23285
23286  ;;
23287esac
23288fi
23289DSYMUTIL=$ac_cv_path_DSYMUTIL
23290if test -n "$DSYMUTIL"; then
23291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23292$as_echo "$DSYMUTIL" >&6; }
23293else
23294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23295$as_echo "no" >&6; }
23296fi
23297
23298
23299  test -n "$DSYMUTIL" && break
23300done
23301
23302  else
23303    # The variable is set, but is it from the command line or the environment?
23304
23305    # Try to remove the string !DSYMUTIL! from our list.
23306    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23307    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23308      # If it failed, the variable was not from the command line. Ignore it,
23309      # but warn the user (except for BASH, which is always set by the calling BASH).
23310      if test "xDSYMUTIL" != xBASH; then
23311        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23312$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23313      fi
23314      # Try to locate tool using the code snippet
23315      for ac_prog in dsymutil
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_DSYMUTIL+:} false; then :
23322  $as_echo_n "(cached) " >&6
23323else
23324  case $DSYMUTIL in
23325  [\\/]* | ?:[\\/]*)
23326  ac_cv_path_DSYMUTIL="$DSYMUTIL" # 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_DSYMUTIL="$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
23347DSYMUTIL=$ac_cv_path_DSYMUTIL
23348if test -n "$DSYMUTIL"; then
23349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23350$as_echo "$DSYMUTIL" >&6; }
23351else
23352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23353$as_echo "no" >&6; }
23354fi
23355
23356
23357  test -n "$DSYMUTIL" && break
23358done
23359
23360    else
23361      # If it succeeded, then it was overridden by the user. We will use it
23362      # for the tool.
23363
23364      # First remove it from the list of overridden variables, so we can test
23365      # for unknown variables in the end.
23366      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23367
23368      # Check if we try to supply an empty value
23369      if test "x$DSYMUTIL" = x; then
23370        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23371$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23372        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23373$as_echo_n "checking for DSYMUTIL... " >&6; }
23374        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23375$as_echo "disabled" >&6; }
23376      else
23377        # Check if the provided tool contains a complete path.
23378        tool_specified="$DSYMUTIL"
23379        tool_basename="${tool_specified##*/}"
23380        if test "x$tool_basename" = "x$tool_specified"; then
23381          # A command without a complete path is provided, search $PATH.
23382          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23383$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23384          # Extract the first word of "$tool_basename", so it can be a program name with args.
23385set dummy $tool_basename; ac_word=$2
23386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23387$as_echo_n "checking for $ac_word... " >&6; }
23388if ${ac_cv_path_DSYMUTIL+:} false; then :
23389  $as_echo_n "(cached) " >&6
23390else
23391  case $DSYMUTIL in
23392  [\\/]* | ?:[\\/]*)
23393  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23394  ;;
23395  *)
23396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23397for as_dir in $PATH
23398do
23399  IFS=$as_save_IFS
23400  test -z "$as_dir" && as_dir=.
23401    for ac_exec_ext in '' $ac_executable_extensions; do
23402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23403    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23405    break 2
23406  fi
23407done
23408  done
23409IFS=$as_save_IFS
23410
23411  ;;
23412esac
23413fi
23414DSYMUTIL=$ac_cv_path_DSYMUTIL
23415if test -n "$DSYMUTIL"; then
23416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23417$as_echo "$DSYMUTIL" >&6; }
23418else
23419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23420$as_echo "no" >&6; }
23421fi
23422
23423
23424          if test "x$DSYMUTIL" = x; then
23425            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23426          fi
23427        else
23428          # Otherwise we believe it is a complete path. Use it as it is.
23429          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23430$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23431          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23432$as_echo_n "checking for DSYMUTIL... " >&6; }
23433          if test ! -x "$tool_specified"; then
23434            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23435$as_echo "not found" >&6; }
23436            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23437          fi
23438          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23439$as_echo "$tool_specified" >&6; }
23440        fi
23441      fi
23442    fi
23443
23444  fi
23445
23446
23447
23448  if test "x$DSYMUTIL" = x; then
23449    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23450  fi
23451
23452
23453
23454
23455
23456  # Publish this variable in the help.
23457
23458
23459  if [ -z "${XATTR+x}" ]; then
23460    # The variable is not set by user, try to locate tool using the code snippet
23461    for ac_prog in xattr
23462do
23463  # Extract the first word of "$ac_prog", so it can be a program name with args.
23464set dummy $ac_prog; ac_word=$2
23465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23466$as_echo_n "checking for $ac_word... " >&6; }
23467if ${ac_cv_path_XATTR+:} false; then :
23468  $as_echo_n "(cached) " >&6
23469else
23470  case $XATTR in
23471  [\\/]* | ?:[\\/]*)
23472  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23473  ;;
23474  *)
23475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23476for as_dir in $PATH
23477do
23478  IFS=$as_save_IFS
23479  test -z "$as_dir" && as_dir=.
23480    for ac_exec_ext in '' $ac_executable_extensions; do
23481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23482    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23484    break 2
23485  fi
23486done
23487  done
23488IFS=$as_save_IFS
23489
23490  ;;
23491esac
23492fi
23493XATTR=$ac_cv_path_XATTR
23494if test -n "$XATTR"; then
23495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23496$as_echo "$XATTR" >&6; }
23497else
23498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23499$as_echo "no" >&6; }
23500fi
23501
23502
23503  test -n "$XATTR" && break
23504done
23505
23506  else
23507    # The variable is set, but is it from the command line or the environment?
23508
23509    # Try to remove the string !XATTR! from our list.
23510    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23511    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23512      # If it failed, the variable was not from the command line. Ignore it,
23513      # but warn the user (except for BASH, which is always set by the calling BASH).
23514      if test "xXATTR" != xBASH; then
23515        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23516$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23517      fi
23518      # Try to locate tool using the code snippet
23519      for ac_prog in xattr
23520do
23521  # Extract the first word of "$ac_prog", so it can be a program name with args.
23522set dummy $ac_prog; ac_word=$2
23523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23524$as_echo_n "checking for $ac_word... " >&6; }
23525if ${ac_cv_path_XATTR+:} false; then :
23526  $as_echo_n "(cached) " >&6
23527else
23528  case $XATTR in
23529  [\\/]* | ?:[\\/]*)
23530  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23531  ;;
23532  *)
23533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23534for as_dir in $PATH
23535do
23536  IFS=$as_save_IFS
23537  test -z "$as_dir" && as_dir=.
23538    for ac_exec_ext in '' $ac_executable_extensions; do
23539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23540    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23542    break 2
23543  fi
23544done
23545  done
23546IFS=$as_save_IFS
23547
23548  ;;
23549esac
23550fi
23551XATTR=$ac_cv_path_XATTR
23552if test -n "$XATTR"; then
23553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23554$as_echo "$XATTR" >&6; }
23555else
23556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23557$as_echo "no" >&6; }
23558fi
23559
23560
23561  test -n "$XATTR" && break
23562done
23563
23564    else
23565      # If it succeeded, then it was overridden by the user. We will use it
23566      # for the tool.
23567
23568      # First remove it from the list of overridden variables, so we can test
23569      # for unknown variables in the end.
23570      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23571
23572      # Check if we try to supply an empty value
23573      if test "x$XATTR" = x; then
23574        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23575$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23576        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23577$as_echo_n "checking for XATTR... " >&6; }
23578        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23579$as_echo "disabled" >&6; }
23580      else
23581        # Check if the provided tool contains a complete path.
23582        tool_specified="$XATTR"
23583        tool_basename="${tool_specified##*/}"
23584        if test "x$tool_basename" = "x$tool_specified"; then
23585          # A command without a complete path is provided, search $PATH.
23586          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23587$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23588          # Extract the first word of "$tool_basename", so it can be a program name with args.
23589set dummy $tool_basename; 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_XATTR+:} false; then :
23593  $as_echo_n "(cached) " >&6
23594else
23595  case $XATTR in
23596  [\\/]* | ?:[\\/]*)
23597  ac_cv_path_XATTR="$XATTR" # 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_XATTR="$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
23618XATTR=$ac_cv_path_XATTR
23619if test -n "$XATTR"; then
23620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23621$as_echo "$XATTR" >&6; }
23622else
23623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23624$as_echo "no" >&6; }
23625fi
23626
23627
23628          if test "x$XATTR" = x; then
23629            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23630          fi
23631        else
23632          # Otherwise we believe it is a complete path. Use it as it is.
23633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23634$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23635          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23636$as_echo_n "checking for XATTR... " >&6; }
23637          if test ! -x "$tool_specified"; then
23638            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23639$as_echo "not found" >&6; }
23640            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23641          fi
23642          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23643$as_echo "$tool_specified" >&6; }
23644        fi
23645      fi
23646    fi
23647
23648  fi
23649
23650
23651
23652  if test "x$XATTR" = x; then
23653    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23654  fi
23655
23656
23657
23658
23659  # Publish this variable in the help.
23660
23661
23662  if [ -z "${CODESIGN+x}" ]; then
23663    # The variable is not set by user, try to locate tool using the code snippet
23664    for ac_prog in codesign
23665do
23666  # Extract the first word of "$ac_prog", so it can be a program name with args.
23667set dummy $ac_prog; ac_word=$2
23668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23669$as_echo_n "checking for $ac_word... " >&6; }
23670if ${ac_cv_path_CODESIGN+:} false; then :
23671  $as_echo_n "(cached) " >&6
23672else
23673  case $CODESIGN in
23674  [\\/]* | ?:[\\/]*)
23675  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23676  ;;
23677  *)
23678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23679for as_dir in $PATH
23680do
23681  IFS=$as_save_IFS
23682  test -z "$as_dir" && as_dir=.
23683    for ac_exec_ext in '' $ac_executable_extensions; do
23684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23685    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23687    break 2
23688  fi
23689done
23690  done
23691IFS=$as_save_IFS
23692
23693  ;;
23694esac
23695fi
23696CODESIGN=$ac_cv_path_CODESIGN
23697if test -n "$CODESIGN"; then
23698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23699$as_echo "$CODESIGN" >&6; }
23700else
23701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23702$as_echo "no" >&6; }
23703fi
23704
23705
23706  test -n "$CODESIGN" && break
23707done
23708
23709  else
23710    # The variable is set, but is it from the command line or the environment?
23711
23712    # Try to remove the string !CODESIGN! from our list.
23713    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23714    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23715      # If it failed, the variable was not from the command line. Ignore it,
23716      # but warn the user (except for BASH, which is always set by the calling BASH).
23717      if test "xCODESIGN" != xBASH; then
23718        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23719$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23720      fi
23721      # Try to locate tool using the code snippet
23722      for ac_prog in codesign
23723do
23724  # Extract the first word of "$ac_prog", so it can be a program name with args.
23725set dummy $ac_prog; ac_word=$2
23726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23727$as_echo_n "checking for $ac_word... " >&6; }
23728if ${ac_cv_path_CODESIGN+:} false; then :
23729  $as_echo_n "(cached) " >&6
23730else
23731  case $CODESIGN in
23732  [\\/]* | ?:[\\/]*)
23733  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23734  ;;
23735  *)
23736  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23737for as_dir in $PATH
23738do
23739  IFS=$as_save_IFS
23740  test -z "$as_dir" && as_dir=.
23741    for ac_exec_ext in '' $ac_executable_extensions; do
23742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23743    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23745    break 2
23746  fi
23747done
23748  done
23749IFS=$as_save_IFS
23750
23751  ;;
23752esac
23753fi
23754CODESIGN=$ac_cv_path_CODESIGN
23755if test -n "$CODESIGN"; then
23756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23757$as_echo "$CODESIGN" >&6; }
23758else
23759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23760$as_echo "no" >&6; }
23761fi
23762
23763
23764  test -n "$CODESIGN" && break
23765done
23766
23767    else
23768      # If it succeeded, then it was overridden by the user. We will use it
23769      # for the tool.
23770
23771      # First remove it from the list of overridden variables, so we can test
23772      # for unknown variables in the end.
23773      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23774
23775      # Check if we try to supply an empty value
23776      if test "x$CODESIGN" = x; then
23777        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23778$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23779        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23780$as_echo_n "checking for CODESIGN... " >&6; }
23781        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23782$as_echo "disabled" >&6; }
23783      else
23784        # Check if the provided tool contains a complete path.
23785        tool_specified="$CODESIGN"
23786        tool_basename="${tool_specified##*/}"
23787        if test "x$tool_basename" = "x$tool_specified"; then
23788          # A command without a complete path is provided, search $PATH.
23789          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23790$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23791          # Extract the first word of "$tool_basename", so it can be a program name with args.
23792set dummy $tool_basename; ac_word=$2
23793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23794$as_echo_n "checking for $ac_word... " >&6; }
23795if ${ac_cv_path_CODESIGN+:} false; then :
23796  $as_echo_n "(cached) " >&6
23797else
23798  case $CODESIGN in
23799  [\\/]* | ?:[\\/]*)
23800  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23801  ;;
23802  *)
23803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23804for as_dir in $PATH
23805do
23806  IFS=$as_save_IFS
23807  test -z "$as_dir" && as_dir=.
23808    for ac_exec_ext in '' $ac_executable_extensions; do
23809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23810    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23812    break 2
23813  fi
23814done
23815  done
23816IFS=$as_save_IFS
23817
23818  ;;
23819esac
23820fi
23821CODESIGN=$ac_cv_path_CODESIGN
23822if test -n "$CODESIGN"; then
23823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23824$as_echo "$CODESIGN" >&6; }
23825else
23826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23827$as_echo "no" >&6; }
23828fi
23829
23830
23831          if test "x$CODESIGN" = x; then
23832            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23833          fi
23834        else
23835          # Otherwise we believe it is a complete path. Use it as it is.
23836          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23837$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23838          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23839$as_echo_n "checking for CODESIGN... " >&6; }
23840          if test ! -x "$tool_specified"; then
23841            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23842$as_echo "not found" >&6; }
23843            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23844          fi
23845          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23846$as_echo "$tool_specified" >&6; }
23847        fi
23848      fi
23849    fi
23850
23851  fi
23852
23853
23854    if test "x$CODESIGN" != "x"; then
23855      # Verify that the openjdk_codesign certificate is present
23856      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23857$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23858      $RM codesign-testfile
23859      $TOUCH codesign-testfile
23860      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23861      $RM codesign-testfile
23862      if test "x$CODESIGN" = x; then
23863        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23864$as_echo "no" >&6; }
23865      else
23866        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23867$as_echo "yes" >&6; }
23868      fi
23869    fi
23870
23871
23872
23873  # Publish this variable in the help.
23874
23875
23876  if [ -z "${SETFILE+x}" ]; then
23877    # The variable is not set by user, try to locate tool using the code snippet
23878    for ac_prog in SetFile
23879do
23880  # Extract the first word of "$ac_prog", so it can be a program name with args.
23881set dummy $ac_prog; ac_word=$2
23882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23883$as_echo_n "checking for $ac_word... " >&6; }
23884if ${ac_cv_path_SETFILE+:} false; then :
23885  $as_echo_n "(cached) " >&6
23886else
23887  case $SETFILE in
23888  [\\/]* | ?:[\\/]*)
23889  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23890  ;;
23891  *)
23892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23893for as_dir in $PATH
23894do
23895  IFS=$as_save_IFS
23896  test -z "$as_dir" && as_dir=.
23897    for ac_exec_ext in '' $ac_executable_extensions; do
23898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23899    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23901    break 2
23902  fi
23903done
23904  done
23905IFS=$as_save_IFS
23906
23907  ;;
23908esac
23909fi
23910SETFILE=$ac_cv_path_SETFILE
23911if test -n "$SETFILE"; then
23912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23913$as_echo "$SETFILE" >&6; }
23914else
23915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23916$as_echo "no" >&6; }
23917fi
23918
23919
23920  test -n "$SETFILE" && break
23921done
23922
23923  else
23924    # The variable is set, but is it from the command line or the environment?
23925
23926    # Try to remove the string !SETFILE! from our list.
23927    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23928    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23929      # If it failed, the variable was not from the command line. Ignore it,
23930      # but warn the user (except for BASH, which is always set by the calling BASH).
23931      if test "xSETFILE" != xBASH; then
23932        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23933$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23934      fi
23935      # Try to locate tool using the code snippet
23936      for ac_prog in SetFile
23937do
23938  # Extract the first word of "$ac_prog", so it can be a program name with args.
23939set dummy $ac_prog; ac_word=$2
23940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23941$as_echo_n "checking for $ac_word... " >&6; }
23942if ${ac_cv_path_SETFILE+:} false; then :
23943  $as_echo_n "(cached) " >&6
23944else
23945  case $SETFILE in
23946  [\\/]* | ?:[\\/]*)
23947  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23948  ;;
23949  *)
23950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23951for as_dir in $PATH
23952do
23953  IFS=$as_save_IFS
23954  test -z "$as_dir" && as_dir=.
23955    for ac_exec_ext in '' $ac_executable_extensions; do
23956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23957    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23959    break 2
23960  fi
23961done
23962  done
23963IFS=$as_save_IFS
23964
23965  ;;
23966esac
23967fi
23968SETFILE=$ac_cv_path_SETFILE
23969if test -n "$SETFILE"; then
23970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23971$as_echo "$SETFILE" >&6; }
23972else
23973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23974$as_echo "no" >&6; }
23975fi
23976
23977
23978  test -n "$SETFILE" && break
23979done
23980
23981    else
23982      # If it succeeded, then it was overridden by the user. We will use it
23983      # for the tool.
23984
23985      # First remove it from the list of overridden variables, so we can test
23986      # for unknown variables in the end.
23987      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23988
23989      # Check if we try to supply an empty value
23990      if test "x$SETFILE" = x; then
23991        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23992$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23993        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23994$as_echo_n "checking for SETFILE... " >&6; }
23995        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23996$as_echo "disabled" >&6; }
23997      else
23998        # Check if the provided tool contains a complete path.
23999        tool_specified="$SETFILE"
24000        tool_basename="${tool_specified##*/}"
24001        if test "x$tool_basename" = "x$tool_specified"; then
24002          # A command without a complete path is provided, search $PATH.
24003          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24004$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24005          # Extract the first word of "$tool_basename", so it can be a program name with args.
24006set dummy $tool_basename; ac_word=$2
24007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24008$as_echo_n "checking for $ac_word... " >&6; }
24009if ${ac_cv_path_SETFILE+:} false; then :
24010  $as_echo_n "(cached) " >&6
24011else
24012  case $SETFILE in
24013  [\\/]* | ?:[\\/]*)
24014  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24015  ;;
24016  *)
24017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24018for as_dir in $PATH
24019do
24020  IFS=$as_save_IFS
24021  test -z "$as_dir" && as_dir=.
24022    for ac_exec_ext in '' $ac_executable_extensions; do
24023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24024    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24026    break 2
24027  fi
24028done
24029  done
24030IFS=$as_save_IFS
24031
24032  ;;
24033esac
24034fi
24035SETFILE=$ac_cv_path_SETFILE
24036if test -n "$SETFILE"; then
24037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24038$as_echo "$SETFILE" >&6; }
24039else
24040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24041$as_echo "no" >&6; }
24042fi
24043
24044
24045          if test "x$SETFILE" = x; then
24046            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24047          fi
24048        else
24049          # Otherwise we believe it is a complete path. Use it as it is.
24050          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24051$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24052          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24053$as_echo_n "checking for SETFILE... " >&6; }
24054          if test ! -x "$tool_specified"; then
24055            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24056$as_echo "not found" >&6; }
24057            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24058          fi
24059          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24060$as_echo "$tool_specified" >&6; }
24061        fi
24062      fi
24063    fi
24064
24065  fi
24066
24067
24068
24069  if test "x$SETFILE" = x; then
24070    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24071  fi
24072
24073
24074  fi
24075
24076
24077  # Test if bash supports pipefail.
24078  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24079$as_echo_n "checking if bash supports pipefail... " >&6; }
24080  if ${BASH} -c 'set -o pipefail'; then
24081    BASH_ARGS="$BASH_ARGS -o pipefail"
24082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24083$as_echo "yes" >&6; }
24084  else
24085    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24086$as_echo "no" >&6; }
24087  fi
24088
24089  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24090$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24091  if ${BASH} -e -c 'true'; then
24092    BASH_ARGS="$BASH_ARGS -e"
24093    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24094$as_echo "yes" >&6; }
24095  else
24096    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24097$as_echo "no" >&6; }
24098  fi
24099
24100
24101
24102
24103# Check if pkg-config is available.
24104
24105
24106if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24107	if test -n "$ac_tool_prefix"; then
24108  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24109set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24111$as_echo_n "checking for $ac_word... " >&6; }
24112if ${ac_cv_path_PKG_CONFIG+:} false; then :
24113  $as_echo_n "(cached) " >&6
24114else
24115  case $PKG_CONFIG in
24116  [\\/]* | ?:[\\/]*)
24117  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24118  ;;
24119  *)
24120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24121for as_dir in $PATH
24122do
24123  IFS=$as_save_IFS
24124  test -z "$as_dir" && as_dir=.
24125    for ac_exec_ext in '' $ac_executable_extensions; do
24126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24127    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24129    break 2
24130  fi
24131done
24132  done
24133IFS=$as_save_IFS
24134
24135  ;;
24136esac
24137fi
24138PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24139if test -n "$PKG_CONFIG"; then
24140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24141$as_echo "$PKG_CONFIG" >&6; }
24142else
24143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24144$as_echo "no" >&6; }
24145fi
24146
24147
24148fi
24149if test -z "$ac_cv_path_PKG_CONFIG"; then
24150  ac_pt_PKG_CONFIG=$PKG_CONFIG
24151  # Extract the first word of "pkg-config", so it can be a program name with args.
24152set dummy pkg-config; ac_word=$2
24153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24154$as_echo_n "checking for $ac_word... " >&6; }
24155if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24156  $as_echo_n "(cached) " >&6
24157else
24158  case $ac_pt_PKG_CONFIG in
24159  [\\/]* | ?:[\\/]*)
24160  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24161  ;;
24162  *)
24163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24164for as_dir in $PATH
24165do
24166  IFS=$as_save_IFS
24167  test -z "$as_dir" && as_dir=.
24168    for ac_exec_ext in '' $ac_executable_extensions; do
24169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24170    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24172    break 2
24173  fi
24174done
24175  done
24176IFS=$as_save_IFS
24177
24178  ;;
24179esac
24180fi
24181ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24182if test -n "$ac_pt_PKG_CONFIG"; then
24183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24184$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24185else
24186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24187$as_echo "no" >&6; }
24188fi
24189
24190  if test "x$ac_pt_PKG_CONFIG" = x; then
24191    PKG_CONFIG=""
24192  else
24193    case $cross_compiling:$ac_tool_warned in
24194yes:)
24195{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24196$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24197ac_tool_warned=yes ;;
24198esac
24199    PKG_CONFIG=$ac_pt_PKG_CONFIG
24200  fi
24201else
24202  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24203fi
24204
24205fi
24206if test -n "$PKG_CONFIG"; then
24207	_pkg_min_version=0.9.0
24208	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24209$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24210	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24211		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24212$as_echo "yes" >&6; }
24213	else
24214		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24215$as_echo "no" >&6; }
24216		PKG_CONFIG=""
24217	fi
24218
24219fi
24220
24221# After basic tools have been setup, we can check build os specific details.
24222
24223  ###############################################################################
24224
24225  # Note that this is the build platform OS version!
24226
24227  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24228  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24229  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24230  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24231
24232
24233
24234
24235
24236# Misc basic settings
24237
24238
24239# Check whether --with-default-make-target was given.
24240if test "${with_default_make_target+set}" = set; then :
24241  withval=$with_default_make_target;
24242fi
24243
24244  if test "x$with_default_make_target" = "x" \
24245      || test "x$with_default_make_target" = "xyes"; then
24246    DEFAULT_MAKE_TARGET="exploded-image"
24247  elif test "x$with_default_make_target" = "xno"; then
24248    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24249  else
24250    DEFAULT_MAKE_TARGET="$with_default_make_target"
24251  fi
24252
24253
24254
24255
24256###############################################################################
24257#
24258# Determine OpenJDK variants, options and version numbers.
24259#
24260###############################################################################
24261
24262# We need build & target for this.
24263
24264  # Should we build a JDK without a graphical UI?
24265  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24266$as_echo_n "checking headless only... " >&6; }
24267  # Check whether --enable-headless-only was given.
24268if test "${enable_headless_only+set}" = set; then :
24269  enableval=$enable_headless_only;
24270fi
24271
24272
24273  if test "x$enable_headless_only" = "xyes"; then
24274    ENABLE_HEADLESS_ONLY="true"
24275    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24276$as_echo "yes" >&6; }
24277  elif test "x$enable_headless_only" = "xno"; then
24278    ENABLE_HEADLESS_ONLY="false"
24279    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24280$as_echo "no" >&6; }
24281  elif test "x$enable_headless_only" = "x"; then
24282    ENABLE_HEADLESS_ONLY="false"
24283    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24284$as_echo "no" >&6; }
24285  else
24286    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24287  fi
24288
24289
24290
24291  # Choose cacerts source file
24292
24293# Check whether --with-cacerts-file was given.
24294if test "${with_cacerts_file+set}" = set; then :
24295  withval=$with_cacerts_file;
24296fi
24297
24298  if test "x$with_cacerts_file" != x; then
24299    CACERTS_FILE=$with_cacerts_file
24300  fi
24301
24302
24303  # Enable or disable unlimited crypto
24304  # Check whether --enable-unlimited-crypto was given.
24305if test "${enable_unlimited_crypto+set}" = set; then :
24306  enableval=$enable_unlimited_crypto;
24307else
24308  enable_unlimited_crypto=yes
24309fi
24310
24311  if test "x$enable_unlimited_crypto" = "xyes"; then
24312    UNLIMITED_CRYPTO=true
24313  else
24314    UNLIMITED_CRYPTO=false
24315  fi
24316
24317
24318  # Should we build the serviceability agent (SA)?
24319  INCLUDE_SA=true
24320  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24321    INCLUDE_SA=false
24322  fi
24323  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24324    INCLUDE_SA=false
24325  fi
24326
24327
24328  # Compress jars
24329  COMPRESS_JARS=false
24330
24331
24332
24333  # Setup default copyright year. Mostly overridden when building close to a new year.
24334
24335# Check whether --with-copyright-year was given.
24336if test "${with_copyright_year+set}" = set; then :
24337  withval=$with_copyright_year;
24338fi
24339
24340  if test "x$with_copyright_year" = xyes; then
24341    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24342  elif test "x$with_copyright_year" != x; then
24343    COPYRIGHT_YEAR="$with_copyright_year"
24344  else
24345    COPYRIGHT_YEAR=`$DATE +'%Y'`
24346  fi
24347
24348
24349
24350  # Check whether --enable-keep-packaged-modules was given.
24351if test "${enable_keep_packaged_modules+set}" = set; then :
24352  enableval=$enable_keep_packaged_modules;
24353fi
24354
24355
24356  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24357$as_echo_n "checking if packaged modules are kept... " >&6; }
24358  if test "x$enable_keep_packaged_modules" = "xyes"; then
24359    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24360$as_echo "yes" >&6; }
24361    JLINK_KEEP_PACKAGED_MODULES=true
24362  elif test "x$enable_keep_packaged_modules" = "xno"; then
24363    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24364$as_echo "no" >&6; }
24365    JLINK_KEEP_PACKAGED_MODULES=false
24366  elif test "x$enable_keep_packaged_modules" = "x"; then
24367    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24368$as_echo "yes (default)" >&6; }
24369    JLINK_KEEP_PACKAGED_MODULES=true
24370  else
24371    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
24372$as_echo "error" >&6; }
24373    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24374  fi
24375
24376
24377
24378
24379  # Warn user that old version arguments are deprecated.
24380
24381
24382# Check whether --with-milestone was given.
24383if test "${with_milestone+set}" = set; then :
24384  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24385$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24386fi
24387
24388
24389
24390
24391# Check whether --with-update-version was given.
24392if test "${with_update_version+set}" = set; then :
24393  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24394$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24395fi
24396
24397
24398
24399
24400# Check whether --with-user-release-suffix was given.
24401if test "${with_user_release_suffix+set}" = set; then :
24402  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
24403$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24404fi
24405
24406
24407
24408
24409# Check whether --with-build-number was given.
24410if test "${with_build_number+set}" = set; then :
24411  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24412$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24413fi
24414
24415
24416
24417  # Source the version numbers file
24418  . $AUTOCONF_DIR/version-numbers
24419
24420  # Some non-version number information is set in that file
24421
24422
24423
24424
24425
24426
24427
24428
24429
24430  # Override version from arguments
24431
24432  # If --with-version-string is set, process it first. It is possible to
24433  # override parts with more specific flags, since these are processed later.
24434
24435# Check whether --with-version-string was given.
24436if test "${with_version_string+set}" = set; then :
24437  withval=$with_version_string;
24438fi
24439
24440  if test "x$with_version_string" = xyes; then
24441    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24442  elif test "x$with_version_string" != x; then
24443    # Additional [] needed to keep m4 from mangling shell constructs.
24444    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24445      VERSION_MAJOR=${BASH_REMATCH[1]}
24446      VERSION_MINOR=${BASH_REMATCH[3]}
24447      VERSION_SECURITY=${BASH_REMATCH[5]}
24448      VERSION_PATCH=${BASH_REMATCH[7]}
24449      VERSION_PRE=${BASH_REMATCH[9]}
24450      version_plus_separator=${BASH_REMATCH[11]}
24451      VERSION_BUILD=${BASH_REMATCH[12]}
24452      VERSION_OPT=${BASH_REMATCH[14]}
24453      # Unspecified numerical fields are interpreted as 0.
24454      if test "x$VERSION_MINOR" = x; then
24455        VERSION_MINOR=0
24456      fi
24457      if test "x$VERSION_SECURITY" = x; then
24458        VERSION_SECURITY=0
24459      fi
24460      if test "x$VERSION_PATCH" = x; then
24461        VERSION_PATCH=0
24462      fi
24463      if test "x$version_plus_separator" != x \
24464          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24465        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24466      fi
24467      # Stop the version part process from setting default values.
24468      # We still allow them to explicitly override though.
24469      NO_DEFAULT_VERSION_PARTS=true
24470    else
24471      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24472    fi
24473  fi
24474
24475
24476# Check whether --with-version-pre was given.
24477if test "${with_version_pre+set}" = set; then :
24478  withval=$with_version_pre; with_version_pre_present=true
24479else
24480  with_version_pre_present=false
24481fi
24482
24483
24484  if test "x$with_version_pre_present" = xtrue; then
24485    if test "x$with_version_pre" = xyes; then
24486      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24487    elif test "x$with_version_pre" = xno; then
24488      # Interpret --without-* as empty string instead of the literal "no"
24489      VERSION_PRE=
24490    else
24491      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24492       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24493      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24494        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24495$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24496      fi
24497    fi
24498  else
24499    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24500      # Default is to use "internal" as pre
24501      VERSION_PRE="internal"
24502    fi
24503  fi
24504
24505
24506# Check whether --with-version-opt was given.
24507if test "${with_version_opt+set}" = set; then :
24508  withval=$with_version_opt; with_version_opt_present=true
24509else
24510  with_version_opt_present=false
24511fi
24512
24513
24514  if test "x$with_version_opt_present" = xtrue; then
24515    if test "x$with_version_opt" = xyes; then
24516      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24517    elif test "x$with_version_opt" = xno; then
24518      # Interpret --without-* as empty string instead of the literal "no"
24519      VERSION_OPT=
24520    else
24521      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24522       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24523      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24524        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24525$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24526      fi
24527    fi
24528  else
24529    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24530      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
24531      # Outer [ ] to quote m4.
24532       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24533      VERSION_OPT="adhoc.$USERNAME.$basedirname"
24534    fi
24535  fi
24536
24537
24538# Check whether --with-version-build was given.
24539if test "${with_version_build+set}" = set; then :
24540  withval=$with_version_build; with_version_build_present=true
24541else
24542  with_version_build_present=false
24543fi
24544
24545
24546  if test "x$with_version_build_present" = xtrue; then
24547    if test "x$with_version_build" = xyes; then
24548      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24549    elif test "x$with_version_build" = xno; then
24550      # Interpret --without-* as empty string instead of the literal "no"
24551      VERSION_BUILD=
24552    elif test "x$with_version_build" = x; then
24553      VERSION_BUILD=
24554    else
24555
24556  # Additional [] needed to keep m4 from mangling shell constructs.
24557  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24558    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24559  fi
24560  # Extract the version number without leading zeros.
24561  cleaned_value=${BASH_REMATCH[1]}
24562  if test "x$cleaned_value" = x; then
24563    # Special case for zero
24564    cleaned_value=${BASH_REMATCH[2]}
24565  fi
24566
24567  if test $cleaned_value -gt 255; then
24568    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24569  fi
24570  if test "x$cleaned_value" != "x$with_version_build"; then
24571    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24572$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24573  fi
24574  VERSION_BUILD=$cleaned_value
24575
24576    fi
24577  else
24578    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24579      # Default is to not have a build number.
24580      VERSION_BUILD=""
24581      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24582      VERSION_BUILD=0
24583    fi
24584  fi
24585
24586
24587# Check whether --with-version-major was given.
24588if test "${with_version_major+set}" = set; then :
24589  withval=$with_version_major; with_version_major_present=true
24590else
24591  with_version_major_present=false
24592fi
24593
24594
24595  if test "x$with_version_major_present" = xtrue; then
24596    if test "x$with_version_major" = xyes; then
24597      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24598    else
24599
24600  # Additional [] needed to keep m4 from mangling shell constructs.
24601  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24602    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24603  fi
24604  # Extract the version number without leading zeros.
24605  cleaned_value=${BASH_REMATCH[1]}
24606  if test "x$cleaned_value" = x; then
24607    # Special case for zero
24608    cleaned_value=${BASH_REMATCH[2]}
24609  fi
24610
24611  if test $cleaned_value -gt 255; then
24612    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24613  fi
24614  if test "x$cleaned_value" != "x$with_version_major"; then
24615    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24616$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24617  fi
24618  VERSION_MAJOR=$cleaned_value
24619
24620    fi
24621  else
24622    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24623      # Default is to get value from version-numbers
24624      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24625    fi
24626  fi
24627
24628
24629# Check whether --with-version-minor was given.
24630if test "${with_version_minor+set}" = set; then :
24631  withval=$with_version_minor; with_version_minor_present=true
24632else
24633  with_version_minor_present=false
24634fi
24635
24636
24637  if test "x$with_version_minor_present" = xtrue; then
24638    if test "x$with_version_minor" = xyes; then
24639      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24640    elif test "x$with_version_minor" = xno; then
24641      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24642      VERSION_MINOR=0
24643    elif test "x$with_version_minor" = x; then
24644      VERSION_MINOR=0
24645    else
24646
24647  # Additional [] needed to keep m4 from mangling shell constructs.
24648  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24649    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24650  fi
24651  # Extract the version number without leading zeros.
24652  cleaned_value=${BASH_REMATCH[1]}
24653  if test "x$cleaned_value" = x; then
24654    # Special case for zero
24655    cleaned_value=${BASH_REMATCH[2]}
24656  fi
24657
24658  if test $cleaned_value -gt 255; then
24659    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24660  fi
24661  if test "x$cleaned_value" != "x$with_version_minor"; then
24662    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24663$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24664  fi
24665  VERSION_MINOR=$cleaned_value
24666
24667    fi
24668  else
24669    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24670      # Default is 0, if unspecified
24671      VERSION_MINOR=$DEFAULT_VERSION_MINOR
24672    fi
24673  fi
24674
24675
24676# Check whether --with-version-security was given.
24677if test "${with_version_security+set}" = set; then :
24678  withval=$with_version_security; with_version_security_present=true
24679else
24680  with_version_security_present=false
24681fi
24682
24683
24684  if test "x$with_version_security_present" = xtrue; then
24685    if test "x$with_version_security" = xyes; then
24686      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24687    elif test "x$with_version_security" = xno; then
24688      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24689      VERSION_SECURITY=0
24690    elif test "x$with_version_security" = x; then
24691      VERSION_SECURITY=0
24692    else
24693
24694  # Additional [] needed to keep m4 from mangling shell constructs.
24695  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24696    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24697  fi
24698  # Extract the version number without leading zeros.
24699  cleaned_value=${BASH_REMATCH[1]}
24700  if test "x$cleaned_value" = x; then
24701    # Special case for zero
24702    cleaned_value=${BASH_REMATCH[2]}
24703  fi
24704
24705  if test $cleaned_value -gt 255; then
24706    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24707  fi
24708  if test "x$cleaned_value" != "x$with_version_security"; then
24709    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24710$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24711  fi
24712  VERSION_SECURITY=$cleaned_value
24713
24714    fi
24715  else
24716    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24717      # Default is 0, if unspecified
24718      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
24719    fi
24720  fi
24721
24722
24723# Check whether --with-version-patch was given.
24724if test "${with_version_patch+set}" = set; then :
24725  withval=$with_version_patch; with_version_patch_present=true
24726else
24727  with_version_patch_present=false
24728fi
24729
24730
24731  if test "x$with_version_patch_present" = xtrue; then
24732    if test "x$with_version_patch" = xyes; then
24733      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24734    elif test "x$with_version_patch" = xno; then
24735      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24736      VERSION_PATCH=0
24737    elif test "x$with_version_patch" = x; then
24738      VERSION_PATCH=0
24739    else
24740
24741  # Additional [] needed to keep m4 from mangling shell constructs.
24742  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24743    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24744  fi
24745  # Extract the version number without leading zeros.
24746  cleaned_value=${BASH_REMATCH[1]}
24747  if test "x$cleaned_value" = x; then
24748    # Special case for zero
24749    cleaned_value=${BASH_REMATCH[2]}
24750  fi
24751
24752  if test $cleaned_value -gt 255; then
24753    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24754  fi
24755  if test "x$cleaned_value" != "x$with_version_patch"; then
24756    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24757$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24758  fi
24759  VERSION_PATCH=$cleaned_value
24760
24761    fi
24762  else
24763    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24764      # Default is 0, if unspecified
24765      VERSION_PATCH=$DEFAULT_VERSION_PATCH
24766    fi
24767  fi
24768
24769  # Calculate derived version properties
24770
24771  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24772  if test "x$VERSION_PRE" = x; then
24773    VERSION_IS_GA=true
24774  else
24775    VERSION_IS_GA=false
24776  fi
24777
24778  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24779  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24780
24781  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24782  # Strip trailing zeroes from stripped_version_number
24783  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24784  VERSION_NUMBER=$stripped_version_number
24785
24786  # The complete version string, with additional build information
24787  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24788    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24789  else
24790    # If either build or opt is set, we need a + separator
24791    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24792  fi
24793
24794  # The short version string, just VERSION_NUMBER and PRE, if present.
24795  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24796
24797  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24798$as_echo_n "checking for version string... " >&6; }
24799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24800$as_echo "$VERSION_STRING" >&6; }
24801
24802
24803
24804
24805
24806
24807
24808
24809
24810
24811
24812
24813
24814
24815
24816###############################################################################
24817#
24818# Setup BootJDK, used to bootstrap the build.
24819#
24820###############################################################################
24821
24822
24823  BOOT_JDK_FOUND=no
24824
24825# Check whether --with-boot-jdk was given.
24826if test "${with_boot_jdk+set}" = set; then :
24827  withval=$with_boot_jdk;
24828fi
24829
24830
24831  # We look for the Boot JDK through various means, going from more certain to
24832  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24833  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24834  # must check if this is indeed valid; otherwise we'll continue looking.
24835
24836  # Test: Is bootjdk explicitly set by command line arguments?
24837
24838  if test "x$BOOT_JDK_FOUND" = xno; then
24839    # Now execute the test
24840
24841  if test "x$with_boot_jdk" != x; then
24842    BOOT_JDK=$with_boot_jdk
24843    BOOT_JDK_FOUND=maybe
24844    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24845$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24846  fi
24847
24848
24849    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24850    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24851      # Do we have a bin/java?
24852      if test ! -x "$BOOT_JDK/bin/java"; then
24853        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24854$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24855        BOOT_JDK_FOUND=no
24856      else
24857        # Do we have a bin/javac?
24858        if test ! -x "$BOOT_JDK/bin/javac"; then
24859          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24860$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24861          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24862$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24863          BOOT_JDK_FOUND=no
24864        else
24865          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24866          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24867
24868          # Extra M4 quote needed to protect [] in grep expression.
24869          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24870          if test "x$FOUND_CORRECT_VERSION" = x; then
24871            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24872$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24873            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24874$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24875            BOOT_JDK_FOUND=no
24876          else
24877            # We're done! :-)
24878            BOOT_JDK_FOUND=yes
24879
24880  # Only process if variable expands to non-empty
24881
24882  if test "x$BOOT_JDK" != x; then
24883    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24884
24885  # Input might be given as Windows format, start by converting to
24886  # unix format.
24887  path="$BOOT_JDK"
24888  new_path=`$CYGPATH -u "$path"`
24889
24890  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24891  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24892  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24893  # "foo.exe" is OK but "foo" is an error.
24894  #
24895  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24896  # It is also a way to make sure we got the proper file name for the real test later on.
24897  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24898  if test "x$test_shortpath" = x; then
24899    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24900$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24901    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24902  fi
24903
24904  # Call helper function which possibly converts this using DOS-style short mode.
24905  # If so, the updated path is stored in $new_path.
24906
24907  input_path="$new_path"
24908  # Check if we need to convert this using DOS-style short mode. If the path
24909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24910  # take no chances and rewrite it.
24911  # Note: m4 eats our [], so we need to use [ and ] instead.
24912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24913  if test "x$has_forbidden_chars" != x; then
24914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24915    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24916    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24917    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24918      # Going to short mode and back again did indeed matter. Since short mode is
24919      # case insensitive, let's make it lowercase to improve readability.
24920      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24921      # Now convert it back to Unix-style (cygpath)
24922      input_path=`$CYGPATH -u "$shortmode_path"`
24923      new_path="$input_path"
24924    fi
24925  fi
24926
24927  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24928  if test "x$test_cygdrive_prefix" = x; then
24929    # As a simple fix, exclude /usr/bin since it's not a real path.
24930    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24931      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24932      # a path prefixed by /cygdrive for fixpath to work.
24933      new_path="$CYGWIN_ROOT_PATH$input_path"
24934    fi
24935  fi
24936
24937
24938  if test "x$path" != "x$new_path"; then
24939    BOOT_JDK="$new_path"
24940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24941$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24942  fi
24943
24944    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24945
24946  path="$BOOT_JDK"
24947  has_colon=`$ECHO $path | $GREP ^.:`
24948  new_path="$path"
24949  if test "x$has_colon" = x; then
24950    # Not in mixed or Windows style, start by that.
24951    new_path=`cmd //c echo $path`
24952  fi
24953
24954
24955  input_path="$new_path"
24956  # Check if we need to convert this using DOS-style short mode. If the path
24957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24958  # take no chances and rewrite it.
24959  # Note: m4 eats our [], so we need to use [ and ] instead.
24960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24961  if test "x$has_forbidden_chars" != x; then
24962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24963    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24964  fi
24965
24966
24967  windows_path="$new_path"
24968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24969    unix_path=`$CYGPATH -u "$windows_path"`
24970    new_path="$unix_path"
24971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24973    new_path="$unix_path"
24974  fi
24975
24976  if test "x$path" != "x$new_path"; then
24977    BOOT_JDK="$new_path"
24978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24979$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24980  fi
24981
24982  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24983  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24984
24985    else
24986      # We're on a unix platform. Hooray! :)
24987      path="$BOOT_JDK"
24988      has_space=`$ECHO "$path" | $GREP " "`
24989      if test "x$has_space" != x; then
24990        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24991$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24992        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24993      fi
24994
24995      # Use eval to expand a potential ~
24996      eval path="$path"
24997      if test ! -f "$path" && test ! -d "$path"; then
24998        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24999      fi
25000
25001      if test -d "$path"; then
25002        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25003      else
25004        dir="`$DIRNAME "$path"`"
25005        base="`$BASENAME "$path"`"
25006        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25007      fi
25008    fi
25009  fi
25010
25011            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25012$as_echo_n "checking for Boot JDK... " >&6; }
25013            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25014$as_echo "$BOOT_JDK" >&6; }
25015            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25016$as_echo_n "checking Boot JDK version... " >&6; }
25017            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25018            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25019$as_echo "$BOOT_JDK_VERSION" >&6; }
25020          fi # end check jdk version
25021        fi # end check javac
25022      fi # end check java
25023    fi # end check boot jdk found
25024  fi
25025
25026  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25027    # Having specified an argument which is incorrect will produce an instant failure;
25028    # we should not go on looking
25029    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25030  fi
25031
25032  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25033
25034  if test "x$BOOT_JDK_FOUND" = xno; then
25035    # Now execute the test
25036
25037  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25038    # First check at user selected default
25039
25040  if test "x$BOOT_JDK_FOUND" = xno; then
25041    # Now execute the test
25042
25043  if test -x /usr/libexec/java_home; then
25044    BOOT_JDK=`/usr/libexec/java_home `
25045    BOOT_JDK_FOUND=maybe
25046    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25047$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25048  fi
25049
25050
25051    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25052    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25053      # Do we have a bin/java?
25054      if test ! -x "$BOOT_JDK/bin/java"; then
25055        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25057        BOOT_JDK_FOUND=no
25058      else
25059        # Do we have a bin/javac?
25060        if test ! -x "$BOOT_JDK/bin/javac"; then
25061          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25062$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25063          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25064$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25065          BOOT_JDK_FOUND=no
25066        else
25067          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25068          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25069
25070          # Extra M4 quote needed to protect [] in grep expression.
25071          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25072          if test "x$FOUND_CORRECT_VERSION" = x; then
25073            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25074$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25075            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25076$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25077            BOOT_JDK_FOUND=no
25078          else
25079            # We're done! :-)
25080            BOOT_JDK_FOUND=yes
25081
25082  # Only process if variable expands to non-empty
25083
25084  if test "x$BOOT_JDK" != x; then
25085    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25086
25087  # Input might be given as Windows format, start by converting to
25088  # unix format.
25089  path="$BOOT_JDK"
25090  new_path=`$CYGPATH -u "$path"`
25091
25092  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25093  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25094  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25095  # "foo.exe" is OK but "foo" is an error.
25096  #
25097  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25098  # It is also a way to make sure we got the proper file name for the real test later on.
25099  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25100  if test "x$test_shortpath" = x; then
25101    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25102$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25103    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25104  fi
25105
25106  # Call helper function which possibly converts this using DOS-style short mode.
25107  # If so, the updated path is stored in $new_path.
25108
25109  input_path="$new_path"
25110  # Check if we need to convert this using DOS-style short mode. If the path
25111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25112  # take no chances and rewrite it.
25113  # Note: m4 eats our [], so we need to use [ and ] instead.
25114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25115  if test "x$has_forbidden_chars" != x; then
25116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25117    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25118    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25119    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25120      # Going to short mode and back again did indeed matter. Since short mode is
25121      # case insensitive, let's make it lowercase to improve readability.
25122      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25123      # Now convert it back to Unix-style (cygpath)
25124      input_path=`$CYGPATH -u "$shortmode_path"`
25125      new_path="$input_path"
25126    fi
25127  fi
25128
25129  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25130  if test "x$test_cygdrive_prefix" = x; then
25131    # As a simple fix, exclude /usr/bin since it's not a real path.
25132    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25133      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25134      # a path prefixed by /cygdrive for fixpath to work.
25135      new_path="$CYGWIN_ROOT_PATH$input_path"
25136    fi
25137  fi
25138
25139
25140  if test "x$path" != "x$new_path"; then
25141    BOOT_JDK="$new_path"
25142    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25143$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25144  fi
25145
25146    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25147
25148  path="$BOOT_JDK"
25149  has_colon=`$ECHO $path | $GREP ^.:`
25150  new_path="$path"
25151  if test "x$has_colon" = x; then
25152    # Not in mixed or Windows style, start by that.
25153    new_path=`cmd //c echo $path`
25154  fi
25155
25156
25157  input_path="$new_path"
25158  # Check if we need to convert this using DOS-style short mode. If the path
25159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25160  # take no chances and rewrite it.
25161  # Note: m4 eats our [], so we need to use [ and ] instead.
25162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25163  if test "x$has_forbidden_chars" != x; then
25164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25165    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25166  fi
25167
25168
25169  windows_path="$new_path"
25170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25171    unix_path=`$CYGPATH -u "$windows_path"`
25172    new_path="$unix_path"
25173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25175    new_path="$unix_path"
25176  fi
25177
25178  if test "x$path" != "x$new_path"; then
25179    BOOT_JDK="$new_path"
25180    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25181$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25182  fi
25183
25184  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25185  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25186
25187    else
25188      # We're on a unix platform. Hooray! :)
25189      path="$BOOT_JDK"
25190      has_space=`$ECHO "$path" | $GREP " "`
25191      if test "x$has_space" != x; then
25192        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25193$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25194        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25195      fi
25196
25197      # Use eval to expand a potential ~
25198      eval path="$path"
25199      if test ! -f "$path" && test ! -d "$path"; then
25200        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25201      fi
25202
25203      if test -d "$path"; then
25204        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25205      else
25206        dir="`$DIRNAME "$path"`"
25207        base="`$BASENAME "$path"`"
25208        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25209      fi
25210    fi
25211  fi
25212
25213            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25214$as_echo_n "checking for Boot JDK... " >&6; }
25215            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25216$as_echo "$BOOT_JDK" >&6; }
25217            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25218$as_echo_n "checking Boot JDK version... " >&6; }
25219            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25220            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25221$as_echo "$BOOT_JDK_VERSION" >&6; }
25222          fi # end check jdk version
25223        fi # end check javac
25224      fi # end check java
25225    fi # end check boot jdk found
25226  fi
25227
25228    # If that did not work out (e.g. too old), try explicit versions instead
25229
25230  if test "x$BOOT_JDK_FOUND" = xno; then
25231    # Now execute the test
25232
25233  if test -x /usr/libexec/java_home; then
25234    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25235    BOOT_JDK_FOUND=maybe
25236    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25237$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25238  fi
25239
25240
25241    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25242    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25243      # Do we have a bin/java?
25244      if test ! -x "$BOOT_JDK/bin/java"; then
25245        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25246$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25247        BOOT_JDK_FOUND=no
25248      else
25249        # Do we have a bin/javac?
25250        if test ! -x "$BOOT_JDK/bin/javac"; then
25251          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25252$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25253          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25254$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25255          BOOT_JDK_FOUND=no
25256        else
25257          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25258          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25259
25260          # Extra M4 quote needed to protect [] in grep expression.
25261          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25262          if test "x$FOUND_CORRECT_VERSION" = x; then
25263            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25264$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25265            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25266$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25267            BOOT_JDK_FOUND=no
25268          else
25269            # We're done! :-)
25270            BOOT_JDK_FOUND=yes
25271
25272  # Only process if variable expands to non-empty
25273
25274  if test "x$BOOT_JDK" != x; then
25275    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25276
25277  # Input might be given as Windows format, start by converting to
25278  # unix format.
25279  path="$BOOT_JDK"
25280  new_path=`$CYGPATH -u "$path"`
25281
25282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25285  # "foo.exe" is OK but "foo" is an error.
25286  #
25287  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25288  # It is also a way to make sure we got the proper file name for the real test later on.
25289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25290  if test "x$test_shortpath" = x; then
25291    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25292$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25293    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25294  fi
25295
25296  # Call helper function which possibly converts this using DOS-style short mode.
25297  # If so, the updated path is stored in $new_path.
25298
25299  input_path="$new_path"
25300  # Check if we need to convert this using DOS-style short mode. If the path
25301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25302  # take no chances and rewrite it.
25303  # Note: m4 eats our [], so we need to use [ and ] instead.
25304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25305  if test "x$has_forbidden_chars" != x; then
25306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25307    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25308    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25309    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25310      # Going to short mode and back again did indeed matter. Since short mode is
25311      # case insensitive, let's make it lowercase to improve readability.
25312      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25313      # Now convert it back to Unix-style (cygpath)
25314      input_path=`$CYGPATH -u "$shortmode_path"`
25315      new_path="$input_path"
25316    fi
25317  fi
25318
25319  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25320  if test "x$test_cygdrive_prefix" = x; then
25321    # As a simple fix, exclude /usr/bin since it's not a real path.
25322    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25323      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25324      # a path prefixed by /cygdrive for fixpath to work.
25325      new_path="$CYGWIN_ROOT_PATH$input_path"
25326    fi
25327  fi
25328
25329
25330  if test "x$path" != "x$new_path"; then
25331    BOOT_JDK="$new_path"
25332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25333$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25334  fi
25335
25336    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25337
25338  path="$BOOT_JDK"
25339  has_colon=`$ECHO $path | $GREP ^.:`
25340  new_path="$path"
25341  if test "x$has_colon" = x; then
25342    # Not in mixed or Windows style, start by that.
25343    new_path=`cmd //c echo $path`
25344  fi
25345
25346
25347  input_path="$new_path"
25348  # Check if we need to convert this using DOS-style short mode. If the path
25349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25350  # take no chances and rewrite it.
25351  # Note: m4 eats our [], so we need to use [ and ] instead.
25352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25353  if test "x$has_forbidden_chars" != x; then
25354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25355    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25356  fi
25357
25358
25359  windows_path="$new_path"
25360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25361    unix_path=`$CYGPATH -u "$windows_path"`
25362    new_path="$unix_path"
25363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25365    new_path="$unix_path"
25366  fi
25367
25368  if test "x$path" != "x$new_path"; then
25369    BOOT_JDK="$new_path"
25370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25371$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25372  fi
25373
25374  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25375  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25376
25377    else
25378      # We're on a unix platform. Hooray! :)
25379      path="$BOOT_JDK"
25380      has_space=`$ECHO "$path" | $GREP " "`
25381      if test "x$has_space" != x; then
25382        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25383$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25384        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25385      fi
25386
25387      # Use eval to expand a potential ~
25388      eval path="$path"
25389      if test ! -f "$path" && test ! -d "$path"; then
25390        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25391      fi
25392
25393      if test -d "$path"; then
25394        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25395      else
25396        dir="`$DIRNAME "$path"`"
25397        base="`$BASENAME "$path"`"
25398        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25399      fi
25400    fi
25401  fi
25402
25403            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25404$as_echo_n "checking for Boot JDK... " >&6; }
25405            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25406$as_echo "$BOOT_JDK" >&6; }
25407            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25408$as_echo_n "checking Boot JDK version... " >&6; }
25409            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25410            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25411$as_echo "$BOOT_JDK_VERSION" >&6; }
25412          fi # end check jdk version
25413        fi # end check javac
25414      fi # end check java
25415    fi # end check boot jdk found
25416  fi
25417
25418
25419  if test "x$BOOT_JDK_FOUND" = xno; then
25420    # Now execute the test
25421
25422  if test -x /usr/libexec/java_home; then
25423    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25424    BOOT_JDK_FOUND=maybe
25425    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25426$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25427  fi
25428
25429
25430    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25431    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25432      # Do we have a bin/java?
25433      if test ! -x "$BOOT_JDK/bin/java"; then
25434        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25435$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25436        BOOT_JDK_FOUND=no
25437      else
25438        # Do we have a bin/javac?
25439        if test ! -x "$BOOT_JDK/bin/javac"; then
25440          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25441$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25442          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25443$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25444          BOOT_JDK_FOUND=no
25445        else
25446          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25447          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25448
25449          # Extra M4 quote needed to protect [] in grep expression.
25450          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25451          if test "x$FOUND_CORRECT_VERSION" = x; then
25452            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25453$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25454            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25455$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25456            BOOT_JDK_FOUND=no
25457          else
25458            # We're done! :-)
25459            BOOT_JDK_FOUND=yes
25460
25461  # Only process if variable expands to non-empty
25462
25463  if test "x$BOOT_JDK" != x; then
25464    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25465
25466  # Input might be given as Windows format, start by converting to
25467  # unix format.
25468  path="$BOOT_JDK"
25469  new_path=`$CYGPATH -u "$path"`
25470
25471  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25472  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25473  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25474  # "foo.exe" is OK but "foo" is an error.
25475  #
25476  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25477  # It is also a way to make sure we got the proper file name for the real test later on.
25478  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25479  if test "x$test_shortpath" = x; then
25480    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25481$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25482    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25483  fi
25484
25485  # Call helper function which possibly converts this using DOS-style short mode.
25486  # If so, the updated path is stored in $new_path.
25487
25488  input_path="$new_path"
25489  # Check if we need to convert this using DOS-style short mode. If the path
25490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25491  # take no chances and rewrite it.
25492  # Note: m4 eats our [], so we need to use [ and ] instead.
25493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25494  if test "x$has_forbidden_chars" != x; then
25495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25496    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25497    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25498    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25499      # Going to short mode and back again did indeed matter. Since short mode is
25500      # case insensitive, let's make it lowercase to improve readability.
25501      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25502      # Now convert it back to Unix-style (cygpath)
25503      input_path=`$CYGPATH -u "$shortmode_path"`
25504      new_path="$input_path"
25505    fi
25506  fi
25507
25508  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25509  if test "x$test_cygdrive_prefix" = x; then
25510    # As a simple fix, exclude /usr/bin since it's not a real path.
25511    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25512      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25513      # a path prefixed by /cygdrive for fixpath to work.
25514      new_path="$CYGWIN_ROOT_PATH$input_path"
25515    fi
25516  fi
25517
25518
25519  if test "x$path" != "x$new_path"; then
25520    BOOT_JDK="$new_path"
25521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25522$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25523  fi
25524
25525    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25526
25527  path="$BOOT_JDK"
25528  has_colon=`$ECHO $path | $GREP ^.:`
25529  new_path="$path"
25530  if test "x$has_colon" = x; then
25531    # Not in mixed or Windows style, start by that.
25532    new_path=`cmd //c echo $path`
25533  fi
25534
25535
25536  input_path="$new_path"
25537  # Check if we need to convert this using DOS-style short mode. If the path
25538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25539  # take no chances and rewrite it.
25540  # Note: m4 eats our [], so we need to use [ and ] instead.
25541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25542  if test "x$has_forbidden_chars" != x; then
25543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25544    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25545  fi
25546
25547
25548  windows_path="$new_path"
25549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25550    unix_path=`$CYGPATH -u "$windows_path"`
25551    new_path="$unix_path"
25552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25554    new_path="$unix_path"
25555  fi
25556
25557  if test "x$path" != "x$new_path"; then
25558    BOOT_JDK="$new_path"
25559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25560$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25561  fi
25562
25563  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25564  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25565
25566    else
25567      # We're on a unix platform. Hooray! :)
25568      path="$BOOT_JDK"
25569      has_space=`$ECHO "$path" | $GREP " "`
25570      if test "x$has_space" != x; then
25571        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25572$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25573        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25574      fi
25575
25576      # Use eval to expand a potential ~
25577      eval path="$path"
25578      if test ! -f "$path" && test ! -d "$path"; then
25579        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25580      fi
25581
25582      if test -d "$path"; then
25583        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25584      else
25585        dir="`$DIRNAME "$path"`"
25586        base="`$BASENAME "$path"`"
25587        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25588      fi
25589    fi
25590  fi
25591
25592            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25593$as_echo_n "checking for Boot JDK... " >&6; }
25594            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25595$as_echo "$BOOT_JDK" >&6; }
25596            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25597$as_echo_n "checking Boot JDK version... " >&6; }
25598            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25599            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25600$as_echo "$BOOT_JDK_VERSION" >&6; }
25601          fi # end check jdk version
25602        fi # end check javac
25603      fi # end check java
25604    fi # end check boot jdk found
25605  fi
25606
25607
25608  if test "x$BOOT_JDK_FOUND" = xno; then
25609    # Now execute the test
25610
25611  if test -x /usr/libexec/java_home; then
25612    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25613    BOOT_JDK_FOUND=maybe
25614    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25615$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25616  fi
25617
25618
25619    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25620    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25621      # Do we have a bin/java?
25622      if test ! -x "$BOOT_JDK/bin/java"; then
25623        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25625        BOOT_JDK_FOUND=no
25626      else
25627        # Do we have a bin/javac?
25628        if test ! -x "$BOOT_JDK/bin/javac"; then
25629          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25630$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25631          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25632$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25633          BOOT_JDK_FOUND=no
25634        else
25635          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25636          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25637
25638          # Extra M4 quote needed to protect [] in grep expression.
25639          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25640          if test "x$FOUND_CORRECT_VERSION" = x; then
25641            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25642$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25643            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25644$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25645            BOOT_JDK_FOUND=no
25646          else
25647            # We're done! :-)
25648            BOOT_JDK_FOUND=yes
25649
25650  # Only process if variable expands to non-empty
25651
25652  if test "x$BOOT_JDK" != x; then
25653    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25654
25655  # Input might be given as Windows format, start by converting to
25656  # unix format.
25657  path="$BOOT_JDK"
25658  new_path=`$CYGPATH -u "$path"`
25659
25660  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25661  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25662  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25663  # "foo.exe" is OK but "foo" is an error.
25664  #
25665  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25666  # It is also a way to make sure we got the proper file name for the real test later on.
25667  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25668  if test "x$test_shortpath" = x; then
25669    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25670$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25671    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25672  fi
25673
25674  # Call helper function which possibly converts this using DOS-style short mode.
25675  # If so, the updated path is stored in $new_path.
25676
25677  input_path="$new_path"
25678  # Check if we need to convert this using DOS-style short mode. If the path
25679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25680  # take no chances and rewrite it.
25681  # Note: m4 eats our [], so we need to use [ and ] instead.
25682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25683  if test "x$has_forbidden_chars" != x; then
25684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25685    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25686    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25687    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25688      # Going to short mode and back again did indeed matter. Since short mode is
25689      # case insensitive, let's make it lowercase to improve readability.
25690      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25691      # Now convert it back to Unix-style (cygpath)
25692      input_path=`$CYGPATH -u "$shortmode_path"`
25693      new_path="$input_path"
25694    fi
25695  fi
25696
25697  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25698  if test "x$test_cygdrive_prefix" = x; then
25699    # As a simple fix, exclude /usr/bin since it's not a real path.
25700    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25701      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25702      # a path prefixed by /cygdrive for fixpath to work.
25703      new_path="$CYGWIN_ROOT_PATH$input_path"
25704    fi
25705  fi
25706
25707
25708  if test "x$path" != "x$new_path"; then
25709    BOOT_JDK="$new_path"
25710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25711$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25712  fi
25713
25714    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25715
25716  path="$BOOT_JDK"
25717  has_colon=`$ECHO $path | $GREP ^.:`
25718  new_path="$path"
25719  if test "x$has_colon" = x; then
25720    # Not in mixed or Windows style, start by that.
25721    new_path=`cmd //c echo $path`
25722  fi
25723
25724
25725  input_path="$new_path"
25726  # Check if we need to convert this using DOS-style short mode. If the path
25727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25728  # take no chances and rewrite it.
25729  # Note: m4 eats our [], so we need to use [ and ] instead.
25730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25731  if test "x$has_forbidden_chars" != x; then
25732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25733    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25734  fi
25735
25736
25737  windows_path="$new_path"
25738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25739    unix_path=`$CYGPATH -u "$windows_path"`
25740    new_path="$unix_path"
25741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25743    new_path="$unix_path"
25744  fi
25745
25746  if test "x$path" != "x$new_path"; then
25747    BOOT_JDK="$new_path"
25748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25749$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25750  fi
25751
25752  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25753  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25754
25755    else
25756      # We're on a unix platform. Hooray! :)
25757      path="$BOOT_JDK"
25758      has_space=`$ECHO "$path" | $GREP " "`
25759      if test "x$has_space" != x; then
25760        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25761$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25762        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25763      fi
25764
25765      # Use eval to expand a potential ~
25766      eval path="$path"
25767      if test ! -f "$path" && test ! -d "$path"; then
25768        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25769      fi
25770
25771      if test -d "$path"; then
25772        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25773      else
25774        dir="`$DIRNAME "$path"`"
25775        base="`$BASENAME "$path"`"
25776        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25777      fi
25778    fi
25779  fi
25780
25781            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25782$as_echo_n "checking for Boot JDK... " >&6; }
25783            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25784$as_echo "$BOOT_JDK" >&6; }
25785            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25786$as_echo_n "checking Boot JDK version... " >&6; }
25787            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25788            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25789$as_echo "$BOOT_JDK_VERSION" >&6; }
25790          fi # end check jdk version
25791        fi # end check javac
25792      fi # end check java
25793    fi # end check boot jdk found
25794  fi
25795
25796  fi
25797
25798
25799    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25800    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25801      # Do we have a bin/java?
25802      if test ! -x "$BOOT_JDK/bin/java"; then
25803        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25804$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25805        BOOT_JDK_FOUND=no
25806      else
25807        # Do we have a bin/javac?
25808        if test ! -x "$BOOT_JDK/bin/javac"; then
25809          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25810$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25811          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25812$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25813          BOOT_JDK_FOUND=no
25814        else
25815          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25816          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25817
25818          # Extra M4 quote needed to protect [] in grep expression.
25819          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25820          if test "x$FOUND_CORRECT_VERSION" = x; then
25821            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25822$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25823            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25824$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25825            BOOT_JDK_FOUND=no
25826          else
25827            # We're done! :-)
25828            BOOT_JDK_FOUND=yes
25829
25830  # Only process if variable expands to non-empty
25831
25832  if test "x$BOOT_JDK" != x; then
25833    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25834
25835  # Input might be given as Windows format, start by converting to
25836  # unix format.
25837  path="$BOOT_JDK"
25838  new_path=`$CYGPATH -u "$path"`
25839
25840  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25841  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25842  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25843  # "foo.exe" is OK but "foo" is an error.
25844  #
25845  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25846  # It is also a way to make sure we got the proper file name for the real test later on.
25847  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25848  if test "x$test_shortpath" = x; then
25849    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25850$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25851    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25852  fi
25853
25854  # Call helper function which possibly converts this using DOS-style short mode.
25855  # If so, the updated path is stored in $new_path.
25856
25857  input_path="$new_path"
25858  # Check if we need to convert this using DOS-style short mode. If the path
25859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25860  # take no chances and rewrite it.
25861  # Note: m4 eats our [], so we need to use [ and ] instead.
25862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25863  if test "x$has_forbidden_chars" != x; then
25864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25865    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25866    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25867    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25868      # Going to short mode and back again did indeed matter. Since short mode is
25869      # case insensitive, let's make it lowercase to improve readability.
25870      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25871      # Now convert it back to Unix-style (cygpath)
25872      input_path=`$CYGPATH -u "$shortmode_path"`
25873      new_path="$input_path"
25874    fi
25875  fi
25876
25877  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25878  if test "x$test_cygdrive_prefix" = x; then
25879    # As a simple fix, exclude /usr/bin since it's not a real path.
25880    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25881      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25882      # a path prefixed by /cygdrive for fixpath to work.
25883      new_path="$CYGWIN_ROOT_PATH$input_path"
25884    fi
25885  fi
25886
25887
25888  if test "x$path" != "x$new_path"; then
25889    BOOT_JDK="$new_path"
25890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25891$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25892  fi
25893
25894    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25895
25896  path="$BOOT_JDK"
25897  has_colon=`$ECHO $path | $GREP ^.:`
25898  new_path="$path"
25899  if test "x$has_colon" = x; then
25900    # Not in mixed or Windows style, start by that.
25901    new_path=`cmd //c echo $path`
25902  fi
25903
25904
25905  input_path="$new_path"
25906  # Check if we need to convert this using DOS-style short mode. If the path
25907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25908  # take no chances and rewrite it.
25909  # Note: m4 eats our [], so we need to use [ and ] instead.
25910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25911  if test "x$has_forbidden_chars" != x; then
25912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25913    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25914  fi
25915
25916
25917  windows_path="$new_path"
25918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25919    unix_path=`$CYGPATH -u "$windows_path"`
25920    new_path="$unix_path"
25921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25923    new_path="$unix_path"
25924  fi
25925
25926  if test "x$path" != "x$new_path"; then
25927    BOOT_JDK="$new_path"
25928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25929$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25930  fi
25931
25932  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25933  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25934
25935    else
25936      # We're on a unix platform. Hooray! :)
25937      path="$BOOT_JDK"
25938      has_space=`$ECHO "$path" | $GREP " "`
25939      if test "x$has_space" != x; then
25940        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25941$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25942        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25943      fi
25944
25945      # Use eval to expand a potential ~
25946      eval path="$path"
25947      if test ! -f "$path" && test ! -d "$path"; then
25948        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25949      fi
25950
25951      if test -d "$path"; then
25952        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25953      else
25954        dir="`$DIRNAME "$path"`"
25955        base="`$BASENAME "$path"`"
25956        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25957      fi
25958    fi
25959  fi
25960
25961            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25962$as_echo_n "checking for Boot JDK... " >&6; }
25963            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25964$as_echo "$BOOT_JDK" >&6; }
25965            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25966$as_echo_n "checking Boot JDK version... " >&6; }
25967            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25968            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25969$as_echo "$BOOT_JDK_VERSION" >&6; }
25970          fi # end check jdk version
25971        fi # end check javac
25972      fi # end check java
25973    fi # end check boot jdk found
25974  fi
25975
25976
25977  # Test: Is $JAVA_HOME set?
25978
25979  if test "x$BOOT_JDK_FOUND" = xno; then
25980    # Now execute the test
25981
25982  if test "x$JAVA_HOME" != x; then
25983    JAVA_HOME_PROCESSED="$JAVA_HOME"
25984
25985  # Only process if variable expands to non-empty
25986
25987  if test "x$JAVA_HOME_PROCESSED" != x; then
25988    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25989
25990  # Input might be given as Windows format, start by converting to
25991  # unix format.
25992  path="$JAVA_HOME_PROCESSED"
25993  new_path=`$CYGPATH -u "$path"`
25994
25995  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25996  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25997  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25998  # "foo.exe" is OK but "foo" is an error.
25999  #
26000  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26001  # It is also a way to make sure we got the proper file name for the real test later on.
26002  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26003  if test "x$test_shortpath" = x; then
26004    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26005$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26006    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26007  fi
26008
26009  # Call helper function which possibly converts this using DOS-style short mode.
26010  # If so, the updated path is stored in $new_path.
26011
26012  input_path="$new_path"
26013  # Check if we need to convert this using DOS-style short mode. If the path
26014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26015  # take no chances and rewrite it.
26016  # Note: m4 eats our [], so we need to use [ and ] instead.
26017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26018  if test "x$has_forbidden_chars" != x; then
26019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26020    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26021    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26022    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26023      # Going to short mode and back again did indeed matter. Since short mode is
26024      # case insensitive, let's make it lowercase to improve readability.
26025      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26026      # Now convert it back to Unix-style (cygpath)
26027      input_path=`$CYGPATH -u "$shortmode_path"`
26028      new_path="$input_path"
26029    fi
26030  fi
26031
26032  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26033  if test "x$test_cygdrive_prefix" = x; then
26034    # As a simple fix, exclude /usr/bin since it's not a real path.
26035    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26036      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26037      # a path prefixed by /cygdrive for fixpath to work.
26038      new_path="$CYGWIN_ROOT_PATH$input_path"
26039    fi
26040  fi
26041
26042
26043  if test "x$path" != "x$new_path"; then
26044    JAVA_HOME_PROCESSED="$new_path"
26045    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26046$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26047  fi
26048
26049    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26050
26051  path="$JAVA_HOME_PROCESSED"
26052  has_colon=`$ECHO $path | $GREP ^.:`
26053  new_path="$path"
26054  if test "x$has_colon" = x; then
26055    # Not in mixed or Windows style, start by that.
26056    new_path=`cmd //c echo $path`
26057  fi
26058
26059
26060  input_path="$new_path"
26061  # Check if we need to convert this using DOS-style short mode. If the path
26062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26063  # take no chances and rewrite it.
26064  # Note: m4 eats our [], so we need to use [ and ] instead.
26065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26066  if test "x$has_forbidden_chars" != x; then
26067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26068    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26069  fi
26070
26071
26072  windows_path="$new_path"
26073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26074    unix_path=`$CYGPATH -u "$windows_path"`
26075    new_path="$unix_path"
26076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26078    new_path="$unix_path"
26079  fi
26080
26081  if test "x$path" != "x$new_path"; then
26082    JAVA_HOME_PROCESSED="$new_path"
26083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26084$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26085  fi
26086
26087  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26088  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26089
26090    else
26091      # We're on a unix platform. Hooray! :)
26092      path="$JAVA_HOME_PROCESSED"
26093      has_space=`$ECHO "$path" | $GREP " "`
26094      if test "x$has_space" != x; then
26095        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26096$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26097        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26098      fi
26099
26100      # Use eval to expand a potential ~
26101      eval path="$path"
26102      if test ! -f "$path" && test ! -d "$path"; then
26103        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26104      fi
26105
26106      if test -d "$path"; then
26107        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26108      else
26109        dir="`$DIRNAME "$path"`"
26110        base="`$BASENAME "$path"`"
26111        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26112      fi
26113    fi
26114  fi
26115
26116    if test ! -d "$JAVA_HOME_PROCESSED"; then
26117      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26118$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26119    else
26120      # Aha, the user has set a JAVA_HOME
26121      # let us use that as the Boot JDK.
26122      BOOT_JDK="$JAVA_HOME_PROCESSED"
26123      BOOT_JDK_FOUND=maybe
26124      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26125$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26126    fi
26127  fi
26128
26129
26130    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26131    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26132      # Do we have a bin/java?
26133      if test ! -x "$BOOT_JDK/bin/java"; then
26134        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26135$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26136        BOOT_JDK_FOUND=no
26137      else
26138        # Do we have a bin/javac?
26139        if test ! -x "$BOOT_JDK/bin/javac"; then
26140          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26141$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26142          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26143$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26144          BOOT_JDK_FOUND=no
26145        else
26146          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26147          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26148
26149          # Extra M4 quote needed to protect [] in grep expression.
26150          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26151          if test "x$FOUND_CORRECT_VERSION" = x; then
26152            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26154            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26155$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26156            BOOT_JDK_FOUND=no
26157          else
26158            # We're done! :-)
26159            BOOT_JDK_FOUND=yes
26160
26161  # Only process if variable expands to non-empty
26162
26163  if test "x$BOOT_JDK" != x; then
26164    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26165
26166  # Input might be given as Windows format, start by converting to
26167  # unix format.
26168  path="$BOOT_JDK"
26169  new_path=`$CYGPATH -u "$path"`
26170
26171  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26172  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26173  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26174  # "foo.exe" is OK but "foo" is an error.
26175  #
26176  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26177  # It is also a way to make sure we got the proper file name for the real test later on.
26178  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26179  if test "x$test_shortpath" = x; then
26180    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26181$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26182    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26183  fi
26184
26185  # Call helper function which possibly converts this using DOS-style short mode.
26186  # If so, the updated path is stored in $new_path.
26187
26188  input_path="$new_path"
26189  # Check if we need to convert this using DOS-style short mode. If the path
26190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26191  # take no chances and rewrite it.
26192  # Note: m4 eats our [], so we need to use [ and ] instead.
26193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26194  if test "x$has_forbidden_chars" != x; then
26195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26199      # Going to short mode and back again did indeed matter. Since short mode is
26200      # case insensitive, let's make it lowercase to improve readability.
26201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26202      # Now convert it back to Unix-style (cygpath)
26203      input_path=`$CYGPATH -u "$shortmode_path"`
26204      new_path="$input_path"
26205    fi
26206  fi
26207
26208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26209  if test "x$test_cygdrive_prefix" = x; then
26210    # As a simple fix, exclude /usr/bin since it's not a real path.
26211    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26213      # a path prefixed by /cygdrive for fixpath to work.
26214      new_path="$CYGWIN_ROOT_PATH$input_path"
26215    fi
26216  fi
26217
26218
26219  if test "x$path" != "x$new_path"; then
26220    BOOT_JDK="$new_path"
26221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26222$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26223  fi
26224
26225    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26226
26227  path="$BOOT_JDK"
26228  has_colon=`$ECHO $path | $GREP ^.:`
26229  new_path="$path"
26230  if test "x$has_colon" = x; then
26231    # Not in mixed or Windows style, start by that.
26232    new_path=`cmd //c echo $path`
26233  fi
26234
26235
26236  input_path="$new_path"
26237  # Check if we need to convert this using DOS-style short mode. If the path
26238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26239  # take no chances and rewrite it.
26240  # Note: m4 eats our [], so we need to use [ and ] instead.
26241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26242  if test "x$has_forbidden_chars" != x; then
26243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26245  fi
26246
26247
26248  windows_path="$new_path"
26249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26250    unix_path=`$CYGPATH -u "$windows_path"`
26251    new_path="$unix_path"
26252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26254    new_path="$unix_path"
26255  fi
26256
26257  if test "x$path" != "x$new_path"; then
26258    BOOT_JDK="$new_path"
26259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26260$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26261  fi
26262
26263  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26264  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26265
26266    else
26267      # We're on a unix platform. Hooray! :)
26268      path="$BOOT_JDK"
26269      has_space=`$ECHO "$path" | $GREP " "`
26270      if test "x$has_space" != x; then
26271        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26272$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26273        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26274      fi
26275
26276      # Use eval to expand a potential ~
26277      eval path="$path"
26278      if test ! -f "$path" && test ! -d "$path"; then
26279        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26280      fi
26281
26282      if test -d "$path"; then
26283        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26284      else
26285        dir="`$DIRNAME "$path"`"
26286        base="`$BASENAME "$path"`"
26287        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26288      fi
26289    fi
26290  fi
26291
26292            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26293$as_echo_n "checking for Boot JDK... " >&6; }
26294            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26295$as_echo "$BOOT_JDK" >&6; }
26296            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26297$as_echo_n "checking Boot JDK version... " >&6; }
26298            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26299            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26300$as_echo "$BOOT_JDK_VERSION" >&6; }
26301          fi # end check jdk version
26302        fi # end check javac
26303      fi # end check java
26304    fi # end check boot jdk found
26305  fi
26306
26307
26308  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26309
26310  if test "x$BOOT_JDK_FOUND" = xno; then
26311    # Now execute the test
26312
26313  # Extract the first word of "javac", so it can be a program name with args.
26314set dummy javac; ac_word=$2
26315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26316$as_echo_n "checking for $ac_word... " >&6; }
26317if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26318  $as_echo_n "(cached) " >&6
26319else
26320  case $JAVAC_CHECK in
26321  [\\/]* | ?:[\\/]*)
26322  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26323  ;;
26324  *)
26325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26326for as_dir in $PATH
26327do
26328  IFS=$as_save_IFS
26329  test -z "$as_dir" && as_dir=.
26330    for ac_exec_ext in '' $ac_executable_extensions; do
26331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26332    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26334    break 2
26335  fi
26336done
26337  done
26338IFS=$as_save_IFS
26339
26340  ;;
26341esac
26342fi
26343JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26344if test -n "$JAVAC_CHECK"; then
26345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26346$as_echo "$JAVAC_CHECK" >&6; }
26347else
26348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26349$as_echo "no" >&6; }
26350fi
26351
26352
26353  # Extract the first word of "java", so it can be a program name with args.
26354set dummy java; ac_word=$2
26355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26356$as_echo_n "checking for $ac_word... " >&6; }
26357if ${ac_cv_path_JAVA_CHECK+:} false; then :
26358  $as_echo_n "(cached) " >&6
26359else
26360  case $JAVA_CHECK in
26361  [\\/]* | ?:[\\/]*)
26362  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26363  ;;
26364  *)
26365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26366for as_dir in $PATH
26367do
26368  IFS=$as_save_IFS
26369  test -z "$as_dir" && as_dir=.
26370    for ac_exec_ext in '' $ac_executable_extensions; do
26371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26372    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26374    break 2
26375  fi
26376done
26377  done
26378IFS=$as_save_IFS
26379
26380  ;;
26381esac
26382fi
26383JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26384if test -n "$JAVA_CHECK"; then
26385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26386$as_echo "$JAVA_CHECK" >&6; }
26387else
26388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26389$as_echo "no" >&6; }
26390fi
26391
26392
26393  BINARY="$JAVAC_CHECK"
26394  if test "x$JAVAC_CHECK" = x; then
26395    BINARY="$JAVA_CHECK"
26396  fi
26397  if test "x$BINARY" != x; then
26398    # So there is a java(c) binary, it might be part of a JDK.
26399    # Lets find the JDK/JRE directory by following symbolic links.
26400    # Linux/GNU systems often have links from /usr/bin/java to
26401    # /etc/alternatives/java to the real JDK binary.
26402
26403  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26404    # Follow a chain of symbolic links. Use readlink
26405    # where it exists, else fall back to horribly
26406    # complicated shell code.
26407    if test "x$READLINK_TESTED" != yes; then
26408      # On MacOSX there is a readlink tool with a different
26409      # purpose than the GNU readlink tool. Check the found readlink.
26410      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26411      if test "x$ISGNU" = x; then
26412        # A readlink that we do not know how to use.
26413        # Are there other non-GNU readlinks out there?
26414        READLINK_TESTED=yes
26415        READLINK=
26416      fi
26417    fi
26418
26419    if test "x$READLINK" != x; then
26420      BINARY=`$READLINK -f $BINARY`
26421    else
26422      # Save the current directory for restoring afterwards
26423      STARTDIR=$PWD
26424      COUNTER=0
26425      sym_link_dir=`$DIRNAME $BINARY`
26426      sym_link_file=`$BASENAME $BINARY`
26427      cd $sym_link_dir
26428      # Use -P flag to resolve symlinks in directories.
26429      cd `$THEPWDCMD -P`
26430      sym_link_dir=`$THEPWDCMD -P`
26431      # Resolve file symlinks
26432      while test $COUNTER -lt 20; do
26433        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26434        if test "x$ISLINK" == x; then
26435          # This is not a symbolic link! We are done!
26436          break
26437        fi
26438        # Again resolve directory symlinks since the target of the just found
26439        # link could be in a different directory
26440        cd `$DIRNAME $ISLINK`
26441        sym_link_dir=`$THEPWDCMD -P`
26442        sym_link_file=`$BASENAME $ISLINK`
26443        let COUNTER=COUNTER+1
26444      done
26445      cd $STARTDIR
26446      BINARY=$sym_link_dir/$sym_link_file
26447    fi
26448  fi
26449
26450    BOOT_JDK=`dirname "$BINARY"`
26451    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26452    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26453      # Looks like we found ourselves an JDK
26454      BOOT_JDK_FOUND=maybe
26455      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26456$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26457    fi
26458  fi
26459
26460
26461    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26462    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26463      # Do we have a bin/java?
26464      if test ! -x "$BOOT_JDK/bin/java"; then
26465        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26466$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26467        BOOT_JDK_FOUND=no
26468      else
26469        # Do we have a bin/javac?
26470        if test ! -x "$BOOT_JDK/bin/javac"; then
26471          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26472$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26473          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26474$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26475          BOOT_JDK_FOUND=no
26476        else
26477          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26478          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26479
26480          # Extra M4 quote needed to protect [] in grep expression.
26481          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26482          if test "x$FOUND_CORRECT_VERSION" = x; then
26483            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26484$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26485            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26486$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26487            BOOT_JDK_FOUND=no
26488          else
26489            # We're done! :-)
26490            BOOT_JDK_FOUND=yes
26491
26492  # Only process if variable expands to non-empty
26493
26494  if test "x$BOOT_JDK" != x; then
26495    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26496
26497  # Input might be given as Windows format, start by converting to
26498  # unix format.
26499  path="$BOOT_JDK"
26500  new_path=`$CYGPATH -u "$path"`
26501
26502  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26503  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26504  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26505  # "foo.exe" is OK but "foo" is an error.
26506  #
26507  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26508  # It is also a way to make sure we got the proper file name for the real test later on.
26509  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26510  if test "x$test_shortpath" = x; then
26511    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26512$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26513    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26514  fi
26515
26516  # Call helper function which possibly converts this using DOS-style short mode.
26517  # If so, the updated path is stored in $new_path.
26518
26519  input_path="$new_path"
26520  # Check if we need to convert this using DOS-style short mode. If the path
26521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26522  # take no chances and rewrite it.
26523  # Note: m4 eats our [], so we need to use [ and ] instead.
26524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26525  if test "x$has_forbidden_chars" != x; then
26526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26527    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26528    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26529    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26530      # Going to short mode and back again did indeed matter. Since short mode is
26531      # case insensitive, let's make it lowercase to improve readability.
26532      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26533      # Now convert it back to Unix-style (cygpath)
26534      input_path=`$CYGPATH -u "$shortmode_path"`
26535      new_path="$input_path"
26536    fi
26537  fi
26538
26539  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26540  if test "x$test_cygdrive_prefix" = x; then
26541    # As a simple fix, exclude /usr/bin since it's not a real path.
26542    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26543      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26544      # a path prefixed by /cygdrive for fixpath to work.
26545      new_path="$CYGWIN_ROOT_PATH$input_path"
26546    fi
26547  fi
26548
26549
26550  if test "x$path" != "x$new_path"; then
26551    BOOT_JDK="$new_path"
26552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26553$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26554  fi
26555
26556    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26557
26558  path="$BOOT_JDK"
26559  has_colon=`$ECHO $path | $GREP ^.:`
26560  new_path="$path"
26561  if test "x$has_colon" = x; then
26562    # Not in mixed or Windows style, start by that.
26563    new_path=`cmd //c echo $path`
26564  fi
26565
26566
26567  input_path="$new_path"
26568  # Check if we need to convert this using DOS-style short mode. If the path
26569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26570  # take no chances and rewrite it.
26571  # Note: m4 eats our [], so we need to use [ and ] instead.
26572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26573  if test "x$has_forbidden_chars" != x; then
26574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26575    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26576  fi
26577
26578
26579  windows_path="$new_path"
26580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26581    unix_path=`$CYGPATH -u "$windows_path"`
26582    new_path="$unix_path"
26583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26585    new_path="$unix_path"
26586  fi
26587
26588  if test "x$path" != "x$new_path"; then
26589    BOOT_JDK="$new_path"
26590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26591$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26592  fi
26593
26594  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26595  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26596
26597    else
26598      # We're on a unix platform. Hooray! :)
26599      path="$BOOT_JDK"
26600      has_space=`$ECHO "$path" | $GREP " "`
26601      if test "x$has_space" != x; then
26602        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26603$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26604        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26605      fi
26606
26607      # Use eval to expand a potential ~
26608      eval path="$path"
26609      if test ! -f "$path" && test ! -d "$path"; then
26610        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26611      fi
26612
26613      if test -d "$path"; then
26614        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26615      else
26616        dir="`$DIRNAME "$path"`"
26617        base="`$BASENAME "$path"`"
26618        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26619      fi
26620    fi
26621  fi
26622
26623            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26624$as_echo_n "checking for Boot JDK... " >&6; }
26625            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26626$as_echo "$BOOT_JDK" >&6; }
26627            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26628$as_echo_n "checking Boot JDK version... " >&6; }
26629            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26630            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26631$as_echo "$BOOT_JDK_VERSION" >&6; }
26632          fi # end check jdk version
26633        fi # end check javac
26634      fi # end check java
26635    fi # end check boot jdk found
26636  fi
26637
26638
26639  # Test: Is there a JDK installed in default, well-known locations?
26640
26641  if test "x$BOOT_JDK_FOUND" = xno; then
26642    # Now execute the test
26643
26644  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26645
26646  if test "x$BOOT_JDK_FOUND" = xno; then
26647    # Now execute the test
26648
26649  if test "x$ProgramW6432" != x; then
26650    VIRTUAL_DIR="$ProgramW6432/Java"
26651
26652  windows_path="$VIRTUAL_DIR"
26653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26654    unix_path=`$CYGPATH -u "$windows_path"`
26655    VIRTUAL_DIR="$unix_path"
26656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26658    VIRTUAL_DIR="$unix_path"
26659  fi
26660
26661
26662  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26663  BOOT_JDK_SUFFIX=""
26664  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26665  if test "x$ALL_JDKS_FOUND" != x; then
26666    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26667
26668  if test "x$BOOT_JDK_FOUND" = xno; then
26669    # Now execute the test
26670
26671        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26672        if test -d "$BOOT_JDK"; then
26673          BOOT_JDK_FOUND=maybe
26674          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26675$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26676        fi
26677
26678
26679    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26680    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26681      # Do we have a bin/java?
26682      if test ! -x "$BOOT_JDK/bin/java"; then
26683        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26684$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26685        BOOT_JDK_FOUND=no
26686      else
26687        # Do we have a bin/javac?
26688        if test ! -x "$BOOT_JDK/bin/javac"; then
26689          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26690$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26691          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26692$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26693          BOOT_JDK_FOUND=no
26694        else
26695          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26696          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26697
26698          # Extra M4 quote needed to protect [] in grep expression.
26699          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26700          if test "x$FOUND_CORRECT_VERSION" = x; then
26701            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26702$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26703            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26704$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26705            BOOT_JDK_FOUND=no
26706          else
26707            # We're done! :-)
26708            BOOT_JDK_FOUND=yes
26709
26710  # Only process if variable expands to non-empty
26711
26712  if test "x$BOOT_JDK" != x; then
26713    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26714
26715  # Input might be given as Windows format, start by converting to
26716  # unix format.
26717  path="$BOOT_JDK"
26718  new_path=`$CYGPATH -u "$path"`
26719
26720  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26721  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26722  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26723  # "foo.exe" is OK but "foo" is an error.
26724  #
26725  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26726  # It is also a way to make sure we got the proper file name for the real test later on.
26727  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26728  if test "x$test_shortpath" = x; then
26729    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26730$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26731    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26732  fi
26733
26734  # Call helper function which possibly converts this using DOS-style short mode.
26735  # If so, the updated path is stored in $new_path.
26736
26737  input_path="$new_path"
26738  # Check if we need to convert this using DOS-style short mode. If the path
26739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26740  # take no chances and rewrite it.
26741  # Note: m4 eats our [], so we need to use [ and ] instead.
26742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26743  if test "x$has_forbidden_chars" != x; then
26744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26748      # Going to short mode and back again did indeed matter. Since short mode is
26749      # case insensitive, let's make it lowercase to improve readability.
26750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26751      # Now convert it back to Unix-style (cygpath)
26752      input_path=`$CYGPATH -u "$shortmode_path"`
26753      new_path="$input_path"
26754    fi
26755  fi
26756
26757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26758  if test "x$test_cygdrive_prefix" = x; then
26759    # As a simple fix, exclude /usr/bin since it's not a real path.
26760    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26762      # a path prefixed by /cygdrive for fixpath to work.
26763      new_path="$CYGWIN_ROOT_PATH$input_path"
26764    fi
26765  fi
26766
26767
26768  if test "x$path" != "x$new_path"; then
26769    BOOT_JDK="$new_path"
26770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26771$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26772  fi
26773
26774    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26775
26776  path="$BOOT_JDK"
26777  has_colon=`$ECHO $path | $GREP ^.:`
26778  new_path="$path"
26779  if test "x$has_colon" = x; then
26780    # Not in mixed or Windows style, start by that.
26781    new_path=`cmd //c echo $path`
26782  fi
26783
26784
26785  input_path="$new_path"
26786  # Check if we need to convert this using DOS-style short mode. If the path
26787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26788  # take no chances and rewrite it.
26789  # Note: m4 eats our [], so we need to use [ and ] instead.
26790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26791  if test "x$has_forbidden_chars" != x; then
26792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26793    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26794  fi
26795
26796
26797  windows_path="$new_path"
26798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26799    unix_path=`$CYGPATH -u "$windows_path"`
26800    new_path="$unix_path"
26801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26803    new_path="$unix_path"
26804  fi
26805
26806  if test "x$path" != "x$new_path"; then
26807    BOOT_JDK="$new_path"
26808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26809$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26810  fi
26811
26812  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26813  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26814
26815    else
26816      # We're on a unix platform. Hooray! :)
26817      path="$BOOT_JDK"
26818      has_space=`$ECHO "$path" | $GREP " "`
26819      if test "x$has_space" != x; then
26820        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26821$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26822        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26823      fi
26824
26825      # Use eval to expand a potential ~
26826      eval path="$path"
26827      if test ! -f "$path" && test ! -d "$path"; then
26828        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26829      fi
26830
26831      if test -d "$path"; then
26832        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26833      else
26834        dir="`$DIRNAME "$path"`"
26835        base="`$BASENAME "$path"`"
26836        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26837      fi
26838    fi
26839  fi
26840
26841            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26842$as_echo_n "checking for Boot JDK... " >&6; }
26843            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26844$as_echo "$BOOT_JDK" >&6; }
26845            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26846$as_echo_n "checking Boot JDK version... " >&6; }
26847            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26848            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26849$as_echo "$BOOT_JDK_VERSION" >&6; }
26850          fi # end check jdk version
26851        fi # end check javac
26852      fi # end check java
26853    fi # end check boot jdk found
26854  fi
26855
26856    done
26857  fi
26858
26859  fi
26860
26861
26862    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26863    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26864      # Do we have a bin/java?
26865      if test ! -x "$BOOT_JDK/bin/java"; then
26866        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26867$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26868        BOOT_JDK_FOUND=no
26869      else
26870        # Do we have a bin/javac?
26871        if test ! -x "$BOOT_JDK/bin/javac"; then
26872          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26873$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26874          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26875$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26876          BOOT_JDK_FOUND=no
26877        else
26878          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26879          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26880
26881          # Extra M4 quote needed to protect [] in grep expression.
26882          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26883          if test "x$FOUND_CORRECT_VERSION" = x; then
26884            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26885$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26886            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26887$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26888            BOOT_JDK_FOUND=no
26889          else
26890            # We're done! :-)
26891            BOOT_JDK_FOUND=yes
26892
26893  # Only process if variable expands to non-empty
26894
26895  if test "x$BOOT_JDK" != x; then
26896    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26897
26898  # Input might be given as Windows format, start by converting to
26899  # unix format.
26900  path="$BOOT_JDK"
26901  new_path=`$CYGPATH -u "$path"`
26902
26903  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26904  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26905  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26906  # "foo.exe" is OK but "foo" is an error.
26907  #
26908  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26909  # It is also a way to make sure we got the proper file name for the real test later on.
26910  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26911  if test "x$test_shortpath" = x; then
26912    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26913$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26914    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26915  fi
26916
26917  # Call helper function which possibly converts this using DOS-style short mode.
26918  # If so, the updated path is stored in $new_path.
26919
26920  input_path="$new_path"
26921  # Check if we need to convert this using DOS-style short mode. If the path
26922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26923  # take no chances and rewrite it.
26924  # Note: m4 eats our [], so we need to use [ and ] instead.
26925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26926  if test "x$has_forbidden_chars" != x; then
26927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26928    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26929    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26930    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26931      # Going to short mode and back again did indeed matter. Since short mode is
26932      # case insensitive, let's make it lowercase to improve readability.
26933      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26934      # Now convert it back to Unix-style (cygpath)
26935      input_path=`$CYGPATH -u "$shortmode_path"`
26936      new_path="$input_path"
26937    fi
26938  fi
26939
26940  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26941  if test "x$test_cygdrive_prefix" = x; then
26942    # As a simple fix, exclude /usr/bin since it's not a real path.
26943    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26944      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26945      # a path prefixed by /cygdrive for fixpath to work.
26946      new_path="$CYGWIN_ROOT_PATH$input_path"
26947    fi
26948  fi
26949
26950
26951  if test "x$path" != "x$new_path"; then
26952    BOOT_JDK="$new_path"
26953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26954$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26955  fi
26956
26957    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26958
26959  path="$BOOT_JDK"
26960  has_colon=`$ECHO $path | $GREP ^.:`
26961  new_path="$path"
26962  if test "x$has_colon" = x; then
26963    # Not in mixed or Windows style, start by that.
26964    new_path=`cmd //c echo $path`
26965  fi
26966
26967
26968  input_path="$new_path"
26969  # Check if we need to convert this using DOS-style short mode. If the path
26970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26971  # take no chances and rewrite it.
26972  # Note: m4 eats our [], so we need to use [ and ] instead.
26973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26974  if test "x$has_forbidden_chars" != x; then
26975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26976    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26977  fi
26978
26979
26980  windows_path="$new_path"
26981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26982    unix_path=`$CYGPATH -u "$windows_path"`
26983    new_path="$unix_path"
26984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26986    new_path="$unix_path"
26987  fi
26988
26989  if test "x$path" != "x$new_path"; then
26990    BOOT_JDK="$new_path"
26991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26992$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26993  fi
26994
26995  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26996  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26997
26998    else
26999      # We're on a unix platform. Hooray! :)
27000      path="$BOOT_JDK"
27001      has_space=`$ECHO "$path" | $GREP " "`
27002      if test "x$has_space" != x; then
27003        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27004$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27005        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27006      fi
27007
27008      # Use eval to expand a potential ~
27009      eval path="$path"
27010      if test ! -f "$path" && test ! -d "$path"; then
27011        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27012      fi
27013
27014      if test -d "$path"; then
27015        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27016      else
27017        dir="`$DIRNAME "$path"`"
27018        base="`$BASENAME "$path"`"
27019        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27020      fi
27021    fi
27022  fi
27023
27024            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27025$as_echo_n "checking for Boot JDK... " >&6; }
27026            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27027$as_echo "$BOOT_JDK" >&6; }
27028            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27029$as_echo_n "checking Boot JDK version... " >&6; }
27030            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27031            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27032$as_echo "$BOOT_JDK_VERSION" >&6; }
27033          fi # end check jdk version
27034        fi # end check javac
27035      fi # end check java
27036    fi # end check boot jdk found
27037  fi
27038
27039
27040  if test "x$BOOT_JDK_FOUND" = xno; then
27041    # Now execute the test
27042
27043  if test "x$PROGRAMW6432" != x; then
27044    VIRTUAL_DIR="$PROGRAMW6432/Java"
27045
27046  windows_path="$VIRTUAL_DIR"
27047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27048    unix_path=`$CYGPATH -u "$windows_path"`
27049    VIRTUAL_DIR="$unix_path"
27050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27052    VIRTUAL_DIR="$unix_path"
27053  fi
27054
27055
27056  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27057  BOOT_JDK_SUFFIX=""
27058  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27059  if test "x$ALL_JDKS_FOUND" != x; then
27060    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27061
27062  if test "x$BOOT_JDK_FOUND" = xno; then
27063    # Now execute the test
27064
27065        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27066        if test -d "$BOOT_JDK"; then
27067          BOOT_JDK_FOUND=maybe
27068          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27069$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27070        fi
27071
27072
27073    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27074    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27075      # Do we have a bin/java?
27076      if test ! -x "$BOOT_JDK/bin/java"; then
27077        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27078$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27079        BOOT_JDK_FOUND=no
27080      else
27081        # Do we have a bin/javac?
27082        if test ! -x "$BOOT_JDK/bin/javac"; then
27083          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27084$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27085          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27086$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27087          BOOT_JDK_FOUND=no
27088        else
27089          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27090          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27091
27092          # Extra M4 quote needed to protect [] in grep expression.
27093          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27094          if test "x$FOUND_CORRECT_VERSION" = x; then
27095            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27096$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27097            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27098$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27099            BOOT_JDK_FOUND=no
27100          else
27101            # We're done! :-)
27102            BOOT_JDK_FOUND=yes
27103
27104  # Only process if variable expands to non-empty
27105
27106  if test "x$BOOT_JDK" != x; then
27107    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27108
27109  # Input might be given as Windows format, start by converting to
27110  # unix format.
27111  path="$BOOT_JDK"
27112  new_path=`$CYGPATH -u "$path"`
27113
27114  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27115  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27116  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27117  # "foo.exe" is OK but "foo" is an error.
27118  #
27119  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27120  # It is also a way to make sure we got the proper file name for the real test later on.
27121  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27122  if test "x$test_shortpath" = x; then
27123    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27124$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27125    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27126  fi
27127
27128  # Call helper function which possibly converts this using DOS-style short mode.
27129  # If so, the updated path is stored in $new_path.
27130
27131  input_path="$new_path"
27132  # Check if we need to convert this using DOS-style short mode. If the path
27133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27134  # take no chances and rewrite it.
27135  # Note: m4 eats our [], so we need to use [ and ] instead.
27136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27137  if test "x$has_forbidden_chars" != x; then
27138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27139    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27140    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27141    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27142      # Going to short mode and back again did indeed matter. Since short mode is
27143      # case insensitive, let's make it lowercase to improve readability.
27144      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27145      # Now convert it back to Unix-style (cygpath)
27146      input_path=`$CYGPATH -u "$shortmode_path"`
27147      new_path="$input_path"
27148    fi
27149  fi
27150
27151  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27152  if test "x$test_cygdrive_prefix" = x; then
27153    # As a simple fix, exclude /usr/bin since it's not a real path.
27154    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27155      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27156      # a path prefixed by /cygdrive for fixpath to work.
27157      new_path="$CYGWIN_ROOT_PATH$input_path"
27158    fi
27159  fi
27160
27161
27162  if test "x$path" != "x$new_path"; then
27163    BOOT_JDK="$new_path"
27164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27165$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27166  fi
27167
27168    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27169
27170  path="$BOOT_JDK"
27171  has_colon=`$ECHO $path | $GREP ^.:`
27172  new_path="$path"
27173  if test "x$has_colon" = x; then
27174    # Not in mixed or Windows style, start by that.
27175    new_path=`cmd //c echo $path`
27176  fi
27177
27178
27179  input_path="$new_path"
27180  # Check if we need to convert this using DOS-style short mode. If the path
27181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27182  # take no chances and rewrite it.
27183  # Note: m4 eats our [], so we need to use [ and ] instead.
27184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27185  if test "x$has_forbidden_chars" != x; then
27186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27187    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27188  fi
27189
27190
27191  windows_path="$new_path"
27192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27193    unix_path=`$CYGPATH -u "$windows_path"`
27194    new_path="$unix_path"
27195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27197    new_path="$unix_path"
27198  fi
27199
27200  if test "x$path" != "x$new_path"; then
27201    BOOT_JDK="$new_path"
27202    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27203$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27204  fi
27205
27206  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27207  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27208
27209    else
27210      # We're on a unix platform. Hooray! :)
27211      path="$BOOT_JDK"
27212      has_space=`$ECHO "$path" | $GREP " "`
27213      if test "x$has_space" != x; then
27214        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27215$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27216        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27217      fi
27218
27219      # Use eval to expand a potential ~
27220      eval path="$path"
27221      if test ! -f "$path" && test ! -d "$path"; then
27222        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27223      fi
27224
27225      if test -d "$path"; then
27226        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27227      else
27228        dir="`$DIRNAME "$path"`"
27229        base="`$BASENAME "$path"`"
27230        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27231      fi
27232    fi
27233  fi
27234
27235            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27236$as_echo_n "checking for Boot JDK... " >&6; }
27237            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27238$as_echo "$BOOT_JDK" >&6; }
27239            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27240$as_echo_n "checking Boot JDK version... " >&6; }
27241            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27242            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27243$as_echo "$BOOT_JDK_VERSION" >&6; }
27244          fi # end check jdk version
27245        fi # end check javac
27246      fi # end check java
27247    fi # end check boot jdk found
27248  fi
27249
27250    done
27251  fi
27252
27253  fi
27254
27255
27256    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27257    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27258      # Do we have a bin/java?
27259      if test ! -x "$BOOT_JDK/bin/java"; then
27260        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27261$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27262        BOOT_JDK_FOUND=no
27263      else
27264        # Do we have a bin/javac?
27265        if test ! -x "$BOOT_JDK/bin/javac"; then
27266          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27267$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27268          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27269$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27270          BOOT_JDK_FOUND=no
27271        else
27272          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27273          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27274
27275          # Extra M4 quote needed to protect [] in grep expression.
27276          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27277          if test "x$FOUND_CORRECT_VERSION" = x; then
27278            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27279$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27280            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27281$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27282            BOOT_JDK_FOUND=no
27283          else
27284            # We're done! :-)
27285            BOOT_JDK_FOUND=yes
27286
27287  # Only process if variable expands to non-empty
27288
27289  if test "x$BOOT_JDK" != x; then
27290    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27291
27292  # Input might be given as Windows format, start by converting to
27293  # unix format.
27294  path="$BOOT_JDK"
27295  new_path=`$CYGPATH -u "$path"`
27296
27297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27300  # "foo.exe" is OK but "foo" is an error.
27301  #
27302  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27303  # It is also a way to make sure we got the proper file name for the real test later on.
27304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27305  if test "x$test_shortpath" = x; then
27306    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27307$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27308    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27309  fi
27310
27311  # Call helper function which possibly converts this using DOS-style short mode.
27312  # If so, the updated path is stored in $new_path.
27313
27314  input_path="$new_path"
27315  # Check if we need to convert this using DOS-style short mode. If the path
27316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27317  # take no chances and rewrite it.
27318  # Note: m4 eats our [], so we need to use [ and ] instead.
27319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27320  if test "x$has_forbidden_chars" != x; then
27321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27325      # Going to short mode and back again did indeed matter. Since short mode is
27326      # case insensitive, let's make it lowercase to improve readability.
27327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27328      # Now convert it back to Unix-style (cygpath)
27329      input_path=`$CYGPATH -u "$shortmode_path"`
27330      new_path="$input_path"
27331    fi
27332  fi
27333
27334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27335  if test "x$test_cygdrive_prefix" = x; then
27336    # As a simple fix, exclude /usr/bin since it's not a real path.
27337    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27339      # a path prefixed by /cygdrive for fixpath to work.
27340      new_path="$CYGWIN_ROOT_PATH$input_path"
27341    fi
27342  fi
27343
27344
27345  if test "x$path" != "x$new_path"; then
27346    BOOT_JDK="$new_path"
27347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27348$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27349  fi
27350
27351    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27352
27353  path="$BOOT_JDK"
27354  has_colon=`$ECHO $path | $GREP ^.:`
27355  new_path="$path"
27356  if test "x$has_colon" = x; then
27357    # Not in mixed or Windows style, start by that.
27358    new_path=`cmd //c echo $path`
27359  fi
27360
27361
27362  input_path="$new_path"
27363  # Check if we need to convert this using DOS-style short mode. If the path
27364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27365  # take no chances and rewrite it.
27366  # Note: m4 eats our [], so we need to use [ and ] instead.
27367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27368  if test "x$has_forbidden_chars" != x; then
27369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27370    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27371  fi
27372
27373
27374  windows_path="$new_path"
27375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27376    unix_path=`$CYGPATH -u "$windows_path"`
27377    new_path="$unix_path"
27378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27380    new_path="$unix_path"
27381  fi
27382
27383  if test "x$path" != "x$new_path"; then
27384    BOOT_JDK="$new_path"
27385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27386$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27387  fi
27388
27389  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27390  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27391
27392    else
27393      # We're on a unix platform. Hooray! :)
27394      path="$BOOT_JDK"
27395      has_space=`$ECHO "$path" | $GREP " "`
27396      if test "x$has_space" != x; then
27397        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27398$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27399        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27400      fi
27401
27402      # Use eval to expand a potential ~
27403      eval path="$path"
27404      if test ! -f "$path" && test ! -d "$path"; then
27405        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27406      fi
27407
27408      if test -d "$path"; then
27409        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27410      else
27411        dir="`$DIRNAME "$path"`"
27412        base="`$BASENAME "$path"`"
27413        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27414      fi
27415    fi
27416  fi
27417
27418            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27419$as_echo_n "checking for Boot JDK... " >&6; }
27420            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27421$as_echo "$BOOT_JDK" >&6; }
27422            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27423$as_echo_n "checking Boot JDK version... " >&6; }
27424            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27425            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27426$as_echo "$BOOT_JDK_VERSION" >&6; }
27427          fi # end check jdk version
27428        fi # end check javac
27429      fi # end check java
27430    fi # end check boot jdk found
27431  fi
27432
27433
27434  if test "x$BOOT_JDK_FOUND" = xno; then
27435    # Now execute the test
27436
27437  if test "x$PROGRAMFILES" != x; then
27438    VIRTUAL_DIR="$PROGRAMFILES/Java"
27439
27440  windows_path="$VIRTUAL_DIR"
27441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27442    unix_path=`$CYGPATH -u "$windows_path"`
27443    VIRTUAL_DIR="$unix_path"
27444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27446    VIRTUAL_DIR="$unix_path"
27447  fi
27448
27449
27450  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27451  BOOT_JDK_SUFFIX=""
27452  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27453  if test "x$ALL_JDKS_FOUND" != x; then
27454    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27455
27456  if test "x$BOOT_JDK_FOUND" = xno; then
27457    # Now execute the test
27458
27459        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27460        if test -d "$BOOT_JDK"; then
27461          BOOT_JDK_FOUND=maybe
27462          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27463$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27464        fi
27465
27466
27467    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27468    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27469      # Do we have a bin/java?
27470      if test ! -x "$BOOT_JDK/bin/java"; then
27471        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27472$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27473        BOOT_JDK_FOUND=no
27474      else
27475        # Do we have a bin/javac?
27476        if test ! -x "$BOOT_JDK/bin/javac"; then
27477          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27478$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27479          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27480$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27481          BOOT_JDK_FOUND=no
27482        else
27483          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27484          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27485
27486          # Extra M4 quote needed to protect [] in grep expression.
27487          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27488          if test "x$FOUND_CORRECT_VERSION" = x; then
27489            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27490$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27491            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27492$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27493            BOOT_JDK_FOUND=no
27494          else
27495            # We're done! :-)
27496            BOOT_JDK_FOUND=yes
27497
27498  # Only process if variable expands to non-empty
27499
27500  if test "x$BOOT_JDK" != x; then
27501    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27502
27503  # Input might be given as Windows format, start by converting to
27504  # unix format.
27505  path="$BOOT_JDK"
27506  new_path=`$CYGPATH -u "$path"`
27507
27508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27511  # "foo.exe" is OK but "foo" is an error.
27512  #
27513  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27514  # It is also a way to make sure we got the proper file name for the real test later on.
27515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27516  if test "x$test_shortpath" = x; then
27517    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27518$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27519    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27520  fi
27521
27522  # Call helper function which possibly converts this using DOS-style short mode.
27523  # If so, the updated path is stored in $new_path.
27524
27525  input_path="$new_path"
27526  # Check if we need to convert this using DOS-style short mode. If the path
27527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27528  # take no chances and rewrite it.
27529  # Note: m4 eats our [], so we need to use [ and ] instead.
27530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27531  if test "x$has_forbidden_chars" != x; then
27532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27533    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27534    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27535    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27536      # Going to short mode and back again did indeed matter. Since short mode is
27537      # case insensitive, let's make it lowercase to improve readability.
27538      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27539      # Now convert it back to Unix-style (cygpath)
27540      input_path=`$CYGPATH -u "$shortmode_path"`
27541      new_path="$input_path"
27542    fi
27543  fi
27544
27545  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27546  if test "x$test_cygdrive_prefix" = x; then
27547    # As a simple fix, exclude /usr/bin since it's not a real path.
27548    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27549      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27550      # a path prefixed by /cygdrive for fixpath to work.
27551      new_path="$CYGWIN_ROOT_PATH$input_path"
27552    fi
27553  fi
27554
27555
27556  if test "x$path" != "x$new_path"; then
27557    BOOT_JDK="$new_path"
27558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27559$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27560  fi
27561
27562    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27563
27564  path="$BOOT_JDK"
27565  has_colon=`$ECHO $path | $GREP ^.:`
27566  new_path="$path"
27567  if test "x$has_colon" = x; then
27568    # Not in mixed or Windows style, start by that.
27569    new_path=`cmd //c echo $path`
27570  fi
27571
27572
27573  input_path="$new_path"
27574  # Check if we need to convert this using DOS-style short mode. If the path
27575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27576  # take no chances and rewrite it.
27577  # Note: m4 eats our [], so we need to use [ and ] instead.
27578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27579  if test "x$has_forbidden_chars" != x; then
27580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27581    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27582  fi
27583
27584
27585  windows_path="$new_path"
27586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27587    unix_path=`$CYGPATH -u "$windows_path"`
27588    new_path="$unix_path"
27589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27591    new_path="$unix_path"
27592  fi
27593
27594  if test "x$path" != "x$new_path"; then
27595    BOOT_JDK="$new_path"
27596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27597$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27598  fi
27599
27600  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27601  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27602
27603    else
27604      # We're on a unix platform. Hooray! :)
27605      path="$BOOT_JDK"
27606      has_space=`$ECHO "$path" | $GREP " "`
27607      if test "x$has_space" != x; then
27608        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27609$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27610        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27611      fi
27612
27613      # Use eval to expand a potential ~
27614      eval path="$path"
27615      if test ! -f "$path" && test ! -d "$path"; then
27616        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27617      fi
27618
27619      if test -d "$path"; then
27620        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27621      else
27622        dir="`$DIRNAME "$path"`"
27623        base="`$BASENAME "$path"`"
27624        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27625      fi
27626    fi
27627  fi
27628
27629            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27630$as_echo_n "checking for Boot JDK... " >&6; }
27631            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27632$as_echo "$BOOT_JDK" >&6; }
27633            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27634$as_echo_n "checking Boot JDK version... " >&6; }
27635            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27636            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27637$as_echo "$BOOT_JDK_VERSION" >&6; }
27638          fi # end check jdk version
27639        fi # end check javac
27640      fi # end check java
27641    fi # end check boot jdk found
27642  fi
27643
27644    done
27645  fi
27646
27647  fi
27648
27649
27650    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27651    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27652      # Do we have a bin/java?
27653      if test ! -x "$BOOT_JDK/bin/java"; then
27654        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27655$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27656        BOOT_JDK_FOUND=no
27657      else
27658        # Do we have a bin/javac?
27659        if test ! -x "$BOOT_JDK/bin/javac"; then
27660          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27661$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27662          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27663$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27664          BOOT_JDK_FOUND=no
27665        else
27666          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27667          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27668
27669          # Extra M4 quote needed to protect [] in grep expression.
27670          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27671          if test "x$FOUND_CORRECT_VERSION" = x; then
27672            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27673$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27674            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27675$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27676            BOOT_JDK_FOUND=no
27677          else
27678            # We're done! :-)
27679            BOOT_JDK_FOUND=yes
27680
27681  # Only process if variable expands to non-empty
27682
27683  if test "x$BOOT_JDK" != x; then
27684    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27685
27686  # Input might be given as Windows format, start by converting to
27687  # unix format.
27688  path="$BOOT_JDK"
27689  new_path=`$CYGPATH -u "$path"`
27690
27691  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27692  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27693  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27694  # "foo.exe" is OK but "foo" is an error.
27695  #
27696  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27697  # It is also a way to make sure we got the proper file name for the real test later on.
27698  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27699  if test "x$test_shortpath" = x; then
27700    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27701$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27702    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27703  fi
27704
27705  # Call helper function which possibly converts this using DOS-style short mode.
27706  # If so, the updated path is stored in $new_path.
27707
27708  input_path="$new_path"
27709  # Check if we need to convert this using DOS-style short mode. If the path
27710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27711  # take no chances and rewrite it.
27712  # Note: m4 eats our [], so we need to use [ and ] instead.
27713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27714  if test "x$has_forbidden_chars" != x; then
27715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27716    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27717    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27718    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27719      # Going to short mode and back again did indeed matter. Since short mode is
27720      # case insensitive, let's make it lowercase to improve readability.
27721      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27722      # Now convert it back to Unix-style (cygpath)
27723      input_path=`$CYGPATH -u "$shortmode_path"`
27724      new_path="$input_path"
27725    fi
27726  fi
27727
27728  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27729  if test "x$test_cygdrive_prefix" = x; then
27730    # As a simple fix, exclude /usr/bin since it's not a real path.
27731    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27732      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27733      # a path prefixed by /cygdrive for fixpath to work.
27734      new_path="$CYGWIN_ROOT_PATH$input_path"
27735    fi
27736  fi
27737
27738
27739  if test "x$path" != "x$new_path"; then
27740    BOOT_JDK="$new_path"
27741    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27742$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27743  fi
27744
27745    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27746
27747  path="$BOOT_JDK"
27748  has_colon=`$ECHO $path | $GREP ^.:`
27749  new_path="$path"
27750  if test "x$has_colon" = x; then
27751    # Not in mixed or Windows style, start by that.
27752    new_path=`cmd //c echo $path`
27753  fi
27754
27755
27756  input_path="$new_path"
27757  # Check if we need to convert this using DOS-style short mode. If the path
27758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27759  # take no chances and rewrite it.
27760  # Note: m4 eats our [], so we need to use [ and ] instead.
27761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27762  if test "x$has_forbidden_chars" != x; then
27763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27764    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27765  fi
27766
27767
27768  windows_path="$new_path"
27769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27770    unix_path=`$CYGPATH -u "$windows_path"`
27771    new_path="$unix_path"
27772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27774    new_path="$unix_path"
27775  fi
27776
27777  if test "x$path" != "x$new_path"; then
27778    BOOT_JDK="$new_path"
27779    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27780$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27781  fi
27782
27783  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27784  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27785
27786    else
27787      # We're on a unix platform. Hooray! :)
27788      path="$BOOT_JDK"
27789      has_space=`$ECHO "$path" | $GREP " "`
27790      if test "x$has_space" != x; then
27791        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27792$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27793        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27794      fi
27795
27796      # Use eval to expand a potential ~
27797      eval path="$path"
27798      if test ! -f "$path" && test ! -d "$path"; then
27799        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27800      fi
27801
27802      if test -d "$path"; then
27803        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27804      else
27805        dir="`$DIRNAME "$path"`"
27806        base="`$BASENAME "$path"`"
27807        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27808      fi
27809    fi
27810  fi
27811
27812            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27813$as_echo_n "checking for Boot JDK... " >&6; }
27814            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27815$as_echo "$BOOT_JDK" >&6; }
27816            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27817$as_echo_n "checking Boot JDK version... " >&6; }
27818            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27819            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27820$as_echo "$BOOT_JDK_VERSION" >&6; }
27821          fi # end check jdk version
27822        fi # end check javac
27823      fi # end check java
27824    fi # end check boot jdk found
27825  fi
27826
27827
27828  if test "x$BOOT_JDK_FOUND" = xno; then
27829    # Now execute the test
27830
27831  if test "x$ProgramFiles" != x; then
27832    VIRTUAL_DIR="$ProgramFiles/Java"
27833
27834  windows_path="$VIRTUAL_DIR"
27835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27836    unix_path=`$CYGPATH -u "$windows_path"`
27837    VIRTUAL_DIR="$unix_path"
27838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27840    VIRTUAL_DIR="$unix_path"
27841  fi
27842
27843
27844  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27845  BOOT_JDK_SUFFIX=""
27846  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27847  if test "x$ALL_JDKS_FOUND" != x; then
27848    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27849
27850  if test "x$BOOT_JDK_FOUND" = xno; then
27851    # Now execute the test
27852
27853        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27854        if test -d "$BOOT_JDK"; then
27855          BOOT_JDK_FOUND=maybe
27856          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27857$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27858        fi
27859
27860
27861    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27862    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27863      # Do we have a bin/java?
27864      if test ! -x "$BOOT_JDK/bin/java"; then
27865        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27867        BOOT_JDK_FOUND=no
27868      else
27869        # Do we have a bin/javac?
27870        if test ! -x "$BOOT_JDK/bin/javac"; then
27871          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27872$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27873          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27874$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27875          BOOT_JDK_FOUND=no
27876        else
27877          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27878          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27879
27880          # Extra M4 quote needed to protect [] in grep expression.
27881          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27882          if test "x$FOUND_CORRECT_VERSION" = x; then
27883            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27884$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27885            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27886$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27887            BOOT_JDK_FOUND=no
27888          else
27889            # We're done! :-)
27890            BOOT_JDK_FOUND=yes
27891
27892  # Only process if variable expands to non-empty
27893
27894  if test "x$BOOT_JDK" != x; then
27895    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27896
27897  # Input might be given as Windows format, start by converting to
27898  # unix format.
27899  path="$BOOT_JDK"
27900  new_path=`$CYGPATH -u "$path"`
27901
27902  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27903  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27904  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27905  # "foo.exe" is OK but "foo" is an error.
27906  #
27907  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27908  # It is also a way to make sure we got the proper file name for the real test later on.
27909  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27910  if test "x$test_shortpath" = x; then
27911    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27912$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27913    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27914  fi
27915
27916  # Call helper function which possibly converts this using DOS-style short mode.
27917  # If so, the updated path is stored in $new_path.
27918
27919  input_path="$new_path"
27920  # Check if we need to convert this using DOS-style short mode. If the path
27921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27922  # take no chances and rewrite it.
27923  # Note: m4 eats our [], so we need to use [ and ] instead.
27924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27925  if test "x$has_forbidden_chars" != x; then
27926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27927    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27928    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27929    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27930      # Going to short mode and back again did indeed matter. Since short mode is
27931      # case insensitive, let's make it lowercase to improve readability.
27932      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27933      # Now convert it back to Unix-style (cygpath)
27934      input_path=`$CYGPATH -u "$shortmode_path"`
27935      new_path="$input_path"
27936    fi
27937  fi
27938
27939  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27940  if test "x$test_cygdrive_prefix" = x; then
27941    # As a simple fix, exclude /usr/bin since it's not a real path.
27942    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27943      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27944      # a path prefixed by /cygdrive for fixpath to work.
27945      new_path="$CYGWIN_ROOT_PATH$input_path"
27946    fi
27947  fi
27948
27949
27950  if test "x$path" != "x$new_path"; then
27951    BOOT_JDK="$new_path"
27952    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27953$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27954  fi
27955
27956    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27957
27958  path="$BOOT_JDK"
27959  has_colon=`$ECHO $path | $GREP ^.:`
27960  new_path="$path"
27961  if test "x$has_colon" = x; then
27962    # Not in mixed or Windows style, start by that.
27963    new_path=`cmd //c echo $path`
27964  fi
27965
27966
27967  input_path="$new_path"
27968  # Check if we need to convert this using DOS-style short mode. If the path
27969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27970  # take no chances and rewrite it.
27971  # Note: m4 eats our [], so we need to use [ and ] instead.
27972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27973  if test "x$has_forbidden_chars" != x; then
27974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27975    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27976  fi
27977
27978
27979  windows_path="$new_path"
27980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27981    unix_path=`$CYGPATH -u "$windows_path"`
27982    new_path="$unix_path"
27983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27985    new_path="$unix_path"
27986  fi
27987
27988  if test "x$path" != "x$new_path"; then
27989    BOOT_JDK="$new_path"
27990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27991$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27992  fi
27993
27994  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27995  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27996
27997    else
27998      # We're on a unix platform. Hooray! :)
27999      path="$BOOT_JDK"
28000      has_space=`$ECHO "$path" | $GREP " "`
28001      if test "x$has_space" != x; then
28002        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28003$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28004        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28005      fi
28006
28007      # Use eval to expand a potential ~
28008      eval path="$path"
28009      if test ! -f "$path" && test ! -d "$path"; then
28010        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28011      fi
28012
28013      if test -d "$path"; then
28014        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28015      else
28016        dir="`$DIRNAME "$path"`"
28017        base="`$BASENAME "$path"`"
28018        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28019      fi
28020    fi
28021  fi
28022
28023            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28024$as_echo_n "checking for Boot JDK... " >&6; }
28025            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28026$as_echo "$BOOT_JDK" >&6; }
28027            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28028$as_echo_n "checking Boot JDK version... " >&6; }
28029            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28030            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28031$as_echo "$BOOT_JDK_VERSION" >&6; }
28032          fi # end check jdk version
28033        fi # end check javac
28034      fi # end check java
28035    fi # end check boot jdk found
28036  fi
28037
28038    done
28039  fi
28040
28041  fi
28042
28043
28044    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28045    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28046      # Do we have a bin/java?
28047      if test ! -x "$BOOT_JDK/bin/java"; then
28048        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28049$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28050        BOOT_JDK_FOUND=no
28051      else
28052        # Do we have a bin/javac?
28053        if test ! -x "$BOOT_JDK/bin/javac"; then
28054          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28055$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28056          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28057$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28058          BOOT_JDK_FOUND=no
28059        else
28060          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28061          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28062
28063          # Extra M4 quote needed to protect [] in grep expression.
28064          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28065          if test "x$FOUND_CORRECT_VERSION" = x; then
28066            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28067$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28068            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28069$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28070            BOOT_JDK_FOUND=no
28071          else
28072            # We're done! :-)
28073            BOOT_JDK_FOUND=yes
28074
28075  # Only process if variable expands to non-empty
28076
28077  if test "x$BOOT_JDK" != x; then
28078    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28079
28080  # Input might be given as Windows format, start by converting to
28081  # unix format.
28082  path="$BOOT_JDK"
28083  new_path=`$CYGPATH -u "$path"`
28084
28085  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28086  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28087  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28088  # "foo.exe" is OK but "foo" is an error.
28089  #
28090  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28091  # It is also a way to make sure we got the proper file name for the real test later on.
28092  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28093  if test "x$test_shortpath" = x; then
28094    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28095$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28096    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28097  fi
28098
28099  # Call helper function which possibly converts this using DOS-style short mode.
28100  # If so, the updated path is stored in $new_path.
28101
28102  input_path="$new_path"
28103  # Check if we need to convert this using DOS-style short mode. If the path
28104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28105  # take no chances and rewrite it.
28106  # Note: m4 eats our [], so we need to use [ and ] instead.
28107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28108  if test "x$has_forbidden_chars" != x; then
28109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28110    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28111    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28112    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28113      # Going to short mode and back again did indeed matter. Since short mode is
28114      # case insensitive, let's make it lowercase to improve readability.
28115      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28116      # Now convert it back to Unix-style (cygpath)
28117      input_path=`$CYGPATH -u "$shortmode_path"`
28118      new_path="$input_path"
28119    fi
28120  fi
28121
28122  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28123  if test "x$test_cygdrive_prefix" = x; then
28124    # As a simple fix, exclude /usr/bin since it's not a real path.
28125    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28126      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28127      # a path prefixed by /cygdrive for fixpath to work.
28128      new_path="$CYGWIN_ROOT_PATH$input_path"
28129    fi
28130  fi
28131
28132
28133  if test "x$path" != "x$new_path"; then
28134    BOOT_JDK="$new_path"
28135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28136$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28137  fi
28138
28139    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28140
28141  path="$BOOT_JDK"
28142  has_colon=`$ECHO $path | $GREP ^.:`
28143  new_path="$path"
28144  if test "x$has_colon" = x; then
28145    # Not in mixed or Windows style, start by that.
28146    new_path=`cmd //c echo $path`
28147  fi
28148
28149
28150  input_path="$new_path"
28151  # Check if we need to convert this using DOS-style short mode. If the path
28152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28153  # take no chances and rewrite it.
28154  # Note: m4 eats our [], so we need to use [ and ] instead.
28155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28156  if test "x$has_forbidden_chars" != x; then
28157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28158    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28159  fi
28160
28161
28162  windows_path="$new_path"
28163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28164    unix_path=`$CYGPATH -u "$windows_path"`
28165    new_path="$unix_path"
28166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28168    new_path="$unix_path"
28169  fi
28170
28171  if test "x$path" != "x$new_path"; then
28172    BOOT_JDK="$new_path"
28173    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28174$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28175  fi
28176
28177  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28178  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28179
28180    else
28181      # We're on a unix platform. Hooray! :)
28182      path="$BOOT_JDK"
28183      has_space=`$ECHO "$path" | $GREP " "`
28184      if test "x$has_space" != x; then
28185        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28186$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28187        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28188      fi
28189
28190      # Use eval to expand a potential ~
28191      eval path="$path"
28192      if test ! -f "$path" && test ! -d "$path"; then
28193        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28194      fi
28195
28196      if test -d "$path"; then
28197        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28198      else
28199        dir="`$DIRNAME "$path"`"
28200        base="`$BASENAME "$path"`"
28201        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28202      fi
28203    fi
28204  fi
28205
28206            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28207$as_echo_n "checking for Boot JDK... " >&6; }
28208            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28209$as_echo "$BOOT_JDK" >&6; }
28210            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28211$as_echo_n "checking Boot JDK version... " >&6; }
28212            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28213            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28214$as_echo "$BOOT_JDK_VERSION" >&6; }
28215          fi # end check jdk version
28216        fi # end check javac
28217      fi # end check java
28218    fi # end check boot jdk found
28219  fi
28220
28221
28222  if test "x$BOOT_JDK_FOUND" = xno; then
28223    # Now execute the test
28224
28225  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28226  BOOT_JDK_SUFFIX=""
28227  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28228  if test "x$ALL_JDKS_FOUND" != x; then
28229    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28230
28231  if test "x$BOOT_JDK_FOUND" = xno; then
28232    # Now execute the test
28233
28234        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28235        if test -d "$BOOT_JDK"; then
28236          BOOT_JDK_FOUND=maybe
28237          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28238$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28239        fi
28240
28241
28242    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28243    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28244      # Do we have a bin/java?
28245      if test ! -x "$BOOT_JDK/bin/java"; then
28246        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28247$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28248        BOOT_JDK_FOUND=no
28249      else
28250        # Do we have a bin/javac?
28251        if test ! -x "$BOOT_JDK/bin/javac"; then
28252          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28253$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28254          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28255$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28256          BOOT_JDK_FOUND=no
28257        else
28258          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28259          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28260
28261          # Extra M4 quote needed to protect [] in grep expression.
28262          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28263          if test "x$FOUND_CORRECT_VERSION" = x; then
28264            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28265$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28266            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28267$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28268            BOOT_JDK_FOUND=no
28269          else
28270            # We're done! :-)
28271            BOOT_JDK_FOUND=yes
28272
28273  # Only process if variable expands to non-empty
28274
28275  if test "x$BOOT_JDK" != x; then
28276    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28277
28278  # Input might be given as Windows format, start by converting to
28279  # unix format.
28280  path="$BOOT_JDK"
28281  new_path=`$CYGPATH -u "$path"`
28282
28283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28286  # "foo.exe" is OK but "foo" is an error.
28287  #
28288  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28289  # It is also a way to make sure we got the proper file name for the real test later on.
28290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28291  if test "x$test_shortpath" = x; then
28292    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28293$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28294    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28295  fi
28296
28297  # Call helper function which possibly converts this using DOS-style short mode.
28298  # If so, the updated path is stored in $new_path.
28299
28300  input_path="$new_path"
28301  # Check if we need to convert this using DOS-style short mode. If the path
28302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28303  # take no chances and rewrite it.
28304  # Note: m4 eats our [], so we need to use [ and ] instead.
28305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28306  if test "x$has_forbidden_chars" != x; then
28307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28311      # Going to short mode and back again did indeed matter. Since short mode is
28312      # case insensitive, let's make it lowercase to improve readability.
28313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28314      # Now convert it back to Unix-style (cygpath)
28315      input_path=`$CYGPATH -u "$shortmode_path"`
28316      new_path="$input_path"
28317    fi
28318  fi
28319
28320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28321  if test "x$test_cygdrive_prefix" = x; then
28322    # As a simple fix, exclude /usr/bin since it's not a real path.
28323    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28325      # a path prefixed by /cygdrive for fixpath to work.
28326      new_path="$CYGWIN_ROOT_PATH$input_path"
28327    fi
28328  fi
28329
28330
28331  if test "x$path" != "x$new_path"; then
28332    BOOT_JDK="$new_path"
28333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28334$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28335  fi
28336
28337    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28338
28339  path="$BOOT_JDK"
28340  has_colon=`$ECHO $path | $GREP ^.:`
28341  new_path="$path"
28342  if test "x$has_colon" = x; then
28343    # Not in mixed or Windows style, start by that.
28344    new_path=`cmd //c echo $path`
28345  fi
28346
28347
28348  input_path="$new_path"
28349  # Check if we need to convert this using DOS-style short mode. If the path
28350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28351  # take no chances and rewrite it.
28352  # Note: m4 eats our [], so we need to use [ and ] instead.
28353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28354  if test "x$has_forbidden_chars" != x; then
28355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28356    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28357  fi
28358
28359
28360  windows_path="$new_path"
28361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28362    unix_path=`$CYGPATH -u "$windows_path"`
28363    new_path="$unix_path"
28364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28366    new_path="$unix_path"
28367  fi
28368
28369  if test "x$path" != "x$new_path"; then
28370    BOOT_JDK="$new_path"
28371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28372$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28373  fi
28374
28375  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28376  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28377
28378    else
28379      # We're on a unix platform. Hooray! :)
28380      path="$BOOT_JDK"
28381      has_space=`$ECHO "$path" | $GREP " "`
28382      if test "x$has_space" != x; then
28383        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28384$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28385        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28386      fi
28387
28388      # Use eval to expand a potential ~
28389      eval path="$path"
28390      if test ! -f "$path" && test ! -d "$path"; then
28391        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28392      fi
28393
28394      if test -d "$path"; then
28395        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28396      else
28397        dir="`$DIRNAME "$path"`"
28398        base="`$BASENAME "$path"`"
28399        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28400      fi
28401    fi
28402  fi
28403
28404            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28405$as_echo_n "checking for Boot JDK... " >&6; }
28406            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28407$as_echo "$BOOT_JDK" >&6; }
28408            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28409$as_echo_n "checking Boot JDK version... " >&6; }
28410            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28411            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28412$as_echo "$BOOT_JDK_VERSION" >&6; }
28413          fi # end check jdk version
28414        fi # end check javac
28415      fi # end check java
28416    fi # end check boot jdk found
28417  fi
28418
28419    done
28420  fi
28421
28422
28423    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28424    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28425      # Do we have a bin/java?
28426      if test ! -x "$BOOT_JDK/bin/java"; then
28427        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28429        BOOT_JDK_FOUND=no
28430      else
28431        # Do we have a bin/javac?
28432        if test ! -x "$BOOT_JDK/bin/javac"; then
28433          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28434$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28435          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28436$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28437          BOOT_JDK_FOUND=no
28438        else
28439          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28440          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28441
28442          # Extra M4 quote needed to protect [] in grep expression.
28443          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28444          if test "x$FOUND_CORRECT_VERSION" = x; then
28445            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28447            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28448$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28449            BOOT_JDK_FOUND=no
28450          else
28451            # We're done! :-)
28452            BOOT_JDK_FOUND=yes
28453
28454  # Only process if variable expands to non-empty
28455
28456  if test "x$BOOT_JDK" != x; then
28457    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28458
28459  # Input might be given as Windows format, start by converting to
28460  # unix format.
28461  path="$BOOT_JDK"
28462  new_path=`$CYGPATH -u "$path"`
28463
28464  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28465  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28466  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28467  # "foo.exe" is OK but "foo" is an error.
28468  #
28469  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28470  # It is also a way to make sure we got the proper file name for the real test later on.
28471  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28472  if test "x$test_shortpath" = x; then
28473    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28474$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28475    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28476  fi
28477
28478  # Call helper function which possibly converts this using DOS-style short mode.
28479  # If so, the updated path is stored in $new_path.
28480
28481  input_path="$new_path"
28482  # Check if we need to convert this using DOS-style short mode. If the path
28483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28484  # take no chances and rewrite it.
28485  # Note: m4 eats our [], so we need to use [ and ] instead.
28486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28487  if test "x$has_forbidden_chars" != x; then
28488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28489    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28490    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28491    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28492      # Going to short mode and back again did indeed matter. Since short mode is
28493      # case insensitive, let's make it lowercase to improve readability.
28494      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28495      # Now convert it back to Unix-style (cygpath)
28496      input_path=`$CYGPATH -u "$shortmode_path"`
28497      new_path="$input_path"
28498    fi
28499  fi
28500
28501  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28502  if test "x$test_cygdrive_prefix" = x; then
28503    # As a simple fix, exclude /usr/bin since it's not a real path.
28504    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28505      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28506      # a path prefixed by /cygdrive for fixpath to work.
28507      new_path="$CYGWIN_ROOT_PATH$input_path"
28508    fi
28509  fi
28510
28511
28512  if test "x$path" != "x$new_path"; then
28513    BOOT_JDK="$new_path"
28514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28515$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28516  fi
28517
28518    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28519
28520  path="$BOOT_JDK"
28521  has_colon=`$ECHO $path | $GREP ^.:`
28522  new_path="$path"
28523  if test "x$has_colon" = x; then
28524    # Not in mixed or Windows style, start by that.
28525    new_path=`cmd //c echo $path`
28526  fi
28527
28528
28529  input_path="$new_path"
28530  # Check if we need to convert this using DOS-style short mode. If the path
28531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28532  # take no chances and rewrite it.
28533  # Note: m4 eats our [], so we need to use [ and ] instead.
28534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28535  if test "x$has_forbidden_chars" != x; then
28536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28537    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28538  fi
28539
28540
28541  windows_path="$new_path"
28542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28543    unix_path=`$CYGPATH -u "$windows_path"`
28544    new_path="$unix_path"
28545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28547    new_path="$unix_path"
28548  fi
28549
28550  if test "x$path" != "x$new_path"; then
28551    BOOT_JDK="$new_path"
28552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28553$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28554  fi
28555
28556  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28557  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28558
28559    else
28560      # We're on a unix platform. Hooray! :)
28561      path="$BOOT_JDK"
28562      has_space=`$ECHO "$path" | $GREP " "`
28563      if test "x$has_space" != x; then
28564        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28565$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28566        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28567      fi
28568
28569      # Use eval to expand a potential ~
28570      eval path="$path"
28571      if test ! -f "$path" && test ! -d "$path"; then
28572        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28573      fi
28574
28575      if test -d "$path"; then
28576        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28577      else
28578        dir="`$DIRNAME "$path"`"
28579        base="`$BASENAME "$path"`"
28580        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28581      fi
28582    fi
28583  fi
28584
28585            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28586$as_echo_n "checking for Boot JDK... " >&6; }
28587            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28588$as_echo "$BOOT_JDK" >&6; }
28589            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28590$as_echo_n "checking Boot JDK version... " >&6; }
28591            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28592            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28593$as_echo "$BOOT_JDK_VERSION" >&6; }
28594          fi # end check jdk version
28595        fi # end check javac
28596      fi # end check java
28597    fi # end check boot jdk found
28598  fi
28599
28600  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28601
28602  if test "x$BOOT_JDK_FOUND" = xno; then
28603    # Now execute the test
28604
28605  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28606  BOOT_JDK_SUFFIX="/Contents/Home"
28607  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28608  if test "x$ALL_JDKS_FOUND" != x; then
28609    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28610
28611  if test "x$BOOT_JDK_FOUND" = xno; then
28612    # Now execute the test
28613
28614        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28615        if test -d "$BOOT_JDK"; then
28616          BOOT_JDK_FOUND=maybe
28617          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28618$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28619        fi
28620
28621
28622    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28623    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28624      # Do we have a bin/java?
28625      if test ! -x "$BOOT_JDK/bin/java"; then
28626        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28627$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28628        BOOT_JDK_FOUND=no
28629      else
28630        # Do we have a bin/javac?
28631        if test ! -x "$BOOT_JDK/bin/javac"; then
28632          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28633$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28634          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28635$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28636          BOOT_JDK_FOUND=no
28637        else
28638          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28639          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28640
28641          # Extra M4 quote needed to protect [] in grep expression.
28642          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28643          if test "x$FOUND_CORRECT_VERSION" = x; then
28644            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28646            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28647$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28648            BOOT_JDK_FOUND=no
28649          else
28650            # We're done! :-)
28651            BOOT_JDK_FOUND=yes
28652
28653  # Only process if variable expands to non-empty
28654
28655  if test "x$BOOT_JDK" != x; then
28656    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28657
28658  # Input might be given as Windows format, start by converting to
28659  # unix format.
28660  path="$BOOT_JDK"
28661  new_path=`$CYGPATH -u "$path"`
28662
28663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28666  # "foo.exe" is OK but "foo" is an error.
28667  #
28668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28669  # It is also a way to make sure we got the proper file name for the real test later on.
28670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28671  if test "x$test_shortpath" = x; then
28672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28673$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28674    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28675  fi
28676
28677  # Call helper function which possibly converts this using DOS-style short mode.
28678  # If so, the updated path is stored in $new_path.
28679
28680  input_path="$new_path"
28681  # Check if we need to convert this using DOS-style short mode. If the path
28682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28683  # take no chances and rewrite it.
28684  # Note: m4 eats our [], so we need to use [ and ] instead.
28685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28686  if test "x$has_forbidden_chars" != x; then
28687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28691      # Going to short mode and back again did indeed matter. Since short mode is
28692      # case insensitive, let's make it lowercase to improve readability.
28693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28694      # Now convert it back to Unix-style (cygpath)
28695      input_path=`$CYGPATH -u "$shortmode_path"`
28696      new_path="$input_path"
28697    fi
28698  fi
28699
28700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28701  if test "x$test_cygdrive_prefix" = x; then
28702    # As a simple fix, exclude /usr/bin since it's not a real path.
28703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28705      # a path prefixed by /cygdrive for fixpath to work.
28706      new_path="$CYGWIN_ROOT_PATH$input_path"
28707    fi
28708  fi
28709
28710
28711  if test "x$path" != "x$new_path"; then
28712    BOOT_JDK="$new_path"
28713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28714$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28715  fi
28716
28717    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28718
28719  path="$BOOT_JDK"
28720  has_colon=`$ECHO $path | $GREP ^.:`
28721  new_path="$path"
28722  if test "x$has_colon" = x; then
28723    # Not in mixed or Windows style, start by that.
28724    new_path=`cmd //c echo $path`
28725  fi
28726
28727
28728  input_path="$new_path"
28729  # Check if we need to convert this using DOS-style short mode. If the path
28730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28731  # take no chances and rewrite it.
28732  # Note: m4 eats our [], so we need to use [ and ] instead.
28733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28734  if test "x$has_forbidden_chars" != x; then
28735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28737  fi
28738
28739
28740  windows_path="$new_path"
28741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28742    unix_path=`$CYGPATH -u "$windows_path"`
28743    new_path="$unix_path"
28744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28746    new_path="$unix_path"
28747  fi
28748
28749  if test "x$path" != "x$new_path"; then
28750    BOOT_JDK="$new_path"
28751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28752$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28753  fi
28754
28755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28757
28758    else
28759      # We're on a unix platform. Hooray! :)
28760      path="$BOOT_JDK"
28761      has_space=`$ECHO "$path" | $GREP " "`
28762      if test "x$has_space" != x; then
28763        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28764$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28765        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28766      fi
28767
28768      # Use eval to expand a potential ~
28769      eval path="$path"
28770      if test ! -f "$path" && test ! -d "$path"; then
28771        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28772      fi
28773
28774      if test -d "$path"; then
28775        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28776      else
28777        dir="`$DIRNAME "$path"`"
28778        base="`$BASENAME "$path"`"
28779        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28780      fi
28781    fi
28782  fi
28783
28784            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28785$as_echo_n "checking for Boot JDK... " >&6; }
28786            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28787$as_echo "$BOOT_JDK" >&6; }
28788            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28789$as_echo_n "checking Boot JDK version... " >&6; }
28790            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28791            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28792$as_echo "$BOOT_JDK_VERSION" >&6; }
28793          fi # end check jdk version
28794        fi # end check javac
28795      fi # end check java
28796    fi # end check boot jdk found
28797  fi
28798
28799    done
28800  fi
28801
28802
28803    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28804    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28805      # Do we have a bin/java?
28806      if test ! -x "$BOOT_JDK/bin/java"; then
28807        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28809        BOOT_JDK_FOUND=no
28810      else
28811        # Do we have a bin/javac?
28812        if test ! -x "$BOOT_JDK/bin/javac"; then
28813          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28814$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28815          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28816$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28817          BOOT_JDK_FOUND=no
28818        else
28819          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28820          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28821
28822          # Extra M4 quote needed to protect [] in grep expression.
28823          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28824          if test "x$FOUND_CORRECT_VERSION" = x; then
28825            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28826$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28827            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28828$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28829            BOOT_JDK_FOUND=no
28830          else
28831            # We're done! :-)
28832            BOOT_JDK_FOUND=yes
28833
28834  # Only process if variable expands to non-empty
28835
28836  if test "x$BOOT_JDK" != x; then
28837    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28838
28839  # Input might be given as Windows format, start by converting to
28840  # unix format.
28841  path="$BOOT_JDK"
28842  new_path=`$CYGPATH -u "$path"`
28843
28844  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28845  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28846  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28847  # "foo.exe" is OK but "foo" is an error.
28848  #
28849  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28850  # It is also a way to make sure we got the proper file name for the real test later on.
28851  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28852  if test "x$test_shortpath" = x; then
28853    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28854$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28855    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28856  fi
28857
28858  # Call helper function which possibly converts this using DOS-style short mode.
28859  # If so, the updated path is stored in $new_path.
28860
28861  input_path="$new_path"
28862  # Check if we need to convert this using DOS-style short mode. If the path
28863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28864  # take no chances and rewrite it.
28865  # Note: m4 eats our [], so we need to use [ and ] instead.
28866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28867  if test "x$has_forbidden_chars" != x; then
28868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28869    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28870    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28871    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28872      # Going to short mode and back again did indeed matter. Since short mode is
28873      # case insensitive, let's make it lowercase to improve readability.
28874      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28875      # Now convert it back to Unix-style (cygpath)
28876      input_path=`$CYGPATH -u "$shortmode_path"`
28877      new_path="$input_path"
28878    fi
28879  fi
28880
28881  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28882  if test "x$test_cygdrive_prefix" = x; then
28883    # As a simple fix, exclude /usr/bin since it's not a real path.
28884    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28885      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28886      # a path prefixed by /cygdrive for fixpath to work.
28887      new_path="$CYGWIN_ROOT_PATH$input_path"
28888    fi
28889  fi
28890
28891
28892  if test "x$path" != "x$new_path"; then
28893    BOOT_JDK="$new_path"
28894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28895$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28896  fi
28897
28898    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28899
28900  path="$BOOT_JDK"
28901  has_colon=`$ECHO $path | $GREP ^.:`
28902  new_path="$path"
28903  if test "x$has_colon" = x; then
28904    # Not in mixed or Windows style, start by that.
28905    new_path=`cmd //c echo $path`
28906  fi
28907
28908
28909  input_path="$new_path"
28910  # Check if we need to convert this using DOS-style short mode. If the path
28911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28912  # take no chances and rewrite it.
28913  # Note: m4 eats our [], so we need to use [ and ] instead.
28914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28915  if test "x$has_forbidden_chars" != x; then
28916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28917    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28918  fi
28919
28920
28921  windows_path="$new_path"
28922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28923    unix_path=`$CYGPATH -u "$windows_path"`
28924    new_path="$unix_path"
28925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28927    new_path="$unix_path"
28928  fi
28929
28930  if test "x$path" != "x$new_path"; then
28931    BOOT_JDK="$new_path"
28932    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28933$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28934  fi
28935
28936  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28937  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28938
28939    else
28940      # We're on a unix platform. Hooray! :)
28941      path="$BOOT_JDK"
28942      has_space=`$ECHO "$path" | $GREP " "`
28943      if test "x$has_space" != x; then
28944        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28945$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28946        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28947      fi
28948
28949      # Use eval to expand a potential ~
28950      eval path="$path"
28951      if test ! -f "$path" && test ! -d "$path"; then
28952        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28953      fi
28954
28955      if test -d "$path"; then
28956        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28957      else
28958        dir="`$DIRNAME "$path"`"
28959        base="`$BASENAME "$path"`"
28960        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28961      fi
28962    fi
28963  fi
28964
28965            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28966$as_echo_n "checking for Boot JDK... " >&6; }
28967            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28968$as_echo "$BOOT_JDK" >&6; }
28969            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28970$as_echo_n "checking Boot JDK version... " >&6; }
28971            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28973$as_echo "$BOOT_JDK_VERSION" >&6; }
28974          fi # end check jdk version
28975        fi # end check javac
28976      fi # end check java
28977    fi # end check boot jdk found
28978  fi
28979
28980
28981  if test "x$BOOT_JDK_FOUND" = xno; then
28982    # Now execute the test
28983
28984  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28985  BOOT_JDK_SUFFIX="/Contents/Home"
28986  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28987  if test "x$ALL_JDKS_FOUND" != x; then
28988    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28989
28990  if test "x$BOOT_JDK_FOUND" = xno; then
28991    # Now execute the test
28992
28993        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28994        if test -d "$BOOT_JDK"; then
28995          BOOT_JDK_FOUND=maybe
28996          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28997$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28998        fi
28999
29000
29001    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29002    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29003      # Do we have a bin/java?
29004      if test ! -x "$BOOT_JDK/bin/java"; then
29005        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29006$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29007        BOOT_JDK_FOUND=no
29008      else
29009        # Do we have a bin/javac?
29010        if test ! -x "$BOOT_JDK/bin/javac"; then
29011          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29013          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29014$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29015          BOOT_JDK_FOUND=no
29016        else
29017          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29018          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29019
29020          # Extra M4 quote needed to protect [] in grep expression.
29021          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29022          if test "x$FOUND_CORRECT_VERSION" = x; then
29023            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29024$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29025            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29026$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29027            BOOT_JDK_FOUND=no
29028          else
29029            # We're done! :-)
29030            BOOT_JDK_FOUND=yes
29031
29032  # Only process if variable expands to non-empty
29033
29034  if test "x$BOOT_JDK" != x; then
29035    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29036
29037  # Input might be given as Windows format, start by converting to
29038  # unix format.
29039  path="$BOOT_JDK"
29040  new_path=`$CYGPATH -u "$path"`
29041
29042  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29043  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29044  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29045  # "foo.exe" is OK but "foo" is an error.
29046  #
29047  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29048  # It is also a way to make sure we got the proper file name for the real test later on.
29049  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29050  if test "x$test_shortpath" = x; then
29051    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29052$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29053    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29054  fi
29055
29056  # Call helper function which possibly converts this using DOS-style short mode.
29057  # If so, the updated path is stored in $new_path.
29058
29059  input_path="$new_path"
29060  # Check if we need to convert this using DOS-style short mode. If the path
29061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29062  # take no chances and rewrite it.
29063  # Note: m4 eats our [], so we need to use [ and ] instead.
29064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29065  if test "x$has_forbidden_chars" != x; then
29066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29067    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29068    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29069    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29070      # Going to short mode and back again did indeed matter. Since short mode is
29071      # case insensitive, let's make it lowercase to improve readability.
29072      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29073      # Now convert it back to Unix-style (cygpath)
29074      input_path=`$CYGPATH -u "$shortmode_path"`
29075      new_path="$input_path"
29076    fi
29077  fi
29078
29079  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29080  if test "x$test_cygdrive_prefix" = x; then
29081    # As a simple fix, exclude /usr/bin since it's not a real path.
29082    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29083      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29084      # a path prefixed by /cygdrive for fixpath to work.
29085      new_path="$CYGWIN_ROOT_PATH$input_path"
29086    fi
29087  fi
29088
29089
29090  if test "x$path" != "x$new_path"; then
29091    BOOT_JDK="$new_path"
29092    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29093$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29094  fi
29095
29096    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29097
29098  path="$BOOT_JDK"
29099  has_colon=`$ECHO $path | $GREP ^.:`
29100  new_path="$path"
29101  if test "x$has_colon" = x; then
29102    # Not in mixed or Windows style, start by that.
29103    new_path=`cmd //c echo $path`
29104  fi
29105
29106
29107  input_path="$new_path"
29108  # Check if we need to convert this using DOS-style short mode. If the path
29109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29110  # take no chances and rewrite it.
29111  # Note: m4 eats our [], so we need to use [ and ] instead.
29112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29113  if test "x$has_forbidden_chars" != x; then
29114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29115    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29116  fi
29117
29118
29119  windows_path="$new_path"
29120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29121    unix_path=`$CYGPATH -u "$windows_path"`
29122    new_path="$unix_path"
29123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29125    new_path="$unix_path"
29126  fi
29127
29128  if test "x$path" != "x$new_path"; then
29129    BOOT_JDK="$new_path"
29130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29131$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29132  fi
29133
29134  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29135  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29136
29137    else
29138      # We're on a unix platform. Hooray! :)
29139      path="$BOOT_JDK"
29140      has_space=`$ECHO "$path" | $GREP " "`
29141      if test "x$has_space" != x; then
29142        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29143$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29144        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29145      fi
29146
29147      # Use eval to expand a potential ~
29148      eval path="$path"
29149      if test ! -f "$path" && test ! -d "$path"; then
29150        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29151      fi
29152
29153      if test -d "$path"; then
29154        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29155      else
29156        dir="`$DIRNAME "$path"`"
29157        base="`$BASENAME "$path"`"
29158        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29159      fi
29160    fi
29161  fi
29162
29163            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29164$as_echo_n "checking for Boot JDK... " >&6; }
29165            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29166$as_echo "$BOOT_JDK" >&6; }
29167            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29168$as_echo_n "checking Boot JDK version... " >&6; }
29169            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29170            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29171$as_echo "$BOOT_JDK_VERSION" >&6; }
29172          fi # end check jdk version
29173        fi # end check javac
29174      fi # end check java
29175    fi # end check boot jdk found
29176  fi
29177
29178    done
29179  fi
29180
29181
29182    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29183    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29184      # Do we have a bin/java?
29185      if test ! -x "$BOOT_JDK/bin/java"; then
29186        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29187$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29188        BOOT_JDK_FOUND=no
29189      else
29190        # Do we have a bin/javac?
29191        if test ! -x "$BOOT_JDK/bin/javac"; then
29192          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29193$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29194          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29195$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29196          BOOT_JDK_FOUND=no
29197        else
29198          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29199          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29200
29201          # Extra M4 quote needed to protect [] in grep expression.
29202          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29203          if test "x$FOUND_CORRECT_VERSION" = x; then
29204            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29206            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29207$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29208            BOOT_JDK_FOUND=no
29209          else
29210            # We're done! :-)
29211            BOOT_JDK_FOUND=yes
29212
29213  # Only process if variable expands to non-empty
29214
29215  if test "x$BOOT_JDK" != x; then
29216    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29217
29218  # Input might be given as Windows format, start by converting to
29219  # unix format.
29220  path="$BOOT_JDK"
29221  new_path=`$CYGPATH -u "$path"`
29222
29223  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29224  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29225  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29226  # "foo.exe" is OK but "foo" is an error.
29227  #
29228  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29229  # It is also a way to make sure we got the proper file name for the real test later on.
29230  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29231  if test "x$test_shortpath" = x; then
29232    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29233$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29234    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29235  fi
29236
29237  # Call helper function which possibly converts this using DOS-style short mode.
29238  # If so, the updated path is stored in $new_path.
29239
29240  input_path="$new_path"
29241  # Check if we need to convert this using DOS-style short mode. If the path
29242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29243  # take no chances and rewrite it.
29244  # Note: m4 eats our [], so we need to use [ and ] instead.
29245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29246  if test "x$has_forbidden_chars" != x; then
29247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29248    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29249    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29250    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29251      # Going to short mode and back again did indeed matter. Since short mode is
29252      # case insensitive, let's make it lowercase to improve readability.
29253      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29254      # Now convert it back to Unix-style (cygpath)
29255      input_path=`$CYGPATH -u "$shortmode_path"`
29256      new_path="$input_path"
29257    fi
29258  fi
29259
29260  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29261  if test "x$test_cygdrive_prefix" = x; then
29262    # As a simple fix, exclude /usr/bin since it's not a real path.
29263    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29264      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29265      # a path prefixed by /cygdrive for fixpath to work.
29266      new_path="$CYGWIN_ROOT_PATH$input_path"
29267    fi
29268  fi
29269
29270
29271  if test "x$path" != "x$new_path"; then
29272    BOOT_JDK="$new_path"
29273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29274$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29275  fi
29276
29277    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29278
29279  path="$BOOT_JDK"
29280  has_colon=`$ECHO $path | $GREP ^.:`
29281  new_path="$path"
29282  if test "x$has_colon" = x; then
29283    # Not in mixed or Windows style, start by that.
29284    new_path=`cmd //c echo $path`
29285  fi
29286
29287
29288  input_path="$new_path"
29289  # Check if we need to convert this using DOS-style short mode. If the path
29290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29291  # take no chances and rewrite it.
29292  # Note: m4 eats our [], so we need to use [ and ] instead.
29293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29294  if test "x$has_forbidden_chars" != x; then
29295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29296    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29297  fi
29298
29299
29300  windows_path="$new_path"
29301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29302    unix_path=`$CYGPATH -u "$windows_path"`
29303    new_path="$unix_path"
29304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29306    new_path="$unix_path"
29307  fi
29308
29309  if test "x$path" != "x$new_path"; then
29310    BOOT_JDK="$new_path"
29311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29312$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29313  fi
29314
29315  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29316  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29317
29318    else
29319      # We're on a unix platform. Hooray! :)
29320      path="$BOOT_JDK"
29321      has_space=`$ECHO "$path" | $GREP " "`
29322      if test "x$has_space" != x; then
29323        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29324$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29325        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29326      fi
29327
29328      # Use eval to expand a potential ~
29329      eval path="$path"
29330      if test ! -f "$path" && test ! -d "$path"; then
29331        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29332      fi
29333
29334      if test -d "$path"; then
29335        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29336      else
29337        dir="`$DIRNAME "$path"`"
29338        base="`$BASENAME "$path"`"
29339        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29340      fi
29341    fi
29342  fi
29343
29344            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29345$as_echo_n "checking for Boot JDK... " >&6; }
29346            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29347$as_echo "$BOOT_JDK" >&6; }
29348            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29349$as_echo_n "checking Boot JDK version... " >&6; }
29350            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29351            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29352$as_echo "$BOOT_JDK_VERSION" >&6; }
29353          fi # end check jdk version
29354        fi # end check javac
29355      fi # end check java
29356    fi # end check boot jdk found
29357  fi
29358
29359  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29360
29361  if test "x$BOOT_JDK_FOUND" = xno; then
29362    # Now execute the test
29363
29364  BOOT_JDK_PREFIX="/usr/lib/jvm"
29365  BOOT_JDK_SUFFIX=""
29366  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29367  if test "x$ALL_JDKS_FOUND" != x; then
29368    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29369
29370  if test "x$BOOT_JDK_FOUND" = xno; then
29371    # Now execute the test
29372
29373        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29374        if test -d "$BOOT_JDK"; then
29375          BOOT_JDK_FOUND=maybe
29376          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29377$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29378        fi
29379
29380
29381    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29382    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29383      # Do we have a bin/java?
29384      if test ! -x "$BOOT_JDK/bin/java"; then
29385        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29386$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29387        BOOT_JDK_FOUND=no
29388      else
29389        # Do we have a bin/javac?
29390        if test ! -x "$BOOT_JDK/bin/javac"; then
29391          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29392$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29393          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29394$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29395          BOOT_JDK_FOUND=no
29396        else
29397          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29398          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29399
29400          # Extra M4 quote needed to protect [] in grep expression.
29401          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29402          if test "x$FOUND_CORRECT_VERSION" = x; then
29403            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29404$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29405            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29406$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29407            BOOT_JDK_FOUND=no
29408          else
29409            # We're done! :-)
29410            BOOT_JDK_FOUND=yes
29411
29412  # Only process if variable expands to non-empty
29413
29414  if test "x$BOOT_JDK" != x; then
29415    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29416
29417  # Input might be given as Windows format, start by converting to
29418  # unix format.
29419  path="$BOOT_JDK"
29420  new_path=`$CYGPATH -u "$path"`
29421
29422  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29423  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29424  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29425  # "foo.exe" is OK but "foo" is an error.
29426  #
29427  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29428  # It is also a way to make sure we got the proper file name for the real test later on.
29429  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29430  if test "x$test_shortpath" = x; then
29431    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29432$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29433    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29434  fi
29435
29436  # Call helper function which possibly converts this using DOS-style short mode.
29437  # If so, the updated path is stored in $new_path.
29438
29439  input_path="$new_path"
29440  # Check if we need to convert this using DOS-style short mode. If the path
29441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29442  # take no chances and rewrite it.
29443  # Note: m4 eats our [], so we need to use [ and ] instead.
29444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29445  if test "x$has_forbidden_chars" != x; then
29446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29447    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29448    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29449    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29450      # Going to short mode and back again did indeed matter. Since short mode is
29451      # case insensitive, let's make it lowercase to improve readability.
29452      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29453      # Now convert it back to Unix-style (cygpath)
29454      input_path=`$CYGPATH -u "$shortmode_path"`
29455      new_path="$input_path"
29456    fi
29457  fi
29458
29459  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29460  if test "x$test_cygdrive_prefix" = x; then
29461    # As a simple fix, exclude /usr/bin since it's not a real path.
29462    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29463      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29464      # a path prefixed by /cygdrive for fixpath to work.
29465      new_path="$CYGWIN_ROOT_PATH$input_path"
29466    fi
29467  fi
29468
29469
29470  if test "x$path" != "x$new_path"; then
29471    BOOT_JDK="$new_path"
29472    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29473$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29474  fi
29475
29476    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29477
29478  path="$BOOT_JDK"
29479  has_colon=`$ECHO $path | $GREP ^.:`
29480  new_path="$path"
29481  if test "x$has_colon" = x; then
29482    # Not in mixed or Windows style, start by that.
29483    new_path=`cmd //c echo $path`
29484  fi
29485
29486
29487  input_path="$new_path"
29488  # Check if we need to convert this using DOS-style short mode. If the path
29489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29490  # take no chances and rewrite it.
29491  # Note: m4 eats our [], so we need to use [ and ] instead.
29492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29493  if test "x$has_forbidden_chars" != x; then
29494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29495    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29496  fi
29497
29498
29499  windows_path="$new_path"
29500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29501    unix_path=`$CYGPATH -u "$windows_path"`
29502    new_path="$unix_path"
29503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29505    new_path="$unix_path"
29506  fi
29507
29508  if test "x$path" != "x$new_path"; then
29509    BOOT_JDK="$new_path"
29510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29511$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29512  fi
29513
29514  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29515  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29516
29517    else
29518      # We're on a unix platform. Hooray! :)
29519      path="$BOOT_JDK"
29520      has_space=`$ECHO "$path" | $GREP " "`
29521      if test "x$has_space" != x; then
29522        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29523$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29524        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29525      fi
29526
29527      # Use eval to expand a potential ~
29528      eval path="$path"
29529      if test ! -f "$path" && test ! -d "$path"; then
29530        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29531      fi
29532
29533      if test -d "$path"; then
29534        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29535      else
29536        dir="`$DIRNAME "$path"`"
29537        base="`$BASENAME "$path"`"
29538        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29539      fi
29540    fi
29541  fi
29542
29543            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29544$as_echo_n "checking for Boot JDK... " >&6; }
29545            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29546$as_echo "$BOOT_JDK" >&6; }
29547            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29548$as_echo_n "checking Boot JDK version... " >&6; }
29549            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29550            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29551$as_echo "$BOOT_JDK_VERSION" >&6; }
29552          fi # end check jdk version
29553        fi # end check javac
29554      fi # end check java
29555    fi # end check boot jdk found
29556  fi
29557
29558    done
29559  fi
29560
29561
29562    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29563    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29564      # Do we have a bin/java?
29565      if test ! -x "$BOOT_JDK/bin/java"; then
29566        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29567$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29568        BOOT_JDK_FOUND=no
29569      else
29570        # Do we have a bin/javac?
29571        if test ! -x "$BOOT_JDK/bin/javac"; then
29572          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29574          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29575$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29576          BOOT_JDK_FOUND=no
29577        else
29578          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29579          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29580
29581          # Extra M4 quote needed to protect [] in grep expression.
29582          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29583          if test "x$FOUND_CORRECT_VERSION" = x; then
29584            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29586            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29587$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29588            BOOT_JDK_FOUND=no
29589          else
29590            # We're done! :-)
29591            BOOT_JDK_FOUND=yes
29592
29593  # Only process if variable expands to non-empty
29594
29595  if test "x$BOOT_JDK" != x; then
29596    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29597
29598  # Input might be given as Windows format, start by converting to
29599  # unix format.
29600  path="$BOOT_JDK"
29601  new_path=`$CYGPATH -u "$path"`
29602
29603  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29604  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29605  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29606  # "foo.exe" is OK but "foo" is an error.
29607  #
29608  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29609  # It is also a way to make sure we got the proper file name for the real test later on.
29610  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29611  if test "x$test_shortpath" = x; then
29612    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29613$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29614    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29615  fi
29616
29617  # Call helper function which possibly converts this using DOS-style short mode.
29618  # If so, the updated path is stored in $new_path.
29619
29620  input_path="$new_path"
29621  # Check if we need to convert this using DOS-style short mode. If the path
29622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29623  # take no chances and rewrite it.
29624  # Note: m4 eats our [], so we need to use [ and ] instead.
29625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29626  if test "x$has_forbidden_chars" != x; then
29627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29628    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29629    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29630    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29631      # Going to short mode and back again did indeed matter. Since short mode is
29632      # case insensitive, let's make it lowercase to improve readability.
29633      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29634      # Now convert it back to Unix-style (cygpath)
29635      input_path=`$CYGPATH -u "$shortmode_path"`
29636      new_path="$input_path"
29637    fi
29638  fi
29639
29640  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29641  if test "x$test_cygdrive_prefix" = x; then
29642    # As a simple fix, exclude /usr/bin since it's not a real path.
29643    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29644      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29645      # a path prefixed by /cygdrive for fixpath to work.
29646      new_path="$CYGWIN_ROOT_PATH$input_path"
29647    fi
29648  fi
29649
29650
29651  if test "x$path" != "x$new_path"; then
29652    BOOT_JDK="$new_path"
29653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29654$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29655  fi
29656
29657    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29658
29659  path="$BOOT_JDK"
29660  has_colon=`$ECHO $path | $GREP ^.:`
29661  new_path="$path"
29662  if test "x$has_colon" = x; then
29663    # Not in mixed or Windows style, start by that.
29664    new_path=`cmd //c echo $path`
29665  fi
29666
29667
29668  input_path="$new_path"
29669  # Check if we need to convert this using DOS-style short mode. If the path
29670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29671  # take no chances and rewrite it.
29672  # Note: m4 eats our [], so we need to use [ and ] instead.
29673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29674  if test "x$has_forbidden_chars" != x; then
29675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29677  fi
29678
29679
29680  windows_path="$new_path"
29681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29682    unix_path=`$CYGPATH -u "$windows_path"`
29683    new_path="$unix_path"
29684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29686    new_path="$unix_path"
29687  fi
29688
29689  if test "x$path" != "x$new_path"; then
29690    BOOT_JDK="$new_path"
29691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29692$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29693  fi
29694
29695  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29696  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29697
29698    else
29699      # We're on a unix platform. Hooray! :)
29700      path="$BOOT_JDK"
29701      has_space=`$ECHO "$path" | $GREP " "`
29702      if test "x$has_space" != x; then
29703        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29704$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29705        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29706      fi
29707
29708      # Use eval to expand a potential ~
29709      eval path="$path"
29710      if test ! -f "$path" && test ! -d "$path"; then
29711        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29712      fi
29713
29714      if test -d "$path"; then
29715        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29716      else
29717        dir="`$DIRNAME "$path"`"
29718        base="`$BASENAME "$path"`"
29719        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29720      fi
29721    fi
29722  fi
29723
29724            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29725$as_echo_n "checking for Boot JDK... " >&6; }
29726            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29727$as_echo "$BOOT_JDK" >&6; }
29728            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29729$as_echo_n "checking Boot JDK version... " >&6; }
29730            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29731            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29732$as_echo "$BOOT_JDK_VERSION" >&6; }
29733          fi # end check jdk version
29734        fi # end check javac
29735      fi # end check java
29736    fi # end check boot jdk found
29737  fi
29738
29739  fi
29740
29741
29742    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29743    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29744      # Do we have a bin/java?
29745      if test ! -x "$BOOT_JDK/bin/java"; then
29746        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29747$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29748        BOOT_JDK_FOUND=no
29749      else
29750        # Do we have a bin/javac?
29751        if test ! -x "$BOOT_JDK/bin/javac"; then
29752          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29753$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29754          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29755$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29756          BOOT_JDK_FOUND=no
29757        else
29758          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29759          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29760
29761          # Extra M4 quote needed to protect [] in grep expression.
29762          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29763          if test "x$FOUND_CORRECT_VERSION" = x; then
29764            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29766            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29767$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29768            BOOT_JDK_FOUND=no
29769          else
29770            # We're done! :-)
29771            BOOT_JDK_FOUND=yes
29772
29773  # Only process if variable expands to non-empty
29774
29775  if test "x$BOOT_JDK" != x; then
29776    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29777
29778  # Input might be given as Windows format, start by converting to
29779  # unix format.
29780  path="$BOOT_JDK"
29781  new_path=`$CYGPATH -u "$path"`
29782
29783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29786  # "foo.exe" is OK but "foo" is an error.
29787  #
29788  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29789  # It is also a way to make sure we got the proper file name for the real test later on.
29790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29791  if test "x$test_shortpath" = x; then
29792    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29793$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29794    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29795  fi
29796
29797  # Call helper function which possibly converts this using DOS-style short mode.
29798  # If so, the updated path is stored in $new_path.
29799
29800  input_path="$new_path"
29801  # Check if we need to convert this using DOS-style short mode. If the path
29802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29803  # take no chances and rewrite it.
29804  # Note: m4 eats our [], so we need to use [ and ] instead.
29805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29806  if test "x$has_forbidden_chars" != x; then
29807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29811      # Going to short mode and back again did indeed matter. Since short mode is
29812      # case insensitive, let's make it lowercase to improve readability.
29813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29814      # Now convert it back to Unix-style (cygpath)
29815      input_path=`$CYGPATH -u "$shortmode_path"`
29816      new_path="$input_path"
29817    fi
29818  fi
29819
29820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29821  if test "x$test_cygdrive_prefix" = x; then
29822    # As a simple fix, exclude /usr/bin since it's not a real path.
29823    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29825      # a path prefixed by /cygdrive for fixpath to work.
29826      new_path="$CYGWIN_ROOT_PATH$input_path"
29827    fi
29828  fi
29829
29830
29831  if test "x$path" != "x$new_path"; then
29832    BOOT_JDK="$new_path"
29833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29834$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29835  fi
29836
29837    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29838
29839  path="$BOOT_JDK"
29840  has_colon=`$ECHO $path | $GREP ^.:`
29841  new_path="$path"
29842  if test "x$has_colon" = x; then
29843    # Not in mixed or Windows style, start by that.
29844    new_path=`cmd //c echo $path`
29845  fi
29846
29847
29848  input_path="$new_path"
29849  # Check if we need to convert this using DOS-style short mode. If the path
29850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29851  # take no chances and rewrite it.
29852  # Note: m4 eats our [], so we need to use [ and ] instead.
29853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29854  if test "x$has_forbidden_chars" != x; then
29855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29856    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29857  fi
29858
29859
29860  windows_path="$new_path"
29861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29862    unix_path=`$CYGPATH -u "$windows_path"`
29863    new_path="$unix_path"
29864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29866    new_path="$unix_path"
29867  fi
29868
29869  if test "x$path" != "x$new_path"; then
29870    BOOT_JDK="$new_path"
29871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29872$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29873  fi
29874
29875  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29876  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29877
29878    else
29879      # We're on a unix platform. Hooray! :)
29880      path="$BOOT_JDK"
29881      has_space=`$ECHO "$path" | $GREP " "`
29882      if test "x$has_space" != x; then
29883        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29884$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29885        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29886      fi
29887
29888      # Use eval to expand a potential ~
29889      eval path="$path"
29890      if test ! -f "$path" && test ! -d "$path"; then
29891        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29892      fi
29893
29894      if test -d "$path"; then
29895        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29896      else
29897        dir="`$DIRNAME "$path"`"
29898        base="`$BASENAME "$path"`"
29899        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29900      fi
29901    fi
29902  fi
29903
29904            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29905$as_echo_n "checking for Boot JDK... " >&6; }
29906            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29907$as_echo "$BOOT_JDK" >&6; }
29908            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29909$as_echo_n "checking Boot JDK version... " >&6; }
29910            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29911            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29912$as_echo "$BOOT_JDK_VERSION" >&6; }
29913          fi # end check jdk version
29914        fi # end check javac
29915      fi # end check java
29916    fi # end check boot jdk found
29917  fi
29918
29919
29920  # If we haven't found anything yet, we've truly lost. Give up.
29921  if test "x$BOOT_JDK_FOUND" = xno; then
29922
29923  # Print a helpful message on how to acquire the necessary build dependency.
29924  # openjdk is the help tag: freetype, cups, alsa etc
29925  MISSING_DEPENDENCY=openjdk
29926
29927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29928    cygwin_help $MISSING_DEPENDENCY
29929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29930    msys_help $MISSING_DEPENDENCY
29931  else
29932    PKGHANDLER_COMMAND=
29933
29934    case $PKGHANDLER in
29935      apt-get)
29936        apt_help     $MISSING_DEPENDENCY ;;
29937      yum)
29938        yum_help     $MISSING_DEPENDENCY ;;
29939      brew)
29940        brew_help    $MISSING_DEPENDENCY ;;
29941      port)
29942        port_help    $MISSING_DEPENDENCY ;;
29943      pkgutil)
29944        pkgutil_help $MISSING_DEPENDENCY ;;
29945      pkgadd)
29946        pkgadd_help  $MISSING_DEPENDENCY ;;
29947    esac
29948
29949    if test "x$PKGHANDLER_COMMAND" != x; then
29950      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29951    fi
29952  fi
29953
29954    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29955$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29956    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
29957$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29958    as_fn_error $? "Cannot continue" "$LINENO" 5
29959  fi
29960
29961
29962
29963  # Setup tools from the Boot JDK.
29964
29965  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29966
29967  # Publish this variable in the help.
29968
29969
29970  if [ -z "${JAVA+x}" ]; then
29971    # The variable is not set by user, try to locate tool using the code snippet
29972
29973      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29974$as_echo_n "checking for java in Boot JDK... " >&6; }
29975      JAVA=$BOOT_JDK/bin/java
29976      if test ! -x $JAVA; then
29977        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29978$as_echo "not found" >&6; }
29979        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
29980$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29981        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29982      fi
29983      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29984$as_echo "ok" >&6; }
29985
29986
29987  else
29988    # The variable is set, but is it from the command line or the environment?
29989
29990    # Try to remove the string !JAVA! from our list.
29991    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29992    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29993      # If it failed, the variable was not from the command line. Ignore it,
29994      # but warn the user (except for BASH, which is always set by the calling BASH).
29995      if test "xJAVA" != xBASH; then
29996        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29997$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29998      fi
29999      # Try to locate tool using the code snippet
30000
30001      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30002$as_echo_n "checking for java in Boot JDK... " >&6; }
30003      JAVA=$BOOT_JDK/bin/java
30004      if test ! -x $JAVA; then
30005        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30006$as_echo "not found" >&6; }
30007        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30008$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30009        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30010      fi
30011      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30012$as_echo "ok" >&6; }
30013
30014
30015    else
30016      # If it succeeded, then it was overridden by the user. We will use it
30017      # for the tool.
30018
30019      # First remove it from the list of overridden variables, so we can test
30020      # for unknown variables in the end.
30021      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30022
30023      # Check if we try to supply an empty value
30024      if test "x$JAVA" = x; then
30025        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30026$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30027        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30028$as_echo_n "checking for JAVA... " >&6; }
30029        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30030$as_echo "disabled" >&6; }
30031      else
30032        # Check if the provided tool contains a complete path.
30033        tool_specified="$JAVA"
30034        tool_basename="${tool_specified##*/}"
30035        if test "x$tool_basename" = "x$tool_specified"; then
30036          # A command without a complete path is provided, search $PATH.
30037          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30038$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30039          # Extract the first word of "$tool_basename", so it can be a program name with args.
30040set dummy $tool_basename; ac_word=$2
30041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30042$as_echo_n "checking for $ac_word... " >&6; }
30043if ${ac_cv_path_JAVA+:} false; then :
30044  $as_echo_n "(cached) " >&6
30045else
30046  case $JAVA in
30047  [\\/]* | ?:[\\/]*)
30048  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30049  ;;
30050  *)
30051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30052for as_dir in $PATH
30053do
30054  IFS=$as_save_IFS
30055  test -z "$as_dir" && as_dir=.
30056    for ac_exec_ext in '' $ac_executable_extensions; do
30057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30058    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30060    break 2
30061  fi
30062done
30063  done
30064IFS=$as_save_IFS
30065
30066  ;;
30067esac
30068fi
30069JAVA=$ac_cv_path_JAVA
30070if test -n "$JAVA"; then
30071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30072$as_echo "$JAVA" >&6; }
30073else
30074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30075$as_echo "no" >&6; }
30076fi
30077
30078
30079          if test "x$JAVA" = x; then
30080            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30081          fi
30082        else
30083          # Otherwise we believe it is a complete path. Use it as it is.
30084          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30085$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30086          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30087$as_echo_n "checking for JAVA... " >&6; }
30088          if test ! -x "$tool_specified"; then
30089            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30090$as_echo "not found" >&6; }
30091            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30092          fi
30093          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30094$as_echo "$tool_specified" >&6; }
30095        fi
30096      fi
30097    fi
30098
30099  fi
30100
30101
30102
30103  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30104
30105  # Publish this variable in the help.
30106
30107
30108  if [ -z "${JAVAC+x}" ]; then
30109    # The variable is not set by user, try to locate tool using the code snippet
30110
30111      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30112$as_echo_n "checking for javac in Boot JDK... " >&6; }
30113      JAVAC=$BOOT_JDK/bin/javac
30114      if test ! -x $JAVAC; then
30115        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30116$as_echo "not found" >&6; }
30117        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30118$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30119        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30120      fi
30121      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30122$as_echo "ok" >&6; }
30123
30124
30125  else
30126    # The variable is set, but is it from the command line or the environment?
30127
30128    # Try to remove the string !JAVAC! from our list.
30129    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30130    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30131      # If it failed, the variable was not from the command line. Ignore it,
30132      # but warn the user (except for BASH, which is always set by the calling BASH).
30133      if test "xJAVAC" != xBASH; then
30134        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30135$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30136      fi
30137      # Try to locate tool using the code snippet
30138
30139      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30140$as_echo_n "checking for javac in Boot JDK... " >&6; }
30141      JAVAC=$BOOT_JDK/bin/javac
30142      if test ! -x $JAVAC; then
30143        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30144$as_echo "not found" >&6; }
30145        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30146$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30147        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30148      fi
30149      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30150$as_echo "ok" >&6; }
30151
30152
30153    else
30154      # If it succeeded, then it was overridden by the user. We will use it
30155      # for the tool.
30156
30157      # First remove it from the list of overridden variables, so we can test
30158      # for unknown variables in the end.
30159      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30160
30161      # Check if we try to supply an empty value
30162      if test "x$JAVAC" = x; then
30163        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30164$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30165        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30166$as_echo_n "checking for JAVAC... " >&6; }
30167        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30168$as_echo "disabled" >&6; }
30169      else
30170        # Check if the provided tool contains a complete path.
30171        tool_specified="$JAVAC"
30172        tool_basename="${tool_specified##*/}"
30173        if test "x$tool_basename" = "x$tool_specified"; then
30174          # A command without a complete path is provided, search $PATH.
30175          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30176$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30177          # Extract the first word of "$tool_basename", so it can be a program name with args.
30178set dummy $tool_basename; ac_word=$2
30179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30180$as_echo_n "checking for $ac_word... " >&6; }
30181if ${ac_cv_path_JAVAC+:} false; then :
30182  $as_echo_n "(cached) " >&6
30183else
30184  case $JAVAC in
30185  [\\/]* | ?:[\\/]*)
30186  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30187  ;;
30188  *)
30189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30190for as_dir in $PATH
30191do
30192  IFS=$as_save_IFS
30193  test -z "$as_dir" && as_dir=.
30194    for ac_exec_ext in '' $ac_executable_extensions; do
30195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30196    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30198    break 2
30199  fi
30200done
30201  done
30202IFS=$as_save_IFS
30203
30204  ;;
30205esac
30206fi
30207JAVAC=$ac_cv_path_JAVAC
30208if test -n "$JAVAC"; then
30209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30210$as_echo "$JAVAC" >&6; }
30211else
30212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30213$as_echo "no" >&6; }
30214fi
30215
30216
30217          if test "x$JAVAC" = x; then
30218            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30219          fi
30220        else
30221          # Otherwise we believe it is a complete path. Use it as it is.
30222          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30223$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30224          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30225$as_echo_n "checking for JAVAC... " >&6; }
30226          if test ! -x "$tool_specified"; then
30227            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30228$as_echo "not found" >&6; }
30229            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30230          fi
30231          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30232$as_echo "$tool_specified" >&6; }
30233        fi
30234      fi
30235    fi
30236
30237  fi
30238
30239
30240
30241  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30242
30243  # Publish this variable in the help.
30244
30245
30246  if [ -z "${JAVAH+x}" ]; then
30247    # The variable is not set by user, try to locate tool using the code snippet
30248
30249      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30250$as_echo_n "checking for javah in Boot JDK... " >&6; }
30251      JAVAH=$BOOT_JDK/bin/javah
30252      if test ! -x $JAVAH; then
30253        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30254$as_echo "not found" >&6; }
30255        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30256$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30257        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30258      fi
30259      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30260$as_echo "ok" >&6; }
30261
30262
30263  else
30264    # The variable is set, but is it from the command line or the environment?
30265
30266    # Try to remove the string !JAVAH! from our list.
30267    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30268    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30269      # If it failed, the variable was not from the command line. Ignore it,
30270      # but warn the user (except for BASH, which is always set by the calling BASH).
30271      if test "xJAVAH" != xBASH; then
30272        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30273$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30274      fi
30275      # Try to locate tool using the code snippet
30276
30277      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30278$as_echo_n "checking for javah in Boot JDK... " >&6; }
30279      JAVAH=$BOOT_JDK/bin/javah
30280      if test ! -x $JAVAH; then
30281        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30282$as_echo "not found" >&6; }
30283        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30284$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30285        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30286      fi
30287      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30288$as_echo "ok" >&6; }
30289
30290
30291    else
30292      # If it succeeded, then it was overridden by the user. We will use it
30293      # for the tool.
30294
30295      # First remove it from the list of overridden variables, so we can test
30296      # for unknown variables in the end.
30297      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30298
30299      # Check if we try to supply an empty value
30300      if test "x$JAVAH" = x; then
30301        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30302$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30303        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30304$as_echo_n "checking for JAVAH... " >&6; }
30305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30306$as_echo "disabled" >&6; }
30307      else
30308        # Check if the provided tool contains a complete path.
30309        tool_specified="$JAVAH"
30310        tool_basename="${tool_specified##*/}"
30311        if test "x$tool_basename" = "x$tool_specified"; then
30312          # A command without a complete path is provided, search $PATH.
30313          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30314$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30315          # Extract the first word of "$tool_basename", so it can be a program name with args.
30316set dummy $tool_basename; ac_word=$2
30317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30318$as_echo_n "checking for $ac_word... " >&6; }
30319if ${ac_cv_path_JAVAH+:} false; then :
30320  $as_echo_n "(cached) " >&6
30321else
30322  case $JAVAH in
30323  [\\/]* | ?:[\\/]*)
30324  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30325  ;;
30326  *)
30327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30328for as_dir in $PATH
30329do
30330  IFS=$as_save_IFS
30331  test -z "$as_dir" && as_dir=.
30332    for ac_exec_ext in '' $ac_executable_extensions; do
30333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30334    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30336    break 2
30337  fi
30338done
30339  done
30340IFS=$as_save_IFS
30341
30342  ;;
30343esac
30344fi
30345JAVAH=$ac_cv_path_JAVAH
30346if test -n "$JAVAH"; then
30347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30348$as_echo "$JAVAH" >&6; }
30349else
30350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30351$as_echo "no" >&6; }
30352fi
30353
30354
30355          if test "x$JAVAH" = x; then
30356            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30357          fi
30358        else
30359          # Otherwise we believe it is a complete path. Use it as it is.
30360          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30361$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30362          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30363$as_echo_n "checking for JAVAH... " >&6; }
30364          if test ! -x "$tool_specified"; then
30365            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30366$as_echo "not found" >&6; }
30367            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30368          fi
30369          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30370$as_echo "$tool_specified" >&6; }
30371        fi
30372      fi
30373    fi
30374
30375  fi
30376
30377
30378
30379  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30380
30381  # Publish this variable in the help.
30382
30383
30384  if [ -z "${JAR+x}" ]; then
30385    # The variable is not set by user, try to locate tool using the code snippet
30386
30387      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30388$as_echo_n "checking for jar in Boot JDK... " >&6; }
30389      JAR=$BOOT_JDK/bin/jar
30390      if test ! -x $JAR; then
30391        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30392$as_echo "not found" >&6; }
30393        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30394$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30395        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30396      fi
30397      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30398$as_echo "ok" >&6; }
30399
30400
30401  else
30402    # The variable is set, but is it from the command line or the environment?
30403
30404    # Try to remove the string !JAR! from our list.
30405    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30406    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30407      # If it failed, the variable was not from the command line. Ignore it,
30408      # but warn the user (except for BASH, which is always set by the calling BASH).
30409      if test "xJAR" != xBASH; then
30410        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30411$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30412      fi
30413      # Try to locate tool using the code snippet
30414
30415      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30416$as_echo_n "checking for jar in Boot JDK... " >&6; }
30417      JAR=$BOOT_JDK/bin/jar
30418      if test ! -x $JAR; then
30419        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30420$as_echo "not found" >&6; }
30421        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30422$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30423        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30424      fi
30425      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30426$as_echo "ok" >&6; }
30427
30428
30429    else
30430      # If it succeeded, then it was overridden by the user. We will use it
30431      # for the tool.
30432
30433      # First remove it from the list of overridden variables, so we can test
30434      # for unknown variables in the end.
30435      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30436
30437      # Check if we try to supply an empty value
30438      if test "x$JAR" = x; then
30439        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30440$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30441        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30442$as_echo_n "checking for JAR... " >&6; }
30443        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30444$as_echo "disabled" >&6; }
30445      else
30446        # Check if the provided tool contains a complete path.
30447        tool_specified="$JAR"
30448        tool_basename="${tool_specified##*/}"
30449        if test "x$tool_basename" = "x$tool_specified"; then
30450          # A command without a complete path is provided, search $PATH.
30451          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30452$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30453          # Extract the first word of "$tool_basename", so it can be a program name with args.
30454set dummy $tool_basename; ac_word=$2
30455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30456$as_echo_n "checking for $ac_word... " >&6; }
30457if ${ac_cv_path_JAR+:} false; then :
30458  $as_echo_n "(cached) " >&6
30459else
30460  case $JAR in
30461  [\\/]* | ?:[\\/]*)
30462  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30463  ;;
30464  *)
30465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30466for as_dir in $PATH
30467do
30468  IFS=$as_save_IFS
30469  test -z "$as_dir" && as_dir=.
30470    for ac_exec_ext in '' $ac_executable_extensions; do
30471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30472    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30474    break 2
30475  fi
30476done
30477  done
30478IFS=$as_save_IFS
30479
30480  ;;
30481esac
30482fi
30483JAR=$ac_cv_path_JAR
30484if test -n "$JAR"; then
30485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30486$as_echo "$JAR" >&6; }
30487else
30488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30489$as_echo "no" >&6; }
30490fi
30491
30492
30493          if test "x$JAR" = x; then
30494            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30495          fi
30496        else
30497          # Otherwise we believe it is a complete path. Use it as it is.
30498          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30499$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30500          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30501$as_echo_n "checking for JAR... " >&6; }
30502          if test ! -x "$tool_specified"; then
30503            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30504$as_echo "not found" >&6; }
30505            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30506          fi
30507          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30508$as_echo "$tool_specified" >&6; }
30509        fi
30510      fi
30511    fi
30512
30513  fi
30514
30515
30516
30517  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30518
30519  # Publish this variable in the help.
30520
30521
30522  if [ -z "${JARSIGNER+x}" ]; then
30523    # The variable is not set by user, try to locate tool using the code snippet
30524
30525      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30526$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30527      JARSIGNER=$BOOT_JDK/bin/jarsigner
30528      if test ! -x $JARSIGNER; then
30529        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30530$as_echo "not found" >&6; }
30531        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30532$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30533        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30534      fi
30535      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30536$as_echo "ok" >&6; }
30537
30538
30539  else
30540    # The variable is set, but is it from the command line or the environment?
30541
30542    # Try to remove the string !JARSIGNER! from our list.
30543    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30544    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30545      # If it failed, the variable was not from the command line. Ignore it,
30546      # but warn the user (except for BASH, which is always set by the calling BASH).
30547      if test "xJARSIGNER" != xBASH; then
30548        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30549$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30550      fi
30551      # Try to locate tool using the code snippet
30552
30553      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30554$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30555      JARSIGNER=$BOOT_JDK/bin/jarsigner
30556      if test ! -x $JARSIGNER; then
30557        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30558$as_echo "not found" >&6; }
30559        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30560$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30561        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30562      fi
30563      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30564$as_echo "ok" >&6; }
30565
30566
30567    else
30568      # If it succeeded, then it was overridden by the user. We will use it
30569      # for the tool.
30570
30571      # First remove it from the list of overridden variables, so we can test
30572      # for unknown variables in the end.
30573      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30574
30575      # Check if we try to supply an empty value
30576      if test "x$JARSIGNER" = x; then
30577        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30578$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30579        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30580$as_echo_n "checking for JARSIGNER... " >&6; }
30581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30582$as_echo "disabled" >&6; }
30583      else
30584        # Check if the provided tool contains a complete path.
30585        tool_specified="$JARSIGNER"
30586        tool_basename="${tool_specified##*/}"
30587        if test "x$tool_basename" = "x$tool_specified"; then
30588          # A command without a complete path is provided, search $PATH.
30589          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30590$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30591          # Extract the first word of "$tool_basename", so it can be a program name with args.
30592set dummy $tool_basename; ac_word=$2
30593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30594$as_echo_n "checking for $ac_word... " >&6; }
30595if ${ac_cv_path_JARSIGNER+:} false; then :
30596  $as_echo_n "(cached) " >&6
30597else
30598  case $JARSIGNER in
30599  [\\/]* | ?:[\\/]*)
30600  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30601  ;;
30602  *)
30603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30604for as_dir in $PATH
30605do
30606  IFS=$as_save_IFS
30607  test -z "$as_dir" && as_dir=.
30608    for ac_exec_ext in '' $ac_executable_extensions; do
30609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30610    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30612    break 2
30613  fi
30614done
30615  done
30616IFS=$as_save_IFS
30617
30618  ;;
30619esac
30620fi
30621JARSIGNER=$ac_cv_path_JARSIGNER
30622if test -n "$JARSIGNER"; then
30623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30624$as_echo "$JARSIGNER" >&6; }
30625else
30626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30627$as_echo "no" >&6; }
30628fi
30629
30630
30631          if test "x$JARSIGNER" = x; then
30632            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30633          fi
30634        else
30635          # Otherwise we believe it is a complete path. Use it as it is.
30636          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30637$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30638          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30639$as_echo_n "checking for JARSIGNER... " >&6; }
30640          if test ! -x "$tool_specified"; then
30641            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30642$as_echo "not found" >&6; }
30643            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30644          fi
30645          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30646$as_echo "$tool_specified" >&6; }
30647        fi
30648      fi
30649    fi
30650
30651  fi
30652
30653
30654
30655  # Finally, set some other options...
30656
30657  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30658  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30659
30660
30661  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30662$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30663  if "$JAVA" --list-modules > /dev/null 2>&1; then
30664    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30665$as_echo "yes" >&6; }
30666    BOOT_JDK_MODULAR="true"
30667  else
30668    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30669$as_echo "no" >&6; }
30670    BOOT_JDK_MODULAR="false"
30671  fi
30672
30673
30674
30675
30676  # Check if the boot jdk is 32 or 64 bit
30677  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30678    BOOT_JDK_BITS="64"
30679  else
30680    BOOT_JDK_BITS="32"
30681  fi
30682  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30683$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30685$as_echo "$BOOT_JDK_BITS" >&6; }
30686
30687
30688
30689
30690# Check whether --with-build-jdk was given.
30691if test "${with_build_jdk+set}" = set; then :
30692  withval=$with_build_jdk;
30693fi
30694
30695
30696  CREATE_BUILDJDK=false
30697  EXTERNAL_BUILDJDK=false
30698  BUILD_JDK_FOUND="no"
30699  if test "x$with_build_jdk" != "x"; then
30700
30701  if test "x$BUILD_JDK_FOUND" = xno; then
30702    # Execute the test
30703
30704       if test "x$with_build_jdk" != x; then
30705         BUILD_JDK=$with_build_jdk
30706         BUILD_JDK_FOUND=maybe
30707         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30708$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30709       fi
30710
30711    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30712    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30713      # Do we have a bin/java?
30714      if test ! -x "$BUILD_JDK/bin/java"; then
30715        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30716$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30717        BUILD_JDK_FOUND=no
30718      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30719        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30720$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30721        BUILD_JDK_FOUND=no
30722      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30723        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30724$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30725        BUILD_JDK_FOUND=no
30726      elif test ! -x "$BUILD_JDK/bin/javac"; then
30727        # Do we have a bin/javac?
30728        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30729$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30730        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30731$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30732        BUILD_JDK_FOUND=no
30733      else
30734        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30735        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30736
30737        # Extra M4 quote needed to protect [] in grep expression.
30738        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30739        if test "x$FOUND_CORRECT_VERSION" = x; then
30740          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30741$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30742          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30743$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30744          BUILD_JDK_FOUND=no
30745        else
30746          # We're done!
30747          BUILD_JDK_FOUND=yes
30748
30749  # Only process if variable expands to non-empty
30750
30751  if test "x$BUILD_JDK" != x; then
30752    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30753
30754  # Input might be given as Windows format, start by converting to
30755  # unix format.
30756  path="$BUILD_JDK"
30757  new_path=`$CYGPATH -u "$path"`
30758
30759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30762  # "foo.exe" is OK but "foo" is an error.
30763  #
30764  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30765  # It is also a way to make sure we got the proper file name for the real test later on.
30766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30767  if test "x$test_shortpath" = x; then
30768    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30769$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30770    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30771  fi
30772
30773  # Call helper function which possibly converts this using DOS-style short mode.
30774  # If so, the updated path is stored in $new_path.
30775
30776  input_path="$new_path"
30777  # Check if we need to convert this using DOS-style short mode. If the path
30778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30779  # take no chances and rewrite it.
30780  # Note: m4 eats our [], so we need to use [ and ] instead.
30781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30782  if test "x$has_forbidden_chars" != x; then
30783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30787      # Going to short mode and back again did indeed matter. Since short mode is
30788      # case insensitive, let's make it lowercase to improve readability.
30789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30790      # Now convert it back to Unix-style (cygpath)
30791      input_path=`$CYGPATH -u "$shortmode_path"`
30792      new_path="$input_path"
30793    fi
30794  fi
30795
30796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30797  if test "x$test_cygdrive_prefix" = x; then
30798    # As a simple fix, exclude /usr/bin since it's not a real path.
30799    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30801      # a path prefixed by /cygdrive for fixpath to work.
30802      new_path="$CYGWIN_ROOT_PATH$input_path"
30803    fi
30804  fi
30805
30806
30807  if test "x$path" != "x$new_path"; then
30808    BUILD_JDK="$new_path"
30809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30810$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30811  fi
30812
30813    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30814
30815  path="$BUILD_JDK"
30816  has_colon=`$ECHO $path | $GREP ^.:`
30817  new_path="$path"
30818  if test "x$has_colon" = x; then
30819    # Not in mixed or Windows style, start by that.
30820    new_path=`cmd //c echo $path`
30821  fi
30822
30823
30824  input_path="$new_path"
30825  # Check if we need to convert this using DOS-style short mode. If the path
30826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30827  # take no chances and rewrite it.
30828  # Note: m4 eats our [], so we need to use [ and ] instead.
30829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30830  if test "x$has_forbidden_chars" != x; then
30831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30832    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30833  fi
30834
30835
30836  windows_path="$new_path"
30837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30838    unix_path=`$CYGPATH -u "$windows_path"`
30839    new_path="$unix_path"
30840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30842    new_path="$unix_path"
30843  fi
30844
30845  if test "x$path" != "x$new_path"; then
30846    BUILD_JDK="$new_path"
30847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30848$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30849  fi
30850
30851  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30852  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30853
30854    else
30855      # We're on a unix platform. Hooray! :)
30856      path="$BUILD_JDK"
30857      has_space=`$ECHO "$path" | $GREP " "`
30858      if test "x$has_space" != x; then
30859        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30860$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30861        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30862      fi
30863
30864      # Use eval to expand a potential ~
30865      eval path="$path"
30866      if test ! -f "$path" && test ! -d "$path"; then
30867        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30868      fi
30869
30870      if test -d "$path"; then
30871        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30872      else
30873        dir="`$DIRNAME "$path"`"
30874        base="`$BASENAME "$path"`"
30875        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30876      fi
30877    fi
30878  fi
30879
30880          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30881$as_echo_n "checking for Build JDK... " >&6; }
30882          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30883$as_echo "$BUILD_JDK" >&6; }
30884          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30885$as_echo_n "checking Build JDK version... " >&6; }
30886          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30887          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30888$as_echo "$BUILD_JDK_VERSION" >&6; }
30889        fi # end check jdk version
30890      fi # end check java
30891    fi # end check build jdk found
30892  fi
30893
30894    EXTERNAL_BUILDJDK=true
30895  else
30896    if test "x$COMPILE_TYPE" = "xcross"; then
30897      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30898      BUILD_JDK_FOUND=yes
30899      CREATE_BUILDJDK=true
30900      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30901$as_echo_n "checking for Build JDK... " >&6; }
30902      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30903$as_echo "yes, will build it for the host platform" >&6; }
30904    else
30905      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30906      BUILD_JDK_FOUND=yes
30907      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30908$as_echo_n "checking for Build JDK... " >&6; }
30909      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30910$as_echo "yes, will use output dir" >&6; }
30911    fi
30912  fi
30913
30914  JMOD="$BUILD_JDK/bin/jmod"
30915  JLINK="$BUILD_JDK/bin/jlink"
30916
30917
30918
30919  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30920    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30921$as_echo_n "checking for Build JDK... " >&6; }
30922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30923$as_echo "no" >&6; }
30924    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30925  fi
30926
30927
30928
30929
30930
30931
30932###############################################################################
30933#
30934# Configure the sources to use. We can add or override individual directories.
30935#
30936###############################################################################
30937
30938
30939  # Where are the sources.
30940  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30941  CORBA_TOPDIR="$SRC_ROOT/corba"
30942  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30943  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30944  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30945  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30946  JDK_TOPDIR="$SRC_ROOT/jdk"
30947
30948
30949
30950
30951
30952
30953
30954
30955
30956  # This feature is no longer supported.
30957
30958
30959
30960# Check whether --with-add-source-root was given.
30961if test "${with_add_source_root+set}" = set; then :
30962  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
30963$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30964fi
30965
30966
30967
30968
30969# Check whether --with-override-source-root was given.
30970if test "${with_override_source_root+set}" = set; then :
30971  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
30972$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30973fi
30974
30975
30976
30977
30978# Check whether --with-adds-and-overrides was given.
30979if test "${with_adds_and_overrides+set}" = set; then :
30980  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
30981$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30982fi
30983
30984
30985
30986
30987# Check whether --with-override-langtools was given.
30988if test "${with_override_langtools+set}" = set; then :
30989  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30990$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30991fi
30992
30993
30994
30995
30996# Check whether --with-override-corba was given.
30997if test "${with_override_corba+set}" = set; then :
30998  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30999$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31000fi
31001
31002
31003
31004
31005# Check whether --with-override-jaxp was given.
31006if test "${with_override_jaxp+set}" = set; then :
31007  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31008$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31009fi
31010
31011
31012
31013
31014# Check whether --with-override-jaxws was given.
31015if test "${with_override_jaxws+set}" = set; then :
31016  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31017$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31018fi
31019
31020
31021
31022
31023# Check whether --with-override-hotspot was given.
31024if test "${with_override_hotspot+set}" = set; then :
31025  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31026$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31027fi
31028
31029
31030
31031
31032# Check whether --with-override-nashorn was given.
31033if test "${with_override_nashorn+set}" = set; then :
31034  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31035$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31036fi
31037
31038
31039
31040
31041# Check whether --with-override-jdk was given.
31042if test "${with_override_jdk+set}" = set; then :
31043  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31044$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31045fi
31046
31047
31048
31049
31050  BUILD_OUTPUT="$OUTPUT_ROOT"
31051
31052  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31053
31054
31055
31056# Check whether --with-import_hotspot was given.
31057if test "${with_import_hotspot+set}" = set; then :
31058  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31059$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31060fi
31061
31062
31063
31064
31065
31066
31067# Check whether --with-import-modules was given.
31068if test "${with_import_modules+set}" = set; then :
31069  withval=$with_import_modules;
31070fi
31071
31072
31073  if test "x$with_import_modules" != x \
31074      && test "x$with_import_modules" != "xno"; then
31075    if test -d "$with_import_modules"; then
31076      IMPORT_MODULES_TOPDIR="$with_import_modules"
31077
31078  # Only process if variable expands to non-empty
31079
31080  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31081    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31082
31083  # Input might be given as Windows format, start by converting to
31084  # unix format.
31085  path="$IMPORT_MODULES_TOPDIR"
31086  new_path=`$CYGPATH -u "$path"`
31087
31088  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31089  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31090  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31091  # "foo.exe" is OK but "foo" is an error.
31092  #
31093  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31094  # It is also a way to make sure we got the proper file name for the real test later on.
31095  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31096  if test "x$test_shortpath" = x; then
31097    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31098$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31099    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31100  fi
31101
31102  # Call helper function which possibly converts this using DOS-style short mode.
31103  # If so, the updated path is stored in $new_path.
31104
31105  input_path="$new_path"
31106  # Check if we need to convert this using DOS-style short mode. If the path
31107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31108  # take no chances and rewrite it.
31109  # Note: m4 eats our [], so we need to use [ and ] instead.
31110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31111  if test "x$has_forbidden_chars" != x; then
31112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31113    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31114    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31115    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31116      # Going to short mode and back again did indeed matter. Since short mode is
31117      # case insensitive, let's make it lowercase to improve readability.
31118      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31119      # Now convert it back to Unix-style (cygpath)
31120      input_path=`$CYGPATH -u "$shortmode_path"`
31121      new_path="$input_path"
31122    fi
31123  fi
31124
31125  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31126  if test "x$test_cygdrive_prefix" = x; then
31127    # As a simple fix, exclude /usr/bin since it's not a real path.
31128    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31129      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31130      # a path prefixed by /cygdrive for fixpath to work.
31131      new_path="$CYGWIN_ROOT_PATH$input_path"
31132    fi
31133  fi
31134
31135
31136  if test "x$path" != "x$new_path"; then
31137    IMPORT_MODULES_TOPDIR="$new_path"
31138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31139$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31140  fi
31141
31142    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31143
31144  path="$IMPORT_MODULES_TOPDIR"
31145  has_colon=`$ECHO $path | $GREP ^.:`
31146  new_path="$path"
31147  if test "x$has_colon" = x; then
31148    # Not in mixed or Windows style, start by that.
31149    new_path=`cmd //c echo $path`
31150  fi
31151
31152
31153  input_path="$new_path"
31154  # Check if we need to convert this using DOS-style short mode. If the path
31155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31156  # take no chances and rewrite it.
31157  # Note: m4 eats our [], so we need to use [ and ] instead.
31158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31159  if test "x$has_forbidden_chars" != x; then
31160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31161    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31162  fi
31163
31164
31165  windows_path="$new_path"
31166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31167    unix_path=`$CYGPATH -u "$windows_path"`
31168    new_path="$unix_path"
31169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31171    new_path="$unix_path"
31172  fi
31173
31174  if test "x$path" != "x$new_path"; then
31175    IMPORT_MODULES_TOPDIR="$new_path"
31176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31177$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31178  fi
31179
31180  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31181  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31182
31183    else
31184      # We're on a unix platform. Hooray! :)
31185      path="$IMPORT_MODULES_TOPDIR"
31186      has_space=`$ECHO "$path" | $GREP " "`
31187      if test "x$has_space" != x; then
31188        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31189$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31190        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31191      fi
31192
31193      # Use eval to expand a potential ~
31194      eval path="$path"
31195      if test ! -f "$path" && test ! -d "$path"; then
31196        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31197      fi
31198
31199      if test -d "$path"; then
31200        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31201      else
31202        dir="`$DIRNAME "$path"`"
31203        base="`$BASENAME "$path"`"
31204        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31205      fi
31206    fi
31207  fi
31208
31209    elif test -e "$with_import_modules"; then
31210      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31211      $RM -rf "$IMPORT_MODULES_TOPDIR"
31212      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31213      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31214        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31215      fi
31216    else
31217      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31218    fi
31219  fi
31220
31221  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31222    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31223  fi
31224  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31225    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31226  fi
31227  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31228    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31229  fi
31230  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31231    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31232  fi
31233  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31234    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31235  fi
31236  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31237    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31238  fi
31239  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31240    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31241  fi
31242  # Workaround for using different imported module-info.java in Jake due to a
31243  # change in format. Remove once new format is standard in JDK 9 and javafx
31244  # delivers just that.
31245  if test -d "$IMPORT_MODULES_TOPDIR/modules_src_jake"; then
31246    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src_jake $IMPORT_MODULES_SRC"
31247  fi
31248  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31249    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31250  fi
31251
31252
31253
31254
31255
31256
31257
31258
31259
31260
31261
31262###############################################################################
31263#
31264# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31265# native code.
31266#
31267###############################################################################
31268
31269# See if we are doing a complete static build or not
31270
31271  # Check whether --enable-static-build was given.
31272if test "${enable_static_build+set}" = set; then :
31273  enableval=$enable_static_build;
31274fi
31275
31276  STATIC_BUILD=false
31277  if test "x$enable_static_build" = "xyes"; then
31278    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31279$as_echo_n "checking if static build is enabled... " >&6; }
31280    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31281$as_echo "yes" >&6; }
31282    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31283      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31284    fi
31285    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31286    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31287    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31288    STATIC_BUILD=true
31289  elif test "x$enable_static_build" = "xno"; then
31290    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31291$as_echo_n "checking if static build is enabled... " >&6; }
31292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31293$as_echo "no" >&6; }
31294  elif test "x$enable_static_build" != "x"; then
31295    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31296  fi
31297
31298
31299
31300
31301# First determine the toolchain type (compiler family)
31302
31303
31304# Check whether --with-toolchain-type was given.
31305if test "${with_toolchain_type+set}" = set; then :
31306  withval=$with_toolchain_type;
31307fi
31308
31309
31310  # Use indirect variable referencing
31311  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31312  VALID_TOOLCHAINS=${!toolchain_var_name}
31313
31314  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31315    if test -n "$XCODEBUILD"; then
31316      # On Mac OS X, default toolchain to clang after Xcode 5
31317      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31318      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31319      if test $? -ne 0; then
31320        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31321      fi
31322      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31323          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31324          $CUT -f 1 -d .`
31325      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31326$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31327      if test $XCODE_MAJOR_VERSION -ge 5; then
31328          DEFAULT_TOOLCHAIN="clang"
31329      else
31330          DEFAULT_TOOLCHAIN="gcc"
31331      fi
31332    else
31333      # If Xcode is not installed, but the command line tools are
31334      # then we can't run xcodebuild. On these systems we should
31335      # default to clang
31336      DEFAULT_TOOLCHAIN="clang"
31337    fi
31338  else
31339    # First toolchain type in the list is the default
31340    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31341  fi
31342
31343  if test "x$with_toolchain_type" = xlist; then
31344    # List all toolchains
31345    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31346$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31347    for toolchain in $VALID_TOOLCHAINS; do
31348      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31349      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31350      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31351    done
31352
31353    exit 0
31354  elif test "x$with_toolchain_type" != x; then
31355    # User override; check that it is valid
31356    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31357      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31358$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31359      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31360$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31361      as_fn_error $? "Cannot continue." "$LINENO" 5
31362    fi
31363    TOOLCHAIN_TYPE=$with_toolchain_type
31364  else
31365    # No flag given, use default
31366    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31367  fi
31368
31369
31370  TOOLCHAIN_CC_BINARY_clang="clang"
31371  TOOLCHAIN_CC_BINARY_gcc="gcc"
31372  TOOLCHAIN_CC_BINARY_microsoft="cl"
31373  TOOLCHAIN_CC_BINARY_solstudio="cc"
31374  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31375
31376  TOOLCHAIN_CXX_BINARY_clang="clang++"
31377  TOOLCHAIN_CXX_BINARY_gcc="g++"
31378  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31379  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31380  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31381
31382  # Use indirect variable referencing
31383  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31384  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31385  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31386  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31387  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31388  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31389  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31390  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31391
31392
31393  # Define filename patterns
31394  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31395    LIBRARY_PREFIX=
31396    SHARED_LIBRARY_SUFFIX='.dll'
31397    STATIC_LIBRARY_SUFFIX='.lib'
31398    SHARED_LIBRARY='$1.dll'
31399    STATIC_LIBRARY='$1.lib'
31400    OBJ_SUFFIX='.obj'
31401    EXE_SUFFIX='.exe'
31402  else
31403    LIBRARY_PREFIX=lib
31404    SHARED_LIBRARY_SUFFIX='.so'
31405    STATIC_LIBRARY_SUFFIX='.a'
31406    SHARED_LIBRARY='lib$1.so'
31407    STATIC_LIBRARY='lib$1.a'
31408    OBJ_SUFFIX='.o'
31409    EXE_SUFFIX=''
31410    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31411      # For full static builds, we're overloading the SHARED_LIBRARY
31412      # variables in order to limit the amount of changes required.
31413      # It would be better to remove SHARED and just use LIBRARY and
31414      # LIBRARY_SUFFIX for libraries that can be built either
31415      # shared or static and use STATIC_* for libraries that are
31416      # always built statically.
31417      if test "x$STATIC_BUILD" = xtrue; then
31418        SHARED_LIBRARY='lib$1.a'
31419        SHARED_LIBRARY_SUFFIX='.a'
31420      else
31421        SHARED_LIBRARY='lib$1.dylib'
31422        SHARED_LIBRARY_SUFFIX='.dylib'
31423      fi
31424    fi
31425  fi
31426
31427
31428
31429
31430
31431
31432
31433
31434
31435
31436  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31437    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31438$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31439  else
31440    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31441$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31442  fi
31443
31444
31445# User supplied flags should be used when configure detects compilers
31446
31447  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31448    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31449$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31450  fi
31451
31452  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31453    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31454$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31455  fi
31456
31457  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31458    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31459$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31460  fi
31461
31462
31463# Check whether --with-extra-cflags was given.
31464if test "${with_extra_cflags+set}" = set; then :
31465  withval=$with_extra_cflags;
31466fi
31467
31468
31469
31470# Check whether --with-extra-cxxflags was given.
31471if test "${with_extra_cxxflags+set}" = set; then :
31472  withval=$with_extra_cxxflags;
31473fi
31474
31475
31476
31477# Check whether --with-extra-ldflags was given.
31478if test "${with_extra_ldflags+set}" = set; then :
31479  withval=$with_extra_ldflags;
31480fi
31481
31482
31483  EXTRA_CFLAGS="$with_extra_cflags"
31484  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31485  EXTRA_LDFLAGS="$with_extra_ldflags"
31486
31487
31488
31489
31490
31491  # The global CFLAGS and LDLAGS variables are used by configure tests and
31492  # should include the extra parameters
31493  CFLAGS="$EXTRA_CFLAGS"
31494  CXXFLAGS="$EXTRA_CXXFLAGS"
31495  LDFLAGS="$EXTRA_LDFLAGS"
31496  CPPFLAGS=""
31497
31498# The sysroot cflags are needed for configure to be able to run the compilers
31499
31500  if test "x$SYSROOT" != "x"; then
31501    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31502      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31503        # Solaris Studio does not have a concept of sysroot. Instead we must
31504        # make sure the default include and lib dirs are appended to each
31505        # compile and link command line. Must also add -I-xbuiltin to enable
31506        # inlining of system functions and intrinsics.
31507        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31508        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31509            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31510      fi
31511    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31512      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31513      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31514    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31515      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31516      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31517    fi
31518    # The global CFLAGS and LDFLAGS variables need these for configure to function
31519    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31520    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31521    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31522    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31523  fi
31524
31525  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31526    # We also need -iframework<path>/System/Library/Frameworks
31527    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31528    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31529    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31530    # set this here so it doesn't have to be peppered throughout the forest
31531    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31532    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31533  fi
31534
31535
31536
31537
31538
31539# Then detect the actual binaries needed
31540
31541  # FIXME: Is this needed?
31542  ac_ext=cpp
31543ac_cpp='$CXXCPP $CPPFLAGS'
31544ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31545ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31546ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31547
31548
31549  # Store the CFLAGS etc passed to the configure script.
31550  ORG_CFLAGS="$CFLAGS"
31551  ORG_CXXFLAGS="$CXXFLAGS"
31552
31553  # autoconf magic only relies on PATH, so update it if tools dir is specified
31554  OLD_PATH="$PATH"
31555
31556  # On Windows, we need to detect the visual studio installation first.
31557  # This will change the PATH, but we need to keep that new PATH even
31558  # after toolchain detection is done, since the compiler (on x86) uses
31559  # it for DLL resolution in runtime.
31560  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31561      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31562
31563  # Store path to cygwin link.exe to help excluding it when searching for
31564  # VS linker. This must be done before changing the PATH when looking for VS.
31565  # Extract the first word of "link", so it can be a program name with args.
31566set dummy link; ac_word=$2
31567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31568$as_echo_n "checking for $ac_word... " >&6; }
31569if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31570  $as_echo_n "(cached) " >&6
31571else
31572  case $CYGWIN_LINK in
31573  [\\/]* | ?:[\\/]*)
31574  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31575  ;;
31576  *)
31577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31578for as_dir in $PATH
31579do
31580  IFS=$as_save_IFS
31581  test -z "$as_dir" && as_dir=.
31582    for ac_exec_ext in '' $ac_executable_extensions; do
31583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31584    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31586    break 2
31587  fi
31588done
31589  done
31590IFS=$as_save_IFS
31591
31592  ;;
31593esac
31594fi
31595CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31596if test -n "$CYGWIN_LINK"; then
31597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31598$as_echo "$CYGWIN_LINK" >&6; }
31599else
31600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31601$as_echo "no" >&6; }
31602fi
31603
31604
31605  if test "x$CYGWIN_LINK" != x; then
31606    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31607$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31608    "$CYGWIN_LINK" --version > /dev/null
31609    if test $? -eq 0 ; then
31610      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31611$as_echo "yes" >&6; }
31612    else
31613      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31614$as_echo "no" >&6; }
31615      # This might be the VS linker. Don't exclude it later on.
31616      CYGWIN_LINK=""
31617    fi
31618  fi
31619
31620  # First-hand choice is to locate and run the vsvars bat file.
31621
31622
31623# Check whether --with-toolchain-version was given.
31624if test "${with_toolchain_version+set}" = set; then :
31625  withval=$with_toolchain_version;
31626fi
31627
31628
31629  if test "x$with_toolchain_version" = xlist; then
31630    # List all toolchains
31631    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31632$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31633    for version in $VALID_VS_VERSIONS; do
31634      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31635      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31636    done
31637
31638    exit 0
31639  elif test "x$DEVKIT_VS_VERSION" != x; then
31640    VS_VERSION=$DEVKIT_VS_VERSION
31641    TOOLCHAIN_VERSION=$VS_VERSION
31642    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31643    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31644    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31645    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31646    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31647    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31648
31649    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31650    # can still be exported as INCLUDE for compiler invocations without
31651    # SYSROOT_CFLAGS
31652    OLDIFS="$IFS"
31653    IFS=";"
31654    for i in $DEVKIT_VS_INCLUDE; do
31655      ipath=$i
31656
31657  unix_path="$ipath"
31658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31659    windows_path=`$CYGPATH -m "$unix_path"`
31660    ipath="$windows_path"
31661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31662    windows_path=`cmd //c echo $unix_path`
31663    ipath="$windows_path"
31664  fi
31665
31666      VS_INCLUDE="$VS_INCLUDE;$ipath"
31667    done
31668    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31669    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31670    for i in $DEVKIT_VS_LIB; do
31671      libpath=$i
31672
31673  unix_path="$libpath"
31674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31675    windows_path=`$CYGPATH -m "$unix_path"`
31676    libpath="$windows_path"
31677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31678    windows_path=`cmd //c echo $unix_path`
31679    libpath="$windows_path"
31680  fi
31681
31682      VS_LIB="$VS_LIB;$libpath"
31683    done
31684    IFS="$OLDIFS"
31685
31686    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31687$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31688
31689  elif test "x$with_toolchain_version" != x; then
31690    # User override; check that it is valid
31691    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31692      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31693$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31694      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31695$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31696      as_fn_error $? "Cannot continue." "$LINENO" 5
31697    fi
31698    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31699  else
31700    # No flag given, use default
31701    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31702  fi
31703
31704  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31705
31706  VS_VERSION="$VS_VERSION"
31707  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31708  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31709  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31710  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31711
31712  # When using --with-tools-dir, assume it points to the correct and default
31713  # version of Visual Studio or that --with-toolchain-version was also set.
31714  if test "x$with_tools_dir" != x; then
31715
31716  if test "x$VS_ENV_CMD" = x; then
31717    VS_VERSION="${VS_VERSION}"
31718    VS_BASE="$with_tools_dir/../.."
31719    METHOD="--with-tools-dir"
31720
31721    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31722      VCVARSFILE="vc/bin/vcvars32.bat"
31723    else
31724      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31725    fi
31726
31727
31728  windows_path="$VS_BASE"
31729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31730    unix_path=`$CYGPATH -u "$windows_path"`
31731    VS_BASE="$unix_path"
31732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31734    VS_BASE="$unix_path"
31735  fi
31736
31737    if test -d "$VS_BASE"; then
31738      if test -f "$VS_BASE/$VCVARSFILE"; then
31739        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31740$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31741        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31742        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31743        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31744        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31745      else
31746        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31747$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31748        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31749$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31750      fi
31751    fi
31752  fi
31753
31754
31755  if test "x$VS_ENV_CMD" = x; then
31756    VS_VERSION="${VS_VERSION}"
31757    VS_BASE="$with_tools_dir/../../.."
31758    METHOD="--with-tools-dir"
31759
31760    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31761      VCVARSFILE="vc/bin/vcvars32.bat"
31762    else
31763      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31764    fi
31765
31766
31767  windows_path="$VS_BASE"
31768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31769    unix_path=`$CYGPATH -u "$windows_path"`
31770    VS_BASE="$unix_path"
31771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31773    VS_BASE="$unix_path"
31774  fi
31775
31776    if test -d "$VS_BASE"; then
31777      if test -f "$VS_BASE/$VCVARSFILE"; then
31778        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31779$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31780        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31781        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31782        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31783        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31784      else
31785        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31786$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31787        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31788$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31789      fi
31790    fi
31791  fi
31792
31793    if test "x$VS_ENV_CMD" = x; then
31794      # Having specified an argument which is incorrect will produce an instant failure;
31795      # we should not go on looking
31796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31797$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31798      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31799$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31800      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31801$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31802      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31803    fi
31804  fi
31805
31806  VS_ENV_CMD=""
31807  VS_ENV_ARGS=""
31808
31809  if test "x$VS_COMNTOOLS" != x; then
31810
31811  if test "x$VS_ENV_CMD" = x; then
31812    VS_VERSION="${VS_VERSION}"
31813    VS_BASE="$VS_COMNTOOLS/../.."
31814    METHOD="$VS_COMNTOOLS_VAR variable"
31815
31816    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31817      VCVARSFILE="vc/bin/vcvars32.bat"
31818    else
31819      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31820    fi
31821
31822
31823  windows_path="$VS_BASE"
31824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31825    unix_path=`$CYGPATH -u "$windows_path"`
31826    VS_BASE="$unix_path"
31827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31829    VS_BASE="$unix_path"
31830  fi
31831
31832    if test -d "$VS_BASE"; then
31833      if test -f "$VS_BASE/$VCVARSFILE"; then
31834        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31835$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31836        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31837        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31838        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31839        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31840      else
31841        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31842$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31843        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31844$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31845      fi
31846    fi
31847  fi
31848
31849  fi
31850  if test "x$PROGRAMFILES" != x; then
31851
31852  if test "x$VS_ENV_CMD" = x; then
31853    VS_VERSION="${VS_VERSION}"
31854    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31855    METHOD="well-known name"
31856
31857    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31858      VCVARSFILE="vc/bin/vcvars32.bat"
31859    else
31860      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31861    fi
31862
31863
31864  windows_path="$VS_BASE"
31865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31866    unix_path=`$CYGPATH -u "$windows_path"`
31867    VS_BASE="$unix_path"
31868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31870    VS_BASE="$unix_path"
31871  fi
31872
31873    if test -d "$VS_BASE"; then
31874      if test -f "$VS_BASE/$VCVARSFILE"; then
31875        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31876$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31877        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31878        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31879        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31880        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31881      else
31882        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31883$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31884        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31885$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31886      fi
31887    fi
31888  fi
31889
31890  fi
31891  # Work around the insanely named ProgramFiles(x86) env variable
31892  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31893  if test "x$PROGRAMFILES_X86" != x; then
31894
31895  if test "x$VS_ENV_CMD" = x; then
31896    VS_VERSION="${VS_VERSION}"
31897    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31898    METHOD="well-known name"
31899
31900    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31901      VCVARSFILE="vc/bin/vcvars32.bat"
31902    else
31903      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31904    fi
31905
31906
31907  windows_path="$VS_BASE"
31908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31909    unix_path=`$CYGPATH -u "$windows_path"`
31910    VS_BASE="$unix_path"
31911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31913    VS_BASE="$unix_path"
31914  fi
31915
31916    if test -d "$VS_BASE"; then
31917      if test -f "$VS_BASE/$VCVARSFILE"; then
31918        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31919$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31920        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31921        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31922        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31923        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31924      else
31925        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31926$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31927        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31928$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31929      fi
31930    fi
31931  fi
31932
31933  fi
31934
31935  if test "x$VS_ENV_CMD" = x; then
31936    VS_VERSION="${VS_VERSION}"
31937    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31938    METHOD="well-known name"
31939
31940    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31941      VCVARSFILE="vc/bin/vcvars32.bat"
31942    else
31943      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31944    fi
31945
31946
31947  windows_path="$VS_BASE"
31948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31949    unix_path=`$CYGPATH -u "$windows_path"`
31950    VS_BASE="$unix_path"
31951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31953    VS_BASE="$unix_path"
31954  fi
31955
31956    if test -d "$VS_BASE"; then
31957      if test -f "$VS_BASE/$VCVARSFILE"; then
31958        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31959$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31960        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31961        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31962        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31963        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31964      else
31965        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31966$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31967        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31968$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31969      fi
31970    fi
31971  fi
31972
31973
31974  if test "x$VS_ENV_CMD" = x; then
31975    VS_VERSION="${VS_VERSION}"
31976    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31977    METHOD="well-known name"
31978
31979    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31980      VCVARSFILE="vc/bin/vcvars32.bat"
31981    else
31982      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31983    fi
31984
31985
31986  windows_path="$VS_BASE"
31987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31988    unix_path=`$CYGPATH -u "$windows_path"`
31989    VS_BASE="$unix_path"
31990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31992    VS_BASE="$unix_path"
31993  fi
31994
31995    if test -d "$VS_BASE"; then
31996      if test -f "$VS_BASE/$VCVARSFILE"; then
31997        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31998$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31999        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32000        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32001        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32002        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32003      else
32004        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32005$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32006        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32007$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32008      fi
32009    fi
32010  fi
32011
32012
32013  if test "x$SDK_INSTALL_DIR" != x; then
32014    if test "x$ProgramW6432" != x; then
32015
32016  if test "x$VS_ENV_CMD" = x; then
32017    VS_VERSION="${VS_VERSION}"
32018    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32019    METHOD="well-known name"
32020
32021  windows_path="$WIN_SDK_BASE"
32022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32023    unix_path=`$CYGPATH -u "$windows_path"`
32024    WIN_SDK_BASE="$unix_path"
32025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32027    WIN_SDK_BASE="$unix_path"
32028  fi
32029
32030    if test -d "$WIN_SDK_BASE"; then
32031      # There have been cases of partial or broken SDK installations. A missing
32032      # lib dir is not going to work.
32033      if test ! -d "$WIN_SDK_BASE/lib"; then
32034        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32035$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32036        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32037$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32038      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32039        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32040$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32041        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32042        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32043          VS_ENV_ARGS="/x86"
32044        else
32045          VS_ENV_ARGS="/x64"
32046        fi
32047        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32048        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32049        # TODO: improve detection for other versions of SDK
32050        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32051      else
32052        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32053$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32054        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32055$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32056      fi
32057    fi
32058  fi
32059
32060    fi
32061    if test "x$PROGRAMW6432" != x; then
32062
32063  if test "x$VS_ENV_CMD" = x; then
32064    VS_VERSION="${VS_VERSION}"
32065    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32066    METHOD="well-known name"
32067
32068  windows_path="$WIN_SDK_BASE"
32069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32070    unix_path=`$CYGPATH -u "$windows_path"`
32071    WIN_SDK_BASE="$unix_path"
32072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32074    WIN_SDK_BASE="$unix_path"
32075  fi
32076
32077    if test -d "$WIN_SDK_BASE"; then
32078      # There have been cases of partial or broken SDK installations. A missing
32079      # lib dir is not going to work.
32080      if test ! -d "$WIN_SDK_BASE/lib"; then
32081        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32082$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32083        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32084$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32085      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32086        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32087$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32088        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32089        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32090          VS_ENV_ARGS="/x86"
32091        else
32092          VS_ENV_ARGS="/x64"
32093        fi
32094        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32095        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32096        # TODO: improve detection for other versions of SDK
32097        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32098      else
32099        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32100$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32101        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32102$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32103      fi
32104    fi
32105  fi
32106
32107    fi
32108    if test "x$PROGRAMFILES" != x; then
32109
32110  if test "x$VS_ENV_CMD" = x; then
32111    VS_VERSION="${VS_VERSION}"
32112    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32113    METHOD="well-known name"
32114
32115  windows_path="$WIN_SDK_BASE"
32116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32117    unix_path=`$CYGPATH -u "$windows_path"`
32118    WIN_SDK_BASE="$unix_path"
32119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32121    WIN_SDK_BASE="$unix_path"
32122  fi
32123
32124    if test -d "$WIN_SDK_BASE"; then
32125      # There have been cases of partial or broken SDK installations. A missing
32126      # lib dir is not going to work.
32127      if test ! -d "$WIN_SDK_BASE/lib"; then
32128        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32129$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32130        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32131$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32132      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32133        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32134$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32135        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32136        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32137          VS_ENV_ARGS="/x86"
32138        else
32139          VS_ENV_ARGS="/x64"
32140        fi
32141        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32142        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32143        # TODO: improve detection for other versions of SDK
32144        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32145      else
32146        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32147$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32148        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32149$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32150      fi
32151    fi
32152  fi
32153
32154    fi
32155
32156  if test "x$VS_ENV_CMD" = x; then
32157    VS_VERSION="${VS_VERSION}"
32158    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32159    METHOD="well-known name"
32160
32161  windows_path="$WIN_SDK_BASE"
32162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32163    unix_path=`$CYGPATH -u "$windows_path"`
32164    WIN_SDK_BASE="$unix_path"
32165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32167    WIN_SDK_BASE="$unix_path"
32168  fi
32169
32170    if test -d "$WIN_SDK_BASE"; then
32171      # There have been cases of partial or broken SDK installations. A missing
32172      # lib dir is not going to work.
32173      if test ! -d "$WIN_SDK_BASE/lib"; then
32174        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32175$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32176        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32177$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32178      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32179        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32180$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32181        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32182        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32183          VS_ENV_ARGS="/x86"
32184        else
32185          VS_ENV_ARGS="/x64"
32186        fi
32187        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32188        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32189        # TODO: improve detection for other versions of SDK
32190        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32191      else
32192        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32193$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32194        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32195$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32196      fi
32197    fi
32198  fi
32199
32200
32201  if test "x$VS_ENV_CMD" = x; then
32202    VS_VERSION="${VS_VERSION}"
32203    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32204    METHOD="well-known name"
32205
32206  windows_path="$WIN_SDK_BASE"
32207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32208    unix_path=`$CYGPATH -u "$windows_path"`
32209    WIN_SDK_BASE="$unix_path"
32210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32212    WIN_SDK_BASE="$unix_path"
32213  fi
32214
32215    if test -d "$WIN_SDK_BASE"; then
32216      # There have been cases of partial or broken SDK installations. A missing
32217      # lib dir is not going to work.
32218      if test ! -d "$WIN_SDK_BASE/lib"; then
32219        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32220$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32221        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32222$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32223      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32224        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32225$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32226        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32227        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32228          VS_ENV_ARGS="/x86"
32229        else
32230          VS_ENV_ARGS="/x64"
32231        fi
32232        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32233        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32234        # TODO: improve detection for other versions of SDK
32235        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32236      else
32237        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32238$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32239        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32240$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32241      fi
32242    fi
32243  fi
32244
32245  fi
32246
32247    if test "x$VS_ENV_CMD" != x; then
32248      TOOLCHAIN_VERSION=$VS_VERSION
32249      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32250      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32251      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32252      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32253      # The rest of the variables are already evaled while probing
32254      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32255$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32256      break
32257    fi
32258  done
32259
32260
32261  # If we have a devkit, skip all of the below.
32262  if test "x$DEVKIT_VS_VERSION" = x; then
32263    if test "x$VS_ENV_CMD" != x; then
32264      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32265
32266  # Only process if variable expands to non-empty
32267
32268  if test "x$VS_ENV_CMD" != x; then
32269    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32270
32271  # First separate the path from the arguments. This will split at the first
32272  # space.
32273  complete="$VS_ENV_CMD"
32274  path="${complete%% *}"
32275  tmp="$complete EOL"
32276  arguments="${tmp#* }"
32277
32278  # Input might be given as Windows format, start by converting to
32279  # unix format.
32280  new_path=`$CYGPATH -u "$path"`
32281
32282  # Now try to locate executable using which
32283  new_path=`$WHICH "$new_path" 2> /dev/null`
32284  # bat and cmd files are not always considered executable in cygwin causing which
32285  # to not find them
32286  if test "x$new_path" = x \
32287      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32288      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32289    new_path=`$CYGPATH -u "$path"`
32290  fi
32291  if test "x$new_path" = x; then
32292    # Oops. Which didn't find the executable.
32293    # The splitting of arguments from the executable at a space might have been incorrect,
32294    # since paths with space are more likely in Windows. Give it another try with the whole
32295    # argument.
32296    path="$complete"
32297    arguments="EOL"
32298    new_path=`$CYGPATH -u "$path"`
32299    new_path=`$WHICH "$new_path" 2> /dev/null`
32300    # bat and cmd files are not always considered executable in cygwin causing which
32301    # to not find them
32302    if test "x$new_path" = x \
32303        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32304        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32305      new_path=`$CYGPATH -u "$path"`
32306    fi
32307    if test "x$new_path" = x; then
32308      # It's still not found. Now this is an unrecoverable error.
32309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32310$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32311      has_space=`$ECHO "$complete" | $GREP " "`
32312      if test "x$has_space" != x; then
32313        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32314$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32315      fi
32316      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32317    fi
32318  fi
32319
32320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32323  # "foo.exe" is OK but "foo" is an error.
32324  #
32325  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32326  # It is also a way to make sure we got the proper file name for the real test later on.
32327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32328  if test "x$test_shortpath" = x; then
32329    # Short path failed, file does not exist as specified.
32330    # Try adding .exe or .cmd
32331    if test -f "${new_path}.exe"; then
32332      input_to_shortpath="${new_path}.exe"
32333    elif test -f "${new_path}.cmd"; then
32334      input_to_shortpath="${new_path}.cmd"
32335    else
32336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32337$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32338      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32339$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32340      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32341    fi
32342  else
32343    input_to_shortpath="$new_path"
32344  fi
32345
32346  # Call helper function which possibly converts this using DOS-style short mode.
32347  # If so, the updated path is stored in $new_path.
32348  new_path="$input_to_shortpath"
32349
32350  input_path="$input_to_shortpath"
32351  # Check if we need to convert this using DOS-style short mode. If the path
32352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32353  # take no chances and rewrite it.
32354  # Note: m4 eats our [], so we need to use [ and ] instead.
32355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32356  if test "x$has_forbidden_chars" != x; then
32357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32361      # Going to short mode and back again did indeed matter. Since short mode is
32362      # case insensitive, let's make it lowercase to improve readability.
32363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32364      # Now convert it back to Unix-style (cygpath)
32365      input_path=`$CYGPATH -u "$shortmode_path"`
32366      new_path="$input_path"
32367    fi
32368  fi
32369
32370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32371  if test "x$test_cygdrive_prefix" = x; then
32372    # As a simple fix, exclude /usr/bin since it's not a real path.
32373    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32375      # a path prefixed by /cygdrive for fixpath to work.
32376      new_path="$CYGWIN_ROOT_PATH$input_path"
32377    fi
32378  fi
32379
32380  # remove trailing .exe if any
32381  new_path="${new_path/%.exe/}"
32382
32383    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32384
32385  # First separate the path from the arguments. This will split at the first
32386  # space.
32387  complete="$VS_ENV_CMD"
32388  path="${complete%% *}"
32389  tmp="$complete EOL"
32390  arguments="${tmp#* }"
32391
32392  # Input might be given as Windows format, start by converting to
32393  # unix format.
32394  new_path="$path"
32395
32396  windows_path="$new_path"
32397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32398    unix_path=`$CYGPATH -u "$windows_path"`
32399    new_path="$unix_path"
32400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32402    new_path="$unix_path"
32403  fi
32404
32405
32406  # Now try to locate executable using which
32407  new_path=`$WHICH "$new_path" 2> /dev/null`
32408
32409  if test "x$new_path" = x; then
32410    # Oops. Which didn't find the executable.
32411    # The splitting of arguments from the executable at a space might have been incorrect,
32412    # since paths with space are more likely in Windows. Give it another try with the whole
32413    # argument.
32414    path="$complete"
32415    arguments="EOL"
32416    new_path="$path"
32417
32418  windows_path="$new_path"
32419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32420    unix_path=`$CYGPATH -u "$windows_path"`
32421    new_path="$unix_path"
32422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32424    new_path="$unix_path"
32425  fi
32426
32427
32428    new_path=`$WHICH "$new_path" 2> /dev/null`
32429    # bat and cmd files are not always considered executable in MSYS causing which
32430    # to not find them
32431    if test "x$new_path" = x \
32432        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32433        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32434      new_path="$path"
32435
32436  windows_path="$new_path"
32437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32438    unix_path=`$CYGPATH -u "$windows_path"`
32439    new_path="$unix_path"
32440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32442    new_path="$unix_path"
32443  fi
32444
32445    fi
32446
32447    if test "x$new_path" = x; then
32448      # It's still not found. Now this is an unrecoverable error.
32449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32450$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32451      has_space=`$ECHO "$complete" | $GREP " "`
32452      if test "x$has_space" != x; then
32453        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32454$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32455      fi
32456      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32457    fi
32458  fi
32459
32460  # Now new_path has a complete unix path to the binary
32461  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32462    # Keep paths in /bin as-is, but remove trailing .exe if any
32463    new_path="${new_path/%.exe/}"
32464    # Do not save /bin paths to all_fixpath_prefixes!
32465  else
32466    # Not in mixed or Windows style, start by that.
32467    new_path=`cmd //c echo $new_path`
32468
32469  input_path="$new_path"
32470  # Check if we need to convert this using DOS-style short mode. If the path
32471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32472  # take no chances and rewrite it.
32473  # Note: m4 eats our [], so we need to use [ and ] instead.
32474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32475  if test "x$has_forbidden_chars" != x; then
32476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32478  fi
32479
32480    # Output is in $new_path
32481
32482  windows_path="$new_path"
32483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32484    unix_path=`$CYGPATH -u "$windows_path"`
32485    new_path="$unix_path"
32486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32488    new_path="$unix_path"
32489  fi
32490
32491    # remove trailing .exe if any
32492    new_path="${new_path/%.exe/}"
32493
32494    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32495    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32496  fi
32497
32498    else
32499      # We're on a unix platform. Hooray! :)
32500      # First separate the path from the arguments. This will split at the first
32501      # space.
32502      complete="$VS_ENV_CMD"
32503      path="${complete%% *}"
32504      tmp="$complete EOL"
32505      arguments="${tmp#* }"
32506
32507      # Cannot rely on the command "which" here since it doesn't always work.
32508      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32509      if test -z "$is_absolute_path"; then
32510        # Path to executable is not absolute. Find it.
32511        IFS_save="$IFS"
32512        IFS=:
32513        for p in $PATH; do
32514          if test -f "$p/$path" && test -x "$p/$path"; then
32515            new_path="$p/$path"
32516            break
32517          fi
32518        done
32519        IFS="$IFS_save"
32520      else
32521        # This is an absolute path, we can use it without further modifications.
32522        new_path="$path"
32523      fi
32524
32525      if test "x$new_path" = x; then
32526        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32527$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32528        has_space=`$ECHO "$complete" | $GREP " "`
32529        if test "x$has_space" != x; then
32530          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32531$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32532        fi
32533        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32534      fi
32535    fi
32536
32537    # Now join together the path and the arguments once again
32538    if test "x$arguments" != xEOL; then
32539      new_complete="$new_path ${arguments% *}"
32540    else
32541      new_complete="$new_path"
32542    fi
32543
32544    if test "x$complete" != "x$new_complete"; then
32545      VS_ENV_CMD="$new_complete"
32546      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32547$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32548    fi
32549  fi
32550
32551
32552      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32553      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32554$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32555
32556      # We need to create a couple of temporary files.
32557      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32558      $MKDIR -p $VS_ENV_TMP_DIR
32559
32560      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32561      # Instead create a shell script which will set the relevant variables when run.
32562      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32563
32564  unix_path="$WINPATH_VS_ENV_CMD"
32565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32566    windows_path=`$CYGPATH -m "$unix_path"`
32567    WINPATH_VS_ENV_CMD="$windows_path"
32568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32569    windows_path=`cmd //c echo $unix_path`
32570    WINPATH_VS_ENV_CMD="$windows_path"
32571  fi
32572
32573      WINPATH_BASH="$BASH"
32574
32575  unix_path="$WINPATH_BASH"
32576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32577    windows_path=`$CYGPATH -m "$unix_path"`
32578    WINPATH_BASH="$windows_path"
32579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32580    windows_path=`cmd //c echo $unix_path`
32581    WINPATH_BASH="$windows_path"
32582  fi
32583
32584
32585      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32586      # script (executable by bash) that will setup the important variables.
32587      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32588      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32589      # This will end up something like:
32590      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32591      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32592      # These will end up something like:
32593      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32594      # The trailing space for everyone except PATH is no typo, but is needed due
32595      # to trailing \ in the Windows paths. These will be stripped later.
32596      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32597          >> $EXTRACT_VC_ENV_BAT_FILE
32598      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32599          >> $EXTRACT_VC_ENV_BAT_FILE
32600      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32601          >> $EXTRACT_VC_ENV_BAT_FILE
32602      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32603          >> $EXTRACT_VC_ENV_BAT_FILE
32604      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32605          >> $EXTRACT_VC_ENV_BAT_FILE
32606      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32607          >> $EXTRACT_VC_ENV_BAT_FILE
32608
32609      # Now execute the newly created bat file.
32610      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32611      # Change directory so we don't need to mess with Windows paths in redirects.
32612      cd $VS_ENV_TMP_DIR
32613      cmd /c extract-vs-env.bat | $CAT
32614      cd $CURDIR
32615
32616      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32617        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32618$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32619        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32620$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32621        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32622$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32623        as_fn_error $? "Cannot continue" "$LINENO" 5
32624      fi
32625
32626      # Now set all paths and other env variables. This will allow the rest of
32627      # the configure script to find and run the compiler in the proper way.
32628      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32629$as_echo "$as_me: Setting extracted environment variables" >&6;}
32630      . $VS_ENV_TMP_DIR/set-vs-env.sh
32631      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32632      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32633    else
32634      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32635      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32636$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32637    fi
32638  fi
32639
32640  # At this point, we should have correct variables in the environment, or we can't continue.
32641  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32642$as_echo_n "checking for Visual Studio variables... " >&6; }
32643
32644  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32645      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32646    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32647      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32648$as_echo "present but broken" >&6; }
32649      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32650    else
32651      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32652$as_echo "ok" >&6; }
32653      # Remove any trailing "\" ";" and " " from the variables.
32654      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32655      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32656      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32657      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32658      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32659      # Remove any paths containing # (typically F#) as that messes up make. This
32660      # is needed if visual studio was installed with F# support.
32661      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32662
32663
32664
32665
32666
32667      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32668      OLDIFS="$IFS"
32669      IFS=";"
32670      for i in $VS_INCLUDE; do
32671        ipath=$i
32672        # Only process non-empty elements
32673        if test "x$ipath" != x; then
32674          IFS="$OLDIFS"
32675          # Check that directory exists before calling fixup_path
32676          testpath=$ipath
32677
32678  windows_path="$testpath"
32679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32680    unix_path=`$CYGPATH -u "$windows_path"`
32681    testpath="$unix_path"
32682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32684    testpath="$unix_path"
32685  fi
32686
32687          if test -d "$testpath"; then
32688
32689  # Only process if variable expands to non-empty
32690
32691  if test "x$ipath" != x; then
32692    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32693
32694  # Input might be given as Windows format, start by converting to
32695  # unix format.
32696  path="$ipath"
32697  new_path=`$CYGPATH -u "$path"`
32698
32699  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32700  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32701  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32702  # "foo.exe" is OK but "foo" is an error.
32703  #
32704  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32705  # It is also a way to make sure we got the proper file name for the real test later on.
32706  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32707  if test "x$test_shortpath" = x; then
32708    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32709$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32710    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32711  fi
32712
32713  # Call helper function which possibly converts this using DOS-style short mode.
32714  # If so, the updated path is stored in $new_path.
32715
32716  input_path="$new_path"
32717  # Check if we need to convert this using DOS-style short mode. If the path
32718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32719  # take no chances and rewrite it.
32720  # Note: m4 eats our [], so we need to use [ and ] instead.
32721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32722  if test "x$has_forbidden_chars" != x; then
32723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32724    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32725    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32726    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32727      # Going to short mode and back again did indeed matter. Since short mode is
32728      # case insensitive, let's make it lowercase to improve readability.
32729      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32730      # Now convert it back to Unix-style (cygpath)
32731      input_path=`$CYGPATH -u "$shortmode_path"`
32732      new_path="$input_path"
32733    fi
32734  fi
32735
32736  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32737  if test "x$test_cygdrive_prefix" = x; then
32738    # As a simple fix, exclude /usr/bin since it's not a real path.
32739    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32740      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32741      # a path prefixed by /cygdrive for fixpath to work.
32742      new_path="$CYGWIN_ROOT_PATH$input_path"
32743    fi
32744  fi
32745
32746
32747  if test "x$path" != "x$new_path"; then
32748    ipath="$new_path"
32749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32750$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32751  fi
32752
32753    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32754
32755  path="$ipath"
32756  has_colon=`$ECHO $path | $GREP ^.:`
32757  new_path="$path"
32758  if test "x$has_colon" = x; then
32759    # Not in mixed or Windows style, start by that.
32760    new_path=`cmd //c echo $path`
32761  fi
32762
32763
32764  input_path="$new_path"
32765  # Check if we need to convert this using DOS-style short mode. If the path
32766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32767  # take no chances and rewrite it.
32768  # Note: m4 eats our [], so we need to use [ and ] instead.
32769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32770  if test "x$has_forbidden_chars" != x; then
32771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32772    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32773  fi
32774
32775
32776  windows_path="$new_path"
32777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32778    unix_path=`$CYGPATH -u "$windows_path"`
32779    new_path="$unix_path"
32780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32782    new_path="$unix_path"
32783  fi
32784
32785  if test "x$path" != "x$new_path"; then
32786    ipath="$new_path"
32787    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32788$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32789  fi
32790
32791  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32792  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32793
32794    else
32795      # We're on a unix platform. Hooray! :)
32796      path="$ipath"
32797      has_space=`$ECHO "$path" | $GREP " "`
32798      if test "x$has_space" != x; then
32799        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32800$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32801        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32802      fi
32803
32804      # Use eval to expand a potential ~
32805      eval path="$path"
32806      if test ! -f "$path" && test ! -d "$path"; then
32807        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32808      fi
32809
32810      if test -d "$path"; then
32811        ipath="`cd "$path"; $THEPWDCMD -L`"
32812      else
32813        dir="`$DIRNAME "$path"`"
32814        base="`$BASENAME "$path"`"
32815        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32816      fi
32817    fi
32818  fi
32819
32820            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32821          fi
32822          IFS=";"
32823        fi
32824      done
32825      # Convert VS_LIB into SYSROOT_LDFLAGS
32826      for i in $VS_LIB; do
32827        libpath=$i
32828        # Only process non-empty elements
32829        if test "x$libpath" != x; then
32830          IFS="$OLDIFS"
32831          # Check that directory exists before calling fixup_path
32832          testpath=$libpath
32833
32834  windows_path="$testpath"
32835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32836    unix_path=`$CYGPATH -u "$windows_path"`
32837    testpath="$unix_path"
32838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32840    testpath="$unix_path"
32841  fi
32842
32843          if test -d "$testpath"; then
32844
32845  # Only process if variable expands to non-empty
32846
32847  if test "x$libpath" != x; then
32848    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32849
32850  # Input might be given as Windows format, start by converting to
32851  # unix format.
32852  path="$libpath"
32853  new_path=`$CYGPATH -u "$path"`
32854
32855  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32856  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32857  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32858  # "foo.exe" is OK but "foo" is an error.
32859  #
32860  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32861  # It is also a way to make sure we got the proper file name for the real test later on.
32862  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32863  if test "x$test_shortpath" = x; then
32864    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32865$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32866    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32867  fi
32868
32869  # Call helper function which possibly converts this using DOS-style short mode.
32870  # If so, the updated path is stored in $new_path.
32871
32872  input_path="$new_path"
32873  # Check if we need to convert this using DOS-style short mode. If the path
32874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32875  # take no chances and rewrite it.
32876  # Note: m4 eats our [], so we need to use [ and ] instead.
32877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32878  if test "x$has_forbidden_chars" != x; then
32879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32883      # Going to short mode and back again did indeed matter. Since short mode is
32884      # case insensitive, let's make it lowercase to improve readability.
32885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32886      # Now convert it back to Unix-style (cygpath)
32887      input_path=`$CYGPATH -u "$shortmode_path"`
32888      new_path="$input_path"
32889    fi
32890  fi
32891
32892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32893  if test "x$test_cygdrive_prefix" = x; then
32894    # As a simple fix, exclude /usr/bin since it's not a real path.
32895    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32897      # a path prefixed by /cygdrive for fixpath to work.
32898      new_path="$CYGWIN_ROOT_PATH$input_path"
32899    fi
32900  fi
32901
32902
32903  if test "x$path" != "x$new_path"; then
32904    libpath="$new_path"
32905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32906$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32907  fi
32908
32909    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32910
32911  path="$libpath"
32912  has_colon=`$ECHO $path | $GREP ^.:`
32913  new_path="$path"
32914  if test "x$has_colon" = x; then
32915    # Not in mixed or Windows style, start by that.
32916    new_path=`cmd //c echo $path`
32917  fi
32918
32919
32920  input_path="$new_path"
32921  # Check if we need to convert this using DOS-style short mode. If the path
32922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32923  # take no chances and rewrite it.
32924  # Note: m4 eats our [], so we need to use [ and ] instead.
32925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32926  if test "x$has_forbidden_chars" != x; then
32927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32928    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32929  fi
32930
32931
32932  windows_path="$new_path"
32933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32934    unix_path=`$CYGPATH -u "$windows_path"`
32935    new_path="$unix_path"
32936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32938    new_path="$unix_path"
32939  fi
32940
32941  if test "x$path" != "x$new_path"; then
32942    libpath="$new_path"
32943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32944$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32945  fi
32946
32947  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32948  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32949
32950    else
32951      # We're on a unix platform. Hooray! :)
32952      path="$libpath"
32953      has_space=`$ECHO "$path" | $GREP " "`
32954      if test "x$has_space" != x; then
32955        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32956$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32957        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32958      fi
32959
32960      # Use eval to expand a potential ~
32961      eval path="$path"
32962      if test ! -f "$path" && test ! -d "$path"; then
32963        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32964      fi
32965
32966      if test -d "$path"; then
32967        libpath="`cd "$path"; $THEPWDCMD -L`"
32968      else
32969        dir="`$DIRNAME "$path"`"
32970        base="`$BASENAME "$path"`"
32971        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32972      fi
32973    fi
32974  fi
32975
32976            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32977          fi
32978          IFS=";"
32979        fi
32980      done
32981      IFS="$OLDIFS"
32982    fi
32983  else
32984    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32985$as_echo "not found" >&6; }
32986
32987    if test "x$VS_ENV_CMD" = x; then
32988      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32989$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32990      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32991$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32992    else
32993      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32994$as_echo "$as_me: Running the extraction script failed." >&6;}
32995    fi
32996    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32997$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32998    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32999$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33000    as_fn_error $? "Cannot continue" "$LINENO" 5
33001  fi
33002
33003    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33004    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33005    PATH="$VS_PATH"
33006    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33007    export INCLUDE="$VS_INCLUDE"
33008    export LIB="$VS_LIB"
33009  else
33010    if test "x$XCODE_VERSION_OUTPUT" != x; then
33011      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33012      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33013      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33014    else
33015      # Currently we do not define this for other toolchains. This might change as the need arise.
33016      TOOLCHAIN_VERSION=
33017    fi
33018  fi
33019
33020
33021  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33022  # override all other locations.
33023  if test "x$TOOLCHAIN_PATH" != x; then
33024    PATH=$TOOLCHAIN_PATH:$PATH
33025  fi
33026
33027
33028  #
33029  # Setup the compilers (CC and CXX)
33030  #
33031
33032  COMPILER_NAME=C
33033  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33034
33035  if test "x$CC" != x; then
33036    # User has supplied compiler name already, always let that override.
33037    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33038$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33039    if test "x`basename $CC`" = "x$CC"; then
33040      # A command without a complete path is provided, search $PATH.
33041
33042      for ac_prog in $CC
33043do
33044  # Extract the first word of "$ac_prog", so it can be a program name with args.
33045set dummy $ac_prog; ac_word=$2
33046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33047$as_echo_n "checking for $ac_word... " >&6; }
33048if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33049  $as_echo_n "(cached) " >&6
33050else
33051  case $POTENTIAL_CC in
33052  [\\/]* | ?:[\\/]*)
33053  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33054  ;;
33055  *)
33056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33057for as_dir in $PATH
33058do
33059  IFS=$as_save_IFS
33060  test -z "$as_dir" && as_dir=.
33061    for ac_exec_ext in '' $ac_executable_extensions; do
33062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33063    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33065    break 2
33066  fi
33067done
33068  done
33069IFS=$as_save_IFS
33070
33071  ;;
33072esac
33073fi
33074POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33075if test -n "$POTENTIAL_CC"; then
33076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33077$as_echo "$POTENTIAL_CC" >&6; }
33078else
33079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33080$as_echo "no" >&6; }
33081fi
33082
33083
33084  test -n "$POTENTIAL_CC" && break
33085done
33086
33087      if test "x$POTENTIAL_CC" != x; then
33088        CC=$POTENTIAL_CC
33089      else
33090        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33091      fi
33092    else
33093      # Otherwise it might already be a complete path
33094      if test ! -x "$CC"; then
33095        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33096      fi
33097    fi
33098  else
33099    # No user supplied value. Locate compiler ourselves.
33100
33101    # If we are cross compiling, assume cross compilation tools follows the
33102    # cross compilation standard where they are prefixed with the autoconf
33103    # standard name for the target. For example the binary
33104    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33105    # If we are not cross compiling, then the default compiler name will be
33106    # used.
33107
33108    CC=
33109    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33110    # before checking the rest of the PATH.
33111    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33112    # step, this should not be necessary.
33113    if test -n "$TOOLCHAIN_PATH"; then
33114      PATH_save="$PATH"
33115      PATH="$TOOLCHAIN_PATH"
33116      for ac_prog in $SEARCH_LIST
33117do
33118  # Extract the first word of "$ac_prog", so it can be a program name with args.
33119set dummy $ac_prog; ac_word=$2
33120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33121$as_echo_n "checking for $ac_word... " >&6; }
33122if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33123  $as_echo_n "(cached) " >&6
33124else
33125  case $TOOLCHAIN_PATH_CC in
33126  [\\/]* | ?:[\\/]*)
33127  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33128  ;;
33129  *)
33130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33131for as_dir in $PATH
33132do
33133  IFS=$as_save_IFS
33134  test -z "$as_dir" && as_dir=.
33135    for ac_exec_ext in '' $ac_executable_extensions; do
33136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33137    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33139    break 2
33140  fi
33141done
33142  done
33143IFS=$as_save_IFS
33144
33145  ;;
33146esac
33147fi
33148TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33149if test -n "$TOOLCHAIN_PATH_CC"; then
33150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33151$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33152else
33153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33154$as_echo "no" >&6; }
33155fi
33156
33157
33158  test -n "$TOOLCHAIN_PATH_CC" && break
33159done
33160
33161      CC=$TOOLCHAIN_PATH_CC
33162      PATH="$PATH_save"
33163    fi
33164
33165    # AC_PATH_PROGS can't be run multiple times with the same variable,
33166    # so create a new name for this run.
33167    if test "x$CC" = x; then
33168      for ac_prog in $SEARCH_LIST
33169do
33170  # Extract the first word of "$ac_prog", so it can be a program name with args.
33171set dummy $ac_prog; ac_word=$2
33172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33173$as_echo_n "checking for $ac_word... " >&6; }
33174if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33175  $as_echo_n "(cached) " >&6
33176else
33177  case $POTENTIAL_CC in
33178  [\\/]* | ?:[\\/]*)
33179  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33180  ;;
33181  *)
33182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33183for as_dir in $PATH
33184do
33185  IFS=$as_save_IFS
33186  test -z "$as_dir" && as_dir=.
33187    for ac_exec_ext in '' $ac_executable_extensions; do
33188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33189    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33191    break 2
33192  fi
33193done
33194  done
33195IFS=$as_save_IFS
33196
33197  ;;
33198esac
33199fi
33200POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33201if test -n "$POTENTIAL_CC"; then
33202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33203$as_echo "$POTENTIAL_CC" >&6; }
33204else
33205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33206$as_echo "no" >&6; }
33207fi
33208
33209
33210  test -n "$POTENTIAL_CC" && break
33211done
33212
33213      CC=$POTENTIAL_CC
33214    fi
33215
33216    if test "x$CC" = x; then
33217
33218  # Print a helpful message on how to acquire the necessary build dependency.
33219  # devkit is the help tag: freetype, cups, alsa etc
33220  MISSING_DEPENDENCY=devkit
33221
33222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33223    cygwin_help $MISSING_DEPENDENCY
33224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33225    msys_help $MISSING_DEPENDENCY
33226  else
33227    PKGHANDLER_COMMAND=
33228
33229    case $PKGHANDLER in
33230      apt-get)
33231        apt_help     $MISSING_DEPENDENCY ;;
33232      yum)
33233        yum_help     $MISSING_DEPENDENCY ;;
33234      brew)
33235        brew_help    $MISSING_DEPENDENCY ;;
33236      port)
33237        port_help    $MISSING_DEPENDENCY ;;
33238      pkgutil)
33239        pkgutil_help $MISSING_DEPENDENCY ;;
33240      pkgadd)
33241        pkgadd_help  $MISSING_DEPENDENCY ;;
33242    esac
33243
33244    if test "x$PKGHANDLER_COMMAND" != x; then
33245      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33246    fi
33247  fi
33248
33249      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33250    fi
33251  fi
33252
33253  # Now we have a compiler binary in CC. Make sure it's okay.
33254
33255  # Only process if variable expands to non-empty
33256
33257  if test "x$CC" != x; then
33258    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33259
33260  # First separate the path from the arguments. This will split at the first
33261  # space.
33262  complete="$CC"
33263  path="${complete%% *}"
33264  tmp="$complete EOL"
33265  arguments="${tmp#* }"
33266
33267  # Input might be given as Windows format, start by converting to
33268  # unix format.
33269  new_path=`$CYGPATH -u "$path"`
33270
33271  # Now try to locate executable using which
33272  new_path=`$WHICH "$new_path" 2> /dev/null`
33273  # bat and cmd files are not always considered executable in cygwin causing which
33274  # to not find them
33275  if test "x$new_path" = x \
33276      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33277      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33278    new_path=`$CYGPATH -u "$path"`
33279  fi
33280  if test "x$new_path" = x; then
33281    # Oops. Which didn't find the executable.
33282    # The splitting of arguments from the executable at a space might have been incorrect,
33283    # since paths with space are more likely in Windows. Give it another try with the whole
33284    # argument.
33285    path="$complete"
33286    arguments="EOL"
33287    new_path=`$CYGPATH -u "$path"`
33288    new_path=`$WHICH "$new_path" 2> /dev/null`
33289    # bat and cmd files are not always considered executable in cygwin causing which
33290    # to not find them
33291    if test "x$new_path" = x \
33292        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33293        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33294      new_path=`$CYGPATH -u "$path"`
33295    fi
33296    if test "x$new_path" = x; then
33297      # It's still not found. Now this is an unrecoverable error.
33298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33299$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33300      has_space=`$ECHO "$complete" | $GREP " "`
33301      if test "x$has_space" != x; then
33302        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33303$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33304      fi
33305      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33306    fi
33307  fi
33308
33309  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33310  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33311  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33312  # "foo.exe" is OK but "foo" is an error.
33313  #
33314  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33315  # It is also a way to make sure we got the proper file name for the real test later on.
33316  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33317  if test "x$test_shortpath" = x; then
33318    # Short path failed, file does not exist as specified.
33319    # Try adding .exe or .cmd
33320    if test -f "${new_path}.exe"; then
33321      input_to_shortpath="${new_path}.exe"
33322    elif test -f "${new_path}.cmd"; then
33323      input_to_shortpath="${new_path}.cmd"
33324    else
33325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33326$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33327      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33328$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33329      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33330    fi
33331  else
33332    input_to_shortpath="$new_path"
33333  fi
33334
33335  # Call helper function which possibly converts this using DOS-style short mode.
33336  # If so, the updated path is stored in $new_path.
33337  new_path="$input_to_shortpath"
33338
33339  input_path="$input_to_shortpath"
33340  # Check if we need to convert this using DOS-style short mode. If the path
33341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33342  # take no chances and rewrite it.
33343  # Note: m4 eats our [], so we need to use [ and ] instead.
33344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33345  if test "x$has_forbidden_chars" != x; then
33346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33347    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33348    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33349    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33350      # Going to short mode and back again did indeed matter. Since short mode is
33351      # case insensitive, let's make it lowercase to improve readability.
33352      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33353      # Now convert it back to Unix-style (cygpath)
33354      input_path=`$CYGPATH -u "$shortmode_path"`
33355      new_path="$input_path"
33356    fi
33357  fi
33358
33359  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33360  if test "x$test_cygdrive_prefix" = x; then
33361    # As a simple fix, exclude /usr/bin since it's not a real path.
33362    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33363      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33364      # a path prefixed by /cygdrive for fixpath to work.
33365      new_path="$CYGWIN_ROOT_PATH$input_path"
33366    fi
33367  fi
33368
33369  # remove trailing .exe if any
33370  new_path="${new_path/%.exe/}"
33371
33372    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33373
33374  # First separate the path from the arguments. This will split at the first
33375  # space.
33376  complete="$CC"
33377  path="${complete%% *}"
33378  tmp="$complete EOL"
33379  arguments="${tmp#* }"
33380
33381  # Input might be given as Windows format, start by converting to
33382  # unix format.
33383  new_path="$path"
33384
33385  windows_path="$new_path"
33386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33387    unix_path=`$CYGPATH -u "$windows_path"`
33388    new_path="$unix_path"
33389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33391    new_path="$unix_path"
33392  fi
33393
33394
33395  # Now try to locate executable using which
33396  new_path=`$WHICH "$new_path" 2> /dev/null`
33397
33398  if test "x$new_path" = x; then
33399    # Oops. Which didn't find the executable.
33400    # The splitting of arguments from the executable at a space might have been incorrect,
33401    # since paths with space are more likely in Windows. Give it another try with the whole
33402    # argument.
33403    path="$complete"
33404    arguments="EOL"
33405    new_path="$path"
33406
33407  windows_path="$new_path"
33408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33409    unix_path=`$CYGPATH -u "$windows_path"`
33410    new_path="$unix_path"
33411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33413    new_path="$unix_path"
33414  fi
33415
33416
33417    new_path=`$WHICH "$new_path" 2> /dev/null`
33418    # bat and cmd files are not always considered executable in MSYS causing which
33419    # to not find them
33420    if test "x$new_path" = x \
33421        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33422        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33423      new_path="$path"
33424
33425  windows_path="$new_path"
33426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33427    unix_path=`$CYGPATH -u "$windows_path"`
33428    new_path="$unix_path"
33429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33431    new_path="$unix_path"
33432  fi
33433
33434    fi
33435
33436    if test "x$new_path" = x; then
33437      # It's still not found. Now this is an unrecoverable error.
33438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33439$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33440      has_space=`$ECHO "$complete" | $GREP " "`
33441      if test "x$has_space" != x; then
33442        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33443$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33444      fi
33445      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33446    fi
33447  fi
33448
33449  # Now new_path has a complete unix path to the binary
33450  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33451    # Keep paths in /bin as-is, but remove trailing .exe if any
33452    new_path="${new_path/%.exe/}"
33453    # Do not save /bin paths to all_fixpath_prefixes!
33454  else
33455    # Not in mixed or Windows style, start by that.
33456    new_path=`cmd //c echo $new_path`
33457
33458  input_path="$new_path"
33459  # Check if we need to convert this using DOS-style short mode. If the path
33460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33461  # take no chances and rewrite it.
33462  # Note: m4 eats our [], so we need to use [ and ] instead.
33463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33464  if test "x$has_forbidden_chars" != x; then
33465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33466    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33467  fi
33468
33469    # Output is in $new_path
33470
33471  windows_path="$new_path"
33472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33473    unix_path=`$CYGPATH -u "$windows_path"`
33474    new_path="$unix_path"
33475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33477    new_path="$unix_path"
33478  fi
33479
33480    # remove trailing .exe if any
33481    new_path="${new_path/%.exe/}"
33482
33483    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33484    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33485  fi
33486
33487    else
33488      # We're on a unix platform. Hooray! :)
33489      # First separate the path from the arguments. This will split at the first
33490      # space.
33491      complete="$CC"
33492      path="${complete%% *}"
33493      tmp="$complete EOL"
33494      arguments="${tmp#* }"
33495
33496      # Cannot rely on the command "which" here since it doesn't always work.
33497      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33498      if test -z "$is_absolute_path"; then
33499        # Path to executable is not absolute. Find it.
33500        IFS_save="$IFS"
33501        IFS=:
33502        for p in $PATH; do
33503          if test -f "$p/$path" && test -x "$p/$path"; then
33504            new_path="$p/$path"
33505            break
33506          fi
33507        done
33508        IFS="$IFS_save"
33509      else
33510        # This is an absolute path, we can use it without further modifications.
33511        new_path="$path"
33512      fi
33513
33514      if test "x$new_path" = x; then
33515        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33516$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33517        has_space=`$ECHO "$complete" | $GREP " "`
33518        if test "x$has_space" != x; then
33519          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33520$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33521        fi
33522        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33523      fi
33524    fi
33525
33526    # Now join together the path and the arguments once again
33527    if test "x$arguments" != xEOL; then
33528      new_complete="$new_path ${arguments% *}"
33529    else
33530      new_complete="$new_path"
33531    fi
33532
33533    if test "x$complete" != "x$new_complete"; then
33534      CC="$new_complete"
33535      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33536$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33537    fi
33538  fi
33539
33540  TEST_COMPILER="$CC"
33541
33542  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33543$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33544  SYMLINK_ORIGINAL="$TEST_COMPILER"
33545
33546  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33547    # Follow a chain of symbolic links. Use readlink
33548    # where it exists, else fall back to horribly
33549    # complicated shell code.
33550    if test "x$READLINK_TESTED" != yes; then
33551      # On MacOSX there is a readlink tool with a different
33552      # purpose than the GNU readlink tool. Check the found readlink.
33553      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33554      if test "x$ISGNU" = x; then
33555        # A readlink that we do not know how to use.
33556        # Are there other non-GNU readlinks out there?
33557        READLINK_TESTED=yes
33558        READLINK=
33559      fi
33560    fi
33561
33562    if test "x$READLINK" != x; then
33563      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33564    else
33565      # Save the current directory for restoring afterwards
33566      STARTDIR=$PWD
33567      COUNTER=0
33568      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33569      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33570      cd $sym_link_dir
33571      # Use -P flag to resolve symlinks in directories.
33572      cd `$THEPWDCMD -P`
33573      sym_link_dir=`$THEPWDCMD -P`
33574      # Resolve file symlinks
33575      while test $COUNTER -lt 20; do
33576        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33577        if test "x$ISLINK" == x; then
33578          # This is not a symbolic link! We are done!
33579          break
33580        fi
33581        # Again resolve directory symlinks since the target of the just found
33582        # link could be in a different directory
33583        cd `$DIRNAME $ISLINK`
33584        sym_link_dir=`$THEPWDCMD -P`
33585        sym_link_file=`$BASENAME $ISLINK`
33586        let COUNTER=COUNTER+1
33587      done
33588      cd $STARTDIR
33589      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33590    fi
33591  fi
33592
33593  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33594    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33595$as_echo "no symlink" >&6; }
33596  else
33597    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33598$as_echo "$SYMLINK_ORIGINAL" >&6; }
33599
33600    # We can't handle ccache by gcc wrappers, since we need to know if we're
33601    # using ccache. Instead ccache usage must be controlled by a configure option.
33602    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33603    if test "x$COMPILER_BASENAME" = "xccache"; then
33604      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33605$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33606      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33607    fi
33608  fi
33609
33610
33611  COMPILER=$CC
33612  COMPILER_NAME=$COMPILER_NAME
33613
33614  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33615    # cc -V output typically looks like
33616    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33617    # or
33618    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
33619    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33620    # Check that this is likely to be the Solaris Studio cc.
33621    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
33622    if test $? -ne 0; then
33623      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33624      { $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
33625$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33626      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33627$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33628      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33629$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33630      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33631    fi
33632    # Remove usage instructions (if present), and
33633    # collapse compiler output into a single line
33634    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33635        $SED -e 's/ *[Uu]sage:.*//'`
33636    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33637        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33638  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33639    # xlc -qversion output typically looks like
33640    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33641    #     Version: 11.01.0000.0015
33642    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33643    # Check that this is likely to be the IBM XL C compiler.
33644    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33645    if test $? -ne 0; then
33646      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33647      { $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
33648$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33649      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33650$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33651      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33652$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33653      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33654    fi
33655    # Collapse compiler output into a single line
33656    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33657    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33658        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33659  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33660    # There is no specific version flag, but all output starts with a version string.
33661    # First line typically looks something like:
33662    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33663    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33664    # Check that this is likely to be Microsoft CL.EXE.
33665    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33666    if test $? -ne 0; then
33667      { $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
33668$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33669      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33670$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33671      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33672    fi
33673    # Collapse compiler output into a single line
33674    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33675    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33676        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33677  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33678    # gcc --version output typically looks like
33679    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33680    #     Copyright (C) 2013 Free Software Foundation, Inc.
33681    #     This is free software; see the source for copying conditions.  There is NO
33682    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33683    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33684    # Check that this is likely to be GCC.
33685    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33686    if test $? -ne 0; then
33687      { $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
33688$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33689      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33690$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33691      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33692    fi
33693    # Remove Copyright and legalese from version string, and
33694    # collapse into a single line
33695    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33696        $SED -e 's/ *Copyright .*//'`
33697    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33698        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33699  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33700    # clang --version output typically looks like
33701    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33702    #    clang version 3.3 (tags/RELEASE_33/final)
33703    # or
33704    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33705    #    Target: x86_64-pc-linux-gnu
33706    #    Thread model: posix
33707    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33708    # Check that this is likely to be clang
33709    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33710    if test $? -ne 0; then
33711      { $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
33712$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33713      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33714$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33715      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33716    fi
33717    # Collapse compiler output into a single line
33718    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33719    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33720        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33721  else
33722      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33723  fi
33724  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33725  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33726  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33727  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33728
33729  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33730$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33731
33732
33733  # Now that we have resolved CC ourself, let autoconf have its go at it
33734  ac_ext=c
33735ac_cpp='$CPP $CPPFLAGS'
33736ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33737ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33738ac_compiler_gnu=$ac_cv_c_compiler_gnu
33739if test -n "$ac_tool_prefix"; then
33740  for ac_prog in $CC
33741  do
33742    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33743set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33745$as_echo_n "checking for $ac_word... " >&6; }
33746if ${ac_cv_prog_CC+:} false; then :
33747  $as_echo_n "(cached) " >&6
33748else
33749  if test -n "$CC"; then
33750  ac_cv_prog_CC="$CC" # Let the user override the test.
33751else
33752as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33753for as_dir in $PATH
33754do
33755  IFS=$as_save_IFS
33756  test -z "$as_dir" && as_dir=.
33757    for ac_exec_ext in '' $ac_executable_extensions; do
33758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33759    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33761    break 2
33762  fi
33763done
33764  done
33765IFS=$as_save_IFS
33766
33767fi
33768fi
33769CC=$ac_cv_prog_CC
33770if test -n "$CC"; then
33771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33772$as_echo "$CC" >&6; }
33773else
33774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33775$as_echo "no" >&6; }
33776fi
33777
33778
33779    test -n "$CC" && break
33780  done
33781fi
33782if test -z "$CC"; then
33783  ac_ct_CC=$CC
33784  for ac_prog in $CC
33785do
33786  # Extract the first word of "$ac_prog", so it can be a program name with args.
33787set dummy $ac_prog; ac_word=$2
33788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33789$as_echo_n "checking for $ac_word... " >&6; }
33790if ${ac_cv_prog_ac_ct_CC+:} false; then :
33791  $as_echo_n "(cached) " >&6
33792else
33793  if test -n "$ac_ct_CC"; then
33794  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33795else
33796as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33797for as_dir in $PATH
33798do
33799  IFS=$as_save_IFS
33800  test -z "$as_dir" && as_dir=.
33801    for ac_exec_ext in '' $ac_executable_extensions; do
33802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33803    ac_cv_prog_ac_ct_CC="$ac_prog"
33804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33805    break 2
33806  fi
33807done
33808  done
33809IFS=$as_save_IFS
33810
33811fi
33812fi
33813ac_ct_CC=$ac_cv_prog_ac_ct_CC
33814if test -n "$ac_ct_CC"; then
33815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33816$as_echo "$ac_ct_CC" >&6; }
33817else
33818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33819$as_echo "no" >&6; }
33820fi
33821
33822
33823  test -n "$ac_ct_CC" && break
33824done
33825
33826  if test "x$ac_ct_CC" = x; then
33827    CC=""
33828  else
33829    case $cross_compiling:$ac_tool_warned in
33830yes:)
33831{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33832$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33833ac_tool_warned=yes ;;
33834esac
33835    CC=$ac_ct_CC
33836  fi
33837fi
33838
33839
33840test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33841$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33842as_fn_error $? "no acceptable C compiler found in \$PATH
33843See \`config.log' for more details" "$LINENO" 5; }
33844
33845# Provide some information about the compiler.
33846$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33847set X $ac_compile
33848ac_compiler=$2
33849for ac_option in --version -v -V -qversion; do
33850  { { ac_try="$ac_compiler $ac_option >&5"
33851case "(($ac_try" in
33852  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33853  *) ac_try_echo=$ac_try;;
33854esac
33855eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33856$as_echo "$ac_try_echo"; } >&5
33857  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33858  ac_status=$?
33859  if test -s conftest.err; then
33860    sed '10a\
33861... rest of stderr output deleted ...
33862         10q' conftest.err >conftest.er1
33863    cat conftest.er1 >&5
33864  fi
33865  rm -f conftest.er1 conftest.err
33866  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33867  test $ac_status = 0; }
33868done
33869
33870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33871/* end confdefs.h.  */
33872
33873int
33874main ()
33875{
33876
33877  ;
33878  return 0;
33879}
33880_ACEOF
33881ac_clean_files_save=$ac_clean_files
33882ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33883# Try to create an executable without -o first, disregard a.out.
33884# It will help us diagnose broken compilers, and finding out an intuition
33885# of exeext.
33886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33887$as_echo_n "checking whether the C compiler works... " >&6; }
33888ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33889
33890# The possible output files:
33891ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33892
33893ac_rmfiles=
33894for ac_file in $ac_files
33895do
33896  case $ac_file in
33897    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33898    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33899  esac
33900done
33901rm -f $ac_rmfiles
33902
33903if { { ac_try="$ac_link_default"
33904case "(($ac_try" in
33905  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33906  *) ac_try_echo=$ac_try;;
33907esac
33908eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33909$as_echo "$ac_try_echo"; } >&5
33910  (eval "$ac_link_default") 2>&5
33911  ac_status=$?
33912  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33913  test $ac_status = 0; }; then :
33914  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33915# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33916# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33917# so that the user can short-circuit this test for compilers unknown to
33918# Autoconf.
33919for ac_file in $ac_files ''
33920do
33921  test -f "$ac_file" || continue
33922  case $ac_file in
33923    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33924	;;
33925    [ab].out )
33926	# We found the default executable, but exeext='' is most
33927	# certainly right.
33928	break;;
33929    *.* )
33930	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33931	then :; else
33932	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33933	fi
33934	# We set ac_cv_exeext here because the later test for it is not
33935	# safe: cross compilers may not add the suffix if given an `-o'
33936	# argument, so we may need to know it at that point already.
33937	# Even if this section looks crufty: it has the advantage of
33938	# actually working.
33939	break;;
33940    * )
33941	break;;
33942  esac
33943done
33944test "$ac_cv_exeext" = no && ac_cv_exeext=
33945
33946else
33947  ac_file=''
33948fi
33949if test -z "$ac_file"; then :
33950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33951$as_echo "no" >&6; }
33952$as_echo "$as_me: failed program was:" >&5
33953sed 's/^/| /' conftest.$ac_ext >&5
33954
33955{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33956$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33957as_fn_error 77 "C compiler cannot create executables
33958See \`config.log' for more details" "$LINENO" 5; }
33959else
33960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33961$as_echo "yes" >&6; }
33962fi
33963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33964$as_echo_n "checking for C compiler default output file name... " >&6; }
33965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33966$as_echo "$ac_file" >&6; }
33967ac_exeext=$ac_cv_exeext
33968
33969rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33970ac_clean_files=$ac_clean_files_save
33971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33972$as_echo_n "checking for suffix of executables... " >&6; }
33973if { { ac_try="$ac_link"
33974case "(($ac_try" in
33975  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33976  *) ac_try_echo=$ac_try;;
33977esac
33978eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33979$as_echo "$ac_try_echo"; } >&5
33980  (eval "$ac_link") 2>&5
33981  ac_status=$?
33982  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33983  test $ac_status = 0; }; then :
33984  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33985# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33986# work properly (i.e., refer to `conftest.exe'), while it won't with
33987# `rm'.
33988for ac_file in conftest.exe conftest conftest.*; do
33989  test -f "$ac_file" || continue
33990  case $ac_file in
33991    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33992    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33993	  break;;
33994    * ) break;;
33995  esac
33996done
33997else
33998  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33999$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34000as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34001See \`config.log' for more details" "$LINENO" 5; }
34002fi
34003rm -f conftest conftest$ac_cv_exeext
34004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34005$as_echo "$ac_cv_exeext" >&6; }
34006
34007rm -f conftest.$ac_ext
34008EXEEXT=$ac_cv_exeext
34009ac_exeext=$EXEEXT
34010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34011/* end confdefs.h.  */
34012#include <stdio.h>
34013int
34014main ()
34015{
34016FILE *f = fopen ("conftest.out", "w");
34017 return ferror (f) || fclose (f) != 0;
34018
34019  ;
34020  return 0;
34021}
34022_ACEOF
34023ac_clean_files="$ac_clean_files conftest.out"
34024# Check that the compiler produces executables we can run.  If not, either
34025# the compiler is broken, or we cross compile.
34026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34027$as_echo_n "checking whether we are cross compiling... " >&6; }
34028if test "$cross_compiling" != yes; then
34029  { { ac_try="$ac_link"
34030case "(($ac_try" in
34031  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34032  *) ac_try_echo=$ac_try;;
34033esac
34034eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34035$as_echo "$ac_try_echo"; } >&5
34036  (eval "$ac_link") 2>&5
34037  ac_status=$?
34038  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34039  test $ac_status = 0; }
34040  if { ac_try='./conftest$ac_cv_exeext'
34041  { { case "(($ac_try" in
34042  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34043  *) ac_try_echo=$ac_try;;
34044esac
34045eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34046$as_echo "$ac_try_echo"; } >&5
34047  (eval "$ac_try") 2>&5
34048  ac_status=$?
34049  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34050  test $ac_status = 0; }; }; then
34051    cross_compiling=no
34052  else
34053    if test "$cross_compiling" = maybe; then
34054	cross_compiling=yes
34055    else
34056	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34057$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34058as_fn_error $? "cannot run C compiled programs.
34059If you meant to cross compile, use \`--host'.
34060See \`config.log' for more details" "$LINENO" 5; }
34061    fi
34062  fi
34063fi
34064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34065$as_echo "$cross_compiling" >&6; }
34066
34067rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34068ac_clean_files=$ac_clean_files_save
34069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34070$as_echo_n "checking for suffix of object files... " >&6; }
34071if ${ac_cv_objext+:} false; then :
34072  $as_echo_n "(cached) " >&6
34073else
34074  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34075/* end confdefs.h.  */
34076
34077int
34078main ()
34079{
34080
34081  ;
34082  return 0;
34083}
34084_ACEOF
34085rm -f conftest.o conftest.obj
34086if { { ac_try="$ac_compile"
34087case "(($ac_try" in
34088  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34089  *) ac_try_echo=$ac_try;;
34090esac
34091eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34092$as_echo "$ac_try_echo"; } >&5
34093  (eval "$ac_compile") 2>&5
34094  ac_status=$?
34095  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34096  test $ac_status = 0; }; then :
34097  for ac_file in conftest.o conftest.obj conftest.*; do
34098  test -f "$ac_file" || continue;
34099  case $ac_file in
34100    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34101    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34102       break;;
34103  esac
34104done
34105else
34106  $as_echo "$as_me: failed program was:" >&5
34107sed 's/^/| /' conftest.$ac_ext >&5
34108
34109{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34110$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34111as_fn_error $? "cannot compute suffix of object files: cannot compile
34112See \`config.log' for more details" "$LINENO" 5; }
34113fi
34114rm -f conftest.$ac_cv_objext conftest.$ac_ext
34115fi
34116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34117$as_echo "$ac_cv_objext" >&6; }
34118OBJEXT=$ac_cv_objext
34119ac_objext=$OBJEXT
34120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34121$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34122if ${ac_cv_c_compiler_gnu+:} false; then :
34123  $as_echo_n "(cached) " >&6
34124else
34125  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34126/* end confdefs.h.  */
34127
34128int
34129main ()
34130{
34131#ifndef __GNUC__
34132       choke me
34133#endif
34134
34135  ;
34136  return 0;
34137}
34138_ACEOF
34139if ac_fn_c_try_compile "$LINENO"; then :
34140  ac_compiler_gnu=yes
34141else
34142  ac_compiler_gnu=no
34143fi
34144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34145ac_cv_c_compiler_gnu=$ac_compiler_gnu
34146
34147fi
34148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34149$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34150if test $ac_compiler_gnu = yes; then
34151  GCC=yes
34152else
34153  GCC=
34154fi
34155ac_test_CFLAGS=${CFLAGS+set}
34156ac_save_CFLAGS=$CFLAGS
34157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34158$as_echo_n "checking whether $CC accepts -g... " >&6; }
34159if ${ac_cv_prog_cc_g+:} false; then :
34160  $as_echo_n "(cached) " >&6
34161else
34162  ac_save_c_werror_flag=$ac_c_werror_flag
34163   ac_c_werror_flag=yes
34164   ac_cv_prog_cc_g=no
34165   CFLAGS="-g"
34166   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34167/* end confdefs.h.  */
34168
34169int
34170main ()
34171{
34172
34173  ;
34174  return 0;
34175}
34176_ACEOF
34177if ac_fn_c_try_compile "$LINENO"; then :
34178  ac_cv_prog_cc_g=yes
34179else
34180  CFLAGS=""
34181      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34182/* end confdefs.h.  */
34183
34184int
34185main ()
34186{
34187
34188  ;
34189  return 0;
34190}
34191_ACEOF
34192if ac_fn_c_try_compile "$LINENO"; then :
34193
34194else
34195  ac_c_werror_flag=$ac_save_c_werror_flag
34196	 CFLAGS="-g"
34197	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34198/* end confdefs.h.  */
34199
34200int
34201main ()
34202{
34203
34204  ;
34205  return 0;
34206}
34207_ACEOF
34208if ac_fn_c_try_compile "$LINENO"; then :
34209  ac_cv_prog_cc_g=yes
34210fi
34211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34212fi
34213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34214fi
34215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34216   ac_c_werror_flag=$ac_save_c_werror_flag
34217fi
34218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34219$as_echo "$ac_cv_prog_cc_g" >&6; }
34220if test "$ac_test_CFLAGS" = set; then
34221  CFLAGS=$ac_save_CFLAGS
34222elif test $ac_cv_prog_cc_g = yes; then
34223  if test "$GCC" = yes; then
34224    CFLAGS="-g -O2"
34225  else
34226    CFLAGS="-g"
34227  fi
34228else
34229  if test "$GCC" = yes; then
34230    CFLAGS="-O2"
34231  else
34232    CFLAGS=
34233  fi
34234fi
34235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34236$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34237if ${ac_cv_prog_cc_c89+:} false; then :
34238  $as_echo_n "(cached) " >&6
34239else
34240  ac_cv_prog_cc_c89=no
34241ac_save_CC=$CC
34242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34243/* end confdefs.h.  */
34244#include <stdarg.h>
34245#include <stdio.h>
34246struct stat;
34247/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34248struct buf { int x; };
34249FILE * (*rcsopen) (struct buf *, struct stat *, int);
34250static char *e (p, i)
34251     char **p;
34252     int i;
34253{
34254  return p[i];
34255}
34256static char *f (char * (*g) (char **, int), char **p, ...)
34257{
34258  char *s;
34259  va_list v;
34260  va_start (v,p);
34261  s = g (p, va_arg (v,int));
34262  va_end (v);
34263  return s;
34264}
34265
34266/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34267   function prototypes and stuff, but not '\xHH' hex character constants.
34268   These don't provoke an error unfortunately, instead are silently treated
34269   as 'x'.  The following induces an error, until -std is added to get
34270   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34271   array size at least.  It's necessary to write '\x00'==0 to get something
34272   that's true only with -std.  */
34273int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34274
34275/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34276   inside strings and character constants.  */
34277#define FOO(x) 'x'
34278int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34279
34280int test (int i, double x);
34281struct s1 {int (*f) (int a);};
34282struct s2 {int (*f) (double a);};
34283int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34284int argc;
34285char **argv;
34286int
34287main ()
34288{
34289return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34290  ;
34291  return 0;
34292}
34293_ACEOF
34294for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34295	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34296do
34297  CC="$ac_save_CC $ac_arg"
34298  if ac_fn_c_try_compile "$LINENO"; then :
34299  ac_cv_prog_cc_c89=$ac_arg
34300fi
34301rm -f core conftest.err conftest.$ac_objext
34302  test "x$ac_cv_prog_cc_c89" != "xno" && break
34303done
34304rm -f conftest.$ac_ext
34305CC=$ac_save_CC
34306
34307fi
34308# AC_CACHE_VAL
34309case "x$ac_cv_prog_cc_c89" in
34310  x)
34311    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34312$as_echo "none needed" >&6; } ;;
34313  xno)
34314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34315$as_echo "unsupported" >&6; } ;;
34316  *)
34317    CC="$CC $ac_cv_prog_cc_c89"
34318    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34319$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34320esac
34321if test "x$ac_cv_prog_cc_c89" != xno; then :
34322
34323fi
34324
34325ac_ext=cpp
34326ac_cpp='$CXXCPP $CPPFLAGS'
34327ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34328ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34329ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34330
34331
34332
34333  COMPILER_NAME=C++
34334  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34335
34336  if test "x$CXX" != x; then
34337    # User has supplied compiler name already, always let that override.
34338    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34339$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34340    if test "x`basename $CXX`" = "x$CXX"; then
34341      # A command without a complete path is provided, search $PATH.
34342
34343      for ac_prog in $CXX
34344do
34345  # Extract the first word of "$ac_prog", so it can be a program name with args.
34346set dummy $ac_prog; ac_word=$2
34347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34348$as_echo_n "checking for $ac_word... " >&6; }
34349if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34350  $as_echo_n "(cached) " >&6
34351else
34352  case $POTENTIAL_CXX in
34353  [\\/]* | ?:[\\/]*)
34354  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34355  ;;
34356  *)
34357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34358for as_dir in $PATH
34359do
34360  IFS=$as_save_IFS
34361  test -z "$as_dir" && as_dir=.
34362    for ac_exec_ext in '' $ac_executable_extensions; do
34363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34364    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34366    break 2
34367  fi
34368done
34369  done
34370IFS=$as_save_IFS
34371
34372  ;;
34373esac
34374fi
34375POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34376if test -n "$POTENTIAL_CXX"; then
34377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34378$as_echo "$POTENTIAL_CXX" >&6; }
34379else
34380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34381$as_echo "no" >&6; }
34382fi
34383
34384
34385  test -n "$POTENTIAL_CXX" && break
34386done
34387
34388      if test "x$POTENTIAL_CXX" != x; then
34389        CXX=$POTENTIAL_CXX
34390      else
34391        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34392      fi
34393    else
34394      # Otherwise it might already be a complete path
34395      if test ! -x "$CXX"; then
34396        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34397      fi
34398    fi
34399  else
34400    # No user supplied value. Locate compiler ourselves.
34401
34402    # If we are cross compiling, assume cross compilation tools follows the
34403    # cross compilation standard where they are prefixed with the autoconf
34404    # standard name for the target. For example the binary
34405    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34406    # If we are not cross compiling, then the default compiler name will be
34407    # used.
34408
34409    CXX=
34410    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34411    # before checking the rest of the PATH.
34412    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34413    # step, this should not be necessary.
34414    if test -n "$TOOLCHAIN_PATH"; then
34415      PATH_save="$PATH"
34416      PATH="$TOOLCHAIN_PATH"
34417      for ac_prog in $SEARCH_LIST
34418do
34419  # Extract the first word of "$ac_prog", so it can be a program name with args.
34420set dummy $ac_prog; ac_word=$2
34421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34422$as_echo_n "checking for $ac_word... " >&6; }
34423if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34424  $as_echo_n "(cached) " >&6
34425else
34426  case $TOOLCHAIN_PATH_CXX in
34427  [\\/]* | ?:[\\/]*)
34428  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34429  ;;
34430  *)
34431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34432for as_dir in $PATH
34433do
34434  IFS=$as_save_IFS
34435  test -z "$as_dir" && as_dir=.
34436    for ac_exec_ext in '' $ac_executable_extensions; do
34437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34438    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34440    break 2
34441  fi
34442done
34443  done
34444IFS=$as_save_IFS
34445
34446  ;;
34447esac
34448fi
34449TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34450if test -n "$TOOLCHAIN_PATH_CXX"; then
34451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34452$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34453else
34454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34455$as_echo "no" >&6; }
34456fi
34457
34458
34459  test -n "$TOOLCHAIN_PATH_CXX" && break
34460done
34461
34462      CXX=$TOOLCHAIN_PATH_CXX
34463      PATH="$PATH_save"
34464    fi
34465
34466    # AC_PATH_PROGS can't be run multiple times with the same variable,
34467    # so create a new name for this run.
34468    if test "x$CXX" = x; then
34469      for ac_prog in $SEARCH_LIST
34470do
34471  # Extract the first word of "$ac_prog", so it can be a program name with args.
34472set dummy $ac_prog; ac_word=$2
34473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34474$as_echo_n "checking for $ac_word... " >&6; }
34475if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34476  $as_echo_n "(cached) " >&6
34477else
34478  case $POTENTIAL_CXX in
34479  [\\/]* | ?:[\\/]*)
34480  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34481  ;;
34482  *)
34483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34484for as_dir in $PATH
34485do
34486  IFS=$as_save_IFS
34487  test -z "$as_dir" && as_dir=.
34488    for ac_exec_ext in '' $ac_executable_extensions; do
34489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34490    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34492    break 2
34493  fi
34494done
34495  done
34496IFS=$as_save_IFS
34497
34498  ;;
34499esac
34500fi
34501POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34502if test -n "$POTENTIAL_CXX"; then
34503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34504$as_echo "$POTENTIAL_CXX" >&6; }
34505else
34506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34507$as_echo "no" >&6; }
34508fi
34509
34510
34511  test -n "$POTENTIAL_CXX" && break
34512done
34513
34514      CXX=$POTENTIAL_CXX
34515    fi
34516
34517    if test "x$CXX" = x; then
34518
34519  # Print a helpful message on how to acquire the necessary build dependency.
34520  # devkit is the help tag: freetype, cups, alsa etc
34521  MISSING_DEPENDENCY=devkit
34522
34523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34524    cygwin_help $MISSING_DEPENDENCY
34525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34526    msys_help $MISSING_DEPENDENCY
34527  else
34528    PKGHANDLER_COMMAND=
34529
34530    case $PKGHANDLER in
34531      apt-get)
34532        apt_help     $MISSING_DEPENDENCY ;;
34533      yum)
34534        yum_help     $MISSING_DEPENDENCY ;;
34535      brew)
34536        brew_help    $MISSING_DEPENDENCY ;;
34537      port)
34538        port_help    $MISSING_DEPENDENCY ;;
34539      pkgutil)
34540        pkgutil_help $MISSING_DEPENDENCY ;;
34541      pkgadd)
34542        pkgadd_help  $MISSING_DEPENDENCY ;;
34543    esac
34544
34545    if test "x$PKGHANDLER_COMMAND" != x; then
34546      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34547    fi
34548  fi
34549
34550      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34551    fi
34552  fi
34553
34554  # Now we have a compiler binary in CXX. Make sure it's okay.
34555
34556  # Only process if variable expands to non-empty
34557
34558  if test "x$CXX" != x; then
34559    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34560
34561  # First separate the path from the arguments. This will split at the first
34562  # space.
34563  complete="$CXX"
34564  path="${complete%% *}"
34565  tmp="$complete EOL"
34566  arguments="${tmp#* }"
34567
34568  # Input might be given as Windows format, start by converting to
34569  # unix format.
34570  new_path=`$CYGPATH -u "$path"`
34571
34572  # Now try to locate executable using which
34573  new_path=`$WHICH "$new_path" 2> /dev/null`
34574  # bat and cmd files are not always considered executable in cygwin causing which
34575  # to not find them
34576  if test "x$new_path" = x \
34577      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34578      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34579    new_path=`$CYGPATH -u "$path"`
34580  fi
34581  if test "x$new_path" = x; then
34582    # Oops. Which didn't find the executable.
34583    # The splitting of arguments from the executable at a space might have been incorrect,
34584    # since paths with space are more likely in Windows. Give it another try with the whole
34585    # argument.
34586    path="$complete"
34587    arguments="EOL"
34588    new_path=`$CYGPATH -u "$path"`
34589    new_path=`$WHICH "$new_path" 2> /dev/null`
34590    # bat and cmd files are not always considered executable in cygwin causing which
34591    # to not find them
34592    if test "x$new_path" = x \
34593        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34594        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34595      new_path=`$CYGPATH -u "$path"`
34596    fi
34597    if test "x$new_path" = x; then
34598      # It's still not found. Now this is an unrecoverable error.
34599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34600$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34601      has_space=`$ECHO "$complete" | $GREP " "`
34602      if test "x$has_space" != x; then
34603        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34604$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34605      fi
34606      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34607    fi
34608  fi
34609
34610  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34611  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34612  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34613  # "foo.exe" is OK but "foo" is an error.
34614  #
34615  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34616  # It is also a way to make sure we got the proper file name for the real test later on.
34617  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34618  if test "x$test_shortpath" = x; then
34619    # Short path failed, file does not exist as specified.
34620    # Try adding .exe or .cmd
34621    if test -f "${new_path}.exe"; then
34622      input_to_shortpath="${new_path}.exe"
34623    elif test -f "${new_path}.cmd"; then
34624      input_to_shortpath="${new_path}.cmd"
34625    else
34626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34627$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34628      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34629$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34630      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34631    fi
34632  else
34633    input_to_shortpath="$new_path"
34634  fi
34635
34636  # Call helper function which possibly converts this using DOS-style short mode.
34637  # If so, the updated path is stored in $new_path.
34638  new_path="$input_to_shortpath"
34639
34640  input_path="$input_to_shortpath"
34641  # Check if we need to convert this using DOS-style short mode. If the path
34642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34643  # take no chances and rewrite it.
34644  # Note: m4 eats our [], so we need to use [ and ] instead.
34645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34646  if test "x$has_forbidden_chars" != x; then
34647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34648    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34649    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34650    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34651      # Going to short mode and back again did indeed matter. Since short mode is
34652      # case insensitive, let's make it lowercase to improve readability.
34653      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34654      # Now convert it back to Unix-style (cygpath)
34655      input_path=`$CYGPATH -u "$shortmode_path"`
34656      new_path="$input_path"
34657    fi
34658  fi
34659
34660  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34661  if test "x$test_cygdrive_prefix" = x; then
34662    # As a simple fix, exclude /usr/bin since it's not a real path.
34663    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34664      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34665      # a path prefixed by /cygdrive for fixpath to work.
34666      new_path="$CYGWIN_ROOT_PATH$input_path"
34667    fi
34668  fi
34669
34670  # remove trailing .exe if any
34671  new_path="${new_path/%.exe/}"
34672
34673    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34674
34675  # First separate the path from the arguments. This will split at the first
34676  # space.
34677  complete="$CXX"
34678  path="${complete%% *}"
34679  tmp="$complete EOL"
34680  arguments="${tmp#* }"
34681
34682  # Input might be given as Windows format, start by converting to
34683  # unix format.
34684  new_path="$path"
34685
34686  windows_path="$new_path"
34687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34688    unix_path=`$CYGPATH -u "$windows_path"`
34689    new_path="$unix_path"
34690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34692    new_path="$unix_path"
34693  fi
34694
34695
34696  # Now try to locate executable using which
34697  new_path=`$WHICH "$new_path" 2> /dev/null`
34698
34699  if test "x$new_path" = x; then
34700    # Oops. Which didn't find the executable.
34701    # The splitting of arguments from the executable at a space might have been incorrect,
34702    # since paths with space are more likely in Windows. Give it another try with the whole
34703    # argument.
34704    path="$complete"
34705    arguments="EOL"
34706    new_path="$path"
34707
34708  windows_path="$new_path"
34709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34710    unix_path=`$CYGPATH -u "$windows_path"`
34711    new_path="$unix_path"
34712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34714    new_path="$unix_path"
34715  fi
34716
34717
34718    new_path=`$WHICH "$new_path" 2> /dev/null`
34719    # bat and cmd files are not always considered executable in MSYS causing which
34720    # to not find them
34721    if test "x$new_path" = x \
34722        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34723        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34724      new_path="$path"
34725
34726  windows_path="$new_path"
34727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34728    unix_path=`$CYGPATH -u "$windows_path"`
34729    new_path="$unix_path"
34730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34732    new_path="$unix_path"
34733  fi
34734
34735    fi
34736
34737    if test "x$new_path" = x; then
34738      # It's still not found. Now this is an unrecoverable error.
34739      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34740$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34741      has_space=`$ECHO "$complete" | $GREP " "`
34742      if test "x$has_space" != x; then
34743        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34744$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34745      fi
34746      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34747    fi
34748  fi
34749
34750  # Now new_path has a complete unix path to the binary
34751  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34752    # Keep paths in /bin as-is, but remove trailing .exe if any
34753    new_path="${new_path/%.exe/}"
34754    # Do not save /bin paths to all_fixpath_prefixes!
34755  else
34756    # Not in mixed or Windows style, start by that.
34757    new_path=`cmd //c echo $new_path`
34758
34759  input_path="$new_path"
34760  # Check if we need to convert this using DOS-style short mode. If the path
34761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34762  # take no chances and rewrite it.
34763  # Note: m4 eats our [], so we need to use [ and ] instead.
34764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34765  if test "x$has_forbidden_chars" != x; then
34766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34767    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34768  fi
34769
34770    # Output is in $new_path
34771
34772  windows_path="$new_path"
34773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34774    unix_path=`$CYGPATH -u "$windows_path"`
34775    new_path="$unix_path"
34776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34778    new_path="$unix_path"
34779  fi
34780
34781    # remove trailing .exe if any
34782    new_path="${new_path/%.exe/}"
34783
34784    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34785    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34786  fi
34787
34788    else
34789      # We're on a unix platform. Hooray! :)
34790      # First separate the path from the arguments. This will split at the first
34791      # space.
34792      complete="$CXX"
34793      path="${complete%% *}"
34794      tmp="$complete EOL"
34795      arguments="${tmp#* }"
34796
34797      # Cannot rely on the command "which" here since it doesn't always work.
34798      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34799      if test -z "$is_absolute_path"; then
34800        # Path to executable is not absolute. Find it.
34801        IFS_save="$IFS"
34802        IFS=:
34803        for p in $PATH; do
34804          if test -f "$p/$path" && test -x "$p/$path"; then
34805            new_path="$p/$path"
34806            break
34807          fi
34808        done
34809        IFS="$IFS_save"
34810      else
34811        # This is an absolute path, we can use it without further modifications.
34812        new_path="$path"
34813      fi
34814
34815      if test "x$new_path" = x; then
34816        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34817$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34818        has_space=`$ECHO "$complete" | $GREP " "`
34819        if test "x$has_space" != x; then
34820          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34821$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34822        fi
34823        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34824      fi
34825    fi
34826
34827    # Now join together the path and the arguments once again
34828    if test "x$arguments" != xEOL; then
34829      new_complete="$new_path ${arguments% *}"
34830    else
34831      new_complete="$new_path"
34832    fi
34833
34834    if test "x$complete" != "x$new_complete"; then
34835      CXX="$new_complete"
34836      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34837$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34838    fi
34839  fi
34840
34841  TEST_COMPILER="$CXX"
34842
34843  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34844$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34845  SYMLINK_ORIGINAL="$TEST_COMPILER"
34846
34847  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34848    # Follow a chain of symbolic links. Use readlink
34849    # where it exists, else fall back to horribly
34850    # complicated shell code.
34851    if test "x$READLINK_TESTED" != yes; then
34852      # On MacOSX there is a readlink tool with a different
34853      # purpose than the GNU readlink tool. Check the found readlink.
34854      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34855      if test "x$ISGNU" = x; then
34856        # A readlink that we do not know how to use.
34857        # Are there other non-GNU readlinks out there?
34858        READLINK_TESTED=yes
34859        READLINK=
34860      fi
34861    fi
34862
34863    if test "x$READLINK" != x; then
34864      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34865    else
34866      # Save the current directory for restoring afterwards
34867      STARTDIR=$PWD
34868      COUNTER=0
34869      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34870      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34871      cd $sym_link_dir
34872      # Use -P flag to resolve symlinks in directories.
34873      cd `$THEPWDCMD -P`
34874      sym_link_dir=`$THEPWDCMD -P`
34875      # Resolve file symlinks
34876      while test $COUNTER -lt 20; do
34877        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34878        if test "x$ISLINK" == x; then
34879          # This is not a symbolic link! We are done!
34880          break
34881        fi
34882        # Again resolve directory symlinks since the target of the just found
34883        # link could be in a different directory
34884        cd `$DIRNAME $ISLINK`
34885        sym_link_dir=`$THEPWDCMD -P`
34886        sym_link_file=`$BASENAME $ISLINK`
34887        let COUNTER=COUNTER+1
34888      done
34889      cd $STARTDIR
34890      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34891    fi
34892  fi
34893
34894  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34895    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34896$as_echo "no symlink" >&6; }
34897  else
34898    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34899$as_echo "$SYMLINK_ORIGINAL" >&6; }
34900
34901    # We can't handle ccache by gcc wrappers, since we need to know if we're
34902    # using ccache. Instead ccache usage must be controlled by a configure option.
34903    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34904    if test "x$COMPILER_BASENAME" = "xccache"; then
34905      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34906$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34907      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34908    fi
34909  fi
34910
34911
34912  COMPILER=$CXX
34913  COMPILER_NAME=$COMPILER_NAME
34914
34915  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34916    # cc -V output typically looks like
34917    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34918    # or
34919    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34920    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34921    # Check that this is likely to be the Solaris Studio cc.
34922    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34923    if test $? -ne 0; then
34924      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34925      { $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
34926$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34927      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34928$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34929      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34930$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34931      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34932    fi
34933    # Remove usage instructions (if present), and
34934    # collapse compiler output into a single line
34935    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34936        $SED -e 's/ *[Uu]sage:.*//'`
34937    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34938        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34939  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34940    # xlc -qversion output typically looks like
34941    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34942    #     Version: 11.01.0000.0015
34943    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34944    # Check that this is likely to be the IBM XL C compiler.
34945    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34946    if test $? -ne 0; then
34947      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34948      { $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
34949$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34950      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34951$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34952      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34953$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34954      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34955    fi
34956    # Collapse compiler output into a single line
34957    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34958    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34959        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34960  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34961    # There is no specific version flag, but all output starts with a version string.
34962    # First line typically looks something like:
34963    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34964    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34965    # Check that this is likely to be Microsoft CL.EXE.
34966    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34967    if test $? -ne 0; then
34968      { $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
34969$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34970      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34971$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34972      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34973    fi
34974    # Collapse compiler output into a single line
34975    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34976    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34977        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34978  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34979    # gcc --version output typically looks like
34980    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34981    #     Copyright (C) 2013 Free Software Foundation, Inc.
34982    #     This is free software; see the source for copying conditions.  There is NO
34983    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34984    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34985    # Check that this is likely to be GCC.
34986    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34987    if test $? -ne 0; then
34988      { $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
34989$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34990      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34991$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34992      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34993    fi
34994    # Remove Copyright and legalese from version string, and
34995    # collapse into a single line
34996    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34997        $SED -e 's/ *Copyright .*//'`
34998    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34999        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35000  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35001    # clang --version output typically looks like
35002    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35003    #    clang version 3.3 (tags/RELEASE_33/final)
35004    # or
35005    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35006    #    Target: x86_64-pc-linux-gnu
35007    #    Thread model: posix
35008    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35009    # Check that this is likely to be clang
35010    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35011    if test $? -ne 0; then
35012      { $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
35013$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35014      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35015$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35016      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35017    fi
35018    # Collapse compiler output into a single line
35019    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35020    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35021        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35022  else
35023      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35024  fi
35025  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35026  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35027  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35028  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35029
35030  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35031$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35032
35033
35034  # Now that we have resolved CXX ourself, let autoconf have its go at it
35035  ac_ext=cpp
35036ac_cpp='$CXXCPP $CPPFLAGS'
35037ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35038ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35039ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35040if test -z "$CXX"; then
35041  if test -n "$CCC"; then
35042    CXX=$CCC
35043  else
35044    if test -n "$ac_tool_prefix"; then
35045  for ac_prog in $CXX
35046  do
35047    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35048set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35050$as_echo_n "checking for $ac_word... " >&6; }
35051if ${ac_cv_prog_CXX+:} false; then :
35052  $as_echo_n "(cached) " >&6
35053else
35054  if test -n "$CXX"; then
35055  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35056else
35057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35058for as_dir in $PATH
35059do
35060  IFS=$as_save_IFS
35061  test -z "$as_dir" && as_dir=.
35062    for ac_exec_ext in '' $ac_executable_extensions; do
35063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35064    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35066    break 2
35067  fi
35068done
35069  done
35070IFS=$as_save_IFS
35071
35072fi
35073fi
35074CXX=$ac_cv_prog_CXX
35075if test -n "$CXX"; then
35076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35077$as_echo "$CXX" >&6; }
35078else
35079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35080$as_echo "no" >&6; }
35081fi
35082
35083
35084    test -n "$CXX" && break
35085  done
35086fi
35087if test -z "$CXX"; then
35088  ac_ct_CXX=$CXX
35089  for ac_prog in $CXX
35090do
35091  # Extract the first word of "$ac_prog", so it can be a program name with args.
35092set dummy $ac_prog; ac_word=$2
35093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35094$as_echo_n "checking for $ac_word... " >&6; }
35095if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35096  $as_echo_n "(cached) " >&6
35097else
35098  if test -n "$ac_ct_CXX"; then
35099  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35100else
35101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35102for as_dir in $PATH
35103do
35104  IFS=$as_save_IFS
35105  test -z "$as_dir" && as_dir=.
35106    for ac_exec_ext in '' $ac_executable_extensions; do
35107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35108    ac_cv_prog_ac_ct_CXX="$ac_prog"
35109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35110    break 2
35111  fi
35112done
35113  done
35114IFS=$as_save_IFS
35115
35116fi
35117fi
35118ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35119if test -n "$ac_ct_CXX"; then
35120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35121$as_echo "$ac_ct_CXX" >&6; }
35122else
35123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35124$as_echo "no" >&6; }
35125fi
35126
35127
35128  test -n "$ac_ct_CXX" && break
35129done
35130
35131  if test "x$ac_ct_CXX" = x; then
35132    CXX="g++"
35133  else
35134    case $cross_compiling:$ac_tool_warned in
35135yes:)
35136{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35137$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35138ac_tool_warned=yes ;;
35139esac
35140    CXX=$ac_ct_CXX
35141  fi
35142fi
35143
35144  fi
35145fi
35146# Provide some information about the compiler.
35147$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35148set X $ac_compile
35149ac_compiler=$2
35150for ac_option in --version -v -V -qversion; do
35151  { { ac_try="$ac_compiler $ac_option >&5"
35152case "(($ac_try" in
35153  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35154  *) ac_try_echo=$ac_try;;
35155esac
35156eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35157$as_echo "$ac_try_echo"; } >&5
35158  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35159  ac_status=$?
35160  if test -s conftest.err; then
35161    sed '10a\
35162... rest of stderr output deleted ...
35163         10q' conftest.err >conftest.er1
35164    cat conftest.er1 >&5
35165  fi
35166  rm -f conftest.er1 conftest.err
35167  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35168  test $ac_status = 0; }
35169done
35170
35171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35172$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35173if ${ac_cv_cxx_compiler_gnu+:} false; then :
35174  $as_echo_n "(cached) " >&6
35175else
35176  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35177/* end confdefs.h.  */
35178
35179int
35180main ()
35181{
35182#ifndef __GNUC__
35183       choke me
35184#endif
35185
35186  ;
35187  return 0;
35188}
35189_ACEOF
35190if ac_fn_cxx_try_compile "$LINENO"; then :
35191  ac_compiler_gnu=yes
35192else
35193  ac_compiler_gnu=no
35194fi
35195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35196ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35197
35198fi
35199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35200$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35201if test $ac_compiler_gnu = yes; then
35202  GXX=yes
35203else
35204  GXX=
35205fi
35206ac_test_CXXFLAGS=${CXXFLAGS+set}
35207ac_save_CXXFLAGS=$CXXFLAGS
35208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35209$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35210if ${ac_cv_prog_cxx_g+:} false; then :
35211  $as_echo_n "(cached) " >&6
35212else
35213  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35214   ac_cxx_werror_flag=yes
35215   ac_cv_prog_cxx_g=no
35216   CXXFLAGS="-g"
35217   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35218/* end confdefs.h.  */
35219
35220int
35221main ()
35222{
35223
35224  ;
35225  return 0;
35226}
35227_ACEOF
35228if ac_fn_cxx_try_compile "$LINENO"; then :
35229  ac_cv_prog_cxx_g=yes
35230else
35231  CXXFLAGS=""
35232      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35233/* end confdefs.h.  */
35234
35235int
35236main ()
35237{
35238
35239  ;
35240  return 0;
35241}
35242_ACEOF
35243if ac_fn_cxx_try_compile "$LINENO"; then :
35244
35245else
35246  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35247	 CXXFLAGS="-g"
35248	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35249/* end confdefs.h.  */
35250
35251int
35252main ()
35253{
35254
35255  ;
35256  return 0;
35257}
35258_ACEOF
35259if ac_fn_cxx_try_compile "$LINENO"; then :
35260  ac_cv_prog_cxx_g=yes
35261fi
35262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35263fi
35264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35265fi
35266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35267   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35268fi
35269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35270$as_echo "$ac_cv_prog_cxx_g" >&6; }
35271if test "$ac_test_CXXFLAGS" = set; then
35272  CXXFLAGS=$ac_save_CXXFLAGS
35273elif test $ac_cv_prog_cxx_g = yes; then
35274  if test "$GXX" = yes; then
35275    CXXFLAGS="-g -O2"
35276  else
35277    CXXFLAGS="-g"
35278  fi
35279else
35280  if test "$GXX" = yes; then
35281    CXXFLAGS="-O2"
35282  else
35283    CXXFLAGS=
35284  fi
35285fi
35286ac_ext=cpp
35287ac_cpp='$CXXCPP $CPPFLAGS'
35288ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35289ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35290ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35291
35292
35293  # This is the compiler version number on the form X.Y[.Z]
35294
35295
35296
35297
35298  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35299    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35300$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35301    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35302$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35303  fi
35304
35305  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35306  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
35307    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
35308$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35309  fi
35310
35311  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35312    { $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
35313$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35314  fi
35315
35316  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
35317
35318
35319  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35320
35321
35322
35323
35324
35325
35326
35327
35328
35329
35330
35331
35332
35333
35334
35335
35336
35337
35338
35339
35340
35341
35342
35343
35344
35345
35346
35347
35348
35349
35350
35351
35352
35353
35354
35355
35356
35357
35358
35359
35360
35361
35362
35363
35364
35365
35366
35367
35368
35369    # Execute function body
35370
35371  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35372  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35373
35374  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
35375    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
35376  fi
35377
35378  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35379    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35380  fi
35381
35382  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35383  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
35384
35385  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35386    :
35387
35388  else
35389    :
35390
35391          { $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
35392$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35393
35394
35395  fi
35396
35397
35398
35399
35400
35401
35402
35403
35404
35405
35406
35407
35408
35409
35410  fi
35411
35412  #
35413  # Setup the preprocessor (CPP and CXXCPP)
35414  #
35415  ac_ext=c
35416ac_cpp='$CPP $CPPFLAGS'
35417ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35418ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35419ac_compiler_gnu=$ac_cv_c_compiler_gnu
35420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35421$as_echo_n "checking how to run the C preprocessor... " >&6; }
35422# On Suns, sometimes $CPP names a directory.
35423if test -n "$CPP" && test -d "$CPP"; then
35424  CPP=
35425fi
35426if test -z "$CPP"; then
35427  if ${ac_cv_prog_CPP+:} false; then :
35428  $as_echo_n "(cached) " >&6
35429else
35430      # Double quotes because CPP needs to be expanded
35431    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35432    do
35433      ac_preproc_ok=false
35434for ac_c_preproc_warn_flag in '' yes
35435do
35436  # Use a header file that comes with gcc, so configuring glibc
35437  # with a fresh cross-compiler works.
35438  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35439  # <limits.h> exists even on freestanding compilers.
35440  # On the NeXT, cc -E runs the code through the compiler's parser,
35441  # not just through cpp. "Syntax error" is here to catch this case.
35442  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35443/* end confdefs.h.  */
35444#ifdef __STDC__
35445# include <limits.h>
35446#else
35447# include <assert.h>
35448#endif
35449		     Syntax error
35450_ACEOF
35451if ac_fn_c_try_cpp "$LINENO"; then :
35452
35453else
35454  # Broken: fails on valid input.
35455continue
35456fi
35457rm -f conftest.err conftest.i conftest.$ac_ext
35458
35459  # OK, works on sane cases.  Now check whether nonexistent headers
35460  # can be detected and how.
35461  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35462/* end confdefs.h.  */
35463#include <ac_nonexistent.h>
35464_ACEOF
35465if ac_fn_c_try_cpp "$LINENO"; then :
35466  # Broken: success on invalid input.
35467continue
35468else
35469  # Passes both tests.
35470ac_preproc_ok=:
35471break
35472fi
35473rm -f conftest.err conftest.i conftest.$ac_ext
35474
35475done
35476# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35477rm -f conftest.i conftest.err conftest.$ac_ext
35478if $ac_preproc_ok; then :
35479  break
35480fi
35481
35482    done
35483    ac_cv_prog_CPP=$CPP
35484
35485fi
35486  CPP=$ac_cv_prog_CPP
35487else
35488  ac_cv_prog_CPP=$CPP
35489fi
35490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35491$as_echo "$CPP" >&6; }
35492ac_preproc_ok=false
35493for ac_c_preproc_warn_flag in '' yes
35494do
35495  # Use a header file that comes with gcc, so configuring glibc
35496  # with a fresh cross-compiler works.
35497  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35498  # <limits.h> exists even on freestanding compilers.
35499  # On the NeXT, cc -E runs the code through the compiler's parser,
35500  # not just through cpp. "Syntax error" is here to catch this case.
35501  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35502/* end confdefs.h.  */
35503#ifdef __STDC__
35504# include <limits.h>
35505#else
35506# include <assert.h>
35507#endif
35508		     Syntax error
35509_ACEOF
35510if ac_fn_c_try_cpp "$LINENO"; then :
35511
35512else
35513  # Broken: fails on valid input.
35514continue
35515fi
35516rm -f conftest.err conftest.i conftest.$ac_ext
35517
35518  # OK, works on sane cases.  Now check whether nonexistent headers
35519  # can be detected and how.
35520  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35521/* end confdefs.h.  */
35522#include <ac_nonexistent.h>
35523_ACEOF
35524if ac_fn_c_try_cpp "$LINENO"; then :
35525  # Broken: success on invalid input.
35526continue
35527else
35528  # Passes both tests.
35529ac_preproc_ok=:
35530break
35531fi
35532rm -f conftest.err conftest.i conftest.$ac_ext
35533
35534done
35535# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35536rm -f conftest.i conftest.err conftest.$ac_ext
35537if $ac_preproc_ok; then :
35538
35539else
35540  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35541$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35542as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35543See \`config.log' for more details" "$LINENO" 5; }
35544fi
35545
35546ac_ext=cpp
35547ac_cpp='$CXXCPP $CPPFLAGS'
35548ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35549ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35550ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35551
35552
35553  # Only process if variable expands to non-empty
35554
35555  if test "x$CPP" != x; then
35556    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35557
35558  # First separate the path from the arguments. This will split at the first
35559  # space.
35560  complete="$CPP"
35561  path="${complete%% *}"
35562  tmp="$complete EOL"
35563  arguments="${tmp#* }"
35564
35565  # Input might be given as Windows format, start by converting to
35566  # unix format.
35567  new_path=`$CYGPATH -u "$path"`
35568
35569  # Now try to locate executable using which
35570  new_path=`$WHICH "$new_path" 2> /dev/null`
35571  # bat and cmd files are not always considered executable in cygwin causing which
35572  # to not find them
35573  if test "x$new_path" = x \
35574      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35575      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35576    new_path=`$CYGPATH -u "$path"`
35577  fi
35578  if test "x$new_path" = x; then
35579    # Oops. Which didn't find the executable.
35580    # The splitting of arguments from the executable at a space might have been incorrect,
35581    # since paths with space are more likely in Windows. Give it another try with the whole
35582    # argument.
35583    path="$complete"
35584    arguments="EOL"
35585    new_path=`$CYGPATH -u "$path"`
35586    new_path=`$WHICH "$new_path" 2> /dev/null`
35587    # bat and cmd files are not always considered executable in cygwin causing which
35588    # to not find them
35589    if test "x$new_path" = x \
35590        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35591        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35592      new_path=`$CYGPATH -u "$path"`
35593    fi
35594    if test "x$new_path" = x; then
35595      # It's still not found. Now this is an unrecoverable error.
35596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35597$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35598      has_space=`$ECHO "$complete" | $GREP " "`
35599      if test "x$has_space" != x; then
35600        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35601$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35602      fi
35603      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35604    fi
35605  fi
35606
35607  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35608  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35609  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35610  # "foo.exe" is OK but "foo" is an error.
35611  #
35612  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35613  # It is also a way to make sure we got the proper file name for the real test later on.
35614  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35615  if test "x$test_shortpath" = x; then
35616    # Short path failed, file does not exist as specified.
35617    # Try adding .exe or .cmd
35618    if test -f "${new_path}.exe"; then
35619      input_to_shortpath="${new_path}.exe"
35620    elif test -f "${new_path}.cmd"; then
35621      input_to_shortpath="${new_path}.cmd"
35622    else
35623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35624$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35625      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35626$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35627      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35628    fi
35629  else
35630    input_to_shortpath="$new_path"
35631  fi
35632
35633  # Call helper function which possibly converts this using DOS-style short mode.
35634  # If so, the updated path is stored in $new_path.
35635  new_path="$input_to_shortpath"
35636
35637  input_path="$input_to_shortpath"
35638  # Check if we need to convert this using DOS-style short mode. If the path
35639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35640  # take no chances and rewrite it.
35641  # Note: m4 eats our [], so we need to use [ and ] instead.
35642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35643  if test "x$has_forbidden_chars" != x; then
35644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35645    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35646    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35647    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35648      # Going to short mode and back again did indeed matter. Since short mode is
35649      # case insensitive, let's make it lowercase to improve readability.
35650      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35651      # Now convert it back to Unix-style (cygpath)
35652      input_path=`$CYGPATH -u "$shortmode_path"`
35653      new_path="$input_path"
35654    fi
35655  fi
35656
35657  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35658  if test "x$test_cygdrive_prefix" = x; then
35659    # As a simple fix, exclude /usr/bin since it's not a real path.
35660    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35661      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35662      # a path prefixed by /cygdrive for fixpath to work.
35663      new_path="$CYGWIN_ROOT_PATH$input_path"
35664    fi
35665  fi
35666
35667  # remove trailing .exe if any
35668  new_path="${new_path/%.exe/}"
35669
35670    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35671
35672  # First separate the path from the arguments. This will split at the first
35673  # space.
35674  complete="$CPP"
35675  path="${complete%% *}"
35676  tmp="$complete EOL"
35677  arguments="${tmp#* }"
35678
35679  # Input might be given as Windows format, start by converting to
35680  # unix format.
35681  new_path="$path"
35682
35683  windows_path="$new_path"
35684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35685    unix_path=`$CYGPATH -u "$windows_path"`
35686    new_path="$unix_path"
35687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35689    new_path="$unix_path"
35690  fi
35691
35692
35693  # Now try to locate executable using which
35694  new_path=`$WHICH "$new_path" 2> /dev/null`
35695
35696  if test "x$new_path" = x; then
35697    # Oops. Which didn't find the executable.
35698    # The splitting of arguments from the executable at a space might have been incorrect,
35699    # since paths with space are more likely in Windows. Give it another try with the whole
35700    # argument.
35701    path="$complete"
35702    arguments="EOL"
35703    new_path="$path"
35704
35705  windows_path="$new_path"
35706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35707    unix_path=`$CYGPATH -u "$windows_path"`
35708    new_path="$unix_path"
35709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35711    new_path="$unix_path"
35712  fi
35713
35714
35715    new_path=`$WHICH "$new_path" 2> /dev/null`
35716    # bat and cmd files are not always considered executable in MSYS causing which
35717    # to not find them
35718    if test "x$new_path" = x \
35719        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35720        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35721      new_path="$path"
35722
35723  windows_path="$new_path"
35724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35725    unix_path=`$CYGPATH -u "$windows_path"`
35726    new_path="$unix_path"
35727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35729    new_path="$unix_path"
35730  fi
35731
35732    fi
35733
35734    if test "x$new_path" = x; then
35735      # It's still not found. Now this is an unrecoverable error.
35736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35737$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35738      has_space=`$ECHO "$complete" | $GREP " "`
35739      if test "x$has_space" != x; then
35740        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35741$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35742      fi
35743      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35744    fi
35745  fi
35746
35747  # Now new_path has a complete unix path to the binary
35748  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35749    # Keep paths in /bin as-is, but remove trailing .exe if any
35750    new_path="${new_path/%.exe/}"
35751    # Do not save /bin paths to all_fixpath_prefixes!
35752  else
35753    # Not in mixed or Windows style, start by that.
35754    new_path=`cmd //c echo $new_path`
35755
35756  input_path="$new_path"
35757  # Check if we need to convert this using DOS-style short mode. If the path
35758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35759  # take no chances and rewrite it.
35760  # Note: m4 eats our [], so we need to use [ and ] instead.
35761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35762  if test "x$has_forbidden_chars" != x; then
35763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35764    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35765  fi
35766
35767    # Output is in $new_path
35768
35769  windows_path="$new_path"
35770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35771    unix_path=`$CYGPATH -u "$windows_path"`
35772    new_path="$unix_path"
35773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35775    new_path="$unix_path"
35776  fi
35777
35778    # remove trailing .exe if any
35779    new_path="${new_path/%.exe/}"
35780
35781    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35782    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35783  fi
35784
35785    else
35786      # We're on a unix platform. Hooray! :)
35787      # First separate the path from the arguments. This will split at the first
35788      # space.
35789      complete="$CPP"
35790      path="${complete%% *}"
35791      tmp="$complete EOL"
35792      arguments="${tmp#* }"
35793
35794      # Cannot rely on the command "which" here since it doesn't always work.
35795      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35796      if test -z "$is_absolute_path"; then
35797        # Path to executable is not absolute. Find it.
35798        IFS_save="$IFS"
35799        IFS=:
35800        for p in $PATH; do
35801          if test -f "$p/$path" && test -x "$p/$path"; then
35802            new_path="$p/$path"
35803            break
35804          fi
35805        done
35806        IFS="$IFS_save"
35807      else
35808        # This is an absolute path, we can use it without further modifications.
35809        new_path="$path"
35810      fi
35811
35812      if test "x$new_path" = x; then
35813        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35814$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35815        has_space=`$ECHO "$complete" | $GREP " "`
35816        if test "x$has_space" != x; then
35817          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35818$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35819        fi
35820        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35821      fi
35822    fi
35823
35824    # Now join together the path and the arguments once again
35825    if test "x$arguments" != xEOL; then
35826      new_complete="$new_path ${arguments% *}"
35827    else
35828      new_complete="$new_path"
35829    fi
35830
35831    if test "x$complete" != "x$new_complete"; then
35832      CPP="$new_complete"
35833      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35834$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35835    fi
35836  fi
35837
35838  ac_ext=cpp
35839ac_cpp='$CXXCPP $CPPFLAGS'
35840ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35841ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35842ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35844$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35845if test -z "$CXXCPP"; then
35846  if ${ac_cv_prog_CXXCPP+:} false; then :
35847  $as_echo_n "(cached) " >&6
35848else
35849      # Double quotes because CXXCPP needs to be expanded
35850    for CXXCPP in "$CXX -E" "/lib/cpp"
35851    do
35852      ac_preproc_ok=false
35853for ac_cxx_preproc_warn_flag in '' yes
35854do
35855  # Use a header file that comes with gcc, so configuring glibc
35856  # with a fresh cross-compiler works.
35857  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35858  # <limits.h> exists even on freestanding compilers.
35859  # On the NeXT, cc -E runs the code through the compiler's parser,
35860  # not just through cpp. "Syntax error" is here to catch this case.
35861  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35862/* end confdefs.h.  */
35863#ifdef __STDC__
35864# include <limits.h>
35865#else
35866# include <assert.h>
35867#endif
35868		     Syntax error
35869_ACEOF
35870if ac_fn_cxx_try_cpp "$LINENO"; then :
35871
35872else
35873  # Broken: fails on valid input.
35874continue
35875fi
35876rm -f conftest.err conftest.i conftest.$ac_ext
35877
35878  # OK, works on sane cases.  Now check whether nonexistent headers
35879  # can be detected and how.
35880  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35881/* end confdefs.h.  */
35882#include <ac_nonexistent.h>
35883_ACEOF
35884if ac_fn_cxx_try_cpp "$LINENO"; then :
35885  # Broken: success on invalid input.
35886continue
35887else
35888  # Passes both tests.
35889ac_preproc_ok=:
35890break
35891fi
35892rm -f conftest.err conftest.i conftest.$ac_ext
35893
35894done
35895# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35896rm -f conftest.i conftest.err conftest.$ac_ext
35897if $ac_preproc_ok; then :
35898  break
35899fi
35900
35901    done
35902    ac_cv_prog_CXXCPP=$CXXCPP
35903
35904fi
35905  CXXCPP=$ac_cv_prog_CXXCPP
35906else
35907  ac_cv_prog_CXXCPP=$CXXCPP
35908fi
35909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35910$as_echo "$CXXCPP" >&6; }
35911ac_preproc_ok=false
35912for ac_cxx_preproc_warn_flag in '' yes
35913do
35914  # Use a header file that comes with gcc, so configuring glibc
35915  # with a fresh cross-compiler works.
35916  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35917  # <limits.h> exists even on freestanding compilers.
35918  # On the NeXT, cc -E runs the code through the compiler's parser,
35919  # not just through cpp. "Syntax error" is here to catch this case.
35920  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35921/* end confdefs.h.  */
35922#ifdef __STDC__
35923# include <limits.h>
35924#else
35925# include <assert.h>
35926#endif
35927		     Syntax error
35928_ACEOF
35929if ac_fn_cxx_try_cpp "$LINENO"; then :
35930
35931else
35932  # Broken: fails on valid input.
35933continue
35934fi
35935rm -f conftest.err conftest.i conftest.$ac_ext
35936
35937  # OK, works on sane cases.  Now check whether nonexistent headers
35938  # can be detected and how.
35939  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35940/* end confdefs.h.  */
35941#include <ac_nonexistent.h>
35942_ACEOF
35943if ac_fn_cxx_try_cpp "$LINENO"; then :
35944  # Broken: success on invalid input.
35945continue
35946else
35947  # Passes both tests.
35948ac_preproc_ok=:
35949break
35950fi
35951rm -f conftest.err conftest.i conftest.$ac_ext
35952
35953done
35954# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35955rm -f conftest.i conftest.err conftest.$ac_ext
35956if $ac_preproc_ok; then :
35957
35958else
35959  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35960$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35961as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35962See \`config.log' for more details" "$LINENO" 5; }
35963fi
35964
35965ac_ext=cpp
35966ac_cpp='$CXXCPP $CPPFLAGS'
35967ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35968ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35969ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35970
35971
35972  # Only process if variable expands to non-empty
35973
35974  if test "x$CXXCPP" != x; then
35975    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35976
35977  # First separate the path from the arguments. This will split at the first
35978  # space.
35979  complete="$CXXCPP"
35980  path="${complete%% *}"
35981  tmp="$complete EOL"
35982  arguments="${tmp#* }"
35983
35984  # Input might be given as Windows format, start by converting to
35985  # unix format.
35986  new_path=`$CYGPATH -u "$path"`
35987
35988  # Now try to locate executable using which
35989  new_path=`$WHICH "$new_path" 2> /dev/null`
35990  # bat and cmd files are not always considered executable in cygwin causing which
35991  # to not find them
35992  if test "x$new_path" = x \
35993      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35994      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35995    new_path=`$CYGPATH -u "$path"`
35996  fi
35997  if test "x$new_path" = x; then
35998    # Oops. Which didn't find the executable.
35999    # The splitting of arguments from the executable at a space might have been incorrect,
36000    # since paths with space are more likely in Windows. Give it another try with the whole
36001    # argument.
36002    path="$complete"
36003    arguments="EOL"
36004    new_path=`$CYGPATH -u "$path"`
36005    new_path=`$WHICH "$new_path" 2> /dev/null`
36006    # bat and cmd files are not always considered executable in cygwin causing which
36007    # to not find them
36008    if test "x$new_path" = x \
36009        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36010        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36011      new_path=`$CYGPATH -u "$path"`
36012    fi
36013    if test "x$new_path" = x; then
36014      # It's still not found. Now this is an unrecoverable error.
36015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36016$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36017      has_space=`$ECHO "$complete" | $GREP " "`
36018      if test "x$has_space" != x; then
36019        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36020$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36021      fi
36022      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36023    fi
36024  fi
36025
36026  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36027  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36028  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36029  # "foo.exe" is OK but "foo" is an error.
36030  #
36031  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36032  # It is also a way to make sure we got the proper file name for the real test later on.
36033  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36034  if test "x$test_shortpath" = x; then
36035    # Short path failed, file does not exist as specified.
36036    # Try adding .exe or .cmd
36037    if test -f "${new_path}.exe"; then
36038      input_to_shortpath="${new_path}.exe"
36039    elif test -f "${new_path}.cmd"; then
36040      input_to_shortpath="${new_path}.cmd"
36041    else
36042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36043$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36044      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36045$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36046      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36047    fi
36048  else
36049    input_to_shortpath="$new_path"
36050  fi
36051
36052  # Call helper function which possibly converts this using DOS-style short mode.
36053  # If so, the updated path is stored in $new_path.
36054  new_path="$input_to_shortpath"
36055
36056  input_path="$input_to_shortpath"
36057  # Check if we need to convert this using DOS-style short mode. If the path
36058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36059  # take no chances and rewrite it.
36060  # Note: m4 eats our [], so we need to use [ and ] instead.
36061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36062  if test "x$has_forbidden_chars" != x; then
36063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36064    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36065    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36066    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36067      # Going to short mode and back again did indeed matter. Since short mode is
36068      # case insensitive, let's make it lowercase to improve readability.
36069      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36070      # Now convert it back to Unix-style (cygpath)
36071      input_path=`$CYGPATH -u "$shortmode_path"`
36072      new_path="$input_path"
36073    fi
36074  fi
36075
36076  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36077  if test "x$test_cygdrive_prefix" = x; then
36078    # As a simple fix, exclude /usr/bin since it's not a real path.
36079    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36080      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36081      # a path prefixed by /cygdrive for fixpath to work.
36082      new_path="$CYGWIN_ROOT_PATH$input_path"
36083    fi
36084  fi
36085
36086  # remove trailing .exe if any
36087  new_path="${new_path/%.exe/}"
36088
36089    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36090
36091  # First separate the path from the arguments. This will split at the first
36092  # space.
36093  complete="$CXXCPP"
36094  path="${complete%% *}"
36095  tmp="$complete EOL"
36096  arguments="${tmp#* }"
36097
36098  # Input might be given as Windows format, start by converting to
36099  # unix format.
36100  new_path="$path"
36101
36102  windows_path="$new_path"
36103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36104    unix_path=`$CYGPATH -u "$windows_path"`
36105    new_path="$unix_path"
36106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36108    new_path="$unix_path"
36109  fi
36110
36111
36112  # Now try to locate executable using which
36113  new_path=`$WHICH "$new_path" 2> /dev/null`
36114
36115  if test "x$new_path" = x; then
36116    # Oops. Which didn't find the executable.
36117    # The splitting of arguments from the executable at a space might have been incorrect,
36118    # since paths with space are more likely in Windows. Give it another try with the whole
36119    # argument.
36120    path="$complete"
36121    arguments="EOL"
36122    new_path="$path"
36123
36124  windows_path="$new_path"
36125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36126    unix_path=`$CYGPATH -u "$windows_path"`
36127    new_path="$unix_path"
36128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36130    new_path="$unix_path"
36131  fi
36132
36133
36134    new_path=`$WHICH "$new_path" 2> /dev/null`
36135    # bat and cmd files are not always considered executable in MSYS causing which
36136    # to not find them
36137    if test "x$new_path" = x \
36138        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36139        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36140      new_path="$path"
36141
36142  windows_path="$new_path"
36143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36144    unix_path=`$CYGPATH -u "$windows_path"`
36145    new_path="$unix_path"
36146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36148    new_path="$unix_path"
36149  fi
36150
36151    fi
36152
36153    if test "x$new_path" = x; then
36154      # It's still not found. Now this is an unrecoverable error.
36155      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36156$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36157      has_space=`$ECHO "$complete" | $GREP " "`
36158      if test "x$has_space" != x; then
36159        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36160$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36161      fi
36162      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36163    fi
36164  fi
36165
36166  # Now new_path has a complete unix path to the binary
36167  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36168    # Keep paths in /bin as-is, but remove trailing .exe if any
36169    new_path="${new_path/%.exe/}"
36170    # Do not save /bin paths to all_fixpath_prefixes!
36171  else
36172    # Not in mixed or Windows style, start by that.
36173    new_path=`cmd //c echo $new_path`
36174
36175  input_path="$new_path"
36176  # Check if we need to convert this using DOS-style short mode. If the path
36177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36178  # take no chances and rewrite it.
36179  # Note: m4 eats our [], so we need to use [ and ] instead.
36180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36181  if test "x$has_forbidden_chars" != x; then
36182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36183    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36184  fi
36185
36186    # Output is in $new_path
36187
36188  windows_path="$new_path"
36189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36190    unix_path=`$CYGPATH -u "$windows_path"`
36191    new_path="$unix_path"
36192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36194    new_path="$unix_path"
36195  fi
36196
36197    # remove trailing .exe if any
36198    new_path="${new_path/%.exe/}"
36199
36200    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36201    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36202  fi
36203
36204    else
36205      # We're on a unix platform. Hooray! :)
36206      # First separate the path from the arguments. This will split at the first
36207      # space.
36208      complete="$CXXCPP"
36209      path="${complete%% *}"
36210      tmp="$complete EOL"
36211      arguments="${tmp#* }"
36212
36213      # Cannot rely on the command "which" here since it doesn't always work.
36214      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36215      if test -z "$is_absolute_path"; then
36216        # Path to executable is not absolute. Find it.
36217        IFS_save="$IFS"
36218        IFS=:
36219        for p in $PATH; do
36220          if test -f "$p/$path" && test -x "$p/$path"; then
36221            new_path="$p/$path"
36222            break
36223          fi
36224        done
36225        IFS="$IFS_save"
36226      else
36227        # This is an absolute path, we can use it without further modifications.
36228        new_path="$path"
36229      fi
36230
36231      if test "x$new_path" = x; then
36232        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36233$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36234        has_space=`$ECHO "$complete" | $GREP " "`
36235        if test "x$has_space" != x; then
36236          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36237$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36238        fi
36239        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36240      fi
36241    fi
36242
36243    # Now join together the path and the arguments once again
36244    if test "x$arguments" != xEOL; then
36245      new_complete="$new_path ${arguments% *}"
36246    else
36247      new_complete="$new_path"
36248    fi
36249
36250    if test "x$complete" != "x$new_complete"; then
36251      CXXCPP="$new_complete"
36252      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36253$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36254    fi
36255  fi
36256
36257
36258  #
36259  # Setup the linker (LD)
36260  #
36261  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36262    # In the Microsoft toolchain we have a separate LD command "link".
36263    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36264    # a cygwin program for something completely different.
36265    # Extract the first word of "link", so it can be a program name with args.
36266set dummy link; ac_word=$2
36267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36268$as_echo_n "checking for $ac_word... " >&6; }
36269if ${ac_cv_prog_LD+:} false; then :
36270  $as_echo_n "(cached) " >&6
36271else
36272  if test -n "$LD"; then
36273  ac_cv_prog_LD="$LD" # Let the user override the test.
36274else
36275  ac_prog_rejected=no
36276as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36277for as_dir in $PATH
36278do
36279  IFS=$as_save_IFS
36280  test -z "$as_dir" && as_dir=.
36281    for ac_exec_ext in '' $ac_executable_extensions; do
36282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36283    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36284       ac_prog_rejected=yes
36285       continue
36286     fi
36287    ac_cv_prog_LD="link"
36288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36289    break 2
36290  fi
36291done
36292  done
36293IFS=$as_save_IFS
36294
36295if test $ac_prog_rejected = yes; then
36296  # We found a bogon in the path, so make sure we never use it.
36297  set dummy $ac_cv_prog_LD
36298  shift
36299  if test $# != 0; then
36300    # We chose a different compiler from the bogus one.
36301    # However, it has the same basename, so the bogon will be chosen
36302    # first if we set LD to just the basename; use the full file name.
36303    shift
36304    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36305  fi
36306fi
36307fi
36308fi
36309LD=$ac_cv_prog_LD
36310if test -n "$LD"; then
36311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36312$as_echo "$LD" >&6; }
36313else
36314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36315$as_echo "no" >&6; }
36316fi
36317
36318
36319
36320  # Only process if variable expands to non-empty
36321
36322  if test "x$LD" != x; then
36323    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36324
36325  # First separate the path from the arguments. This will split at the first
36326  # space.
36327  complete="$LD"
36328  path="${complete%% *}"
36329  tmp="$complete EOL"
36330  arguments="${tmp#* }"
36331
36332  # Input might be given as Windows format, start by converting to
36333  # unix format.
36334  new_path=`$CYGPATH -u "$path"`
36335
36336  # Now try to locate executable using which
36337  new_path=`$WHICH "$new_path" 2> /dev/null`
36338  # bat and cmd files are not always considered executable in cygwin causing which
36339  # to not find them
36340  if test "x$new_path" = x \
36341      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36342      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36343    new_path=`$CYGPATH -u "$path"`
36344  fi
36345  if test "x$new_path" = x; then
36346    # Oops. Which didn't find the executable.
36347    # The splitting of arguments from the executable at a space might have been incorrect,
36348    # since paths with space are more likely in Windows. Give it another try with the whole
36349    # argument.
36350    path="$complete"
36351    arguments="EOL"
36352    new_path=`$CYGPATH -u "$path"`
36353    new_path=`$WHICH "$new_path" 2> /dev/null`
36354    # bat and cmd files are not always considered executable in cygwin causing which
36355    # to not find them
36356    if test "x$new_path" = x \
36357        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36358        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36359      new_path=`$CYGPATH -u "$path"`
36360    fi
36361    if test "x$new_path" = x; then
36362      # It's still not found. Now this is an unrecoverable error.
36363      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36364$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36365      has_space=`$ECHO "$complete" | $GREP " "`
36366      if test "x$has_space" != x; then
36367        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36368$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36369      fi
36370      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36371    fi
36372  fi
36373
36374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36377  # "foo.exe" is OK but "foo" is an error.
36378  #
36379  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36380  # It is also a way to make sure we got the proper file name for the real test later on.
36381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36382  if test "x$test_shortpath" = x; then
36383    # Short path failed, file does not exist as specified.
36384    # Try adding .exe or .cmd
36385    if test -f "${new_path}.exe"; then
36386      input_to_shortpath="${new_path}.exe"
36387    elif test -f "${new_path}.cmd"; then
36388      input_to_shortpath="${new_path}.cmd"
36389    else
36390      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36391$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36392      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36393$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36394      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36395    fi
36396  else
36397    input_to_shortpath="$new_path"
36398  fi
36399
36400  # Call helper function which possibly converts this using DOS-style short mode.
36401  # If so, the updated path is stored in $new_path.
36402  new_path="$input_to_shortpath"
36403
36404  input_path="$input_to_shortpath"
36405  # Check if we need to convert this using DOS-style short mode. If the path
36406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36407  # take no chances and rewrite it.
36408  # Note: m4 eats our [], so we need to use [ and ] instead.
36409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36410  if test "x$has_forbidden_chars" != x; then
36411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36412    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36413    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36414    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36415      # Going to short mode and back again did indeed matter. Since short mode is
36416      # case insensitive, let's make it lowercase to improve readability.
36417      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36418      # Now convert it back to Unix-style (cygpath)
36419      input_path=`$CYGPATH -u "$shortmode_path"`
36420      new_path="$input_path"
36421    fi
36422  fi
36423
36424  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36425  if test "x$test_cygdrive_prefix" = x; then
36426    # As a simple fix, exclude /usr/bin since it's not a real path.
36427    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36428      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36429      # a path prefixed by /cygdrive for fixpath to work.
36430      new_path="$CYGWIN_ROOT_PATH$input_path"
36431    fi
36432  fi
36433
36434  # remove trailing .exe if any
36435  new_path="${new_path/%.exe/}"
36436
36437    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36438
36439  # First separate the path from the arguments. This will split at the first
36440  # space.
36441  complete="$LD"
36442  path="${complete%% *}"
36443  tmp="$complete EOL"
36444  arguments="${tmp#* }"
36445
36446  # Input might be given as Windows format, start by converting to
36447  # unix format.
36448  new_path="$path"
36449
36450  windows_path="$new_path"
36451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36452    unix_path=`$CYGPATH -u "$windows_path"`
36453    new_path="$unix_path"
36454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36456    new_path="$unix_path"
36457  fi
36458
36459
36460  # Now try to locate executable using which
36461  new_path=`$WHICH "$new_path" 2> /dev/null`
36462
36463  if test "x$new_path" = x; then
36464    # Oops. Which didn't find the executable.
36465    # The splitting of arguments from the executable at a space might have been incorrect,
36466    # since paths with space are more likely in Windows. Give it another try with the whole
36467    # argument.
36468    path="$complete"
36469    arguments="EOL"
36470    new_path="$path"
36471
36472  windows_path="$new_path"
36473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36474    unix_path=`$CYGPATH -u "$windows_path"`
36475    new_path="$unix_path"
36476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36478    new_path="$unix_path"
36479  fi
36480
36481
36482    new_path=`$WHICH "$new_path" 2> /dev/null`
36483    # bat and cmd files are not always considered executable in MSYS causing which
36484    # to not find them
36485    if test "x$new_path" = x \
36486        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36487        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36488      new_path="$path"
36489
36490  windows_path="$new_path"
36491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36492    unix_path=`$CYGPATH -u "$windows_path"`
36493    new_path="$unix_path"
36494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36496    new_path="$unix_path"
36497  fi
36498
36499    fi
36500
36501    if test "x$new_path" = x; then
36502      # It's still not found. Now this is an unrecoverable error.
36503      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36504$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36505      has_space=`$ECHO "$complete" | $GREP " "`
36506      if test "x$has_space" != x; then
36507        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36508$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36509      fi
36510      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36511    fi
36512  fi
36513
36514  # Now new_path has a complete unix path to the binary
36515  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36516    # Keep paths in /bin as-is, but remove trailing .exe if any
36517    new_path="${new_path/%.exe/}"
36518    # Do not save /bin paths to all_fixpath_prefixes!
36519  else
36520    # Not in mixed or Windows style, start by that.
36521    new_path=`cmd //c echo $new_path`
36522
36523  input_path="$new_path"
36524  # Check if we need to convert this using DOS-style short mode. If the path
36525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36526  # take no chances and rewrite it.
36527  # Note: m4 eats our [], so we need to use [ and ] instead.
36528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36529  if test "x$has_forbidden_chars" != x; then
36530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36531    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36532  fi
36533
36534    # Output is in $new_path
36535
36536  windows_path="$new_path"
36537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36538    unix_path=`$CYGPATH -u "$windows_path"`
36539    new_path="$unix_path"
36540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36542    new_path="$unix_path"
36543  fi
36544
36545    # remove trailing .exe if any
36546    new_path="${new_path/%.exe/}"
36547
36548    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36549    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36550  fi
36551
36552    else
36553      # We're on a unix platform. Hooray! :)
36554      # First separate the path from the arguments. This will split at the first
36555      # space.
36556      complete="$LD"
36557      path="${complete%% *}"
36558      tmp="$complete EOL"
36559      arguments="${tmp#* }"
36560
36561      # Cannot rely on the command "which" here since it doesn't always work.
36562      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36563      if test -z "$is_absolute_path"; then
36564        # Path to executable is not absolute. Find it.
36565        IFS_save="$IFS"
36566        IFS=:
36567        for p in $PATH; do
36568          if test -f "$p/$path" && test -x "$p/$path"; then
36569            new_path="$p/$path"
36570            break
36571          fi
36572        done
36573        IFS="$IFS_save"
36574      else
36575        # This is an absolute path, we can use it without further modifications.
36576        new_path="$path"
36577      fi
36578
36579      if test "x$new_path" = x; then
36580        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36581$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36582        has_space=`$ECHO "$complete" | $GREP " "`
36583        if test "x$has_space" != x; then
36584          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36585$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36586        fi
36587        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36588      fi
36589    fi
36590
36591    # Now join together the path and the arguments once again
36592    if test "x$arguments" != xEOL; then
36593      new_complete="$new_path ${arguments% *}"
36594    else
36595      new_complete="$new_path"
36596    fi
36597
36598    if test "x$complete" != "x$new_complete"; then
36599      LD="$new_complete"
36600      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36601$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36602    fi
36603  fi
36604
36605    # Verify that we indeed succeeded with this trick.
36606    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36607$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36608    "$LD" --version > /dev/null
36609    if test $? -eq 0 ; then
36610      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36611$as_echo "no" >&6; }
36612      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36613    else
36614      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36615$as_echo "yes" >&6; }
36616    fi
36617    LDCXX="$LD"
36618  else
36619    # All other toolchains use the compiler to link.
36620    LD="$CC"
36621    LDCXX="$CXX"
36622  fi
36623
36624  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36625
36626
36627  #
36628  # Setup the assembler (AS)
36629  #
36630  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36631
36632
36633  # Publish this variable in the help.
36634
36635
36636  if [ -z "${AS+x}" ]; then
36637    # The variable is not set by user, try to locate tool using the code snippet
36638    for ac_prog in as
36639do
36640  # Extract the first word of "$ac_prog", so it can be a program name with args.
36641set dummy $ac_prog; ac_word=$2
36642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36643$as_echo_n "checking for $ac_word... " >&6; }
36644if ${ac_cv_path_AS+:} false; then :
36645  $as_echo_n "(cached) " >&6
36646else
36647  case $AS in
36648  [\\/]* | ?:[\\/]*)
36649  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36650  ;;
36651  *)
36652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36653for as_dir in $PATH
36654do
36655  IFS=$as_save_IFS
36656  test -z "$as_dir" && as_dir=.
36657    for ac_exec_ext in '' $ac_executable_extensions; do
36658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36659    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36661    break 2
36662  fi
36663done
36664  done
36665IFS=$as_save_IFS
36666
36667  ;;
36668esac
36669fi
36670AS=$ac_cv_path_AS
36671if test -n "$AS"; then
36672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36673$as_echo "$AS" >&6; }
36674else
36675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36676$as_echo "no" >&6; }
36677fi
36678
36679
36680  test -n "$AS" && break
36681done
36682
36683  else
36684    # The variable is set, but is it from the command line or the environment?
36685
36686    # Try to remove the string !AS! from our list.
36687    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36688    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36689      # If it failed, the variable was not from the command line. Ignore it,
36690      # but warn the user (except for BASH, which is always set by the calling BASH).
36691      if test "xAS" != xBASH; then
36692        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36693$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36694      fi
36695      # Try to locate tool using the code snippet
36696      for ac_prog in as
36697do
36698  # Extract the first word of "$ac_prog", so it can be a program name with args.
36699set dummy $ac_prog; ac_word=$2
36700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36701$as_echo_n "checking for $ac_word... " >&6; }
36702if ${ac_cv_path_AS+:} false; then :
36703  $as_echo_n "(cached) " >&6
36704else
36705  case $AS in
36706  [\\/]* | ?:[\\/]*)
36707  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36708  ;;
36709  *)
36710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36711for as_dir in $PATH
36712do
36713  IFS=$as_save_IFS
36714  test -z "$as_dir" && as_dir=.
36715    for ac_exec_ext in '' $ac_executable_extensions; do
36716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36717    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36719    break 2
36720  fi
36721done
36722  done
36723IFS=$as_save_IFS
36724
36725  ;;
36726esac
36727fi
36728AS=$ac_cv_path_AS
36729if test -n "$AS"; then
36730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36731$as_echo "$AS" >&6; }
36732else
36733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36734$as_echo "no" >&6; }
36735fi
36736
36737
36738  test -n "$AS" && break
36739done
36740
36741    else
36742      # If it succeeded, then it was overridden by the user. We will use it
36743      # for the tool.
36744
36745      # First remove it from the list of overridden variables, so we can test
36746      # for unknown variables in the end.
36747      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36748
36749      # Check if we try to supply an empty value
36750      if test "x$AS" = x; then
36751        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36752$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36753        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36754$as_echo_n "checking for AS... " >&6; }
36755        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36756$as_echo "disabled" >&6; }
36757      else
36758        # Check if the provided tool contains a complete path.
36759        tool_specified="$AS"
36760        tool_basename="${tool_specified##*/}"
36761        if test "x$tool_basename" = "x$tool_specified"; then
36762          # A command without a complete path is provided, search $PATH.
36763          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36764$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36765          # Extract the first word of "$tool_basename", so it can be a program name with args.
36766set dummy $tool_basename; ac_word=$2
36767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36768$as_echo_n "checking for $ac_word... " >&6; }
36769if ${ac_cv_path_AS+:} false; then :
36770  $as_echo_n "(cached) " >&6
36771else
36772  case $AS in
36773  [\\/]* | ?:[\\/]*)
36774  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36775  ;;
36776  *)
36777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36778for as_dir in $PATH
36779do
36780  IFS=$as_save_IFS
36781  test -z "$as_dir" && as_dir=.
36782    for ac_exec_ext in '' $ac_executable_extensions; do
36783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36784    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36786    break 2
36787  fi
36788done
36789  done
36790IFS=$as_save_IFS
36791
36792  ;;
36793esac
36794fi
36795AS=$ac_cv_path_AS
36796if test -n "$AS"; then
36797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36798$as_echo "$AS" >&6; }
36799else
36800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36801$as_echo "no" >&6; }
36802fi
36803
36804
36805          if test "x$AS" = x; then
36806            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36807          fi
36808        else
36809          # Otherwise we believe it is a complete path. Use it as it is.
36810          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36811$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36812          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36813$as_echo_n "checking for AS... " >&6; }
36814          if test ! -x "$tool_specified"; then
36815            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36816$as_echo "not found" >&6; }
36817            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36818          fi
36819          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36820$as_echo "$tool_specified" >&6; }
36821        fi
36822      fi
36823    fi
36824
36825  fi
36826
36827
36828
36829  # Only process if variable expands to non-empty
36830
36831  if test "x$AS" != x; then
36832    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36833
36834  # First separate the path from the arguments. This will split at the first
36835  # space.
36836  complete="$AS"
36837  path="${complete%% *}"
36838  tmp="$complete EOL"
36839  arguments="${tmp#* }"
36840
36841  # Input might be given as Windows format, start by converting to
36842  # unix format.
36843  new_path=`$CYGPATH -u "$path"`
36844
36845  # Now try to locate executable using which
36846  new_path=`$WHICH "$new_path" 2> /dev/null`
36847  # bat and cmd files are not always considered executable in cygwin causing which
36848  # to not find them
36849  if test "x$new_path" = x \
36850      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36851      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36852    new_path=`$CYGPATH -u "$path"`
36853  fi
36854  if test "x$new_path" = x; then
36855    # Oops. Which didn't find the executable.
36856    # The splitting of arguments from the executable at a space might have been incorrect,
36857    # since paths with space are more likely in Windows. Give it another try with the whole
36858    # argument.
36859    path="$complete"
36860    arguments="EOL"
36861    new_path=`$CYGPATH -u "$path"`
36862    new_path=`$WHICH "$new_path" 2> /dev/null`
36863    # bat and cmd files are not always considered executable in cygwin causing which
36864    # to not find them
36865    if test "x$new_path" = x \
36866        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36867        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36868      new_path=`$CYGPATH -u "$path"`
36869    fi
36870    if test "x$new_path" = x; then
36871      # It's still not found. Now this is an unrecoverable error.
36872      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36873$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36874      has_space=`$ECHO "$complete" | $GREP " "`
36875      if test "x$has_space" != x; then
36876        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36877$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36878      fi
36879      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36880    fi
36881  fi
36882
36883  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36884  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36885  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36886  # "foo.exe" is OK but "foo" is an error.
36887  #
36888  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36889  # It is also a way to make sure we got the proper file name for the real test later on.
36890  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36891  if test "x$test_shortpath" = x; then
36892    # Short path failed, file does not exist as specified.
36893    # Try adding .exe or .cmd
36894    if test -f "${new_path}.exe"; then
36895      input_to_shortpath="${new_path}.exe"
36896    elif test -f "${new_path}.cmd"; then
36897      input_to_shortpath="${new_path}.cmd"
36898    else
36899      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36900$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36901      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36902$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36903      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36904    fi
36905  else
36906    input_to_shortpath="$new_path"
36907  fi
36908
36909  # Call helper function which possibly converts this using DOS-style short mode.
36910  # If so, the updated path is stored in $new_path.
36911  new_path="$input_to_shortpath"
36912
36913  input_path="$input_to_shortpath"
36914  # Check if we need to convert this using DOS-style short mode. If the path
36915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36916  # take no chances and rewrite it.
36917  # Note: m4 eats our [], so we need to use [ and ] instead.
36918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36919  if test "x$has_forbidden_chars" != x; then
36920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36921    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36922    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36923    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36924      # Going to short mode and back again did indeed matter. Since short mode is
36925      # case insensitive, let's make it lowercase to improve readability.
36926      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36927      # Now convert it back to Unix-style (cygpath)
36928      input_path=`$CYGPATH -u "$shortmode_path"`
36929      new_path="$input_path"
36930    fi
36931  fi
36932
36933  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36934  if test "x$test_cygdrive_prefix" = x; then
36935    # As a simple fix, exclude /usr/bin since it's not a real path.
36936    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36937      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36938      # a path prefixed by /cygdrive for fixpath to work.
36939      new_path="$CYGWIN_ROOT_PATH$input_path"
36940    fi
36941  fi
36942
36943  # remove trailing .exe if any
36944  new_path="${new_path/%.exe/}"
36945
36946    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36947
36948  # First separate the path from the arguments. This will split at the first
36949  # space.
36950  complete="$AS"
36951  path="${complete%% *}"
36952  tmp="$complete EOL"
36953  arguments="${tmp#* }"
36954
36955  # Input might be given as Windows format, start by converting to
36956  # unix format.
36957  new_path="$path"
36958
36959  windows_path="$new_path"
36960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36961    unix_path=`$CYGPATH -u "$windows_path"`
36962    new_path="$unix_path"
36963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36965    new_path="$unix_path"
36966  fi
36967
36968
36969  # Now try to locate executable using which
36970  new_path=`$WHICH "$new_path" 2> /dev/null`
36971
36972  if test "x$new_path" = x; then
36973    # Oops. Which didn't find the executable.
36974    # The splitting of arguments from the executable at a space might have been incorrect,
36975    # since paths with space are more likely in Windows. Give it another try with the whole
36976    # argument.
36977    path="$complete"
36978    arguments="EOL"
36979    new_path="$path"
36980
36981  windows_path="$new_path"
36982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36983    unix_path=`$CYGPATH -u "$windows_path"`
36984    new_path="$unix_path"
36985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36987    new_path="$unix_path"
36988  fi
36989
36990
36991    new_path=`$WHICH "$new_path" 2> /dev/null`
36992    # bat and cmd files are not always considered executable in MSYS causing which
36993    # to not find them
36994    if test "x$new_path" = x \
36995        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36996        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36997      new_path="$path"
36998
36999  windows_path="$new_path"
37000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37001    unix_path=`$CYGPATH -u "$windows_path"`
37002    new_path="$unix_path"
37003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37005    new_path="$unix_path"
37006  fi
37007
37008    fi
37009
37010    if test "x$new_path" = x; then
37011      # It's still not found. Now this is an unrecoverable error.
37012      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37013$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37014      has_space=`$ECHO "$complete" | $GREP " "`
37015      if test "x$has_space" != x; then
37016        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37017$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37018      fi
37019      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37020    fi
37021  fi
37022
37023  # Now new_path has a complete unix path to the binary
37024  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37025    # Keep paths in /bin as-is, but remove trailing .exe if any
37026    new_path="${new_path/%.exe/}"
37027    # Do not save /bin paths to all_fixpath_prefixes!
37028  else
37029    # Not in mixed or Windows style, start by that.
37030    new_path=`cmd //c echo $new_path`
37031
37032  input_path="$new_path"
37033  # Check if we need to convert this using DOS-style short mode. If the path
37034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37035  # take no chances and rewrite it.
37036  # Note: m4 eats our [], so we need to use [ and ] instead.
37037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37038  if test "x$has_forbidden_chars" != x; then
37039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37040    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37041  fi
37042
37043    # Output is in $new_path
37044
37045  windows_path="$new_path"
37046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37047    unix_path=`$CYGPATH -u "$windows_path"`
37048    new_path="$unix_path"
37049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37051    new_path="$unix_path"
37052  fi
37053
37054    # remove trailing .exe if any
37055    new_path="${new_path/%.exe/}"
37056
37057    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37058    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37059  fi
37060
37061    else
37062      # We're on a unix platform. Hooray! :)
37063      # First separate the path from the arguments. This will split at the first
37064      # space.
37065      complete="$AS"
37066      path="${complete%% *}"
37067      tmp="$complete EOL"
37068      arguments="${tmp#* }"
37069
37070      # Cannot rely on the command "which" here since it doesn't always work.
37071      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37072      if test -z "$is_absolute_path"; then
37073        # Path to executable is not absolute. Find it.
37074        IFS_save="$IFS"
37075        IFS=:
37076        for p in $PATH; do
37077          if test -f "$p/$path" && test -x "$p/$path"; then
37078            new_path="$p/$path"
37079            break
37080          fi
37081        done
37082        IFS="$IFS_save"
37083      else
37084        # This is an absolute path, we can use it without further modifications.
37085        new_path="$path"
37086      fi
37087
37088      if test "x$new_path" = x; then
37089        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37090$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37091        has_space=`$ECHO "$complete" | $GREP " "`
37092        if test "x$has_space" != x; then
37093          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37094$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37095        fi
37096        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37097      fi
37098    fi
37099
37100    # Now join together the path and the arguments once again
37101    if test "x$arguments" != xEOL; then
37102      new_complete="$new_path ${arguments% *}"
37103    else
37104      new_complete="$new_path"
37105    fi
37106
37107    if test "x$complete" != "x$new_complete"; then
37108      AS="$new_complete"
37109      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37110$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37111    fi
37112  fi
37113
37114    if test "x$AS" = x; then
37115      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37116    fi
37117  else
37118    # FIXME: is this correct for microsoft?
37119    AS="$CC -c"
37120  fi
37121
37122
37123  #
37124  # Setup the archiver (AR)
37125  #
37126  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37127    # The corresponding ar tool is lib.exe (used to create static libraries)
37128    # Extract the first word of "lib", so it can be a program name with args.
37129set dummy lib; ac_word=$2
37130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37131$as_echo_n "checking for $ac_word... " >&6; }
37132if ${ac_cv_prog_AR+:} false; then :
37133  $as_echo_n "(cached) " >&6
37134else
37135  if test -n "$AR"; then
37136  ac_cv_prog_AR="$AR" # Let the user override the test.
37137else
37138as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37139for as_dir in $PATH
37140do
37141  IFS=$as_save_IFS
37142  test -z "$as_dir" && as_dir=.
37143    for ac_exec_ext in '' $ac_executable_extensions; do
37144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37145    ac_cv_prog_AR="lib"
37146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37147    break 2
37148  fi
37149done
37150  done
37151IFS=$as_save_IFS
37152
37153fi
37154fi
37155AR=$ac_cv_prog_AR
37156if test -n "$AR"; then
37157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37158$as_echo "$AR" >&6; }
37159else
37160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37161$as_echo "no" >&6; }
37162fi
37163
37164
37165  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37166
37167
37168  # Publish this variable in the help.
37169
37170
37171  if [ -z "${AR+x}" ]; then
37172    # The variable is not set by user, try to locate tool using the code snippet
37173    if test -n "$ac_tool_prefix"; then
37174  for ac_prog in ar gcc-ar
37175  do
37176    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37177set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37179$as_echo_n "checking for $ac_word... " >&6; }
37180if ${ac_cv_prog_AR+:} false; then :
37181  $as_echo_n "(cached) " >&6
37182else
37183  if test -n "$AR"; then
37184  ac_cv_prog_AR="$AR" # Let the user override the test.
37185else
37186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37187for as_dir in $PATH
37188do
37189  IFS=$as_save_IFS
37190  test -z "$as_dir" && as_dir=.
37191    for ac_exec_ext in '' $ac_executable_extensions; do
37192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37193    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37195    break 2
37196  fi
37197done
37198  done
37199IFS=$as_save_IFS
37200
37201fi
37202fi
37203AR=$ac_cv_prog_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    test -n "$AR" && break
37214  done
37215fi
37216if test -z "$AR"; then
37217  ac_ct_AR=$AR
37218  for ac_prog in ar gcc-ar
37219do
37220  # Extract the first word of "$ac_prog", so it can be a program name with args.
37221set dummy $ac_prog; ac_word=$2
37222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37223$as_echo_n "checking for $ac_word... " >&6; }
37224if ${ac_cv_prog_ac_ct_AR+:} false; then :
37225  $as_echo_n "(cached) " >&6
37226else
37227  if test -n "$ac_ct_AR"; then
37228  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37229else
37230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37231for as_dir in $PATH
37232do
37233  IFS=$as_save_IFS
37234  test -z "$as_dir" && as_dir=.
37235    for ac_exec_ext in '' $ac_executable_extensions; do
37236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37237    ac_cv_prog_ac_ct_AR="$ac_prog"
37238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37239    break 2
37240  fi
37241done
37242  done
37243IFS=$as_save_IFS
37244
37245fi
37246fi
37247ac_ct_AR=$ac_cv_prog_ac_ct_AR
37248if test -n "$ac_ct_AR"; then
37249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37250$as_echo "$ac_ct_AR" >&6; }
37251else
37252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37253$as_echo "no" >&6; }
37254fi
37255
37256
37257  test -n "$ac_ct_AR" && break
37258done
37259
37260  if test "x$ac_ct_AR" = x; then
37261    AR=""
37262  else
37263    case $cross_compiling:$ac_tool_warned in
37264yes:)
37265{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37266$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37267ac_tool_warned=yes ;;
37268esac
37269    AR=$ac_ct_AR
37270  fi
37271fi
37272
37273  else
37274    # The variable is set, but is it from the command line or the environment?
37275
37276    # Try to remove the string !AR! from our list.
37277    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37278    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37279      # If it failed, the variable was not from the command line. Ignore it,
37280      # but warn the user (except for BASH, which is always set by the calling BASH).
37281      if test "xAR" != xBASH; then
37282        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37283$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37284      fi
37285      # Try to locate tool using the code snippet
37286      if test -n "$ac_tool_prefix"; then
37287  for ac_prog in ar gcc-ar
37288  do
37289    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37290set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37292$as_echo_n "checking for $ac_word... " >&6; }
37293if ${ac_cv_prog_AR+:} false; then :
37294  $as_echo_n "(cached) " >&6
37295else
37296  if test -n "$AR"; then
37297  ac_cv_prog_AR="$AR" # Let the user override the test.
37298else
37299as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37300for as_dir in $PATH
37301do
37302  IFS=$as_save_IFS
37303  test -z "$as_dir" && as_dir=.
37304    for ac_exec_ext in '' $ac_executable_extensions; do
37305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37306    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37308    break 2
37309  fi
37310done
37311  done
37312IFS=$as_save_IFS
37313
37314fi
37315fi
37316AR=$ac_cv_prog_AR
37317if test -n "$AR"; then
37318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37319$as_echo "$AR" >&6; }
37320else
37321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37322$as_echo "no" >&6; }
37323fi
37324
37325
37326    test -n "$AR" && break
37327  done
37328fi
37329if test -z "$AR"; then
37330  ac_ct_AR=$AR
37331  for ac_prog in ar gcc-ar
37332do
37333  # Extract the first word of "$ac_prog", so it can be a program name with args.
37334set dummy $ac_prog; ac_word=$2
37335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37336$as_echo_n "checking for $ac_word... " >&6; }
37337if ${ac_cv_prog_ac_ct_AR+:} false; then :
37338  $as_echo_n "(cached) " >&6
37339else
37340  if test -n "$ac_ct_AR"; then
37341  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37342else
37343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37344for as_dir in $PATH
37345do
37346  IFS=$as_save_IFS
37347  test -z "$as_dir" && as_dir=.
37348    for ac_exec_ext in '' $ac_executable_extensions; do
37349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37350    ac_cv_prog_ac_ct_AR="$ac_prog"
37351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37352    break 2
37353  fi
37354done
37355  done
37356IFS=$as_save_IFS
37357
37358fi
37359fi
37360ac_ct_AR=$ac_cv_prog_ac_ct_AR
37361if test -n "$ac_ct_AR"; then
37362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37363$as_echo "$ac_ct_AR" >&6; }
37364else
37365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37366$as_echo "no" >&6; }
37367fi
37368
37369
37370  test -n "$ac_ct_AR" && break
37371done
37372
37373  if test "x$ac_ct_AR" = x; then
37374    AR=""
37375  else
37376    case $cross_compiling:$ac_tool_warned in
37377yes:)
37378{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37379$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37380ac_tool_warned=yes ;;
37381esac
37382    AR=$ac_ct_AR
37383  fi
37384fi
37385
37386    else
37387      # If it succeeded, then it was overridden by the user. We will use it
37388      # for the tool.
37389
37390      # First remove it from the list of overridden variables, so we can test
37391      # for unknown variables in the end.
37392      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37393
37394      # Check if we try to supply an empty value
37395      if test "x$AR" = x; then
37396        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37397$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37398        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37399$as_echo_n "checking for AR... " >&6; }
37400        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37401$as_echo "disabled" >&6; }
37402      else
37403        # Check if the provided tool contains a complete path.
37404        tool_specified="$AR"
37405        tool_basename="${tool_specified##*/}"
37406        if test "x$tool_basename" = "x$tool_specified"; then
37407          # A command without a complete path is provided, search $PATH.
37408          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37409$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37410          # Extract the first word of "$tool_basename", so it can be a program name with args.
37411set dummy $tool_basename; ac_word=$2
37412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37413$as_echo_n "checking for $ac_word... " >&6; }
37414if ${ac_cv_path_AR+:} false; then :
37415  $as_echo_n "(cached) " >&6
37416else
37417  case $AR in
37418  [\\/]* | ?:[\\/]*)
37419  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37420  ;;
37421  *)
37422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37423for as_dir in $PATH
37424do
37425  IFS=$as_save_IFS
37426  test -z "$as_dir" && as_dir=.
37427    for ac_exec_ext in '' $ac_executable_extensions; do
37428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37429    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37431    break 2
37432  fi
37433done
37434  done
37435IFS=$as_save_IFS
37436
37437  ;;
37438esac
37439fi
37440AR=$ac_cv_path_AR
37441if test -n "$AR"; then
37442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37443$as_echo "$AR" >&6; }
37444else
37445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37446$as_echo "no" >&6; }
37447fi
37448
37449
37450          if test "x$AR" = x; then
37451            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37452          fi
37453        else
37454          # Otherwise we believe it is a complete path. Use it as it is.
37455          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37456$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37457          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37458$as_echo_n "checking for AR... " >&6; }
37459          if test ! -x "$tool_specified"; then
37460            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37461$as_echo "not found" >&6; }
37462            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37463          fi
37464          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37465$as_echo "$tool_specified" >&6; }
37466        fi
37467      fi
37468    fi
37469
37470  fi
37471
37472
37473  else
37474
37475
37476  # Publish this variable in the help.
37477
37478
37479  if [ -z "${AR+x}" ]; then
37480    # The variable is not set by user, try to locate tool using the code snippet
37481    if test -n "$ac_tool_prefix"; then
37482  for ac_prog in ar
37483  do
37484    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37485set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37487$as_echo_n "checking for $ac_word... " >&6; }
37488if ${ac_cv_prog_AR+:} false; then :
37489  $as_echo_n "(cached) " >&6
37490else
37491  if test -n "$AR"; then
37492  ac_cv_prog_AR="$AR" # Let the user override the test.
37493else
37494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37495for as_dir in $PATH
37496do
37497  IFS=$as_save_IFS
37498  test -z "$as_dir" && as_dir=.
37499    for ac_exec_ext in '' $ac_executable_extensions; do
37500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37501    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37503    break 2
37504  fi
37505done
37506  done
37507IFS=$as_save_IFS
37508
37509fi
37510fi
37511AR=$ac_cv_prog_AR
37512if test -n "$AR"; then
37513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37514$as_echo "$AR" >&6; }
37515else
37516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37517$as_echo "no" >&6; }
37518fi
37519
37520
37521    test -n "$AR" && break
37522  done
37523fi
37524if test -z "$AR"; then
37525  ac_ct_AR=$AR
37526  for ac_prog in ar
37527do
37528  # Extract the first word of "$ac_prog", so it can be a program name with args.
37529set dummy $ac_prog; ac_word=$2
37530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37531$as_echo_n "checking for $ac_word... " >&6; }
37532if ${ac_cv_prog_ac_ct_AR+:} false; then :
37533  $as_echo_n "(cached) " >&6
37534else
37535  if test -n "$ac_ct_AR"; then
37536  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37537else
37538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37539for as_dir in $PATH
37540do
37541  IFS=$as_save_IFS
37542  test -z "$as_dir" && as_dir=.
37543    for ac_exec_ext in '' $ac_executable_extensions; do
37544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37545    ac_cv_prog_ac_ct_AR="$ac_prog"
37546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37547    break 2
37548  fi
37549done
37550  done
37551IFS=$as_save_IFS
37552
37553fi
37554fi
37555ac_ct_AR=$ac_cv_prog_ac_ct_AR
37556if test -n "$ac_ct_AR"; then
37557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37558$as_echo "$ac_ct_AR" >&6; }
37559else
37560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37561$as_echo "no" >&6; }
37562fi
37563
37564
37565  test -n "$ac_ct_AR" && break
37566done
37567
37568  if test "x$ac_ct_AR" = x; then
37569    AR=""
37570  else
37571    case $cross_compiling:$ac_tool_warned in
37572yes:)
37573{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37574$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37575ac_tool_warned=yes ;;
37576esac
37577    AR=$ac_ct_AR
37578  fi
37579fi
37580
37581  else
37582    # The variable is set, but is it from the command line or the environment?
37583
37584    # Try to remove the string !AR! from our list.
37585    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37586    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37587      # If it failed, the variable was not from the command line. Ignore it,
37588      # but warn the user (except for BASH, which is always set by the calling BASH).
37589      if test "xAR" != xBASH; then
37590        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37591$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37592      fi
37593      # Try to locate tool using the code snippet
37594      if test -n "$ac_tool_prefix"; then
37595  for ac_prog in ar
37596  do
37597    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37598set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37600$as_echo_n "checking for $ac_word... " >&6; }
37601if ${ac_cv_prog_AR+:} false; then :
37602  $as_echo_n "(cached) " >&6
37603else
37604  if test -n "$AR"; then
37605  ac_cv_prog_AR="$AR" # Let the user override the test.
37606else
37607as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37608for as_dir in $PATH
37609do
37610  IFS=$as_save_IFS
37611  test -z "$as_dir" && as_dir=.
37612    for ac_exec_ext in '' $ac_executable_extensions; do
37613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37614    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37616    break 2
37617  fi
37618done
37619  done
37620IFS=$as_save_IFS
37621
37622fi
37623fi
37624AR=$ac_cv_prog_AR
37625if test -n "$AR"; then
37626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37627$as_echo "$AR" >&6; }
37628else
37629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37630$as_echo "no" >&6; }
37631fi
37632
37633
37634    test -n "$AR" && break
37635  done
37636fi
37637if test -z "$AR"; then
37638  ac_ct_AR=$AR
37639  for ac_prog in ar
37640do
37641  # Extract the first word of "$ac_prog", so it can be a program name with args.
37642set dummy $ac_prog; ac_word=$2
37643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37644$as_echo_n "checking for $ac_word... " >&6; }
37645if ${ac_cv_prog_ac_ct_AR+:} false; then :
37646  $as_echo_n "(cached) " >&6
37647else
37648  if test -n "$ac_ct_AR"; then
37649  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37650else
37651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37652for as_dir in $PATH
37653do
37654  IFS=$as_save_IFS
37655  test -z "$as_dir" && as_dir=.
37656    for ac_exec_ext in '' $ac_executable_extensions; do
37657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37658    ac_cv_prog_ac_ct_AR="$ac_prog"
37659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37660    break 2
37661  fi
37662done
37663  done
37664IFS=$as_save_IFS
37665
37666fi
37667fi
37668ac_ct_AR=$ac_cv_prog_ac_ct_AR
37669if test -n "$ac_ct_AR"; then
37670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37671$as_echo "$ac_ct_AR" >&6; }
37672else
37673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37674$as_echo "no" >&6; }
37675fi
37676
37677
37678  test -n "$ac_ct_AR" && break
37679done
37680
37681  if test "x$ac_ct_AR" = x; then
37682    AR=""
37683  else
37684    case $cross_compiling:$ac_tool_warned in
37685yes:)
37686{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37687$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37688ac_tool_warned=yes ;;
37689esac
37690    AR=$ac_ct_AR
37691  fi
37692fi
37693
37694    else
37695      # If it succeeded, then it was overridden by the user. We will use it
37696      # for the tool.
37697
37698      # First remove it from the list of overridden variables, so we can test
37699      # for unknown variables in the end.
37700      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37701
37702      # Check if we try to supply an empty value
37703      if test "x$AR" = x; then
37704        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37705$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37706        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37707$as_echo_n "checking for AR... " >&6; }
37708        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37709$as_echo "disabled" >&6; }
37710      else
37711        # Check if the provided tool contains a complete path.
37712        tool_specified="$AR"
37713        tool_basename="${tool_specified##*/}"
37714        if test "x$tool_basename" = "x$tool_specified"; then
37715          # A command without a complete path is provided, search $PATH.
37716          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37717$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37718          # Extract the first word of "$tool_basename", so it can be a program name with args.
37719set dummy $tool_basename; ac_word=$2
37720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37721$as_echo_n "checking for $ac_word... " >&6; }
37722if ${ac_cv_path_AR+:} false; then :
37723  $as_echo_n "(cached) " >&6
37724else
37725  case $AR in
37726  [\\/]* | ?:[\\/]*)
37727  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37728  ;;
37729  *)
37730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37731for as_dir in $PATH
37732do
37733  IFS=$as_save_IFS
37734  test -z "$as_dir" && as_dir=.
37735    for ac_exec_ext in '' $ac_executable_extensions; do
37736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37737    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37739    break 2
37740  fi
37741done
37742  done
37743IFS=$as_save_IFS
37744
37745  ;;
37746esac
37747fi
37748AR=$ac_cv_path_AR
37749if test -n "$AR"; then
37750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37751$as_echo "$AR" >&6; }
37752else
37753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37754$as_echo "no" >&6; }
37755fi
37756
37757
37758          if test "x$AR" = x; then
37759            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37760          fi
37761        else
37762          # Otherwise we believe it is a complete path. Use it as it is.
37763          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37764$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37765          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37766$as_echo_n "checking for AR... " >&6; }
37767          if test ! -x "$tool_specified"; then
37768            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37769$as_echo "not found" >&6; }
37770            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37771          fi
37772          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37773$as_echo "$tool_specified" >&6; }
37774        fi
37775      fi
37776    fi
37777
37778  fi
37779
37780
37781  fi
37782
37783  # Only process if variable expands to non-empty
37784
37785  if test "x$AR" != x; then
37786    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37787
37788  # First separate the path from the arguments. This will split at the first
37789  # space.
37790  complete="$AR"
37791  path="${complete%% *}"
37792  tmp="$complete EOL"
37793  arguments="${tmp#* }"
37794
37795  # Input might be given as Windows format, start by converting to
37796  # unix format.
37797  new_path=`$CYGPATH -u "$path"`
37798
37799  # Now try to locate executable using which
37800  new_path=`$WHICH "$new_path" 2> /dev/null`
37801  # bat and cmd files are not always considered executable in cygwin causing which
37802  # to not find them
37803  if test "x$new_path" = x \
37804      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37805      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37806    new_path=`$CYGPATH -u "$path"`
37807  fi
37808  if test "x$new_path" = x; then
37809    # Oops. Which didn't find the executable.
37810    # The splitting of arguments from the executable at a space might have been incorrect,
37811    # since paths with space are more likely in Windows. Give it another try with the whole
37812    # argument.
37813    path="$complete"
37814    arguments="EOL"
37815    new_path=`$CYGPATH -u "$path"`
37816    new_path=`$WHICH "$new_path" 2> /dev/null`
37817    # bat and cmd files are not always considered executable in cygwin causing which
37818    # to not find them
37819    if test "x$new_path" = x \
37820        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37821        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37822      new_path=`$CYGPATH -u "$path"`
37823    fi
37824    if test "x$new_path" = x; then
37825      # It's still not found. Now this is an unrecoverable error.
37826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37827$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37828      has_space=`$ECHO "$complete" | $GREP " "`
37829      if test "x$has_space" != x; then
37830        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37831$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37832      fi
37833      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37834    fi
37835  fi
37836
37837  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37838  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37839  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37840  # "foo.exe" is OK but "foo" is an error.
37841  #
37842  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37843  # It is also a way to make sure we got the proper file name for the real test later on.
37844  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37845  if test "x$test_shortpath" = x; then
37846    # Short path failed, file does not exist as specified.
37847    # Try adding .exe or .cmd
37848    if test -f "${new_path}.exe"; then
37849      input_to_shortpath="${new_path}.exe"
37850    elif test -f "${new_path}.cmd"; then
37851      input_to_shortpath="${new_path}.cmd"
37852    else
37853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37854$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37855      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37856$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37857      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37858    fi
37859  else
37860    input_to_shortpath="$new_path"
37861  fi
37862
37863  # Call helper function which possibly converts this using DOS-style short mode.
37864  # If so, the updated path is stored in $new_path.
37865  new_path="$input_to_shortpath"
37866
37867  input_path="$input_to_shortpath"
37868  # Check if we need to convert this using DOS-style short mode. If the path
37869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37870  # take no chances and rewrite it.
37871  # Note: m4 eats our [], so we need to use [ and ] instead.
37872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37873  if test "x$has_forbidden_chars" != x; then
37874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37875    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37876    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37877    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37878      # Going to short mode and back again did indeed matter. Since short mode is
37879      # case insensitive, let's make it lowercase to improve readability.
37880      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37881      # Now convert it back to Unix-style (cygpath)
37882      input_path=`$CYGPATH -u "$shortmode_path"`
37883      new_path="$input_path"
37884    fi
37885  fi
37886
37887  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37888  if test "x$test_cygdrive_prefix" = x; then
37889    # As a simple fix, exclude /usr/bin since it's not a real path.
37890    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37891      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37892      # a path prefixed by /cygdrive for fixpath to work.
37893      new_path="$CYGWIN_ROOT_PATH$input_path"
37894    fi
37895  fi
37896
37897  # remove trailing .exe if any
37898  new_path="${new_path/%.exe/}"
37899
37900    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37901
37902  # First separate the path from the arguments. This will split at the first
37903  # space.
37904  complete="$AR"
37905  path="${complete%% *}"
37906  tmp="$complete EOL"
37907  arguments="${tmp#* }"
37908
37909  # Input might be given as Windows format, start by converting to
37910  # unix format.
37911  new_path="$path"
37912
37913  windows_path="$new_path"
37914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37915    unix_path=`$CYGPATH -u "$windows_path"`
37916    new_path="$unix_path"
37917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37919    new_path="$unix_path"
37920  fi
37921
37922
37923  # Now try to locate executable using which
37924  new_path=`$WHICH "$new_path" 2> /dev/null`
37925
37926  if test "x$new_path" = x; then
37927    # Oops. Which didn't find the executable.
37928    # The splitting of arguments from the executable at a space might have been incorrect,
37929    # since paths with space are more likely in Windows. Give it another try with the whole
37930    # argument.
37931    path="$complete"
37932    arguments="EOL"
37933    new_path="$path"
37934
37935  windows_path="$new_path"
37936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37937    unix_path=`$CYGPATH -u "$windows_path"`
37938    new_path="$unix_path"
37939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37941    new_path="$unix_path"
37942  fi
37943
37944
37945    new_path=`$WHICH "$new_path" 2> /dev/null`
37946    # bat and cmd files are not always considered executable in MSYS causing which
37947    # to not find them
37948    if test "x$new_path" = x \
37949        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37950        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37951      new_path="$path"
37952
37953  windows_path="$new_path"
37954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37955    unix_path=`$CYGPATH -u "$windows_path"`
37956    new_path="$unix_path"
37957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37959    new_path="$unix_path"
37960  fi
37961
37962    fi
37963
37964    if test "x$new_path" = x; then
37965      # It's still not found. Now this is an unrecoverable error.
37966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37967$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37968      has_space=`$ECHO "$complete" | $GREP " "`
37969      if test "x$has_space" != x; then
37970        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37971$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37972      fi
37973      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37974    fi
37975  fi
37976
37977  # Now new_path has a complete unix path to the binary
37978  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37979    # Keep paths in /bin as-is, but remove trailing .exe if any
37980    new_path="${new_path/%.exe/}"
37981    # Do not save /bin paths to all_fixpath_prefixes!
37982  else
37983    # Not in mixed or Windows style, start by that.
37984    new_path=`cmd //c echo $new_path`
37985
37986  input_path="$new_path"
37987  # Check if we need to convert this using DOS-style short mode. If the path
37988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37989  # take no chances and rewrite it.
37990  # Note: m4 eats our [], so we need to use [ and ] instead.
37991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37992  if test "x$has_forbidden_chars" != x; then
37993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37995  fi
37996
37997    # Output is in $new_path
37998
37999  windows_path="$new_path"
38000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38001    unix_path=`$CYGPATH -u "$windows_path"`
38002    new_path="$unix_path"
38003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38005    new_path="$unix_path"
38006  fi
38007
38008    # remove trailing .exe if any
38009    new_path="${new_path/%.exe/}"
38010
38011    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38012    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38013  fi
38014
38015    else
38016      # We're on a unix platform. Hooray! :)
38017      # First separate the path from the arguments. This will split at the first
38018      # space.
38019      complete="$AR"
38020      path="${complete%% *}"
38021      tmp="$complete EOL"
38022      arguments="${tmp#* }"
38023
38024      # Cannot rely on the command "which" here since it doesn't always work.
38025      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38026      if test -z "$is_absolute_path"; then
38027        # Path to executable is not absolute. Find it.
38028        IFS_save="$IFS"
38029        IFS=:
38030        for p in $PATH; do
38031          if test -f "$p/$path" && test -x "$p/$path"; then
38032            new_path="$p/$path"
38033            break
38034          fi
38035        done
38036        IFS="$IFS_save"
38037      else
38038        # This is an absolute path, we can use it without further modifications.
38039        new_path="$path"
38040      fi
38041
38042      if test "x$new_path" = x; then
38043        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38044$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38045        has_space=`$ECHO "$complete" | $GREP " "`
38046        if test "x$has_space" != x; then
38047          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38048$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38049        fi
38050        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38051      fi
38052    fi
38053
38054    # Now join together the path and the arguments once again
38055    if test "x$arguments" != xEOL; then
38056      new_complete="$new_path ${arguments% *}"
38057    else
38058      new_complete="$new_path"
38059    fi
38060
38061    if test "x$complete" != "x$new_complete"; then
38062      AR="$new_complete"
38063      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38064$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38065    fi
38066  fi
38067
38068
38069
38070  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38071
38072
38073  # Publish this variable in the help.
38074
38075
38076  if [ -z "${LIPO+x}" ]; then
38077    # The variable is not set by user, try to locate tool using the code snippet
38078    for ac_prog in lipo
38079do
38080  # Extract the first word of "$ac_prog", so it can be a program name with args.
38081set dummy $ac_prog; ac_word=$2
38082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38083$as_echo_n "checking for $ac_word... " >&6; }
38084if ${ac_cv_path_LIPO+:} false; then :
38085  $as_echo_n "(cached) " >&6
38086else
38087  case $LIPO in
38088  [\\/]* | ?:[\\/]*)
38089  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38090  ;;
38091  *)
38092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38093for as_dir in $PATH
38094do
38095  IFS=$as_save_IFS
38096  test -z "$as_dir" && as_dir=.
38097    for ac_exec_ext in '' $ac_executable_extensions; do
38098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38099    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38101    break 2
38102  fi
38103done
38104  done
38105IFS=$as_save_IFS
38106
38107  ;;
38108esac
38109fi
38110LIPO=$ac_cv_path_LIPO
38111if test -n "$LIPO"; then
38112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38113$as_echo "$LIPO" >&6; }
38114else
38115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38116$as_echo "no" >&6; }
38117fi
38118
38119
38120  test -n "$LIPO" && break
38121done
38122
38123  else
38124    # The variable is set, but is it from the command line or the environment?
38125
38126    # Try to remove the string !LIPO! from our list.
38127    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38128    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38129      # If it failed, the variable was not from the command line. Ignore it,
38130      # but warn the user (except for BASH, which is always set by the calling BASH).
38131      if test "xLIPO" != xBASH; then
38132        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38133$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38134      fi
38135      # Try to locate tool using the code snippet
38136      for ac_prog in lipo
38137do
38138  # Extract the first word of "$ac_prog", so it can be a program name with args.
38139set dummy $ac_prog; ac_word=$2
38140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38141$as_echo_n "checking for $ac_word... " >&6; }
38142if ${ac_cv_path_LIPO+:} false; then :
38143  $as_echo_n "(cached) " >&6
38144else
38145  case $LIPO in
38146  [\\/]* | ?:[\\/]*)
38147  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38148  ;;
38149  *)
38150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38151for as_dir in $PATH
38152do
38153  IFS=$as_save_IFS
38154  test -z "$as_dir" && as_dir=.
38155    for ac_exec_ext in '' $ac_executable_extensions; do
38156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38157    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38159    break 2
38160  fi
38161done
38162  done
38163IFS=$as_save_IFS
38164
38165  ;;
38166esac
38167fi
38168LIPO=$ac_cv_path_LIPO
38169if test -n "$LIPO"; then
38170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38171$as_echo "$LIPO" >&6; }
38172else
38173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38174$as_echo "no" >&6; }
38175fi
38176
38177
38178  test -n "$LIPO" && break
38179done
38180
38181    else
38182      # If it succeeded, then it was overridden by the user. We will use it
38183      # for the tool.
38184
38185      # First remove it from the list of overridden variables, so we can test
38186      # for unknown variables in the end.
38187      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38188
38189      # Check if we try to supply an empty value
38190      if test "x$LIPO" = x; then
38191        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38192$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38193        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38194$as_echo_n "checking for LIPO... " >&6; }
38195        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38196$as_echo "disabled" >&6; }
38197      else
38198        # Check if the provided tool contains a complete path.
38199        tool_specified="$LIPO"
38200        tool_basename="${tool_specified##*/}"
38201        if test "x$tool_basename" = "x$tool_specified"; then
38202          # A command without a complete path is provided, search $PATH.
38203          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38204$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38205          # Extract the first word of "$tool_basename", so it can be a program name with args.
38206set dummy $tool_basename; ac_word=$2
38207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38208$as_echo_n "checking for $ac_word... " >&6; }
38209if ${ac_cv_path_LIPO+:} false; then :
38210  $as_echo_n "(cached) " >&6
38211else
38212  case $LIPO in
38213  [\\/]* | ?:[\\/]*)
38214  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38215  ;;
38216  *)
38217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38218for as_dir in $PATH
38219do
38220  IFS=$as_save_IFS
38221  test -z "$as_dir" && as_dir=.
38222    for ac_exec_ext in '' $ac_executable_extensions; do
38223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38224    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38226    break 2
38227  fi
38228done
38229  done
38230IFS=$as_save_IFS
38231
38232  ;;
38233esac
38234fi
38235LIPO=$ac_cv_path_LIPO
38236if test -n "$LIPO"; then
38237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38238$as_echo "$LIPO" >&6; }
38239else
38240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38241$as_echo "no" >&6; }
38242fi
38243
38244
38245          if test "x$LIPO" = x; then
38246            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38247          fi
38248        else
38249          # Otherwise we believe it is a complete path. Use it as it is.
38250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38251$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38252          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38253$as_echo_n "checking for LIPO... " >&6; }
38254          if test ! -x "$tool_specified"; then
38255            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38256$as_echo "not found" >&6; }
38257            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38258          fi
38259          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38260$as_echo "$tool_specified" >&6; }
38261        fi
38262      fi
38263    fi
38264
38265  fi
38266
38267
38268
38269  # Only process if variable expands to non-empty
38270
38271  if test "x$LIPO" != x; then
38272    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38273
38274  # First separate the path from the arguments. This will split at the first
38275  # space.
38276  complete="$LIPO"
38277  path="${complete%% *}"
38278  tmp="$complete EOL"
38279  arguments="${tmp#* }"
38280
38281  # Input might be given as Windows format, start by converting to
38282  # unix format.
38283  new_path=`$CYGPATH -u "$path"`
38284
38285  # Now try to locate executable using which
38286  new_path=`$WHICH "$new_path" 2> /dev/null`
38287  # bat and cmd files are not always considered executable in cygwin causing which
38288  # to not find them
38289  if test "x$new_path" = x \
38290      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38291      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38292    new_path=`$CYGPATH -u "$path"`
38293  fi
38294  if test "x$new_path" = x; then
38295    # Oops. Which didn't find the executable.
38296    # The splitting of arguments from the executable at a space might have been incorrect,
38297    # since paths with space are more likely in Windows. Give it another try with the whole
38298    # argument.
38299    path="$complete"
38300    arguments="EOL"
38301    new_path=`$CYGPATH -u "$path"`
38302    new_path=`$WHICH "$new_path" 2> /dev/null`
38303    # bat and cmd files are not always considered executable in cygwin causing which
38304    # to not find them
38305    if test "x$new_path" = x \
38306        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38307        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38308      new_path=`$CYGPATH -u "$path"`
38309    fi
38310    if test "x$new_path" = x; then
38311      # It's still not found. Now this is an unrecoverable error.
38312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38313$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38314      has_space=`$ECHO "$complete" | $GREP " "`
38315      if test "x$has_space" != x; then
38316        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38317$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38318      fi
38319      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38320    fi
38321  fi
38322
38323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38326  # "foo.exe" is OK but "foo" is an error.
38327  #
38328  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38329  # It is also a way to make sure we got the proper file name for the real test later on.
38330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38331  if test "x$test_shortpath" = x; then
38332    # Short path failed, file does not exist as specified.
38333    # Try adding .exe or .cmd
38334    if test -f "${new_path}.exe"; then
38335      input_to_shortpath="${new_path}.exe"
38336    elif test -f "${new_path}.cmd"; then
38337      input_to_shortpath="${new_path}.cmd"
38338    else
38339      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38340$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38341      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38342$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38343      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38344    fi
38345  else
38346    input_to_shortpath="$new_path"
38347  fi
38348
38349  # Call helper function which possibly converts this using DOS-style short mode.
38350  # If so, the updated path is stored in $new_path.
38351  new_path="$input_to_shortpath"
38352
38353  input_path="$input_to_shortpath"
38354  # Check if we need to convert this using DOS-style short mode. If the path
38355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38356  # take no chances and rewrite it.
38357  # Note: m4 eats our [], so we need to use [ and ] instead.
38358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38359  if test "x$has_forbidden_chars" != x; then
38360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38361    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38362    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38363    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38364      # Going to short mode and back again did indeed matter. Since short mode is
38365      # case insensitive, let's make it lowercase to improve readability.
38366      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38367      # Now convert it back to Unix-style (cygpath)
38368      input_path=`$CYGPATH -u "$shortmode_path"`
38369      new_path="$input_path"
38370    fi
38371  fi
38372
38373  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38374  if test "x$test_cygdrive_prefix" = x; then
38375    # As a simple fix, exclude /usr/bin since it's not a real path.
38376    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38377      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38378      # a path prefixed by /cygdrive for fixpath to work.
38379      new_path="$CYGWIN_ROOT_PATH$input_path"
38380    fi
38381  fi
38382
38383  # remove trailing .exe if any
38384  new_path="${new_path/%.exe/}"
38385
38386    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38387
38388  # First separate the path from the arguments. This will split at the first
38389  # space.
38390  complete="$LIPO"
38391  path="${complete%% *}"
38392  tmp="$complete EOL"
38393  arguments="${tmp#* }"
38394
38395  # Input might be given as Windows format, start by converting to
38396  # unix format.
38397  new_path="$path"
38398
38399  windows_path="$new_path"
38400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38401    unix_path=`$CYGPATH -u "$windows_path"`
38402    new_path="$unix_path"
38403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38405    new_path="$unix_path"
38406  fi
38407
38408
38409  # Now try to locate executable using which
38410  new_path=`$WHICH "$new_path" 2> /dev/null`
38411
38412  if test "x$new_path" = x; then
38413    # Oops. Which didn't find the executable.
38414    # The splitting of arguments from the executable at a space might have been incorrect,
38415    # since paths with space are more likely in Windows. Give it another try with the whole
38416    # argument.
38417    path="$complete"
38418    arguments="EOL"
38419    new_path="$path"
38420
38421  windows_path="$new_path"
38422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38423    unix_path=`$CYGPATH -u "$windows_path"`
38424    new_path="$unix_path"
38425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38427    new_path="$unix_path"
38428  fi
38429
38430
38431    new_path=`$WHICH "$new_path" 2> /dev/null`
38432    # bat and cmd files are not always considered executable in MSYS causing which
38433    # to not find them
38434    if test "x$new_path" = x \
38435        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38436        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38437      new_path="$path"
38438
38439  windows_path="$new_path"
38440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38441    unix_path=`$CYGPATH -u "$windows_path"`
38442    new_path="$unix_path"
38443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38445    new_path="$unix_path"
38446  fi
38447
38448    fi
38449
38450    if test "x$new_path" = x; then
38451      # It's still not found. Now this is an unrecoverable error.
38452      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38453$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38454      has_space=`$ECHO "$complete" | $GREP " "`
38455      if test "x$has_space" != x; then
38456        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38457$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38458      fi
38459      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38460    fi
38461  fi
38462
38463  # Now new_path has a complete unix path to the binary
38464  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38465    # Keep paths in /bin as-is, but remove trailing .exe if any
38466    new_path="${new_path/%.exe/}"
38467    # Do not save /bin paths to all_fixpath_prefixes!
38468  else
38469    # Not in mixed or Windows style, start by that.
38470    new_path=`cmd //c echo $new_path`
38471
38472  input_path="$new_path"
38473  # Check if we need to convert this using DOS-style short mode. If the path
38474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38475  # take no chances and rewrite it.
38476  # Note: m4 eats our [], so we need to use [ and ] instead.
38477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38478  if test "x$has_forbidden_chars" != x; then
38479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38481  fi
38482
38483    # Output is in $new_path
38484
38485  windows_path="$new_path"
38486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38487    unix_path=`$CYGPATH -u "$windows_path"`
38488    new_path="$unix_path"
38489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38491    new_path="$unix_path"
38492  fi
38493
38494    # remove trailing .exe if any
38495    new_path="${new_path/%.exe/}"
38496
38497    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38498    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38499  fi
38500
38501    else
38502      # We're on a unix platform. Hooray! :)
38503      # First separate the path from the arguments. This will split at the first
38504      # space.
38505      complete="$LIPO"
38506      path="${complete%% *}"
38507      tmp="$complete EOL"
38508      arguments="${tmp#* }"
38509
38510      # Cannot rely on the command "which" here since it doesn't always work.
38511      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38512      if test -z "$is_absolute_path"; then
38513        # Path to executable is not absolute. Find it.
38514        IFS_save="$IFS"
38515        IFS=:
38516        for p in $PATH; do
38517          if test -f "$p/$path" && test -x "$p/$path"; then
38518            new_path="$p/$path"
38519            break
38520          fi
38521        done
38522        IFS="$IFS_save"
38523      else
38524        # This is an absolute path, we can use it without further modifications.
38525        new_path="$path"
38526      fi
38527
38528      if test "x$new_path" = x; then
38529        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38530$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38531        has_space=`$ECHO "$complete" | $GREP " "`
38532        if test "x$has_space" != x; then
38533          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38534$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38535        fi
38536        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38537      fi
38538    fi
38539
38540    # Now join together the path and the arguments once again
38541    if test "x$arguments" != xEOL; then
38542      new_complete="$new_path ${arguments% *}"
38543    else
38544      new_complete="$new_path"
38545    fi
38546
38547    if test "x$complete" != "x$new_complete"; then
38548      LIPO="$new_complete"
38549      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38550$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38551    fi
38552  fi
38553
38554  fi
38555
38556  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38557    # Extract the first word of "mt", so it can be a program name with args.
38558set dummy mt; ac_word=$2
38559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38560$as_echo_n "checking for $ac_word... " >&6; }
38561if ${ac_cv_prog_MT+:} false; then :
38562  $as_echo_n "(cached) " >&6
38563else
38564  if test -n "$MT"; then
38565  ac_cv_prog_MT="$MT" # Let the user override the test.
38566else
38567  ac_prog_rejected=no
38568as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38569for as_dir in $PATH
38570do
38571  IFS=$as_save_IFS
38572  test -z "$as_dir" && as_dir=.
38573    for ac_exec_ext in '' $ac_executable_extensions; do
38574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38575    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38576       ac_prog_rejected=yes
38577       continue
38578     fi
38579    ac_cv_prog_MT="mt"
38580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38581    break 2
38582  fi
38583done
38584  done
38585IFS=$as_save_IFS
38586
38587if test $ac_prog_rejected = yes; then
38588  # We found a bogon in the path, so make sure we never use it.
38589  set dummy $ac_cv_prog_MT
38590  shift
38591  if test $# != 0; then
38592    # We chose a different compiler from the bogus one.
38593    # However, it has the same basename, so the bogon will be chosen
38594    # first if we set MT to just the basename; use the full file name.
38595    shift
38596    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38597  fi
38598fi
38599fi
38600fi
38601MT=$ac_cv_prog_MT
38602if test -n "$MT"; then
38603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38604$as_echo "$MT" >&6; }
38605else
38606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38607$as_echo "no" >&6; }
38608fi
38609
38610
38611
38612  # Only process if variable expands to non-empty
38613
38614  if test "x$MT" != x; then
38615    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38616
38617  # First separate the path from the arguments. This will split at the first
38618  # space.
38619  complete="$MT"
38620  path="${complete%% *}"
38621  tmp="$complete EOL"
38622  arguments="${tmp#* }"
38623
38624  # Input might be given as Windows format, start by converting to
38625  # unix format.
38626  new_path=`$CYGPATH -u "$path"`
38627
38628  # Now try to locate executable using which
38629  new_path=`$WHICH "$new_path" 2> /dev/null`
38630  # bat and cmd files are not always considered executable in cygwin causing which
38631  # to not find them
38632  if test "x$new_path" = x \
38633      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38634      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38635    new_path=`$CYGPATH -u "$path"`
38636  fi
38637  if test "x$new_path" = x; then
38638    # Oops. Which didn't find the executable.
38639    # The splitting of arguments from the executable at a space might have been incorrect,
38640    # since paths with space are more likely in Windows. Give it another try with the whole
38641    # argument.
38642    path="$complete"
38643    arguments="EOL"
38644    new_path=`$CYGPATH -u "$path"`
38645    new_path=`$WHICH "$new_path" 2> /dev/null`
38646    # bat and cmd files are not always considered executable in cygwin causing which
38647    # to not find them
38648    if test "x$new_path" = x \
38649        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38650        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38651      new_path=`$CYGPATH -u "$path"`
38652    fi
38653    if test "x$new_path" = x; then
38654      # It's still not found. Now this is an unrecoverable error.
38655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38656$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38657      has_space=`$ECHO "$complete" | $GREP " "`
38658      if test "x$has_space" != x; then
38659        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38660$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38661      fi
38662      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38663    fi
38664  fi
38665
38666  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38667  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38668  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38669  # "foo.exe" is OK but "foo" is an error.
38670  #
38671  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38672  # It is also a way to make sure we got the proper file name for the real test later on.
38673  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38674  if test "x$test_shortpath" = x; then
38675    # Short path failed, file does not exist as specified.
38676    # Try adding .exe or .cmd
38677    if test -f "${new_path}.exe"; then
38678      input_to_shortpath="${new_path}.exe"
38679    elif test -f "${new_path}.cmd"; then
38680      input_to_shortpath="${new_path}.cmd"
38681    else
38682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38683$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38684      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38685$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38686      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38687    fi
38688  else
38689    input_to_shortpath="$new_path"
38690  fi
38691
38692  # Call helper function which possibly converts this using DOS-style short mode.
38693  # If so, the updated path is stored in $new_path.
38694  new_path="$input_to_shortpath"
38695
38696  input_path="$input_to_shortpath"
38697  # Check if we need to convert this using DOS-style short mode. If the path
38698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38699  # take no chances and rewrite it.
38700  # Note: m4 eats our [], so we need to use [ and ] instead.
38701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38702  if test "x$has_forbidden_chars" != x; then
38703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38704    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38705    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38706    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38707      # Going to short mode and back again did indeed matter. Since short mode is
38708      # case insensitive, let's make it lowercase to improve readability.
38709      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38710      # Now convert it back to Unix-style (cygpath)
38711      input_path=`$CYGPATH -u "$shortmode_path"`
38712      new_path="$input_path"
38713    fi
38714  fi
38715
38716  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38717  if test "x$test_cygdrive_prefix" = x; then
38718    # As a simple fix, exclude /usr/bin since it's not a real path.
38719    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38720      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38721      # a path prefixed by /cygdrive for fixpath to work.
38722      new_path="$CYGWIN_ROOT_PATH$input_path"
38723    fi
38724  fi
38725
38726  # remove trailing .exe if any
38727  new_path="${new_path/%.exe/}"
38728
38729    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38730
38731  # First separate the path from the arguments. This will split at the first
38732  # space.
38733  complete="$MT"
38734  path="${complete%% *}"
38735  tmp="$complete EOL"
38736  arguments="${tmp#* }"
38737
38738  # Input might be given as Windows format, start by converting to
38739  # unix format.
38740  new_path="$path"
38741
38742  windows_path="$new_path"
38743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38744    unix_path=`$CYGPATH -u "$windows_path"`
38745    new_path="$unix_path"
38746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38748    new_path="$unix_path"
38749  fi
38750
38751
38752  # Now try to locate executable using which
38753  new_path=`$WHICH "$new_path" 2> /dev/null`
38754
38755  if test "x$new_path" = x; then
38756    # Oops. Which didn't find the executable.
38757    # The splitting of arguments from the executable at a space might have been incorrect,
38758    # since paths with space are more likely in Windows. Give it another try with the whole
38759    # argument.
38760    path="$complete"
38761    arguments="EOL"
38762    new_path="$path"
38763
38764  windows_path="$new_path"
38765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38766    unix_path=`$CYGPATH -u "$windows_path"`
38767    new_path="$unix_path"
38768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38770    new_path="$unix_path"
38771  fi
38772
38773
38774    new_path=`$WHICH "$new_path" 2> /dev/null`
38775    # bat and cmd files are not always considered executable in MSYS causing which
38776    # to not find them
38777    if test "x$new_path" = x \
38778        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38779        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38780      new_path="$path"
38781
38782  windows_path="$new_path"
38783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38784    unix_path=`$CYGPATH -u "$windows_path"`
38785    new_path="$unix_path"
38786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38788    new_path="$unix_path"
38789  fi
38790
38791    fi
38792
38793    if test "x$new_path" = x; then
38794      # It's still not found. Now this is an unrecoverable error.
38795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38796$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38797      has_space=`$ECHO "$complete" | $GREP " "`
38798      if test "x$has_space" != x; then
38799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38801      fi
38802      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38803    fi
38804  fi
38805
38806  # Now new_path has a complete unix path to the binary
38807  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38808    # Keep paths in /bin as-is, but remove trailing .exe if any
38809    new_path="${new_path/%.exe/}"
38810    # Do not save /bin paths to all_fixpath_prefixes!
38811  else
38812    # Not in mixed or Windows style, start by that.
38813    new_path=`cmd //c echo $new_path`
38814
38815  input_path="$new_path"
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38824  fi
38825
38826    # Output is in $new_path
38827
38828  windows_path="$new_path"
38829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38830    unix_path=`$CYGPATH -u "$windows_path"`
38831    new_path="$unix_path"
38832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38834    new_path="$unix_path"
38835  fi
38836
38837    # remove trailing .exe if any
38838    new_path="${new_path/%.exe/}"
38839
38840    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38841    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38842  fi
38843
38844    else
38845      # We're on a unix platform. Hooray! :)
38846      # First separate the path from the arguments. This will split at the first
38847      # space.
38848      complete="$MT"
38849      path="${complete%% *}"
38850      tmp="$complete EOL"
38851      arguments="${tmp#* }"
38852
38853      # Cannot rely on the command "which" here since it doesn't always work.
38854      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38855      if test -z "$is_absolute_path"; then
38856        # Path to executable is not absolute. Find it.
38857        IFS_save="$IFS"
38858        IFS=:
38859        for p in $PATH; do
38860          if test -f "$p/$path" && test -x "$p/$path"; then
38861            new_path="$p/$path"
38862            break
38863          fi
38864        done
38865        IFS="$IFS_save"
38866      else
38867        # This is an absolute path, we can use it without further modifications.
38868        new_path="$path"
38869      fi
38870
38871      if test "x$new_path" = x; then
38872        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38873$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38874        has_space=`$ECHO "$complete" | $GREP " "`
38875        if test "x$has_space" != x; then
38876          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38877$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38878        fi
38879        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38880      fi
38881    fi
38882
38883    # Now join together the path and the arguments once again
38884    if test "x$arguments" != xEOL; then
38885      new_complete="$new_path ${arguments% *}"
38886    else
38887      new_complete="$new_path"
38888    fi
38889
38890    if test "x$complete" != "x$new_complete"; then
38891      MT="$new_complete"
38892      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38893$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38894    fi
38895  fi
38896
38897    # Setup the resource compiler (RC)
38898    # Extract the first word of "rc", so it can be a program name with args.
38899set dummy rc; ac_word=$2
38900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38901$as_echo_n "checking for $ac_word... " >&6; }
38902if ${ac_cv_prog_RC+:} false; then :
38903  $as_echo_n "(cached) " >&6
38904else
38905  if test -n "$RC"; then
38906  ac_cv_prog_RC="$RC" # Let the user override the test.
38907else
38908  ac_prog_rejected=no
38909as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38910for as_dir in $PATH
38911do
38912  IFS=$as_save_IFS
38913  test -z "$as_dir" && as_dir=.
38914    for ac_exec_ext in '' $ac_executable_extensions; do
38915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38916    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38917       ac_prog_rejected=yes
38918       continue
38919     fi
38920    ac_cv_prog_RC="rc"
38921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38922    break 2
38923  fi
38924done
38925  done
38926IFS=$as_save_IFS
38927
38928if test $ac_prog_rejected = yes; then
38929  # We found a bogon in the path, so make sure we never use it.
38930  set dummy $ac_cv_prog_RC
38931  shift
38932  if test $# != 0; then
38933    # We chose a different compiler from the bogus one.
38934    # However, it has the same basename, so the bogon will be chosen
38935    # first if we set RC to just the basename; use the full file name.
38936    shift
38937    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38938  fi
38939fi
38940fi
38941fi
38942RC=$ac_cv_prog_RC
38943if test -n "$RC"; then
38944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38945$as_echo "$RC" >&6; }
38946else
38947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38948$as_echo "no" >&6; }
38949fi
38950
38951
38952
38953  # Only process if variable expands to non-empty
38954
38955  if test "x$RC" != x; then
38956    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38957
38958  # First separate the path from the arguments. This will split at the first
38959  # space.
38960  complete="$RC"
38961  path="${complete%% *}"
38962  tmp="$complete EOL"
38963  arguments="${tmp#* }"
38964
38965  # Input might be given as Windows format, start by converting to
38966  # unix format.
38967  new_path=`$CYGPATH -u "$path"`
38968
38969  # Now try to locate executable using which
38970  new_path=`$WHICH "$new_path" 2> /dev/null`
38971  # bat and cmd files are not always considered executable in cygwin causing which
38972  # to not find them
38973  if test "x$new_path" = x \
38974      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38975      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38976    new_path=`$CYGPATH -u "$path"`
38977  fi
38978  if test "x$new_path" = x; then
38979    # Oops. Which didn't find the executable.
38980    # The splitting of arguments from the executable at a space might have been incorrect,
38981    # since paths with space are more likely in Windows. Give it another try with the whole
38982    # argument.
38983    path="$complete"
38984    arguments="EOL"
38985    new_path=`$CYGPATH -u "$path"`
38986    new_path=`$WHICH "$new_path" 2> /dev/null`
38987    # bat and cmd files are not always considered executable in cygwin causing which
38988    # to not find them
38989    if test "x$new_path" = x \
38990        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38991        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38992      new_path=`$CYGPATH -u "$path"`
38993    fi
38994    if test "x$new_path" = x; then
38995      # It's still not found. Now this is an unrecoverable error.
38996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38997$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38998      has_space=`$ECHO "$complete" | $GREP " "`
38999      if test "x$has_space" != x; then
39000        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39001$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39002      fi
39003      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39004    fi
39005  fi
39006
39007  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39008  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39009  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39010  # "foo.exe" is OK but "foo" is an error.
39011  #
39012  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39013  # It is also a way to make sure we got the proper file name for the real test later on.
39014  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39015  if test "x$test_shortpath" = x; then
39016    # Short path failed, file does not exist as specified.
39017    # Try adding .exe or .cmd
39018    if test -f "${new_path}.exe"; then
39019      input_to_shortpath="${new_path}.exe"
39020    elif test -f "${new_path}.cmd"; then
39021      input_to_shortpath="${new_path}.cmd"
39022    else
39023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39024$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39025      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39026$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39027      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39028    fi
39029  else
39030    input_to_shortpath="$new_path"
39031  fi
39032
39033  # Call helper function which possibly converts this using DOS-style short mode.
39034  # If so, the updated path is stored in $new_path.
39035  new_path="$input_to_shortpath"
39036
39037  input_path="$input_to_shortpath"
39038  # Check if we need to convert this using DOS-style short mode. If the path
39039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39040  # take no chances and rewrite it.
39041  # Note: m4 eats our [], so we need to use [ and ] instead.
39042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39043  if test "x$has_forbidden_chars" != x; then
39044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39045    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39046    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39047    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39048      # Going to short mode and back again did indeed matter. Since short mode is
39049      # case insensitive, let's make it lowercase to improve readability.
39050      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39051      # Now convert it back to Unix-style (cygpath)
39052      input_path=`$CYGPATH -u "$shortmode_path"`
39053      new_path="$input_path"
39054    fi
39055  fi
39056
39057  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39058  if test "x$test_cygdrive_prefix" = x; then
39059    # As a simple fix, exclude /usr/bin since it's not a real path.
39060    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39061      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39062      # a path prefixed by /cygdrive for fixpath to work.
39063      new_path="$CYGWIN_ROOT_PATH$input_path"
39064    fi
39065  fi
39066
39067  # remove trailing .exe if any
39068  new_path="${new_path/%.exe/}"
39069
39070    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39071
39072  # First separate the path from the arguments. This will split at the first
39073  # space.
39074  complete="$RC"
39075  path="${complete%% *}"
39076  tmp="$complete EOL"
39077  arguments="${tmp#* }"
39078
39079  # Input might be given as Windows format, start by converting to
39080  # unix format.
39081  new_path="$path"
39082
39083  windows_path="$new_path"
39084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39085    unix_path=`$CYGPATH -u "$windows_path"`
39086    new_path="$unix_path"
39087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39089    new_path="$unix_path"
39090  fi
39091
39092
39093  # Now try to locate executable using which
39094  new_path=`$WHICH "$new_path" 2> /dev/null`
39095
39096  if test "x$new_path" = x; then
39097    # Oops. Which didn't find the executable.
39098    # The splitting of arguments from the executable at a space might have been incorrect,
39099    # since paths with space are more likely in Windows. Give it another try with the whole
39100    # argument.
39101    path="$complete"
39102    arguments="EOL"
39103    new_path="$path"
39104
39105  windows_path="$new_path"
39106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39107    unix_path=`$CYGPATH -u "$windows_path"`
39108    new_path="$unix_path"
39109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39111    new_path="$unix_path"
39112  fi
39113
39114
39115    new_path=`$WHICH "$new_path" 2> /dev/null`
39116    # bat and cmd files are not always considered executable in MSYS causing which
39117    # to not find them
39118    if test "x$new_path" = x \
39119        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39120        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39121      new_path="$path"
39122
39123  windows_path="$new_path"
39124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39125    unix_path=`$CYGPATH -u "$windows_path"`
39126    new_path="$unix_path"
39127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39129    new_path="$unix_path"
39130  fi
39131
39132    fi
39133
39134    if test "x$new_path" = x; then
39135      # It's still not found. Now this is an unrecoverable error.
39136      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39137$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39138      has_space=`$ECHO "$complete" | $GREP " "`
39139      if test "x$has_space" != x; then
39140        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39141$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39142      fi
39143      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39144    fi
39145  fi
39146
39147  # Now new_path has a complete unix path to the binary
39148  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39149    # Keep paths in /bin as-is, but remove trailing .exe if any
39150    new_path="${new_path/%.exe/}"
39151    # Do not save /bin paths to all_fixpath_prefixes!
39152  else
39153    # Not in mixed or Windows style, start by that.
39154    new_path=`cmd //c echo $new_path`
39155
39156  input_path="$new_path"
39157  # Check if we need to convert this using DOS-style short mode. If the path
39158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39159  # take no chances and rewrite it.
39160  # Note: m4 eats our [], so we need to use [ and ] instead.
39161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39162  if test "x$has_forbidden_chars" != x; then
39163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39164    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39165  fi
39166
39167    # Output is in $new_path
39168
39169  windows_path="$new_path"
39170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39171    unix_path=`$CYGPATH -u "$windows_path"`
39172    new_path="$unix_path"
39173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39175    new_path="$unix_path"
39176  fi
39177
39178    # remove trailing .exe if any
39179    new_path="${new_path/%.exe/}"
39180
39181    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39182    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39183  fi
39184
39185    else
39186      # We're on a unix platform. Hooray! :)
39187      # First separate the path from the arguments. This will split at the first
39188      # space.
39189      complete="$RC"
39190      path="${complete%% *}"
39191      tmp="$complete EOL"
39192      arguments="${tmp#* }"
39193
39194      # Cannot rely on the command "which" here since it doesn't always work.
39195      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39196      if test -z "$is_absolute_path"; then
39197        # Path to executable is not absolute. Find it.
39198        IFS_save="$IFS"
39199        IFS=:
39200        for p in $PATH; do
39201          if test -f "$p/$path" && test -x "$p/$path"; then
39202            new_path="$p/$path"
39203            break
39204          fi
39205        done
39206        IFS="$IFS_save"
39207      else
39208        # This is an absolute path, we can use it without further modifications.
39209        new_path="$path"
39210      fi
39211
39212      if test "x$new_path" = x; then
39213        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39214$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39215        has_space=`$ECHO "$complete" | $GREP " "`
39216        if test "x$has_space" != x; then
39217          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39218$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39219        fi
39220        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39221      fi
39222    fi
39223
39224    # Now join together the path and the arguments once again
39225    if test "x$arguments" != xEOL; then
39226      new_complete="$new_path ${arguments% *}"
39227    else
39228      new_complete="$new_path"
39229    fi
39230
39231    if test "x$complete" != "x$new_complete"; then
39232      RC="$new_complete"
39233      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39234$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39235    fi
39236  fi
39237
39238    # Extract the first word of "dumpbin", so it can be a program name with args.
39239set dummy dumpbin; ac_word=$2
39240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39241$as_echo_n "checking for $ac_word... " >&6; }
39242if ${ac_cv_prog_DUMPBIN+:} false; then :
39243  $as_echo_n "(cached) " >&6
39244else
39245  if test -n "$DUMPBIN"; then
39246  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39247else
39248as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39249for as_dir in $PATH
39250do
39251  IFS=$as_save_IFS
39252  test -z "$as_dir" && as_dir=.
39253    for ac_exec_ext in '' $ac_executable_extensions; do
39254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39255    ac_cv_prog_DUMPBIN="dumpbin"
39256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39257    break 2
39258  fi
39259done
39260  done
39261IFS=$as_save_IFS
39262
39263fi
39264fi
39265DUMPBIN=$ac_cv_prog_DUMPBIN
39266if test -n "$DUMPBIN"; then
39267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39268$as_echo "$DUMPBIN" >&6; }
39269else
39270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39271$as_echo "no" >&6; }
39272fi
39273
39274
39275
39276  # Only process if variable expands to non-empty
39277
39278  if test "x$DUMPBIN" != x; then
39279    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39280
39281  # First separate the path from the arguments. This will split at the first
39282  # space.
39283  complete="$DUMPBIN"
39284  path="${complete%% *}"
39285  tmp="$complete EOL"
39286  arguments="${tmp#* }"
39287
39288  # Input might be given as Windows format, start by converting to
39289  # unix format.
39290  new_path=`$CYGPATH -u "$path"`
39291
39292  # Now try to locate executable using which
39293  new_path=`$WHICH "$new_path" 2> /dev/null`
39294  # bat and cmd files are not always considered executable in cygwin causing which
39295  # to not find them
39296  if test "x$new_path" = x \
39297      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39298      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39299    new_path=`$CYGPATH -u "$path"`
39300  fi
39301  if test "x$new_path" = x; then
39302    # Oops. Which didn't find the executable.
39303    # The splitting of arguments from the executable at a space might have been incorrect,
39304    # since paths with space are more likely in Windows. Give it another try with the whole
39305    # argument.
39306    path="$complete"
39307    arguments="EOL"
39308    new_path=`$CYGPATH -u "$path"`
39309    new_path=`$WHICH "$new_path" 2> /dev/null`
39310    # bat and cmd files are not always considered executable in cygwin causing which
39311    # to not find them
39312    if test "x$new_path" = x \
39313        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39314        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39315      new_path=`$CYGPATH -u "$path"`
39316    fi
39317    if test "x$new_path" = x; then
39318      # It's still not found. Now this is an unrecoverable error.
39319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39320$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39321      has_space=`$ECHO "$complete" | $GREP " "`
39322      if test "x$has_space" != x; then
39323        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39324$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39325      fi
39326      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39327    fi
39328  fi
39329
39330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39333  # "foo.exe" is OK but "foo" is an error.
39334  #
39335  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39336  # It is also a way to make sure we got the proper file name for the real test later on.
39337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39338  if test "x$test_shortpath" = x; then
39339    # Short path failed, file does not exist as specified.
39340    # Try adding .exe or .cmd
39341    if test -f "${new_path}.exe"; then
39342      input_to_shortpath="${new_path}.exe"
39343    elif test -f "${new_path}.cmd"; then
39344      input_to_shortpath="${new_path}.cmd"
39345    else
39346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39347$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39348      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39349$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39350      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39351    fi
39352  else
39353    input_to_shortpath="$new_path"
39354  fi
39355
39356  # Call helper function which possibly converts this using DOS-style short mode.
39357  # If so, the updated path is stored in $new_path.
39358  new_path="$input_to_shortpath"
39359
39360  input_path="$input_to_shortpath"
39361  # Check if we need to convert this using DOS-style short mode. If the path
39362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39363  # take no chances and rewrite it.
39364  # Note: m4 eats our [], so we need to use [ and ] instead.
39365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39366  if test "x$has_forbidden_chars" != x; then
39367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39368    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39369    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39370    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39371      # Going to short mode and back again did indeed matter. Since short mode is
39372      # case insensitive, let's make it lowercase to improve readability.
39373      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39374      # Now convert it back to Unix-style (cygpath)
39375      input_path=`$CYGPATH -u "$shortmode_path"`
39376      new_path="$input_path"
39377    fi
39378  fi
39379
39380  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39381  if test "x$test_cygdrive_prefix" = x; then
39382    # As a simple fix, exclude /usr/bin since it's not a real path.
39383    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39384      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39385      # a path prefixed by /cygdrive for fixpath to work.
39386      new_path="$CYGWIN_ROOT_PATH$input_path"
39387    fi
39388  fi
39389
39390  # remove trailing .exe if any
39391  new_path="${new_path/%.exe/}"
39392
39393    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39394
39395  # First separate the path from the arguments. This will split at the first
39396  # space.
39397  complete="$DUMPBIN"
39398  path="${complete%% *}"
39399  tmp="$complete EOL"
39400  arguments="${tmp#* }"
39401
39402  # Input might be given as Windows format, start by converting to
39403  # unix format.
39404  new_path="$path"
39405
39406  windows_path="$new_path"
39407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39408    unix_path=`$CYGPATH -u "$windows_path"`
39409    new_path="$unix_path"
39410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39412    new_path="$unix_path"
39413  fi
39414
39415
39416  # Now try to locate executable using which
39417  new_path=`$WHICH "$new_path" 2> /dev/null`
39418
39419  if test "x$new_path" = x; then
39420    # Oops. Which didn't find the executable.
39421    # The splitting of arguments from the executable at a space might have been incorrect,
39422    # since paths with space are more likely in Windows. Give it another try with the whole
39423    # argument.
39424    path="$complete"
39425    arguments="EOL"
39426    new_path="$path"
39427
39428  windows_path="$new_path"
39429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39430    unix_path=`$CYGPATH -u "$windows_path"`
39431    new_path="$unix_path"
39432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39434    new_path="$unix_path"
39435  fi
39436
39437
39438    new_path=`$WHICH "$new_path" 2> /dev/null`
39439    # bat and cmd files are not always considered executable in MSYS causing which
39440    # to not find them
39441    if test "x$new_path" = x \
39442        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39443        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39444      new_path="$path"
39445
39446  windows_path="$new_path"
39447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39448    unix_path=`$CYGPATH -u "$windows_path"`
39449    new_path="$unix_path"
39450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39452    new_path="$unix_path"
39453  fi
39454
39455    fi
39456
39457    if test "x$new_path" = x; then
39458      # It's still not found. Now this is an unrecoverable error.
39459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39460$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39461      has_space=`$ECHO "$complete" | $GREP " "`
39462      if test "x$has_space" != x; then
39463        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39464$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39465      fi
39466      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39467    fi
39468  fi
39469
39470  # Now new_path has a complete unix path to the binary
39471  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39472    # Keep paths in /bin as-is, but remove trailing .exe if any
39473    new_path="${new_path/%.exe/}"
39474    # Do not save /bin paths to all_fixpath_prefixes!
39475  else
39476    # Not in mixed or Windows style, start by that.
39477    new_path=`cmd //c echo $new_path`
39478
39479  input_path="$new_path"
39480  # Check if we need to convert this using DOS-style short mode. If the path
39481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39482  # take no chances and rewrite it.
39483  # Note: m4 eats our [], so we need to use [ and ] instead.
39484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39485  if test "x$has_forbidden_chars" != x; then
39486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39488  fi
39489
39490    # Output is in $new_path
39491
39492  windows_path="$new_path"
39493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39494    unix_path=`$CYGPATH -u "$windows_path"`
39495    new_path="$unix_path"
39496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39498    new_path="$unix_path"
39499  fi
39500
39501    # remove trailing .exe if any
39502    new_path="${new_path/%.exe/}"
39503
39504    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39505    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39506  fi
39507
39508    else
39509      # We're on a unix platform. Hooray! :)
39510      # First separate the path from the arguments. This will split at the first
39511      # space.
39512      complete="$DUMPBIN"
39513      path="${complete%% *}"
39514      tmp="$complete EOL"
39515      arguments="${tmp#* }"
39516
39517      # Cannot rely on the command "which" here since it doesn't always work.
39518      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39519      if test -z "$is_absolute_path"; then
39520        # Path to executable is not absolute. Find it.
39521        IFS_save="$IFS"
39522        IFS=:
39523        for p in $PATH; do
39524          if test -f "$p/$path" && test -x "$p/$path"; then
39525            new_path="$p/$path"
39526            break
39527          fi
39528        done
39529        IFS="$IFS_save"
39530      else
39531        # This is an absolute path, we can use it without further modifications.
39532        new_path="$path"
39533      fi
39534
39535      if test "x$new_path" = x; then
39536        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39537$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39538        has_space=`$ECHO "$complete" | $GREP " "`
39539        if test "x$has_space" != x; then
39540          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39541$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39542        fi
39543        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39544      fi
39545    fi
39546
39547    # Now join together the path and the arguments once again
39548    if test "x$arguments" != xEOL; then
39549      new_complete="$new_path ${arguments% *}"
39550    else
39551      new_complete="$new_path"
39552    fi
39553
39554    if test "x$complete" != "x$new_complete"; then
39555      DUMPBIN="$new_complete"
39556      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39557$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39558    fi
39559  fi
39560
39561    # We need to check for 'msbuild.exe' because at the place where we expect to
39562    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39563    # won't find the 'msbuild.exe' executable in that case (and the
39564    # 'ac_executable_extensions' is unusable due to performance reasons).
39565    # Notice that we intentionally don't fix up the path to MSBUILD because we
39566    # will call it in a DOS shell during freetype detection on Windows (see
39567    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39568    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39569set dummy msbuild.exe; ac_word=$2
39570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39571$as_echo_n "checking for $ac_word... " >&6; }
39572if ${ac_cv_prog_MSBUILD+:} false; then :
39573  $as_echo_n "(cached) " >&6
39574else
39575  if test -n "$MSBUILD"; then
39576  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39577else
39578as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39579for as_dir in $PATH
39580do
39581  IFS=$as_save_IFS
39582  test -z "$as_dir" && as_dir=.
39583    for ac_exec_ext in '' $ac_executable_extensions; do
39584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39585    ac_cv_prog_MSBUILD="msbuild.exe"
39586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39587    break 2
39588  fi
39589done
39590  done
39591IFS=$as_save_IFS
39592
39593fi
39594fi
39595MSBUILD=$ac_cv_prog_MSBUILD
39596if test -n "$MSBUILD"; then
39597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39598$as_echo "$MSBUILD" >&6; }
39599else
39600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39601$as_echo "no" >&6; }
39602fi
39603
39604
39605  fi
39606
39607  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39608
39609
39610  # Publish this variable in the help.
39611
39612
39613  if [ -z "${STRIP+x}" ]; then
39614    # The variable is not set by user, try to locate tool using the code snippet
39615    for ac_prog in strip
39616do
39617  # Extract the first word of "$ac_prog", so it can be a program name with args.
39618set dummy $ac_prog; ac_word=$2
39619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39620$as_echo_n "checking for $ac_word... " >&6; }
39621if ${ac_cv_path_STRIP+:} false; then :
39622  $as_echo_n "(cached) " >&6
39623else
39624  case $STRIP in
39625  [\\/]* | ?:[\\/]*)
39626  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39627  ;;
39628  *)
39629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39630for as_dir in $PATH
39631do
39632  IFS=$as_save_IFS
39633  test -z "$as_dir" && as_dir=.
39634    for ac_exec_ext in '' $ac_executable_extensions; do
39635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39636    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39638    break 2
39639  fi
39640done
39641  done
39642IFS=$as_save_IFS
39643
39644  ;;
39645esac
39646fi
39647STRIP=$ac_cv_path_STRIP
39648if test -n "$STRIP"; then
39649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39650$as_echo "$STRIP" >&6; }
39651else
39652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39653$as_echo "no" >&6; }
39654fi
39655
39656
39657  test -n "$STRIP" && break
39658done
39659
39660  else
39661    # The variable is set, but is it from the command line or the environment?
39662
39663    # Try to remove the string !STRIP! from our list.
39664    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39665    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39666      # If it failed, the variable was not from the command line. Ignore it,
39667      # but warn the user (except for BASH, which is always set by the calling BASH).
39668      if test "xSTRIP" != xBASH; then
39669        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39670$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39671      fi
39672      # Try to locate tool using the code snippet
39673      for ac_prog in strip
39674do
39675  # Extract the first word of "$ac_prog", so it can be a program name with args.
39676set dummy $ac_prog; ac_word=$2
39677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39678$as_echo_n "checking for $ac_word... " >&6; }
39679if ${ac_cv_path_STRIP+:} false; then :
39680  $as_echo_n "(cached) " >&6
39681else
39682  case $STRIP in
39683  [\\/]* | ?:[\\/]*)
39684  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39685  ;;
39686  *)
39687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39688for as_dir in $PATH
39689do
39690  IFS=$as_save_IFS
39691  test -z "$as_dir" && as_dir=.
39692    for ac_exec_ext in '' $ac_executable_extensions; do
39693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39694    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39696    break 2
39697  fi
39698done
39699  done
39700IFS=$as_save_IFS
39701
39702  ;;
39703esac
39704fi
39705STRIP=$ac_cv_path_STRIP
39706if test -n "$STRIP"; then
39707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39708$as_echo "$STRIP" >&6; }
39709else
39710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39711$as_echo "no" >&6; }
39712fi
39713
39714
39715  test -n "$STRIP" && break
39716done
39717
39718    else
39719      # If it succeeded, then it was overridden by the user. We will use it
39720      # for the tool.
39721
39722      # First remove it from the list of overridden variables, so we can test
39723      # for unknown variables in the end.
39724      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39725
39726      # Check if we try to supply an empty value
39727      if test "x$STRIP" = x; then
39728        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39729$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39730        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39731$as_echo_n "checking for STRIP... " >&6; }
39732        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39733$as_echo "disabled" >&6; }
39734      else
39735        # Check if the provided tool contains a complete path.
39736        tool_specified="$STRIP"
39737        tool_basename="${tool_specified##*/}"
39738        if test "x$tool_basename" = "x$tool_specified"; then
39739          # A command without a complete path is provided, search $PATH.
39740          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39741$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39742          # Extract the first word of "$tool_basename", so it can be a program name with args.
39743set dummy $tool_basename; ac_word=$2
39744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39745$as_echo_n "checking for $ac_word... " >&6; }
39746if ${ac_cv_path_STRIP+:} false; then :
39747  $as_echo_n "(cached) " >&6
39748else
39749  case $STRIP in
39750  [\\/]* | ?:[\\/]*)
39751  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39752  ;;
39753  *)
39754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39755for as_dir in $PATH
39756do
39757  IFS=$as_save_IFS
39758  test -z "$as_dir" && as_dir=.
39759    for ac_exec_ext in '' $ac_executable_extensions; do
39760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39761    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39763    break 2
39764  fi
39765done
39766  done
39767IFS=$as_save_IFS
39768
39769  ;;
39770esac
39771fi
39772STRIP=$ac_cv_path_STRIP
39773if test -n "$STRIP"; then
39774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39775$as_echo "$STRIP" >&6; }
39776else
39777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39778$as_echo "no" >&6; }
39779fi
39780
39781
39782          if test "x$STRIP" = x; then
39783            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39784          fi
39785        else
39786          # Otherwise we believe it is a complete path. Use it as it is.
39787          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39788$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39789          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39790$as_echo_n "checking for STRIP... " >&6; }
39791          if test ! -x "$tool_specified"; then
39792            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39793$as_echo "not found" >&6; }
39794            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39795          fi
39796          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39797$as_echo "$tool_specified" >&6; }
39798        fi
39799      fi
39800    fi
39801
39802  fi
39803
39804
39805
39806  # Only process if variable expands to non-empty
39807
39808  if test "x$STRIP" != x; then
39809    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39810
39811  # First separate the path from the arguments. This will split at the first
39812  # space.
39813  complete="$STRIP"
39814  path="${complete%% *}"
39815  tmp="$complete EOL"
39816  arguments="${tmp#* }"
39817
39818  # Input might be given as Windows format, start by converting to
39819  # unix format.
39820  new_path=`$CYGPATH -u "$path"`
39821
39822  # Now try to locate executable using which
39823  new_path=`$WHICH "$new_path" 2> /dev/null`
39824  # bat and cmd files are not always considered executable in cygwin causing which
39825  # to not find them
39826  if test "x$new_path" = x \
39827      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39828      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39829    new_path=`$CYGPATH -u "$path"`
39830  fi
39831  if test "x$new_path" = x; then
39832    # Oops. Which didn't find the executable.
39833    # The splitting of arguments from the executable at a space might have been incorrect,
39834    # since paths with space are more likely in Windows. Give it another try with the whole
39835    # argument.
39836    path="$complete"
39837    arguments="EOL"
39838    new_path=`$CYGPATH -u "$path"`
39839    new_path=`$WHICH "$new_path" 2> /dev/null`
39840    # bat and cmd files are not always considered executable in cygwin causing which
39841    # to not find them
39842    if test "x$new_path" = x \
39843        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39844        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39845      new_path=`$CYGPATH -u "$path"`
39846    fi
39847    if test "x$new_path" = x; then
39848      # It's still not found. Now this is an unrecoverable error.
39849      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39850$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39851      has_space=`$ECHO "$complete" | $GREP " "`
39852      if test "x$has_space" != x; then
39853        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39854$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39855      fi
39856      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39857    fi
39858  fi
39859
39860  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39861  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39862  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39863  # "foo.exe" is OK but "foo" is an error.
39864  #
39865  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39866  # It is also a way to make sure we got the proper file name for the real test later on.
39867  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39868  if test "x$test_shortpath" = x; then
39869    # Short path failed, file does not exist as specified.
39870    # Try adding .exe or .cmd
39871    if test -f "${new_path}.exe"; then
39872      input_to_shortpath="${new_path}.exe"
39873    elif test -f "${new_path}.cmd"; then
39874      input_to_shortpath="${new_path}.cmd"
39875    else
39876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39877$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39878      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39879$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39880      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39881    fi
39882  else
39883    input_to_shortpath="$new_path"
39884  fi
39885
39886  # Call helper function which possibly converts this using DOS-style short mode.
39887  # If so, the updated path is stored in $new_path.
39888  new_path="$input_to_shortpath"
39889
39890  input_path="$input_to_shortpath"
39891  # Check if we need to convert this using DOS-style short mode. If the path
39892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39893  # take no chances and rewrite it.
39894  # Note: m4 eats our [], so we need to use [ and ] instead.
39895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39896  if test "x$has_forbidden_chars" != x; then
39897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39898    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39899    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39900    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39901      # Going to short mode and back again did indeed matter. Since short mode is
39902      # case insensitive, let's make it lowercase to improve readability.
39903      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39904      # Now convert it back to Unix-style (cygpath)
39905      input_path=`$CYGPATH -u "$shortmode_path"`
39906      new_path="$input_path"
39907    fi
39908  fi
39909
39910  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39911  if test "x$test_cygdrive_prefix" = x; then
39912    # As a simple fix, exclude /usr/bin since it's not a real path.
39913    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39914      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39915      # a path prefixed by /cygdrive for fixpath to work.
39916      new_path="$CYGWIN_ROOT_PATH$input_path"
39917    fi
39918  fi
39919
39920  # remove trailing .exe if any
39921  new_path="${new_path/%.exe/}"
39922
39923    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39924
39925  # First separate the path from the arguments. This will split at the first
39926  # space.
39927  complete="$STRIP"
39928  path="${complete%% *}"
39929  tmp="$complete EOL"
39930  arguments="${tmp#* }"
39931
39932  # Input might be given as Windows format, start by converting to
39933  # unix format.
39934  new_path="$path"
39935
39936  windows_path="$new_path"
39937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39938    unix_path=`$CYGPATH -u "$windows_path"`
39939    new_path="$unix_path"
39940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39942    new_path="$unix_path"
39943  fi
39944
39945
39946  # Now try to locate executable using which
39947  new_path=`$WHICH "$new_path" 2> /dev/null`
39948
39949  if test "x$new_path" = x; then
39950    # Oops. Which didn't find the executable.
39951    # The splitting of arguments from the executable at a space might have been incorrect,
39952    # since paths with space are more likely in Windows. Give it another try with the whole
39953    # argument.
39954    path="$complete"
39955    arguments="EOL"
39956    new_path="$path"
39957
39958  windows_path="$new_path"
39959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39960    unix_path=`$CYGPATH -u "$windows_path"`
39961    new_path="$unix_path"
39962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39964    new_path="$unix_path"
39965  fi
39966
39967
39968    new_path=`$WHICH "$new_path" 2> /dev/null`
39969    # bat and cmd files are not always considered executable in MSYS causing which
39970    # to not find them
39971    if test "x$new_path" = x \
39972        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39973        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39974      new_path="$path"
39975
39976  windows_path="$new_path"
39977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39978    unix_path=`$CYGPATH -u "$windows_path"`
39979    new_path="$unix_path"
39980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39982    new_path="$unix_path"
39983  fi
39984
39985    fi
39986
39987    if test "x$new_path" = x; then
39988      # It's still not found. Now this is an unrecoverable error.
39989      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39990$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39991      has_space=`$ECHO "$complete" | $GREP " "`
39992      if test "x$has_space" != x; then
39993        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39994$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39995      fi
39996      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39997    fi
39998  fi
39999
40000  # Now new_path has a complete unix path to the binary
40001  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40002    # Keep paths in /bin as-is, but remove trailing .exe if any
40003    new_path="${new_path/%.exe/}"
40004    # Do not save /bin paths to all_fixpath_prefixes!
40005  else
40006    # Not in mixed or Windows style, start by that.
40007    new_path=`cmd //c echo $new_path`
40008
40009  input_path="$new_path"
40010  # Check if we need to convert this using DOS-style short mode. If the path
40011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40012  # take no chances and rewrite it.
40013  # Note: m4 eats our [], so we need to use [ and ] instead.
40014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40015  if test "x$has_forbidden_chars" != x; then
40016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40017    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40018  fi
40019
40020    # Output is in $new_path
40021
40022  windows_path="$new_path"
40023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40024    unix_path=`$CYGPATH -u "$windows_path"`
40025    new_path="$unix_path"
40026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40028    new_path="$unix_path"
40029  fi
40030
40031    # remove trailing .exe if any
40032    new_path="${new_path/%.exe/}"
40033
40034    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40035    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40036  fi
40037
40038    else
40039      # We're on a unix platform. Hooray! :)
40040      # First separate the path from the arguments. This will split at the first
40041      # space.
40042      complete="$STRIP"
40043      path="${complete%% *}"
40044      tmp="$complete EOL"
40045      arguments="${tmp#* }"
40046
40047      # Cannot rely on the command "which" here since it doesn't always work.
40048      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40049      if test -z "$is_absolute_path"; then
40050        # Path to executable is not absolute. Find it.
40051        IFS_save="$IFS"
40052        IFS=:
40053        for p in $PATH; do
40054          if test -f "$p/$path" && test -x "$p/$path"; then
40055            new_path="$p/$path"
40056            break
40057          fi
40058        done
40059        IFS="$IFS_save"
40060      else
40061        # This is an absolute path, we can use it without further modifications.
40062        new_path="$path"
40063      fi
40064
40065      if test "x$new_path" = x; then
40066        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40067$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40068        has_space=`$ECHO "$complete" | $GREP " "`
40069        if test "x$has_space" != x; then
40070          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40071$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40072        fi
40073        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40074      fi
40075    fi
40076
40077    # Now join together the path and the arguments once again
40078    if test "x$arguments" != xEOL; then
40079      new_complete="$new_path ${arguments% *}"
40080    else
40081      new_complete="$new_path"
40082    fi
40083
40084    if test "x$complete" != "x$new_complete"; then
40085      STRIP="$new_complete"
40086      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40087$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40088    fi
40089  fi
40090
40091
40092
40093  # Publish this variable in the help.
40094
40095
40096  if [ -z "${NM+x}" ]; then
40097    # The variable is not set by user, try to locate tool using the code snippet
40098    for ac_prog in nm
40099do
40100  # Extract the first word of "$ac_prog", so it can be a program name with args.
40101set dummy $ac_prog; ac_word=$2
40102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40103$as_echo_n "checking for $ac_word... " >&6; }
40104if ${ac_cv_path_NM+:} false; then :
40105  $as_echo_n "(cached) " >&6
40106else
40107  case $NM in
40108  [\\/]* | ?:[\\/]*)
40109  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40110  ;;
40111  *)
40112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40113for as_dir in $PATH
40114do
40115  IFS=$as_save_IFS
40116  test -z "$as_dir" && as_dir=.
40117    for ac_exec_ext in '' $ac_executable_extensions; do
40118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40119    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40121    break 2
40122  fi
40123done
40124  done
40125IFS=$as_save_IFS
40126
40127  ;;
40128esac
40129fi
40130NM=$ac_cv_path_NM
40131if test -n "$NM"; then
40132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40133$as_echo "$NM" >&6; }
40134else
40135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40136$as_echo "no" >&6; }
40137fi
40138
40139
40140  test -n "$NM" && break
40141done
40142
40143  else
40144    # The variable is set, but is it from the command line or the environment?
40145
40146    # Try to remove the string !NM! from our list.
40147    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40148    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40149      # If it failed, the variable was not from the command line. Ignore it,
40150      # but warn the user (except for BASH, which is always set by the calling BASH).
40151      if test "xNM" != xBASH; then
40152        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40153$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40154      fi
40155      # Try to locate tool using the code snippet
40156      for ac_prog in nm
40157do
40158  # Extract the first word of "$ac_prog", so it can be a program name with args.
40159set dummy $ac_prog; ac_word=$2
40160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40161$as_echo_n "checking for $ac_word... " >&6; }
40162if ${ac_cv_path_NM+:} false; then :
40163  $as_echo_n "(cached) " >&6
40164else
40165  case $NM in
40166  [\\/]* | ?:[\\/]*)
40167  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40168  ;;
40169  *)
40170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40171for as_dir in $PATH
40172do
40173  IFS=$as_save_IFS
40174  test -z "$as_dir" && as_dir=.
40175    for ac_exec_ext in '' $ac_executable_extensions; do
40176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40177    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40179    break 2
40180  fi
40181done
40182  done
40183IFS=$as_save_IFS
40184
40185  ;;
40186esac
40187fi
40188NM=$ac_cv_path_NM
40189if test -n "$NM"; then
40190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40191$as_echo "$NM" >&6; }
40192else
40193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40194$as_echo "no" >&6; }
40195fi
40196
40197
40198  test -n "$NM" && break
40199done
40200
40201    else
40202      # If it succeeded, then it was overridden by the user. We will use it
40203      # for the tool.
40204
40205      # First remove it from the list of overridden variables, so we can test
40206      # for unknown variables in the end.
40207      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40208
40209      # Check if we try to supply an empty value
40210      if test "x$NM" = x; then
40211        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40212$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40213        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40214$as_echo_n "checking for NM... " >&6; }
40215        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40216$as_echo "disabled" >&6; }
40217      else
40218        # Check if the provided tool contains a complete path.
40219        tool_specified="$NM"
40220        tool_basename="${tool_specified##*/}"
40221        if test "x$tool_basename" = "x$tool_specified"; then
40222          # A command without a complete path is provided, search $PATH.
40223          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40224$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40225          # Extract the first word of "$tool_basename", so it can be a program name with args.
40226set dummy $tool_basename; ac_word=$2
40227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40228$as_echo_n "checking for $ac_word... " >&6; }
40229if ${ac_cv_path_NM+:} false; then :
40230  $as_echo_n "(cached) " >&6
40231else
40232  case $NM in
40233  [\\/]* | ?:[\\/]*)
40234  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40235  ;;
40236  *)
40237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40238for as_dir in $PATH
40239do
40240  IFS=$as_save_IFS
40241  test -z "$as_dir" && as_dir=.
40242    for ac_exec_ext in '' $ac_executable_extensions; do
40243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40244    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40246    break 2
40247  fi
40248done
40249  done
40250IFS=$as_save_IFS
40251
40252  ;;
40253esac
40254fi
40255NM=$ac_cv_path_NM
40256if test -n "$NM"; then
40257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40258$as_echo "$NM" >&6; }
40259else
40260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40261$as_echo "no" >&6; }
40262fi
40263
40264
40265          if test "x$NM" = x; then
40266            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40267          fi
40268        else
40269          # Otherwise we believe it is a complete path. Use it as it is.
40270          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40271$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40272          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40273$as_echo_n "checking for NM... " >&6; }
40274          if test ! -x "$tool_specified"; then
40275            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40276$as_echo "not found" >&6; }
40277            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40278          fi
40279          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40280$as_echo "$tool_specified" >&6; }
40281        fi
40282      fi
40283    fi
40284
40285  fi
40286
40287
40288
40289  # Only process if variable expands to non-empty
40290
40291  if test "x$NM" != x; then
40292    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40293
40294  # First separate the path from the arguments. This will split at the first
40295  # space.
40296  complete="$NM"
40297  path="${complete%% *}"
40298  tmp="$complete EOL"
40299  arguments="${tmp#* }"
40300
40301  # Input might be given as Windows format, start by converting to
40302  # unix format.
40303  new_path=`$CYGPATH -u "$path"`
40304
40305  # Now try to locate executable using which
40306  new_path=`$WHICH "$new_path" 2> /dev/null`
40307  # bat and cmd files are not always considered executable in cygwin causing which
40308  # to not find them
40309  if test "x$new_path" = x \
40310      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40311      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40312    new_path=`$CYGPATH -u "$path"`
40313  fi
40314  if test "x$new_path" = x; then
40315    # Oops. Which didn't find the executable.
40316    # The splitting of arguments from the executable at a space might have been incorrect,
40317    # since paths with space are more likely in Windows. Give it another try with the whole
40318    # argument.
40319    path="$complete"
40320    arguments="EOL"
40321    new_path=`$CYGPATH -u "$path"`
40322    new_path=`$WHICH "$new_path" 2> /dev/null`
40323    # bat and cmd files are not always considered executable in cygwin causing which
40324    # to not find them
40325    if test "x$new_path" = x \
40326        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40327        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40328      new_path=`$CYGPATH -u "$path"`
40329    fi
40330    if test "x$new_path" = x; then
40331      # It's still not found. Now this is an unrecoverable error.
40332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40333$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40334      has_space=`$ECHO "$complete" | $GREP " "`
40335      if test "x$has_space" != x; then
40336        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40337$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40338      fi
40339      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40340    fi
40341  fi
40342
40343  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40344  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40345  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40346  # "foo.exe" is OK but "foo" is an error.
40347  #
40348  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40349  # It is also a way to make sure we got the proper file name for the real test later on.
40350  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40351  if test "x$test_shortpath" = x; then
40352    # Short path failed, file does not exist as specified.
40353    # Try adding .exe or .cmd
40354    if test -f "${new_path}.exe"; then
40355      input_to_shortpath="${new_path}.exe"
40356    elif test -f "${new_path}.cmd"; then
40357      input_to_shortpath="${new_path}.cmd"
40358    else
40359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40360$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40361      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40362$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40363      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40364    fi
40365  else
40366    input_to_shortpath="$new_path"
40367  fi
40368
40369  # Call helper function which possibly converts this using DOS-style short mode.
40370  # If so, the updated path is stored in $new_path.
40371  new_path="$input_to_shortpath"
40372
40373  input_path="$input_to_shortpath"
40374  # Check if we need to convert this using DOS-style short mode. If the path
40375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40376  # take no chances and rewrite it.
40377  # Note: m4 eats our [], so we need to use [ and ] instead.
40378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40379  if test "x$has_forbidden_chars" != x; then
40380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40381    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40382    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40383    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40384      # Going to short mode and back again did indeed matter. Since short mode is
40385      # case insensitive, let's make it lowercase to improve readability.
40386      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40387      # Now convert it back to Unix-style (cygpath)
40388      input_path=`$CYGPATH -u "$shortmode_path"`
40389      new_path="$input_path"
40390    fi
40391  fi
40392
40393  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40394  if test "x$test_cygdrive_prefix" = x; then
40395    # As a simple fix, exclude /usr/bin since it's not a real path.
40396    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40397      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40398      # a path prefixed by /cygdrive for fixpath to work.
40399      new_path="$CYGWIN_ROOT_PATH$input_path"
40400    fi
40401  fi
40402
40403  # remove trailing .exe if any
40404  new_path="${new_path/%.exe/}"
40405
40406    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40407
40408  # First separate the path from the arguments. This will split at the first
40409  # space.
40410  complete="$NM"
40411  path="${complete%% *}"
40412  tmp="$complete EOL"
40413  arguments="${tmp#* }"
40414
40415  # Input might be given as Windows format, start by converting to
40416  # unix format.
40417  new_path="$path"
40418
40419  windows_path="$new_path"
40420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40421    unix_path=`$CYGPATH -u "$windows_path"`
40422    new_path="$unix_path"
40423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40425    new_path="$unix_path"
40426  fi
40427
40428
40429  # Now try to locate executable using which
40430  new_path=`$WHICH "$new_path" 2> /dev/null`
40431
40432  if test "x$new_path" = x; then
40433    # Oops. Which didn't find the executable.
40434    # The splitting of arguments from the executable at a space might have been incorrect,
40435    # since paths with space are more likely in Windows. Give it another try with the whole
40436    # argument.
40437    path="$complete"
40438    arguments="EOL"
40439    new_path="$path"
40440
40441  windows_path="$new_path"
40442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40443    unix_path=`$CYGPATH -u "$windows_path"`
40444    new_path="$unix_path"
40445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40447    new_path="$unix_path"
40448  fi
40449
40450
40451    new_path=`$WHICH "$new_path" 2> /dev/null`
40452    # bat and cmd files are not always considered executable in MSYS causing which
40453    # to not find them
40454    if test "x$new_path" = x \
40455        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40456        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40457      new_path="$path"
40458
40459  windows_path="$new_path"
40460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40461    unix_path=`$CYGPATH -u "$windows_path"`
40462    new_path="$unix_path"
40463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40465    new_path="$unix_path"
40466  fi
40467
40468    fi
40469
40470    if test "x$new_path" = x; then
40471      # It's still not found. Now this is an unrecoverable error.
40472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40473$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40474      has_space=`$ECHO "$complete" | $GREP " "`
40475      if test "x$has_space" != x; then
40476        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40477$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40478      fi
40479      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40480    fi
40481  fi
40482
40483  # Now new_path has a complete unix path to the binary
40484  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40485    # Keep paths in /bin as-is, but remove trailing .exe if any
40486    new_path="${new_path/%.exe/}"
40487    # Do not save /bin paths to all_fixpath_prefixes!
40488  else
40489    # Not in mixed or Windows style, start by that.
40490    new_path=`cmd //c echo $new_path`
40491
40492  input_path="$new_path"
40493  # Check if we need to convert this using DOS-style short mode. If the path
40494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40495  # take no chances and rewrite it.
40496  # Note: m4 eats our [], so we need to use [ and ] instead.
40497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40498  if test "x$has_forbidden_chars" != x; then
40499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40500    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40501  fi
40502
40503    # Output is in $new_path
40504
40505  windows_path="$new_path"
40506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40507    unix_path=`$CYGPATH -u "$windows_path"`
40508    new_path="$unix_path"
40509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40511    new_path="$unix_path"
40512  fi
40513
40514    # remove trailing .exe if any
40515    new_path="${new_path/%.exe/}"
40516
40517    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40518    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40519  fi
40520
40521    else
40522      # We're on a unix platform. Hooray! :)
40523      # First separate the path from the arguments. This will split at the first
40524      # space.
40525      complete="$NM"
40526      path="${complete%% *}"
40527      tmp="$complete EOL"
40528      arguments="${tmp#* }"
40529
40530      # Cannot rely on the command "which" here since it doesn't always work.
40531      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40532      if test -z "$is_absolute_path"; then
40533        # Path to executable is not absolute. Find it.
40534        IFS_save="$IFS"
40535        IFS=:
40536        for p in $PATH; do
40537          if test -f "$p/$path" && test -x "$p/$path"; then
40538            new_path="$p/$path"
40539            break
40540          fi
40541        done
40542        IFS="$IFS_save"
40543      else
40544        # This is an absolute path, we can use it without further modifications.
40545        new_path="$path"
40546      fi
40547
40548      if test "x$new_path" = x; then
40549        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40550$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40551        has_space=`$ECHO "$complete" | $GREP " "`
40552        if test "x$has_space" != x; then
40553          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40554$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40555        fi
40556        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40557      fi
40558    fi
40559
40560    # Now join together the path and the arguments once again
40561    if test "x$arguments" != xEOL; then
40562      new_complete="$new_path ${arguments% *}"
40563    else
40564      new_complete="$new_path"
40565    fi
40566
40567    if test "x$complete" != "x$new_complete"; then
40568      NM="$new_complete"
40569      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40570$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40571    fi
40572  fi
40573
40574
40575
40576  # Publish this variable in the help.
40577
40578
40579  if [ -z "${GNM+x}" ]; then
40580    # The variable is not set by user, try to locate tool using the code snippet
40581    for ac_prog in gnm
40582do
40583  # Extract the first word of "$ac_prog", so it can be a program name with args.
40584set dummy $ac_prog; ac_word=$2
40585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40586$as_echo_n "checking for $ac_word... " >&6; }
40587if ${ac_cv_path_GNM+:} false; then :
40588  $as_echo_n "(cached) " >&6
40589else
40590  case $GNM in
40591  [\\/]* | ?:[\\/]*)
40592  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40593  ;;
40594  *)
40595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40596for as_dir in $PATH
40597do
40598  IFS=$as_save_IFS
40599  test -z "$as_dir" && as_dir=.
40600    for ac_exec_ext in '' $ac_executable_extensions; do
40601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40602    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40604    break 2
40605  fi
40606done
40607  done
40608IFS=$as_save_IFS
40609
40610  ;;
40611esac
40612fi
40613GNM=$ac_cv_path_GNM
40614if test -n "$GNM"; then
40615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40616$as_echo "$GNM" >&6; }
40617else
40618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40619$as_echo "no" >&6; }
40620fi
40621
40622
40623  test -n "$GNM" && break
40624done
40625
40626  else
40627    # The variable is set, but is it from the command line or the environment?
40628
40629    # Try to remove the string !GNM! from our list.
40630    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40631    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40632      # If it failed, the variable was not from the command line. Ignore it,
40633      # but warn the user (except for BASH, which is always set by the calling BASH).
40634      if test "xGNM" != xBASH; then
40635        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40636$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40637      fi
40638      # Try to locate tool using the code snippet
40639      for ac_prog in gnm
40640do
40641  # Extract the first word of "$ac_prog", so it can be a program name with args.
40642set dummy $ac_prog; ac_word=$2
40643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40644$as_echo_n "checking for $ac_word... " >&6; }
40645if ${ac_cv_path_GNM+:} false; then :
40646  $as_echo_n "(cached) " >&6
40647else
40648  case $GNM in
40649  [\\/]* | ?:[\\/]*)
40650  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40651  ;;
40652  *)
40653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40654for as_dir in $PATH
40655do
40656  IFS=$as_save_IFS
40657  test -z "$as_dir" && as_dir=.
40658    for ac_exec_ext in '' $ac_executable_extensions; do
40659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40660    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40662    break 2
40663  fi
40664done
40665  done
40666IFS=$as_save_IFS
40667
40668  ;;
40669esac
40670fi
40671GNM=$ac_cv_path_GNM
40672if test -n "$GNM"; then
40673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40674$as_echo "$GNM" >&6; }
40675else
40676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40677$as_echo "no" >&6; }
40678fi
40679
40680
40681  test -n "$GNM" && break
40682done
40683
40684    else
40685      # If it succeeded, then it was overridden by the user. We will use it
40686      # for the tool.
40687
40688      # First remove it from the list of overridden variables, so we can test
40689      # for unknown variables in the end.
40690      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40691
40692      # Check if we try to supply an empty value
40693      if test "x$GNM" = x; then
40694        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40695$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40696        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40697$as_echo_n "checking for GNM... " >&6; }
40698        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40699$as_echo "disabled" >&6; }
40700      else
40701        # Check if the provided tool contains a complete path.
40702        tool_specified="$GNM"
40703        tool_basename="${tool_specified##*/}"
40704        if test "x$tool_basename" = "x$tool_specified"; then
40705          # A command without a complete path is provided, search $PATH.
40706          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40707$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40708          # Extract the first word of "$tool_basename", so it can be a program name with args.
40709set dummy $tool_basename; ac_word=$2
40710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40711$as_echo_n "checking for $ac_word... " >&6; }
40712if ${ac_cv_path_GNM+:} false; then :
40713  $as_echo_n "(cached) " >&6
40714else
40715  case $GNM in
40716  [\\/]* | ?:[\\/]*)
40717  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40718  ;;
40719  *)
40720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40721for as_dir in $PATH
40722do
40723  IFS=$as_save_IFS
40724  test -z "$as_dir" && as_dir=.
40725    for ac_exec_ext in '' $ac_executable_extensions; do
40726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40727    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40729    break 2
40730  fi
40731done
40732  done
40733IFS=$as_save_IFS
40734
40735  ;;
40736esac
40737fi
40738GNM=$ac_cv_path_GNM
40739if test -n "$GNM"; then
40740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40741$as_echo "$GNM" >&6; }
40742else
40743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40744$as_echo "no" >&6; }
40745fi
40746
40747
40748          if test "x$GNM" = x; then
40749            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40750          fi
40751        else
40752          # Otherwise we believe it is a complete path. Use it as it is.
40753          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40754$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40755          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40756$as_echo_n "checking for GNM... " >&6; }
40757          if test ! -x "$tool_specified"; then
40758            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40759$as_echo "not found" >&6; }
40760            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40761          fi
40762          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40763$as_echo "$tool_specified" >&6; }
40764        fi
40765      fi
40766    fi
40767
40768  fi
40769
40770
40771
40772  # Only process if variable expands to non-empty
40773
40774  if test "x$GNM" != x; then
40775    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40776
40777  # First separate the path from the arguments. This will split at the first
40778  # space.
40779  complete="$GNM"
40780  path="${complete%% *}"
40781  tmp="$complete EOL"
40782  arguments="${tmp#* }"
40783
40784  # Input might be given as Windows format, start by converting to
40785  # unix format.
40786  new_path=`$CYGPATH -u "$path"`
40787
40788  # Now try to locate executable using which
40789  new_path=`$WHICH "$new_path" 2> /dev/null`
40790  # bat and cmd files are not always considered executable in cygwin causing which
40791  # to not find them
40792  if test "x$new_path" = x \
40793      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40794      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40795    new_path=`$CYGPATH -u "$path"`
40796  fi
40797  if test "x$new_path" = x; then
40798    # Oops. Which didn't find the executable.
40799    # The splitting of arguments from the executable at a space might have been incorrect,
40800    # since paths with space are more likely in Windows. Give it another try with the whole
40801    # argument.
40802    path="$complete"
40803    arguments="EOL"
40804    new_path=`$CYGPATH -u "$path"`
40805    new_path=`$WHICH "$new_path" 2> /dev/null`
40806    # bat and cmd files are not always considered executable in cygwin causing which
40807    # to not find them
40808    if test "x$new_path" = x \
40809        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40810        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40811      new_path=`$CYGPATH -u "$path"`
40812    fi
40813    if test "x$new_path" = x; then
40814      # It's still not found. Now this is an unrecoverable error.
40815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40816$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40817      has_space=`$ECHO "$complete" | $GREP " "`
40818      if test "x$has_space" != x; then
40819        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40820$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40821      fi
40822      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40823    fi
40824  fi
40825
40826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40829  # "foo.exe" is OK but "foo" is an error.
40830  #
40831  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40832  # It is also a way to make sure we got the proper file name for the real test later on.
40833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40834  if test "x$test_shortpath" = x; then
40835    # Short path failed, file does not exist as specified.
40836    # Try adding .exe or .cmd
40837    if test -f "${new_path}.exe"; then
40838      input_to_shortpath="${new_path}.exe"
40839    elif test -f "${new_path}.cmd"; then
40840      input_to_shortpath="${new_path}.cmd"
40841    else
40842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40843$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40844      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40845$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40846      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40847    fi
40848  else
40849    input_to_shortpath="$new_path"
40850  fi
40851
40852  # Call helper function which possibly converts this using DOS-style short mode.
40853  # If so, the updated path is stored in $new_path.
40854  new_path="$input_to_shortpath"
40855
40856  input_path="$input_to_shortpath"
40857  # Check if we need to convert this using DOS-style short mode. If the path
40858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40859  # take no chances and rewrite it.
40860  # Note: m4 eats our [], so we need to use [ and ] instead.
40861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40862  if test "x$has_forbidden_chars" != x; then
40863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40864    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40865    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40866    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40867      # Going to short mode and back again did indeed matter. Since short mode is
40868      # case insensitive, let's make it lowercase to improve readability.
40869      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40870      # Now convert it back to Unix-style (cygpath)
40871      input_path=`$CYGPATH -u "$shortmode_path"`
40872      new_path="$input_path"
40873    fi
40874  fi
40875
40876  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40877  if test "x$test_cygdrive_prefix" = x; then
40878    # As a simple fix, exclude /usr/bin since it's not a real path.
40879    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40880      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40881      # a path prefixed by /cygdrive for fixpath to work.
40882      new_path="$CYGWIN_ROOT_PATH$input_path"
40883    fi
40884  fi
40885
40886  # remove trailing .exe if any
40887  new_path="${new_path/%.exe/}"
40888
40889    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40890
40891  # First separate the path from the arguments. This will split at the first
40892  # space.
40893  complete="$GNM"
40894  path="${complete%% *}"
40895  tmp="$complete EOL"
40896  arguments="${tmp#* }"
40897
40898  # Input might be given as Windows format, start by converting to
40899  # unix format.
40900  new_path="$path"
40901
40902  windows_path="$new_path"
40903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40904    unix_path=`$CYGPATH -u "$windows_path"`
40905    new_path="$unix_path"
40906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40908    new_path="$unix_path"
40909  fi
40910
40911
40912  # Now try to locate executable using which
40913  new_path=`$WHICH "$new_path" 2> /dev/null`
40914
40915  if test "x$new_path" = x; then
40916    # Oops. Which didn't find the executable.
40917    # The splitting of arguments from the executable at a space might have been incorrect,
40918    # since paths with space are more likely in Windows. Give it another try with the whole
40919    # argument.
40920    path="$complete"
40921    arguments="EOL"
40922    new_path="$path"
40923
40924  windows_path="$new_path"
40925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40926    unix_path=`$CYGPATH -u "$windows_path"`
40927    new_path="$unix_path"
40928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40930    new_path="$unix_path"
40931  fi
40932
40933
40934    new_path=`$WHICH "$new_path" 2> /dev/null`
40935    # bat and cmd files are not always considered executable in MSYS causing which
40936    # to not find them
40937    if test "x$new_path" = x \
40938        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40939        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40940      new_path="$path"
40941
40942  windows_path="$new_path"
40943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40944    unix_path=`$CYGPATH -u "$windows_path"`
40945    new_path="$unix_path"
40946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40948    new_path="$unix_path"
40949  fi
40950
40951    fi
40952
40953    if test "x$new_path" = x; then
40954      # It's still not found. Now this is an unrecoverable error.
40955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40956$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40957      has_space=`$ECHO "$complete" | $GREP " "`
40958      if test "x$has_space" != x; then
40959        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40960$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40961      fi
40962      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40963    fi
40964  fi
40965
40966  # Now new_path has a complete unix path to the binary
40967  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40968    # Keep paths in /bin as-is, but remove trailing .exe if any
40969    new_path="${new_path/%.exe/}"
40970    # Do not save /bin paths to all_fixpath_prefixes!
40971  else
40972    # Not in mixed or Windows style, start by that.
40973    new_path=`cmd //c echo $new_path`
40974
40975  input_path="$new_path"
40976  # Check if we need to convert this using DOS-style short mode. If the path
40977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40978  # take no chances and rewrite it.
40979  # Note: m4 eats our [], so we need to use [ and ] instead.
40980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40981  if test "x$has_forbidden_chars" != x; then
40982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40983    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40984  fi
40985
40986    # Output is in $new_path
40987
40988  windows_path="$new_path"
40989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40990    unix_path=`$CYGPATH -u "$windows_path"`
40991    new_path="$unix_path"
40992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40994    new_path="$unix_path"
40995  fi
40996
40997    # remove trailing .exe if any
40998    new_path="${new_path/%.exe/}"
40999
41000    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41001    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41002  fi
41003
41004    else
41005      # We're on a unix platform. Hooray! :)
41006      # First separate the path from the arguments. This will split at the first
41007      # space.
41008      complete="$GNM"
41009      path="${complete%% *}"
41010      tmp="$complete EOL"
41011      arguments="${tmp#* }"
41012
41013      # Cannot rely on the command "which" here since it doesn't always work.
41014      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41015      if test -z "$is_absolute_path"; then
41016        # Path to executable is not absolute. Find it.
41017        IFS_save="$IFS"
41018        IFS=:
41019        for p in $PATH; do
41020          if test -f "$p/$path" && test -x "$p/$path"; then
41021            new_path="$p/$path"
41022            break
41023          fi
41024        done
41025        IFS="$IFS_save"
41026      else
41027        # This is an absolute path, we can use it without further modifications.
41028        new_path="$path"
41029      fi
41030
41031      if test "x$new_path" = x; then
41032        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41033$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41034        has_space=`$ECHO "$complete" | $GREP " "`
41035        if test "x$has_space" != x; then
41036          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41037$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41038        fi
41039        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41040      fi
41041    fi
41042
41043    # Now join together the path and the arguments once again
41044    if test "x$arguments" != xEOL; then
41045      new_complete="$new_path ${arguments% *}"
41046    else
41047      new_complete="$new_path"
41048    fi
41049
41050    if test "x$complete" != "x$new_complete"; then
41051      GNM="$new_complete"
41052      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41053$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41054    fi
41055  fi
41056
41057  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41058    # FIXME: we should unify this with the solaris case above.
41059
41060
41061  # Publish this variable in the help.
41062
41063
41064  if [ -z "${STRIP+x}" ]; then
41065    # The variable is not set by user, try to locate tool using the code snippet
41066    if test -n "$ac_tool_prefix"; then
41067  for ac_prog in strip
41068  do
41069    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41070set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41072$as_echo_n "checking for $ac_word... " >&6; }
41073if ${ac_cv_prog_STRIP+:} false; then :
41074  $as_echo_n "(cached) " >&6
41075else
41076  if test -n "$STRIP"; then
41077  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41078else
41079as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41080for as_dir in $PATH
41081do
41082  IFS=$as_save_IFS
41083  test -z "$as_dir" && as_dir=.
41084    for ac_exec_ext in '' $ac_executable_extensions; do
41085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41086    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41088    break 2
41089  fi
41090done
41091  done
41092IFS=$as_save_IFS
41093
41094fi
41095fi
41096STRIP=$ac_cv_prog_STRIP
41097if test -n "$STRIP"; then
41098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41099$as_echo "$STRIP" >&6; }
41100else
41101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41102$as_echo "no" >&6; }
41103fi
41104
41105
41106    test -n "$STRIP" && break
41107  done
41108fi
41109if test -z "$STRIP"; then
41110  ac_ct_STRIP=$STRIP
41111  for ac_prog in strip
41112do
41113  # Extract the first word of "$ac_prog", so it can be a program name with args.
41114set dummy $ac_prog; ac_word=$2
41115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41116$as_echo_n "checking for $ac_word... " >&6; }
41117if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41118  $as_echo_n "(cached) " >&6
41119else
41120  if test -n "$ac_ct_STRIP"; then
41121  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41122else
41123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41124for as_dir in $PATH
41125do
41126  IFS=$as_save_IFS
41127  test -z "$as_dir" && as_dir=.
41128    for ac_exec_ext in '' $ac_executable_extensions; do
41129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41130    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41132    break 2
41133  fi
41134done
41135  done
41136IFS=$as_save_IFS
41137
41138fi
41139fi
41140ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41141if test -n "$ac_ct_STRIP"; then
41142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41143$as_echo "$ac_ct_STRIP" >&6; }
41144else
41145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41146$as_echo "no" >&6; }
41147fi
41148
41149
41150  test -n "$ac_ct_STRIP" && break
41151done
41152
41153  if test "x$ac_ct_STRIP" = x; then
41154    STRIP=""
41155  else
41156    case $cross_compiling:$ac_tool_warned in
41157yes:)
41158{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41159$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41160ac_tool_warned=yes ;;
41161esac
41162    STRIP=$ac_ct_STRIP
41163  fi
41164fi
41165
41166  else
41167    # The variable is set, but is it from the command line or the environment?
41168
41169    # Try to remove the string !STRIP! from our list.
41170    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41171    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41172      # If it failed, the variable was not from the command line. Ignore it,
41173      # but warn the user (except for BASH, which is always set by the calling BASH).
41174      if test "xSTRIP" != xBASH; then
41175        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41176$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41177      fi
41178      # Try to locate tool using the code snippet
41179      if test -n "$ac_tool_prefix"; then
41180  for ac_prog in strip
41181  do
41182    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41183set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41185$as_echo_n "checking for $ac_word... " >&6; }
41186if ${ac_cv_prog_STRIP+:} false; then :
41187  $as_echo_n "(cached) " >&6
41188else
41189  if test -n "$STRIP"; then
41190  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41191else
41192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41193for as_dir in $PATH
41194do
41195  IFS=$as_save_IFS
41196  test -z "$as_dir" && as_dir=.
41197    for ac_exec_ext in '' $ac_executable_extensions; do
41198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41199    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41201    break 2
41202  fi
41203done
41204  done
41205IFS=$as_save_IFS
41206
41207fi
41208fi
41209STRIP=$ac_cv_prog_STRIP
41210if test -n "$STRIP"; then
41211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41212$as_echo "$STRIP" >&6; }
41213else
41214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41215$as_echo "no" >&6; }
41216fi
41217
41218
41219    test -n "$STRIP" && break
41220  done
41221fi
41222if test -z "$STRIP"; then
41223  ac_ct_STRIP=$STRIP
41224  for ac_prog in strip
41225do
41226  # Extract the first word of "$ac_prog", so it can be a program name with args.
41227set dummy $ac_prog; ac_word=$2
41228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41229$as_echo_n "checking for $ac_word... " >&6; }
41230if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41231  $as_echo_n "(cached) " >&6
41232else
41233  if test -n "$ac_ct_STRIP"; then
41234  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41235else
41236as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41237for as_dir in $PATH
41238do
41239  IFS=$as_save_IFS
41240  test -z "$as_dir" && as_dir=.
41241    for ac_exec_ext in '' $ac_executable_extensions; do
41242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41243    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41245    break 2
41246  fi
41247done
41248  done
41249IFS=$as_save_IFS
41250
41251fi
41252fi
41253ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41254if test -n "$ac_ct_STRIP"; then
41255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41256$as_echo "$ac_ct_STRIP" >&6; }
41257else
41258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41259$as_echo "no" >&6; }
41260fi
41261
41262
41263  test -n "$ac_ct_STRIP" && break
41264done
41265
41266  if test "x$ac_ct_STRIP" = x; then
41267    STRIP=""
41268  else
41269    case $cross_compiling:$ac_tool_warned in
41270yes:)
41271{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41272$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41273ac_tool_warned=yes ;;
41274esac
41275    STRIP=$ac_ct_STRIP
41276  fi
41277fi
41278
41279    else
41280      # If it succeeded, then it was overridden by the user. We will use it
41281      # for the tool.
41282
41283      # First remove it from the list of overridden variables, so we can test
41284      # for unknown variables in the end.
41285      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41286
41287      # Check if we try to supply an empty value
41288      if test "x$STRIP" = x; then
41289        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41290$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41291        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41292$as_echo_n "checking for STRIP... " >&6; }
41293        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41294$as_echo "disabled" >&6; }
41295      else
41296        # Check if the provided tool contains a complete path.
41297        tool_specified="$STRIP"
41298        tool_basename="${tool_specified##*/}"
41299        if test "x$tool_basename" = "x$tool_specified"; then
41300          # A command without a complete path is provided, search $PATH.
41301          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41302$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41303          # Extract the first word of "$tool_basename", so it can be a program name with args.
41304set dummy $tool_basename; ac_word=$2
41305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41306$as_echo_n "checking for $ac_word... " >&6; }
41307if ${ac_cv_path_STRIP+:} false; then :
41308  $as_echo_n "(cached) " >&6
41309else
41310  case $STRIP in
41311  [\\/]* | ?:[\\/]*)
41312  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41313  ;;
41314  *)
41315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41316for as_dir in $PATH
41317do
41318  IFS=$as_save_IFS
41319  test -z "$as_dir" && as_dir=.
41320    for ac_exec_ext in '' $ac_executable_extensions; do
41321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41322    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41324    break 2
41325  fi
41326done
41327  done
41328IFS=$as_save_IFS
41329
41330  ;;
41331esac
41332fi
41333STRIP=$ac_cv_path_STRIP
41334if test -n "$STRIP"; then
41335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41336$as_echo "$STRIP" >&6; }
41337else
41338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41339$as_echo "no" >&6; }
41340fi
41341
41342
41343          if test "x$STRIP" = x; then
41344            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41345          fi
41346        else
41347          # Otherwise we believe it is a complete path. Use it as it is.
41348          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41349$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41350          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41351$as_echo_n "checking for STRIP... " >&6; }
41352          if test ! -x "$tool_specified"; then
41353            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41354$as_echo "not found" >&6; }
41355            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41356          fi
41357          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41358$as_echo "$tool_specified" >&6; }
41359        fi
41360      fi
41361    fi
41362
41363  fi
41364
41365
41366
41367  # Only process if variable expands to non-empty
41368
41369  if test "x$STRIP" != x; then
41370    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41371
41372  # First separate the path from the arguments. This will split at the first
41373  # space.
41374  complete="$STRIP"
41375  path="${complete%% *}"
41376  tmp="$complete EOL"
41377  arguments="${tmp#* }"
41378
41379  # Input might be given as Windows format, start by converting to
41380  # unix format.
41381  new_path=`$CYGPATH -u "$path"`
41382
41383  # Now try to locate executable using which
41384  new_path=`$WHICH "$new_path" 2> /dev/null`
41385  # bat and cmd files are not always considered executable in cygwin causing which
41386  # to not find them
41387  if test "x$new_path" = x \
41388      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41389      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41390    new_path=`$CYGPATH -u "$path"`
41391  fi
41392  if test "x$new_path" = x; then
41393    # Oops. Which didn't find the executable.
41394    # The splitting of arguments from the executable at a space might have been incorrect,
41395    # since paths with space are more likely in Windows. Give it another try with the whole
41396    # argument.
41397    path="$complete"
41398    arguments="EOL"
41399    new_path=`$CYGPATH -u "$path"`
41400    new_path=`$WHICH "$new_path" 2> /dev/null`
41401    # bat and cmd files are not always considered executable in cygwin causing which
41402    # to not find them
41403    if test "x$new_path" = x \
41404        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41405        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41406      new_path=`$CYGPATH -u "$path"`
41407    fi
41408    if test "x$new_path" = x; then
41409      # It's still not found. Now this is an unrecoverable error.
41410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41411$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41412      has_space=`$ECHO "$complete" | $GREP " "`
41413      if test "x$has_space" != x; then
41414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41416      fi
41417      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41418    fi
41419  fi
41420
41421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41424  # "foo.exe" is OK but "foo" is an error.
41425  #
41426  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41427  # It is also a way to make sure we got the proper file name for the real test later on.
41428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41429  if test "x$test_shortpath" = x; then
41430    # Short path failed, file does not exist as specified.
41431    # Try adding .exe or .cmd
41432    if test -f "${new_path}.exe"; then
41433      input_to_shortpath="${new_path}.exe"
41434    elif test -f "${new_path}.cmd"; then
41435      input_to_shortpath="${new_path}.cmd"
41436    else
41437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41438$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41439      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41440$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41441      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41442    fi
41443  else
41444    input_to_shortpath="$new_path"
41445  fi
41446
41447  # Call helper function which possibly converts this using DOS-style short mode.
41448  # If so, the updated path is stored in $new_path.
41449  new_path="$input_to_shortpath"
41450
41451  input_path="$input_to_shortpath"
41452  # Check if we need to convert this using DOS-style short mode. If the path
41453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41454  # take no chances and rewrite it.
41455  # Note: m4 eats our [], so we need to use [ and ] instead.
41456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41457  if test "x$has_forbidden_chars" != x; then
41458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41459    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41460    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41461    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41462      # Going to short mode and back again did indeed matter. Since short mode is
41463      # case insensitive, let's make it lowercase to improve readability.
41464      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41465      # Now convert it back to Unix-style (cygpath)
41466      input_path=`$CYGPATH -u "$shortmode_path"`
41467      new_path="$input_path"
41468    fi
41469  fi
41470
41471  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41472  if test "x$test_cygdrive_prefix" = x; then
41473    # As a simple fix, exclude /usr/bin since it's not a real path.
41474    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41475      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41476      # a path prefixed by /cygdrive for fixpath to work.
41477      new_path="$CYGWIN_ROOT_PATH$input_path"
41478    fi
41479  fi
41480
41481  # remove trailing .exe if any
41482  new_path="${new_path/%.exe/}"
41483
41484    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41485
41486  # First separate the path from the arguments. This will split at the first
41487  # space.
41488  complete="$STRIP"
41489  path="${complete%% *}"
41490  tmp="$complete EOL"
41491  arguments="${tmp#* }"
41492
41493  # Input might be given as Windows format, start by converting to
41494  # unix format.
41495  new_path="$path"
41496
41497  windows_path="$new_path"
41498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41499    unix_path=`$CYGPATH -u "$windows_path"`
41500    new_path="$unix_path"
41501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41503    new_path="$unix_path"
41504  fi
41505
41506
41507  # Now try to locate executable using which
41508  new_path=`$WHICH "$new_path" 2> /dev/null`
41509
41510  if test "x$new_path" = x; then
41511    # Oops. Which didn't find the executable.
41512    # The splitting of arguments from the executable at a space might have been incorrect,
41513    # since paths with space are more likely in Windows. Give it another try with the whole
41514    # argument.
41515    path="$complete"
41516    arguments="EOL"
41517    new_path="$path"
41518
41519  windows_path="$new_path"
41520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41521    unix_path=`$CYGPATH -u "$windows_path"`
41522    new_path="$unix_path"
41523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41525    new_path="$unix_path"
41526  fi
41527
41528
41529    new_path=`$WHICH "$new_path" 2> /dev/null`
41530    # bat and cmd files are not always considered executable in MSYS causing which
41531    # to not find them
41532    if test "x$new_path" = x \
41533        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41534        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41535      new_path="$path"
41536
41537  windows_path="$new_path"
41538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41539    unix_path=`$CYGPATH -u "$windows_path"`
41540    new_path="$unix_path"
41541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41543    new_path="$unix_path"
41544  fi
41545
41546    fi
41547
41548    if test "x$new_path" = x; then
41549      # It's still not found. Now this is an unrecoverable error.
41550      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41551$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41552      has_space=`$ECHO "$complete" | $GREP " "`
41553      if test "x$has_space" != x; then
41554        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41555$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41556      fi
41557      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41558    fi
41559  fi
41560
41561  # Now new_path has a complete unix path to the binary
41562  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41563    # Keep paths in /bin as-is, but remove trailing .exe if any
41564    new_path="${new_path/%.exe/}"
41565    # Do not save /bin paths to all_fixpath_prefixes!
41566  else
41567    # Not in mixed or Windows style, start by that.
41568    new_path=`cmd //c echo $new_path`
41569
41570  input_path="$new_path"
41571  # Check if we need to convert this using DOS-style short mode. If the path
41572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41573  # take no chances and rewrite it.
41574  # Note: m4 eats our [], so we need to use [ and ] instead.
41575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41576  if test "x$has_forbidden_chars" != x; then
41577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41578    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41579  fi
41580
41581    # Output is in $new_path
41582
41583  windows_path="$new_path"
41584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41585    unix_path=`$CYGPATH -u "$windows_path"`
41586    new_path="$unix_path"
41587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41589    new_path="$unix_path"
41590  fi
41591
41592    # remove trailing .exe if any
41593    new_path="${new_path/%.exe/}"
41594
41595    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41596    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41597  fi
41598
41599    else
41600      # We're on a unix platform. Hooray! :)
41601      # First separate the path from the arguments. This will split at the first
41602      # space.
41603      complete="$STRIP"
41604      path="${complete%% *}"
41605      tmp="$complete EOL"
41606      arguments="${tmp#* }"
41607
41608      # Cannot rely on the command "which" here since it doesn't always work.
41609      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41610      if test -z "$is_absolute_path"; then
41611        # Path to executable is not absolute. Find it.
41612        IFS_save="$IFS"
41613        IFS=:
41614        for p in $PATH; do
41615          if test -f "$p/$path" && test -x "$p/$path"; then
41616            new_path="$p/$path"
41617            break
41618          fi
41619        done
41620        IFS="$IFS_save"
41621      else
41622        # This is an absolute path, we can use it without further modifications.
41623        new_path="$path"
41624      fi
41625
41626      if test "x$new_path" = x; then
41627        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41628$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41629        has_space=`$ECHO "$complete" | $GREP " "`
41630        if test "x$has_space" != x; then
41631          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41632$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41633        fi
41634        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41635      fi
41636    fi
41637
41638    # Now join together the path and the arguments once again
41639    if test "x$arguments" != xEOL; then
41640      new_complete="$new_path ${arguments% *}"
41641    else
41642      new_complete="$new_path"
41643    fi
41644
41645    if test "x$complete" != "x$new_complete"; then
41646      STRIP="$new_complete"
41647      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41648$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41649    fi
41650  fi
41651
41652    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41653
41654
41655  # Publish this variable in the help.
41656
41657
41658  if [ -z "${NM+x}" ]; then
41659    # The variable is not set by user, try to locate tool using the code snippet
41660    if test -n "$ac_tool_prefix"; then
41661  for ac_prog in nm gcc-nm
41662  do
41663    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41664set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41666$as_echo_n "checking for $ac_word... " >&6; }
41667if ${ac_cv_prog_NM+:} false; then :
41668  $as_echo_n "(cached) " >&6
41669else
41670  if test -n "$NM"; then
41671  ac_cv_prog_NM="$NM" # Let the user override the test.
41672else
41673as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41674for as_dir in $PATH
41675do
41676  IFS=$as_save_IFS
41677  test -z "$as_dir" && as_dir=.
41678    for ac_exec_ext in '' $ac_executable_extensions; do
41679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41680    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41682    break 2
41683  fi
41684done
41685  done
41686IFS=$as_save_IFS
41687
41688fi
41689fi
41690NM=$ac_cv_prog_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    test -n "$NM" && break
41701  done
41702fi
41703if test -z "$NM"; then
41704  ac_ct_NM=$NM
41705  for ac_prog in nm gcc-nm
41706do
41707  # Extract the first word of "$ac_prog", so it can be a program name with args.
41708set dummy $ac_prog; ac_word=$2
41709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41710$as_echo_n "checking for $ac_word... " >&6; }
41711if ${ac_cv_prog_ac_ct_NM+:} false; then :
41712  $as_echo_n "(cached) " >&6
41713else
41714  if test -n "$ac_ct_NM"; then
41715  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41716else
41717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41718for as_dir in $PATH
41719do
41720  IFS=$as_save_IFS
41721  test -z "$as_dir" && as_dir=.
41722    for ac_exec_ext in '' $ac_executable_extensions; do
41723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41724    ac_cv_prog_ac_ct_NM="$ac_prog"
41725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41726    break 2
41727  fi
41728done
41729  done
41730IFS=$as_save_IFS
41731
41732fi
41733fi
41734ac_ct_NM=$ac_cv_prog_ac_ct_NM
41735if test -n "$ac_ct_NM"; then
41736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41737$as_echo "$ac_ct_NM" >&6; }
41738else
41739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41740$as_echo "no" >&6; }
41741fi
41742
41743
41744  test -n "$ac_ct_NM" && break
41745done
41746
41747  if test "x$ac_ct_NM" = x; then
41748    NM=""
41749  else
41750    case $cross_compiling:$ac_tool_warned in
41751yes:)
41752{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41753$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41754ac_tool_warned=yes ;;
41755esac
41756    NM=$ac_ct_NM
41757  fi
41758fi
41759
41760  else
41761    # The variable is set, but is it from the command line or the environment?
41762
41763    # Try to remove the string !NM! from our list.
41764    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41765    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41766      # If it failed, the variable was not from the command line. Ignore it,
41767      # but warn the user (except for BASH, which is always set by the calling BASH).
41768      if test "xNM" != xBASH; then
41769        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41770$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41771      fi
41772      # Try to locate tool using the code snippet
41773      if test -n "$ac_tool_prefix"; then
41774  for ac_prog in nm gcc-nm
41775  do
41776    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41777set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41779$as_echo_n "checking for $ac_word... " >&6; }
41780if ${ac_cv_prog_NM+:} false; then :
41781  $as_echo_n "(cached) " >&6
41782else
41783  if test -n "$NM"; then
41784  ac_cv_prog_NM="$NM" # Let the user override the test.
41785else
41786as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41787for as_dir in $PATH
41788do
41789  IFS=$as_save_IFS
41790  test -z "$as_dir" && as_dir=.
41791    for ac_exec_ext in '' $ac_executable_extensions; do
41792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41793    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41795    break 2
41796  fi
41797done
41798  done
41799IFS=$as_save_IFS
41800
41801fi
41802fi
41803NM=$ac_cv_prog_NM
41804if test -n "$NM"; then
41805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41806$as_echo "$NM" >&6; }
41807else
41808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41809$as_echo "no" >&6; }
41810fi
41811
41812
41813    test -n "$NM" && break
41814  done
41815fi
41816if test -z "$NM"; then
41817  ac_ct_NM=$NM
41818  for ac_prog in nm gcc-nm
41819do
41820  # Extract the first word of "$ac_prog", so it can be a program name with args.
41821set dummy $ac_prog; ac_word=$2
41822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41823$as_echo_n "checking for $ac_word... " >&6; }
41824if ${ac_cv_prog_ac_ct_NM+:} false; then :
41825  $as_echo_n "(cached) " >&6
41826else
41827  if test -n "$ac_ct_NM"; then
41828  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41829else
41830as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41831for as_dir in $PATH
41832do
41833  IFS=$as_save_IFS
41834  test -z "$as_dir" && as_dir=.
41835    for ac_exec_ext in '' $ac_executable_extensions; do
41836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41837    ac_cv_prog_ac_ct_NM="$ac_prog"
41838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41839    break 2
41840  fi
41841done
41842  done
41843IFS=$as_save_IFS
41844
41845fi
41846fi
41847ac_ct_NM=$ac_cv_prog_ac_ct_NM
41848if test -n "$ac_ct_NM"; then
41849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41850$as_echo "$ac_ct_NM" >&6; }
41851else
41852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41853$as_echo "no" >&6; }
41854fi
41855
41856
41857  test -n "$ac_ct_NM" && break
41858done
41859
41860  if test "x$ac_ct_NM" = x; then
41861    NM=""
41862  else
41863    case $cross_compiling:$ac_tool_warned in
41864yes:)
41865{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41866$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41867ac_tool_warned=yes ;;
41868esac
41869    NM=$ac_ct_NM
41870  fi
41871fi
41872
41873    else
41874      # If it succeeded, then it was overridden by the user. We will use it
41875      # for the tool.
41876
41877      # First remove it from the list of overridden variables, so we can test
41878      # for unknown variables in the end.
41879      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41880
41881      # Check if we try to supply an empty value
41882      if test "x$NM" = x; then
41883        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41884$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41885        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41886$as_echo_n "checking for NM... " >&6; }
41887        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41888$as_echo "disabled" >&6; }
41889      else
41890        # Check if the provided tool contains a complete path.
41891        tool_specified="$NM"
41892        tool_basename="${tool_specified##*/}"
41893        if test "x$tool_basename" = "x$tool_specified"; then
41894          # A command without a complete path is provided, search $PATH.
41895          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41896$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41897          # Extract the first word of "$tool_basename", so it can be a program name with args.
41898set dummy $tool_basename; ac_word=$2
41899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41900$as_echo_n "checking for $ac_word... " >&6; }
41901if ${ac_cv_path_NM+:} false; then :
41902  $as_echo_n "(cached) " >&6
41903else
41904  case $NM in
41905  [\\/]* | ?:[\\/]*)
41906  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41907  ;;
41908  *)
41909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41910for as_dir in $PATH
41911do
41912  IFS=$as_save_IFS
41913  test -z "$as_dir" && as_dir=.
41914    for ac_exec_ext in '' $ac_executable_extensions; do
41915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41916    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41918    break 2
41919  fi
41920done
41921  done
41922IFS=$as_save_IFS
41923
41924  ;;
41925esac
41926fi
41927NM=$ac_cv_path_NM
41928if test -n "$NM"; then
41929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41930$as_echo "$NM" >&6; }
41931else
41932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41933$as_echo "no" >&6; }
41934fi
41935
41936
41937          if test "x$NM" = x; then
41938            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41939          fi
41940        else
41941          # Otherwise we believe it is a complete path. Use it as it is.
41942          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41943$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41944          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41945$as_echo_n "checking for NM... " >&6; }
41946          if test ! -x "$tool_specified"; then
41947            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41948$as_echo "not found" >&6; }
41949            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41950          fi
41951          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41952$as_echo "$tool_specified" >&6; }
41953        fi
41954      fi
41955    fi
41956
41957  fi
41958
41959
41960    else
41961
41962
41963  # Publish this variable in the help.
41964
41965
41966  if [ -z "${NM+x}" ]; then
41967    # The variable is not set by user, try to locate tool using the code snippet
41968    if test -n "$ac_tool_prefix"; then
41969  for ac_prog in nm
41970  do
41971    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41972set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41974$as_echo_n "checking for $ac_word... " >&6; }
41975if ${ac_cv_prog_NM+:} false; then :
41976  $as_echo_n "(cached) " >&6
41977else
41978  if test -n "$NM"; then
41979  ac_cv_prog_NM="$NM" # Let the user override the test.
41980else
41981as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41982for as_dir in $PATH
41983do
41984  IFS=$as_save_IFS
41985  test -z "$as_dir" && as_dir=.
41986    for ac_exec_ext in '' $ac_executable_extensions; do
41987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41988    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41990    break 2
41991  fi
41992done
41993  done
41994IFS=$as_save_IFS
41995
41996fi
41997fi
41998NM=$ac_cv_prog_NM
41999if test -n "$NM"; then
42000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42001$as_echo "$NM" >&6; }
42002else
42003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42004$as_echo "no" >&6; }
42005fi
42006
42007
42008    test -n "$NM" && break
42009  done
42010fi
42011if test -z "$NM"; then
42012  ac_ct_NM=$NM
42013  for ac_prog in nm
42014do
42015  # Extract the first word of "$ac_prog", so it can be a program name with args.
42016set dummy $ac_prog; ac_word=$2
42017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42018$as_echo_n "checking for $ac_word... " >&6; }
42019if ${ac_cv_prog_ac_ct_NM+:} false; then :
42020  $as_echo_n "(cached) " >&6
42021else
42022  if test -n "$ac_ct_NM"; then
42023  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42024else
42025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42026for as_dir in $PATH
42027do
42028  IFS=$as_save_IFS
42029  test -z "$as_dir" && as_dir=.
42030    for ac_exec_ext in '' $ac_executable_extensions; do
42031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42032    ac_cv_prog_ac_ct_NM="$ac_prog"
42033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42034    break 2
42035  fi
42036done
42037  done
42038IFS=$as_save_IFS
42039
42040fi
42041fi
42042ac_ct_NM=$ac_cv_prog_ac_ct_NM
42043if test -n "$ac_ct_NM"; then
42044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42045$as_echo "$ac_ct_NM" >&6; }
42046else
42047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42048$as_echo "no" >&6; }
42049fi
42050
42051
42052  test -n "$ac_ct_NM" && break
42053done
42054
42055  if test "x$ac_ct_NM" = x; then
42056    NM=""
42057  else
42058    case $cross_compiling:$ac_tool_warned in
42059yes:)
42060{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42061$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42062ac_tool_warned=yes ;;
42063esac
42064    NM=$ac_ct_NM
42065  fi
42066fi
42067
42068  else
42069    # The variable is set, but is it from the command line or the environment?
42070
42071    # Try to remove the string !NM! from our list.
42072    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42073    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42074      # If it failed, the variable was not from the command line. Ignore it,
42075      # but warn the user (except for BASH, which is always set by the calling BASH).
42076      if test "xNM" != xBASH; then
42077        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42078$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42079      fi
42080      # Try to locate tool using the code snippet
42081      if test -n "$ac_tool_prefix"; then
42082  for ac_prog in nm
42083  do
42084    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42085set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42087$as_echo_n "checking for $ac_word... " >&6; }
42088if ${ac_cv_prog_NM+:} false; then :
42089  $as_echo_n "(cached) " >&6
42090else
42091  if test -n "$NM"; then
42092  ac_cv_prog_NM="$NM" # Let the user override the test.
42093else
42094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42095for as_dir in $PATH
42096do
42097  IFS=$as_save_IFS
42098  test -z "$as_dir" && as_dir=.
42099    for ac_exec_ext in '' $ac_executable_extensions; do
42100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42101    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42103    break 2
42104  fi
42105done
42106  done
42107IFS=$as_save_IFS
42108
42109fi
42110fi
42111NM=$ac_cv_prog_NM
42112if test -n "$NM"; then
42113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42114$as_echo "$NM" >&6; }
42115else
42116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42117$as_echo "no" >&6; }
42118fi
42119
42120
42121    test -n "$NM" && break
42122  done
42123fi
42124if test -z "$NM"; then
42125  ac_ct_NM=$NM
42126  for ac_prog in nm
42127do
42128  # Extract the first word of "$ac_prog", so it can be a program name with args.
42129set dummy $ac_prog; ac_word=$2
42130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42131$as_echo_n "checking for $ac_word... " >&6; }
42132if ${ac_cv_prog_ac_ct_NM+:} false; then :
42133  $as_echo_n "(cached) " >&6
42134else
42135  if test -n "$ac_ct_NM"; then
42136  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42137else
42138as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42139for as_dir in $PATH
42140do
42141  IFS=$as_save_IFS
42142  test -z "$as_dir" && as_dir=.
42143    for ac_exec_ext in '' $ac_executable_extensions; do
42144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42145    ac_cv_prog_ac_ct_NM="$ac_prog"
42146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42147    break 2
42148  fi
42149done
42150  done
42151IFS=$as_save_IFS
42152
42153fi
42154fi
42155ac_ct_NM=$ac_cv_prog_ac_ct_NM
42156if test -n "$ac_ct_NM"; then
42157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42158$as_echo "$ac_ct_NM" >&6; }
42159else
42160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42161$as_echo "no" >&6; }
42162fi
42163
42164
42165  test -n "$ac_ct_NM" && break
42166done
42167
42168  if test "x$ac_ct_NM" = x; then
42169    NM=""
42170  else
42171    case $cross_compiling:$ac_tool_warned in
42172yes:)
42173{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42174$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42175ac_tool_warned=yes ;;
42176esac
42177    NM=$ac_ct_NM
42178  fi
42179fi
42180
42181    else
42182      # If it succeeded, then it was overridden by the user. We will use it
42183      # for the tool.
42184
42185      # First remove it from the list of overridden variables, so we can test
42186      # for unknown variables in the end.
42187      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42188
42189      # Check if we try to supply an empty value
42190      if test "x$NM" = x; then
42191        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42192$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42193        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42194$as_echo_n "checking for NM... " >&6; }
42195        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42196$as_echo "disabled" >&6; }
42197      else
42198        # Check if the provided tool contains a complete path.
42199        tool_specified="$NM"
42200        tool_basename="${tool_specified##*/}"
42201        if test "x$tool_basename" = "x$tool_specified"; then
42202          # A command without a complete path is provided, search $PATH.
42203          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42204$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42205          # Extract the first word of "$tool_basename", so it can be a program name with args.
42206set dummy $tool_basename; ac_word=$2
42207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42208$as_echo_n "checking for $ac_word... " >&6; }
42209if ${ac_cv_path_NM+:} false; then :
42210  $as_echo_n "(cached) " >&6
42211else
42212  case $NM in
42213  [\\/]* | ?:[\\/]*)
42214  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42215  ;;
42216  *)
42217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42218for as_dir in $PATH
42219do
42220  IFS=$as_save_IFS
42221  test -z "$as_dir" && as_dir=.
42222    for ac_exec_ext in '' $ac_executable_extensions; do
42223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42224    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42226    break 2
42227  fi
42228done
42229  done
42230IFS=$as_save_IFS
42231
42232  ;;
42233esac
42234fi
42235NM=$ac_cv_path_NM
42236if test -n "$NM"; then
42237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42238$as_echo "$NM" >&6; }
42239else
42240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42241$as_echo "no" >&6; }
42242fi
42243
42244
42245          if test "x$NM" = x; then
42246            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42247          fi
42248        else
42249          # Otherwise we believe it is a complete path. Use it as it is.
42250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42251$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42252          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42253$as_echo_n "checking for NM... " >&6; }
42254          if test ! -x "$tool_specified"; then
42255            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42256$as_echo "not found" >&6; }
42257            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42258          fi
42259          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42260$as_echo "$tool_specified" >&6; }
42261        fi
42262      fi
42263    fi
42264
42265  fi
42266
42267
42268    fi
42269
42270  # Only process if variable expands to non-empty
42271
42272  if test "x$NM" != x; then
42273    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42274
42275  # First separate the path from the arguments. This will split at the first
42276  # space.
42277  complete="$NM"
42278  path="${complete%% *}"
42279  tmp="$complete EOL"
42280  arguments="${tmp#* }"
42281
42282  # Input might be given as Windows format, start by converting to
42283  # unix format.
42284  new_path=`$CYGPATH -u "$path"`
42285
42286  # Now try to locate executable using which
42287  new_path=`$WHICH "$new_path" 2> /dev/null`
42288  # bat and cmd files are not always considered executable in cygwin causing which
42289  # to not find them
42290  if test "x$new_path" = x \
42291      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42292      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42293    new_path=`$CYGPATH -u "$path"`
42294  fi
42295  if test "x$new_path" = x; then
42296    # Oops. Which didn't find the executable.
42297    # The splitting of arguments from the executable at a space might have been incorrect,
42298    # since paths with space are more likely in Windows. Give it another try with the whole
42299    # argument.
42300    path="$complete"
42301    arguments="EOL"
42302    new_path=`$CYGPATH -u "$path"`
42303    new_path=`$WHICH "$new_path" 2> /dev/null`
42304    # bat and cmd files are not always considered executable in cygwin causing which
42305    # to not find them
42306    if test "x$new_path" = x \
42307        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42308        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42309      new_path=`$CYGPATH -u "$path"`
42310    fi
42311    if test "x$new_path" = x; then
42312      # It's still not found. Now this is an unrecoverable error.
42313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42314$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42315      has_space=`$ECHO "$complete" | $GREP " "`
42316      if test "x$has_space" != x; then
42317        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42318$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42319      fi
42320      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42321    fi
42322  fi
42323
42324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42327  # "foo.exe" is OK but "foo" is an error.
42328  #
42329  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42330  # It is also a way to make sure we got the proper file name for the real test later on.
42331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42332  if test "x$test_shortpath" = x; then
42333    # Short path failed, file does not exist as specified.
42334    # Try adding .exe or .cmd
42335    if test -f "${new_path}.exe"; then
42336      input_to_shortpath="${new_path}.exe"
42337    elif test -f "${new_path}.cmd"; then
42338      input_to_shortpath="${new_path}.cmd"
42339    else
42340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42341$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42342      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42343$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42344      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42345    fi
42346  else
42347    input_to_shortpath="$new_path"
42348  fi
42349
42350  # Call helper function which possibly converts this using DOS-style short mode.
42351  # If so, the updated path is stored in $new_path.
42352  new_path="$input_to_shortpath"
42353
42354  input_path="$input_to_shortpath"
42355  # Check if we need to convert this using DOS-style short mode. If the path
42356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42357  # take no chances and rewrite it.
42358  # Note: m4 eats our [], so we need to use [ and ] instead.
42359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42360  if test "x$has_forbidden_chars" != x; then
42361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42362    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42363    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42364    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42365      # Going to short mode and back again did indeed matter. Since short mode is
42366      # case insensitive, let's make it lowercase to improve readability.
42367      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42368      # Now convert it back to Unix-style (cygpath)
42369      input_path=`$CYGPATH -u "$shortmode_path"`
42370      new_path="$input_path"
42371    fi
42372  fi
42373
42374  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42375  if test "x$test_cygdrive_prefix" = x; then
42376    # As a simple fix, exclude /usr/bin since it's not a real path.
42377    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42378      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42379      # a path prefixed by /cygdrive for fixpath to work.
42380      new_path="$CYGWIN_ROOT_PATH$input_path"
42381    fi
42382  fi
42383
42384  # remove trailing .exe if any
42385  new_path="${new_path/%.exe/}"
42386
42387    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42388
42389  # First separate the path from the arguments. This will split at the first
42390  # space.
42391  complete="$NM"
42392  path="${complete%% *}"
42393  tmp="$complete EOL"
42394  arguments="${tmp#* }"
42395
42396  # Input might be given as Windows format, start by converting to
42397  # unix format.
42398  new_path="$path"
42399
42400  windows_path="$new_path"
42401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42402    unix_path=`$CYGPATH -u "$windows_path"`
42403    new_path="$unix_path"
42404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42406    new_path="$unix_path"
42407  fi
42408
42409
42410  # Now try to locate executable using which
42411  new_path=`$WHICH "$new_path" 2> /dev/null`
42412
42413  if test "x$new_path" = x; then
42414    # Oops. Which didn't find the executable.
42415    # The splitting of arguments from the executable at a space might have been incorrect,
42416    # since paths with space are more likely in Windows. Give it another try with the whole
42417    # argument.
42418    path="$complete"
42419    arguments="EOL"
42420    new_path="$path"
42421
42422  windows_path="$new_path"
42423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42424    unix_path=`$CYGPATH -u "$windows_path"`
42425    new_path="$unix_path"
42426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42428    new_path="$unix_path"
42429  fi
42430
42431
42432    new_path=`$WHICH "$new_path" 2> /dev/null`
42433    # bat and cmd files are not always considered executable in MSYS causing which
42434    # to not find them
42435    if test "x$new_path" = x \
42436        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42437        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42438      new_path="$path"
42439
42440  windows_path="$new_path"
42441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42442    unix_path=`$CYGPATH -u "$windows_path"`
42443    new_path="$unix_path"
42444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42446    new_path="$unix_path"
42447  fi
42448
42449    fi
42450
42451    if test "x$new_path" = x; then
42452      # It's still not found. Now this is an unrecoverable error.
42453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42454$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42455      has_space=`$ECHO "$complete" | $GREP " "`
42456      if test "x$has_space" != x; then
42457        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42458$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42459      fi
42460      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42461    fi
42462  fi
42463
42464  # Now new_path has a complete unix path to the binary
42465  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42466    # Keep paths in /bin as-is, but remove trailing .exe if any
42467    new_path="${new_path/%.exe/}"
42468    # Do not save /bin paths to all_fixpath_prefixes!
42469  else
42470    # Not in mixed or Windows style, start by that.
42471    new_path=`cmd //c echo $new_path`
42472
42473  input_path="$new_path"
42474  # Check if we need to convert this using DOS-style short mode. If the path
42475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42476  # take no chances and rewrite it.
42477  # Note: m4 eats our [], so we need to use [ and ] instead.
42478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42479  if test "x$has_forbidden_chars" != x; then
42480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42481    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42482  fi
42483
42484    # Output is in $new_path
42485
42486  windows_path="$new_path"
42487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42488    unix_path=`$CYGPATH -u "$windows_path"`
42489    new_path="$unix_path"
42490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42492    new_path="$unix_path"
42493  fi
42494
42495    # remove trailing .exe if any
42496    new_path="${new_path/%.exe/}"
42497
42498    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42499    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42500  fi
42501
42502    else
42503      # We're on a unix platform. Hooray! :)
42504      # First separate the path from the arguments. This will split at the first
42505      # space.
42506      complete="$NM"
42507      path="${complete%% *}"
42508      tmp="$complete EOL"
42509      arguments="${tmp#* }"
42510
42511      # Cannot rely on the command "which" here since it doesn't always work.
42512      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42513      if test -z "$is_absolute_path"; then
42514        # Path to executable is not absolute. Find it.
42515        IFS_save="$IFS"
42516        IFS=:
42517        for p in $PATH; do
42518          if test -f "$p/$path" && test -x "$p/$path"; then
42519            new_path="$p/$path"
42520            break
42521          fi
42522        done
42523        IFS="$IFS_save"
42524      else
42525        # This is an absolute path, we can use it without further modifications.
42526        new_path="$path"
42527      fi
42528
42529      if test "x$new_path" = x; then
42530        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42531$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42532        has_space=`$ECHO "$complete" | $GREP " "`
42533        if test "x$has_space" != x; then
42534          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42535$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42536        fi
42537        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42538      fi
42539    fi
42540
42541    # Now join together the path and the arguments once again
42542    if test "x$arguments" != xEOL; then
42543      new_complete="$new_path ${arguments% *}"
42544    else
42545      new_complete="$new_path"
42546    fi
42547
42548    if test "x$complete" != "x$new_complete"; then
42549      NM="$new_complete"
42550      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42551$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42552    fi
42553  fi
42554
42555    GNM="$NM"
42556
42557  fi
42558
42559  # objcopy is used for moving debug symbols to separate files when
42560  # full debug symbols are enabled.
42561  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42562
42563
42564  # Publish this variable in the help.
42565
42566
42567  if [ -z "${OBJCOPY+x}" ]; then
42568    # The variable is not set by user, try to locate tool using the code snippet
42569    if test -n "$ac_tool_prefix"; then
42570  for ac_prog in gobjcopy objcopy
42571  do
42572    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42573set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42575$as_echo_n "checking for $ac_word... " >&6; }
42576if ${ac_cv_prog_OBJCOPY+:} false; then :
42577  $as_echo_n "(cached) " >&6
42578else
42579  if test -n "$OBJCOPY"; then
42580  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42581else
42582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42583for as_dir in $PATH
42584do
42585  IFS=$as_save_IFS
42586  test -z "$as_dir" && as_dir=.
42587    for ac_exec_ext in '' $ac_executable_extensions; do
42588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42589    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42591    break 2
42592  fi
42593done
42594  done
42595IFS=$as_save_IFS
42596
42597fi
42598fi
42599OBJCOPY=$ac_cv_prog_OBJCOPY
42600if test -n "$OBJCOPY"; then
42601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42602$as_echo "$OBJCOPY" >&6; }
42603else
42604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42605$as_echo "no" >&6; }
42606fi
42607
42608
42609    test -n "$OBJCOPY" && break
42610  done
42611fi
42612if test -z "$OBJCOPY"; then
42613  ac_ct_OBJCOPY=$OBJCOPY
42614  for ac_prog in gobjcopy objcopy
42615do
42616  # Extract the first word of "$ac_prog", so it can be a program name with args.
42617set dummy $ac_prog; ac_word=$2
42618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42619$as_echo_n "checking for $ac_word... " >&6; }
42620if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42621  $as_echo_n "(cached) " >&6
42622else
42623  if test -n "$ac_ct_OBJCOPY"; then
42624  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42625else
42626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42627for as_dir in $PATH
42628do
42629  IFS=$as_save_IFS
42630  test -z "$as_dir" && as_dir=.
42631    for ac_exec_ext in '' $ac_executable_extensions; do
42632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42633    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42635    break 2
42636  fi
42637done
42638  done
42639IFS=$as_save_IFS
42640
42641fi
42642fi
42643ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42644if test -n "$ac_ct_OBJCOPY"; then
42645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42646$as_echo "$ac_ct_OBJCOPY" >&6; }
42647else
42648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42649$as_echo "no" >&6; }
42650fi
42651
42652
42653  test -n "$ac_ct_OBJCOPY" && break
42654done
42655
42656  if test "x$ac_ct_OBJCOPY" = x; then
42657    OBJCOPY=""
42658  else
42659    case $cross_compiling:$ac_tool_warned in
42660yes:)
42661{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42662$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42663ac_tool_warned=yes ;;
42664esac
42665    OBJCOPY=$ac_ct_OBJCOPY
42666  fi
42667fi
42668
42669  else
42670    # The variable is set, but is it from the command line or the environment?
42671
42672    # Try to remove the string !OBJCOPY! from our list.
42673    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42674    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42675      # If it failed, the variable was not from the command line. Ignore it,
42676      # but warn the user (except for BASH, which is always set by the calling BASH).
42677      if test "xOBJCOPY" != xBASH; then
42678        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42679$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42680      fi
42681      # Try to locate tool using the code snippet
42682      if test -n "$ac_tool_prefix"; then
42683  for ac_prog in gobjcopy objcopy
42684  do
42685    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42686set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42688$as_echo_n "checking for $ac_word... " >&6; }
42689if ${ac_cv_prog_OBJCOPY+:} false; then :
42690  $as_echo_n "(cached) " >&6
42691else
42692  if test -n "$OBJCOPY"; then
42693  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42694else
42695as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42696for as_dir in $PATH
42697do
42698  IFS=$as_save_IFS
42699  test -z "$as_dir" && as_dir=.
42700    for ac_exec_ext in '' $ac_executable_extensions; do
42701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42702    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42704    break 2
42705  fi
42706done
42707  done
42708IFS=$as_save_IFS
42709
42710fi
42711fi
42712OBJCOPY=$ac_cv_prog_OBJCOPY
42713if test -n "$OBJCOPY"; then
42714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42715$as_echo "$OBJCOPY" >&6; }
42716else
42717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42718$as_echo "no" >&6; }
42719fi
42720
42721
42722    test -n "$OBJCOPY" && break
42723  done
42724fi
42725if test -z "$OBJCOPY"; then
42726  ac_ct_OBJCOPY=$OBJCOPY
42727  for ac_prog in gobjcopy objcopy
42728do
42729  # Extract the first word of "$ac_prog", so it can be a program name with args.
42730set dummy $ac_prog; ac_word=$2
42731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42732$as_echo_n "checking for $ac_word... " >&6; }
42733if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42734  $as_echo_n "(cached) " >&6
42735else
42736  if test -n "$ac_ct_OBJCOPY"; then
42737  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42738else
42739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42740for as_dir in $PATH
42741do
42742  IFS=$as_save_IFS
42743  test -z "$as_dir" && as_dir=.
42744    for ac_exec_ext in '' $ac_executable_extensions; do
42745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42746    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42748    break 2
42749  fi
42750done
42751  done
42752IFS=$as_save_IFS
42753
42754fi
42755fi
42756ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42757if test -n "$ac_ct_OBJCOPY"; then
42758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42759$as_echo "$ac_ct_OBJCOPY" >&6; }
42760else
42761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42762$as_echo "no" >&6; }
42763fi
42764
42765
42766  test -n "$ac_ct_OBJCOPY" && break
42767done
42768
42769  if test "x$ac_ct_OBJCOPY" = x; then
42770    OBJCOPY=""
42771  else
42772    case $cross_compiling:$ac_tool_warned in
42773yes:)
42774{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42775$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42776ac_tool_warned=yes ;;
42777esac
42778    OBJCOPY=$ac_ct_OBJCOPY
42779  fi
42780fi
42781
42782    else
42783      # If it succeeded, then it was overridden by the user. We will use it
42784      # for the tool.
42785
42786      # First remove it from the list of overridden variables, so we can test
42787      # for unknown variables in the end.
42788      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42789
42790      # Check if we try to supply an empty value
42791      if test "x$OBJCOPY" = x; then
42792        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42793$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42794        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42795$as_echo_n "checking for OBJCOPY... " >&6; }
42796        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42797$as_echo "disabled" >&6; }
42798      else
42799        # Check if the provided tool contains a complete path.
42800        tool_specified="$OBJCOPY"
42801        tool_basename="${tool_specified##*/}"
42802        if test "x$tool_basename" = "x$tool_specified"; then
42803          # A command without a complete path is provided, search $PATH.
42804          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42805$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42806          # Extract the first word of "$tool_basename", so it can be a program name with args.
42807set dummy $tool_basename; ac_word=$2
42808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42809$as_echo_n "checking for $ac_word... " >&6; }
42810if ${ac_cv_path_OBJCOPY+:} false; then :
42811  $as_echo_n "(cached) " >&6
42812else
42813  case $OBJCOPY in
42814  [\\/]* | ?:[\\/]*)
42815  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42816  ;;
42817  *)
42818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42819for as_dir in $PATH
42820do
42821  IFS=$as_save_IFS
42822  test -z "$as_dir" && as_dir=.
42823    for ac_exec_ext in '' $ac_executable_extensions; do
42824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42825    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42827    break 2
42828  fi
42829done
42830  done
42831IFS=$as_save_IFS
42832
42833  ;;
42834esac
42835fi
42836OBJCOPY=$ac_cv_path_OBJCOPY
42837if test -n "$OBJCOPY"; then
42838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42839$as_echo "$OBJCOPY" >&6; }
42840else
42841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42842$as_echo "no" >&6; }
42843fi
42844
42845
42846          if test "x$OBJCOPY" = x; then
42847            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42848          fi
42849        else
42850          # Otherwise we believe it is a complete path. Use it as it is.
42851          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42852$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42853          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42854$as_echo_n "checking for OBJCOPY... " >&6; }
42855          if test ! -x "$tool_specified"; then
42856            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42857$as_echo "not found" >&6; }
42858            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42859          fi
42860          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42861$as_echo "$tool_specified" >&6; }
42862        fi
42863      fi
42864    fi
42865
42866  fi
42867
42868
42869    # Only call fixup if objcopy was found.
42870    if test -n "$OBJCOPY"; then
42871
42872  # Only process if variable expands to non-empty
42873
42874  if test "x$OBJCOPY" != x; then
42875    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42876
42877  # First separate the path from the arguments. This will split at the first
42878  # space.
42879  complete="$OBJCOPY"
42880  path="${complete%% *}"
42881  tmp="$complete EOL"
42882  arguments="${tmp#* }"
42883
42884  # Input might be given as Windows format, start by converting to
42885  # unix format.
42886  new_path=`$CYGPATH -u "$path"`
42887
42888  # Now try to locate executable using which
42889  new_path=`$WHICH "$new_path" 2> /dev/null`
42890  # bat and cmd files are not always considered executable in cygwin causing which
42891  # to not find them
42892  if test "x$new_path" = x \
42893      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42894      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42895    new_path=`$CYGPATH -u "$path"`
42896  fi
42897  if test "x$new_path" = x; then
42898    # Oops. Which didn't find the executable.
42899    # The splitting of arguments from the executable at a space might have been incorrect,
42900    # since paths with space are more likely in Windows. Give it another try with the whole
42901    # argument.
42902    path="$complete"
42903    arguments="EOL"
42904    new_path=`$CYGPATH -u "$path"`
42905    new_path=`$WHICH "$new_path" 2> /dev/null`
42906    # bat and cmd files are not always considered executable in cygwin causing which
42907    # to not find them
42908    if test "x$new_path" = x \
42909        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42910        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42911      new_path=`$CYGPATH -u "$path"`
42912    fi
42913    if test "x$new_path" = x; then
42914      # It's still not found. Now this is an unrecoverable error.
42915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42916$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42917      has_space=`$ECHO "$complete" | $GREP " "`
42918      if test "x$has_space" != x; then
42919        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42920$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42921      fi
42922      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42923    fi
42924  fi
42925
42926  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42927  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42928  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42929  # "foo.exe" is OK but "foo" is an error.
42930  #
42931  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42932  # It is also a way to make sure we got the proper file name for the real test later on.
42933  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42934  if test "x$test_shortpath" = x; then
42935    # Short path failed, file does not exist as specified.
42936    # Try adding .exe or .cmd
42937    if test -f "${new_path}.exe"; then
42938      input_to_shortpath="${new_path}.exe"
42939    elif test -f "${new_path}.cmd"; then
42940      input_to_shortpath="${new_path}.cmd"
42941    else
42942      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42943$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42944      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42945$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42946      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42947    fi
42948  else
42949    input_to_shortpath="$new_path"
42950  fi
42951
42952  # Call helper function which possibly converts this using DOS-style short mode.
42953  # If so, the updated path is stored in $new_path.
42954  new_path="$input_to_shortpath"
42955
42956  input_path="$input_to_shortpath"
42957  # Check if we need to convert this using DOS-style short mode. If the path
42958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42959  # take no chances and rewrite it.
42960  # Note: m4 eats our [], so we need to use [ and ] instead.
42961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42962  if test "x$has_forbidden_chars" != x; then
42963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42964    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42965    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42966    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42967      # Going to short mode and back again did indeed matter. Since short mode is
42968      # case insensitive, let's make it lowercase to improve readability.
42969      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42970      # Now convert it back to Unix-style (cygpath)
42971      input_path=`$CYGPATH -u "$shortmode_path"`
42972      new_path="$input_path"
42973    fi
42974  fi
42975
42976  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42977  if test "x$test_cygdrive_prefix" = x; then
42978    # As a simple fix, exclude /usr/bin since it's not a real path.
42979    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42980      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42981      # a path prefixed by /cygdrive for fixpath to work.
42982      new_path="$CYGWIN_ROOT_PATH$input_path"
42983    fi
42984  fi
42985
42986  # remove trailing .exe if any
42987  new_path="${new_path/%.exe/}"
42988
42989    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42990
42991  # First separate the path from the arguments. This will split at the first
42992  # space.
42993  complete="$OBJCOPY"
42994  path="${complete%% *}"
42995  tmp="$complete EOL"
42996  arguments="${tmp#* }"
42997
42998  # Input might be given as Windows format, start by converting to
42999  # unix format.
43000  new_path="$path"
43001
43002  windows_path="$new_path"
43003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43004    unix_path=`$CYGPATH -u "$windows_path"`
43005    new_path="$unix_path"
43006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43008    new_path="$unix_path"
43009  fi
43010
43011
43012  # Now try to locate executable using which
43013  new_path=`$WHICH "$new_path" 2> /dev/null`
43014
43015  if test "x$new_path" = x; then
43016    # Oops. Which didn't find the executable.
43017    # The splitting of arguments from the executable at a space might have been incorrect,
43018    # since paths with space are more likely in Windows. Give it another try with the whole
43019    # argument.
43020    path="$complete"
43021    arguments="EOL"
43022    new_path="$path"
43023
43024  windows_path="$new_path"
43025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43026    unix_path=`$CYGPATH -u "$windows_path"`
43027    new_path="$unix_path"
43028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43030    new_path="$unix_path"
43031  fi
43032
43033
43034    new_path=`$WHICH "$new_path" 2> /dev/null`
43035    # bat and cmd files are not always considered executable in MSYS causing which
43036    # to not find them
43037    if test "x$new_path" = x \
43038        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43039        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43040      new_path="$path"
43041
43042  windows_path="$new_path"
43043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43044    unix_path=`$CYGPATH -u "$windows_path"`
43045    new_path="$unix_path"
43046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43048    new_path="$unix_path"
43049  fi
43050
43051    fi
43052
43053    if test "x$new_path" = x; then
43054      # It's still not found. Now this is an unrecoverable error.
43055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43056$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43057      has_space=`$ECHO "$complete" | $GREP " "`
43058      if test "x$has_space" != x; then
43059        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43060$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43061      fi
43062      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43063    fi
43064  fi
43065
43066  # Now new_path has a complete unix path to the binary
43067  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43068    # Keep paths in /bin as-is, but remove trailing .exe if any
43069    new_path="${new_path/%.exe/}"
43070    # Do not save /bin paths to all_fixpath_prefixes!
43071  else
43072    # Not in mixed or Windows style, start by that.
43073    new_path=`cmd //c echo $new_path`
43074
43075  input_path="$new_path"
43076  # Check if we need to convert this using DOS-style short mode. If the path
43077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43078  # take no chances and rewrite it.
43079  # Note: m4 eats our [], so we need to use [ and ] instead.
43080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43081  if test "x$has_forbidden_chars" != x; then
43082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43083    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43084  fi
43085
43086    # Output is in $new_path
43087
43088  windows_path="$new_path"
43089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43090    unix_path=`$CYGPATH -u "$windows_path"`
43091    new_path="$unix_path"
43092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43094    new_path="$unix_path"
43095  fi
43096
43097    # remove trailing .exe if any
43098    new_path="${new_path/%.exe/}"
43099
43100    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43101    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43102  fi
43103
43104    else
43105      # We're on a unix platform. Hooray! :)
43106      # First separate the path from the arguments. This will split at the first
43107      # space.
43108      complete="$OBJCOPY"
43109      path="${complete%% *}"
43110      tmp="$complete EOL"
43111      arguments="${tmp#* }"
43112
43113      # Cannot rely on the command "which" here since it doesn't always work.
43114      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43115      if test -z "$is_absolute_path"; then
43116        # Path to executable is not absolute. Find it.
43117        IFS_save="$IFS"
43118        IFS=:
43119        for p in $PATH; do
43120          if test -f "$p/$path" && test -x "$p/$path"; then
43121            new_path="$p/$path"
43122            break
43123          fi
43124        done
43125        IFS="$IFS_save"
43126      else
43127        # This is an absolute path, we can use it without further modifications.
43128        new_path="$path"
43129      fi
43130
43131      if test "x$new_path" = x; then
43132        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43133$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43134        has_space=`$ECHO "$complete" | $GREP " "`
43135        if test "x$has_space" != x; then
43136          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43137$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43138        fi
43139        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43140      fi
43141    fi
43142
43143    # Now join together the path and the arguments once again
43144    if test "x$arguments" != xEOL; then
43145      new_complete="$new_path ${arguments% *}"
43146    else
43147      new_complete="$new_path"
43148    fi
43149
43150    if test "x$complete" != "x$new_complete"; then
43151      OBJCOPY="$new_complete"
43152      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43153$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43154    fi
43155  fi
43156
43157      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43158        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43159        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43160        # - version number is last blank separate word on first line
43161        # - version number formats that have been seen:
43162        #   - <major>.<minor>
43163        #   - <major>.<minor>.<micro>
43164        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43165        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43166         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43167              -e 's/.* //' \
43168              -e '/^[01]\./b bad' \
43169              -e '/^2\./{' \
43170              -e '  s/^2\.//' \
43171              -e '  /^[0-9]$/b bad' \
43172              -e '  /^[0-9]\./b bad' \
43173              -e '  /^1[0-9]$/b bad' \
43174              -e '  /^1[0-9]\./b bad' \
43175              -e '  /^20\./b bad' \
43176              -e '  /^21\.0$/b bad' \
43177              -e '  /^21\.0\./b bad' \
43178              -e '}' \
43179              -e ':good' \
43180              -e 's/.*/VALID_VERSION/p' \
43181              -e 'q' \
43182              -e ':bad' \
43183              -e 's/.*/BAD_VERSION/p' \
43184              -e 'q'`
43185        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43186          OBJCOPY=
43187          { $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
43188$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43189          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43190$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43191          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43192$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43193          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43194$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43195          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43196$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43197        fi
43198      fi
43199    fi
43200  fi
43201
43202
43203
43204  # Publish this variable in the help.
43205
43206
43207  if [ -z "${OBJDUMP+x}" ]; then
43208    # The variable is not set by user, try to locate tool using the code snippet
43209    if test -n "$ac_tool_prefix"; then
43210  for ac_prog in gobjdump objdump
43211  do
43212    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43213set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43215$as_echo_n "checking for $ac_word... " >&6; }
43216if ${ac_cv_prog_OBJDUMP+:} false; then :
43217  $as_echo_n "(cached) " >&6
43218else
43219  if test -n "$OBJDUMP"; then
43220  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43221else
43222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43223for as_dir in $PATH
43224do
43225  IFS=$as_save_IFS
43226  test -z "$as_dir" && as_dir=.
43227    for ac_exec_ext in '' $ac_executable_extensions; do
43228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43229    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43231    break 2
43232  fi
43233done
43234  done
43235IFS=$as_save_IFS
43236
43237fi
43238fi
43239OBJDUMP=$ac_cv_prog_OBJDUMP
43240if test -n "$OBJDUMP"; then
43241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43242$as_echo "$OBJDUMP" >&6; }
43243else
43244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43245$as_echo "no" >&6; }
43246fi
43247
43248
43249    test -n "$OBJDUMP" && break
43250  done
43251fi
43252if test -z "$OBJDUMP"; then
43253  ac_ct_OBJDUMP=$OBJDUMP
43254  for ac_prog in gobjdump objdump
43255do
43256  # Extract the first word of "$ac_prog", so it can be a program name with args.
43257set dummy $ac_prog; ac_word=$2
43258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43259$as_echo_n "checking for $ac_word... " >&6; }
43260if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43261  $as_echo_n "(cached) " >&6
43262else
43263  if test -n "$ac_ct_OBJDUMP"; then
43264  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43265else
43266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43267for as_dir in $PATH
43268do
43269  IFS=$as_save_IFS
43270  test -z "$as_dir" && as_dir=.
43271    for ac_exec_ext in '' $ac_executable_extensions; do
43272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43273    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43275    break 2
43276  fi
43277done
43278  done
43279IFS=$as_save_IFS
43280
43281fi
43282fi
43283ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43284if test -n "$ac_ct_OBJDUMP"; then
43285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43286$as_echo "$ac_ct_OBJDUMP" >&6; }
43287else
43288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43289$as_echo "no" >&6; }
43290fi
43291
43292
43293  test -n "$ac_ct_OBJDUMP" && break
43294done
43295
43296  if test "x$ac_ct_OBJDUMP" = x; then
43297    OBJDUMP=""
43298  else
43299    case $cross_compiling:$ac_tool_warned in
43300yes:)
43301{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43302$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43303ac_tool_warned=yes ;;
43304esac
43305    OBJDUMP=$ac_ct_OBJDUMP
43306  fi
43307fi
43308
43309  else
43310    # The variable is set, but is it from the command line or the environment?
43311
43312    # Try to remove the string !OBJDUMP! from our list.
43313    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43314    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43315      # If it failed, the variable was not from the command line. Ignore it,
43316      # but warn the user (except for BASH, which is always set by the calling BASH).
43317      if test "xOBJDUMP" != xBASH; then
43318        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43319$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43320      fi
43321      # Try to locate tool using the code snippet
43322      if test -n "$ac_tool_prefix"; then
43323  for ac_prog in gobjdump objdump
43324  do
43325    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43326set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43328$as_echo_n "checking for $ac_word... " >&6; }
43329if ${ac_cv_prog_OBJDUMP+:} false; then :
43330  $as_echo_n "(cached) " >&6
43331else
43332  if test -n "$OBJDUMP"; then
43333  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43334else
43335as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43336for as_dir in $PATH
43337do
43338  IFS=$as_save_IFS
43339  test -z "$as_dir" && as_dir=.
43340    for ac_exec_ext in '' $ac_executable_extensions; do
43341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43342    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43344    break 2
43345  fi
43346done
43347  done
43348IFS=$as_save_IFS
43349
43350fi
43351fi
43352OBJDUMP=$ac_cv_prog_OBJDUMP
43353if test -n "$OBJDUMP"; then
43354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43355$as_echo "$OBJDUMP" >&6; }
43356else
43357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43358$as_echo "no" >&6; }
43359fi
43360
43361
43362    test -n "$OBJDUMP" && break
43363  done
43364fi
43365if test -z "$OBJDUMP"; then
43366  ac_ct_OBJDUMP=$OBJDUMP
43367  for ac_prog in gobjdump objdump
43368do
43369  # Extract the first word of "$ac_prog", so it can be a program name with args.
43370set dummy $ac_prog; ac_word=$2
43371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43372$as_echo_n "checking for $ac_word... " >&6; }
43373if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43374  $as_echo_n "(cached) " >&6
43375else
43376  if test -n "$ac_ct_OBJDUMP"; then
43377  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43378else
43379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43380for as_dir in $PATH
43381do
43382  IFS=$as_save_IFS
43383  test -z "$as_dir" && as_dir=.
43384    for ac_exec_ext in '' $ac_executable_extensions; do
43385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43386    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43388    break 2
43389  fi
43390done
43391  done
43392IFS=$as_save_IFS
43393
43394fi
43395fi
43396ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43397if test -n "$ac_ct_OBJDUMP"; then
43398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43399$as_echo "$ac_ct_OBJDUMP" >&6; }
43400else
43401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43402$as_echo "no" >&6; }
43403fi
43404
43405
43406  test -n "$ac_ct_OBJDUMP" && break
43407done
43408
43409  if test "x$ac_ct_OBJDUMP" = x; then
43410    OBJDUMP=""
43411  else
43412    case $cross_compiling:$ac_tool_warned in
43413yes:)
43414{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43415$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43416ac_tool_warned=yes ;;
43417esac
43418    OBJDUMP=$ac_ct_OBJDUMP
43419  fi
43420fi
43421
43422    else
43423      # If it succeeded, then it was overridden by the user. We will use it
43424      # for the tool.
43425
43426      # First remove it from the list of overridden variables, so we can test
43427      # for unknown variables in the end.
43428      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43429
43430      # Check if we try to supply an empty value
43431      if test "x$OBJDUMP" = x; then
43432        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43433$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43434        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43435$as_echo_n "checking for OBJDUMP... " >&6; }
43436        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43437$as_echo "disabled" >&6; }
43438      else
43439        # Check if the provided tool contains a complete path.
43440        tool_specified="$OBJDUMP"
43441        tool_basename="${tool_specified##*/}"
43442        if test "x$tool_basename" = "x$tool_specified"; then
43443          # A command without a complete path is provided, search $PATH.
43444          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43445$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43446          # Extract the first word of "$tool_basename", so it can be a program name with args.
43447set dummy $tool_basename; ac_word=$2
43448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43449$as_echo_n "checking for $ac_word... " >&6; }
43450if ${ac_cv_path_OBJDUMP+:} false; then :
43451  $as_echo_n "(cached) " >&6
43452else
43453  case $OBJDUMP in
43454  [\\/]* | ?:[\\/]*)
43455  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43456  ;;
43457  *)
43458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43459for as_dir in $PATH
43460do
43461  IFS=$as_save_IFS
43462  test -z "$as_dir" && as_dir=.
43463    for ac_exec_ext in '' $ac_executable_extensions; do
43464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43465    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43467    break 2
43468  fi
43469done
43470  done
43471IFS=$as_save_IFS
43472
43473  ;;
43474esac
43475fi
43476OBJDUMP=$ac_cv_path_OBJDUMP
43477if test -n "$OBJDUMP"; then
43478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43479$as_echo "$OBJDUMP" >&6; }
43480else
43481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43482$as_echo "no" >&6; }
43483fi
43484
43485
43486          if test "x$OBJDUMP" = x; then
43487            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43488          fi
43489        else
43490          # Otherwise we believe it is a complete path. Use it as it is.
43491          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43492$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43493          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43494$as_echo_n "checking for OBJDUMP... " >&6; }
43495          if test ! -x "$tool_specified"; then
43496            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43497$as_echo "not found" >&6; }
43498            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43499          fi
43500          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43501$as_echo "$tool_specified" >&6; }
43502        fi
43503      fi
43504    fi
43505
43506  fi
43507
43508
43509  if test "x$OBJDUMP" != x; then
43510    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43511    # bails if argument is missing.
43512
43513  # Only process if variable expands to non-empty
43514
43515  if test "x$OBJDUMP" != x; then
43516    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43517
43518  # First separate the path from the arguments. This will split at the first
43519  # space.
43520  complete="$OBJDUMP"
43521  path="${complete%% *}"
43522  tmp="$complete EOL"
43523  arguments="${tmp#* }"
43524
43525  # Input might be given as Windows format, start by converting to
43526  # unix format.
43527  new_path=`$CYGPATH -u "$path"`
43528
43529  # Now try to locate executable using which
43530  new_path=`$WHICH "$new_path" 2> /dev/null`
43531  # bat and cmd files are not always considered executable in cygwin causing which
43532  # to not find them
43533  if test "x$new_path" = x \
43534      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43535      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43536    new_path=`$CYGPATH -u "$path"`
43537  fi
43538  if test "x$new_path" = x; then
43539    # Oops. Which didn't find the executable.
43540    # The splitting of arguments from the executable at a space might have been incorrect,
43541    # since paths with space are more likely in Windows. Give it another try with the whole
43542    # argument.
43543    path="$complete"
43544    arguments="EOL"
43545    new_path=`$CYGPATH -u "$path"`
43546    new_path=`$WHICH "$new_path" 2> /dev/null`
43547    # bat and cmd files are not always considered executable in cygwin causing which
43548    # to not find them
43549    if test "x$new_path" = x \
43550        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43551        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43552      new_path=`$CYGPATH -u "$path"`
43553    fi
43554    if test "x$new_path" = x; then
43555      # It's still not found. Now this is an unrecoverable error.
43556      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43557$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43558      has_space=`$ECHO "$complete" | $GREP " "`
43559      if test "x$has_space" != x; then
43560        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43561$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43562      fi
43563      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43564    fi
43565  fi
43566
43567  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43568  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43569  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43570  # "foo.exe" is OK but "foo" is an error.
43571  #
43572  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43573  # It is also a way to make sure we got the proper file name for the real test later on.
43574  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43575  if test "x$test_shortpath" = x; then
43576    # Short path failed, file does not exist as specified.
43577    # Try adding .exe or .cmd
43578    if test -f "${new_path}.exe"; then
43579      input_to_shortpath="${new_path}.exe"
43580    elif test -f "${new_path}.cmd"; then
43581      input_to_shortpath="${new_path}.cmd"
43582    else
43583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43584$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43585      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43586$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43587      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43588    fi
43589  else
43590    input_to_shortpath="$new_path"
43591  fi
43592
43593  # Call helper function which possibly converts this using DOS-style short mode.
43594  # If so, the updated path is stored in $new_path.
43595  new_path="$input_to_shortpath"
43596
43597  input_path="$input_to_shortpath"
43598  # Check if we need to convert this using DOS-style short mode. If the path
43599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43600  # take no chances and rewrite it.
43601  # Note: m4 eats our [], so we need to use [ and ] instead.
43602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43603  if test "x$has_forbidden_chars" != x; then
43604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43605    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43606    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43607    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43608      # Going to short mode and back again did indeed matter. Since short mode is
43609      # case insensitive, let's make it lowercase to improve readability.
43610      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43611      # Now convert it back to Unix-style (cygpath)
43612      input_path=`$CYGPATH -u "$shortmode_path"`
43613      new_path="$input_path"
43614    fi
43615  fi
43616
43617  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43618  if test "x$test_cygdrive_prefix" = x; then
43619    # As a simple fix, exclude /usr/bin since it's not a real path.
43620    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43621      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43622      # a path prefixed by /cygdrive for fixpath to work.
43623      new_path="$CYGWIN_ROOT_PATH$input_path"
43624    fi
43625  fi
43626
43627  # remove trailing .exe if any
43628  new_path="${new_path/%.exe/}"
43629
43630    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43631
43632  # First separate the path from the arguments. This will split at the first
43633  # space.
43634  complete="$OBJDUMP"
43635  path="${complete%% *}"
43636  tmp="$complete EOL"
43637  arguments="${tmp#* }"
43638
43639  # Input might be given as Windows format, start by converting to
43640  # unix format.
43641  new_path="$path"
43642
43643  windows_path="$new_path"
43644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43645    unix_path=`$CYGPATH -u "$windows_path"`
43646    new_path="$unix_path"
43647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43649    new_path="$unix_path"
43650  fi
43651
43652
43653  # Now try to locate executable using which
43654  new_path=`$WHICH "$new_path" 2> /dev/null`
43655
43656  if test "x$new_path" = x; then
43657    # Oops. Which didn't find the executable.
43658    # The splitting of arguments from the executable at a space might have been incorrect,
43659    # since paths with space are more likely in Windows. Give it another try with the whole
43660    # argument.
43661    path="$complete"
43662    arguments="EOL"
43663    new_path="$path"
43664
43665  windows_path="$new_path"
43666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43667    unix_path=`$CYGPATH -u "$windows_path"`
43668    new_path="$unix_path"
43669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43671    new_path="$unix_path"
43672  fi
43673
43674
43675    new_path=`$WHICH "$new_path" 2> /dev/null`
43676    # bat and cmd files are not always considered executable in MSYS causing which
43677    # to not find them
43678    if test "x$new_path" = x \
43679        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43680        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43681      new_path="$path"
43682
43683  windows_path="$new_path"
43684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43685    unix_path=`$CYGPATH -u "$windows_path"`
43686    new_path="$unix_path"
43687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43689    new_path="$unix_path"
43690  fi
43691
43692    fi
43693
43694    if test "x$new_path" = x; then
43695      # It's still not found. Now this is an unrecoverable error.
43696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43697$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43698      has_space=`$ECHO "$complete" | $GREP " "`
43699      if test "x$has_space" != x; then
43700        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43701$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43702      fi
43703      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43704    fi
43705  fi
43706
43707  # Now new_path has a complete unix path to the binary
43708  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43709    # Keep paths in /bin as-is, but remove trailing .exe if any
43710    new_path="${new_path/%.exe/}"
43711    # Do not save /bin paths to all_fixpath_prefixes!
43712  else
43713    # Not in mixed or Windows style, start by that.
43714    new_path=`cmd //c echo $new_path`
43715
43716  input_path="$new_path"
43717  # Check if we need to convert this using DOS-style short mode. If the path
43718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43719  # take no chances and rewrite it.
43720  # Note: m4 eats our [], so we need to use [ and ] instead.
43721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43722  if test "x$has_forbidden_chars" != x; then
43723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43724    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43725  fi
43726
43727    # Output is in $new_path
43728
43729  windows_path="$new_path"
43730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43731    unix_path=`$CYGPATH -u "$windows_path"`
43732    new_path="$unix_path"
43733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43735    new_path="$unix_path"
43736  fi
43737
43738    # remove trailing .exe if any
43739    new_path="${new_path/%.exe/}"
43740
43741    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43742    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43743  fi
43744
43745    else
43746      # We're on a unix platform. Hooray! :)
43747      # First separate the path from the arguments. This will split at the first
43748      # space.
43749      complete="$OBJDUMP"
43750      path="${complete%% *}"
43751      tmp="$complete EOL"
43752      arguments="${tmp#* }"
43753
43754      # Cannot rely on the command "which" here since it doesn't always work.
43755      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43756      if test -z "$is_absolute_path"; then
43757        # Path to executable is not absolute. Find it.
43758        IFS_save="$IFS"
43759        IFS=:
43760        for p in $PATH; do
43761          if test -f "$p/$path" && test -x "$p/$path"; then
43762            new_path="$p/$path"
43763            break
43764          fi
43765        done
43766        IFS="$IFS_save"
43767      else
43768        # This is an absolute path, we can use it without further modifications.
43769        new_path="$path"
43770      fi
43771
43772      if test "x$new_path" = x; then
43773        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43774$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43775        has_space=`$ECHO "$complete" | $GREP " "`
43776        if test "x$has_space" != x; then
43777          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43778$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43779        fi
43780        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43781      fi
43782    fi
43783
43784    # Now join together the path and the arguments once again
43785    if test "x$arguments" != xEOL; then
43786      new_complete="$new_path ${arguments% *}"
43787    else
43788      new_complete="$new_path"
43789    fi
43790
43791    if test "x$complete" != "x$new_complete"; then
43792      OBJDUMP="$new_complete"
43793      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43794$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43795    fi
43796  fi
43797
43798  fi
43799
43800
43801  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43802  # to remain in place. Otherwise the compiler will not work in some siutations
43803  # in later configure checks.
43804  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43805    PATH="$OLD_PATH"
43806  fi
43807
43808  # Restore the flags to the user specified values.
43809  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43810  CFLAGS="$ORG_CFLAGS"
43811  CXXFLAGS="$ORG_CXXFLAGS"
43812
43813
43814# Finally do some processing after the detection phase
43815
43816  if test "x$COMPILE_TYPE" = "xcross"; then
43817    # Now we need to find a C/C++ compiler that can build executables for the
43818    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43819    # used once. Also, we need to do this without adding a tools dir to the
43820    # path, otherwise we might pick up cross-compilers which don't use standard
43821    # naming.
43822
43823    OLDPATH="$PATH"
43824
43825
43826# Check whether --with-build-devkit was given.
43827if test "${with_build_devkit+set}" = set; then :
43828  withval=$with_build_devkit;
43829fi
43830
43831    if test "x$with_build_devkit" = "xyes"; then
43832      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43833    elif test -n "$with_build_devkit"; then
43834      if test ! -d "$with_build_devkit"; then
43835        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43836      else
43837
43838  # Only process if variable expands to non-empty
43839
43840  if test "x$with_build_devkit" != x; then
43841    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43842
43843  # Input might be given as Windows format, start by converting to
43844  # unix format.
43845  path="$with_build_devkit"
43846  new_path=`$CYGPATH -u "$path"`
43847
43848  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43849  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43850  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43851  # "foo.exe" is OK but "foo" is an error.
43852  #
43853  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43854  # It is also a way to make sure we got the proper file name for the real test later on.
43855  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43856  if test "x$test_shortpath" = x; then
43857    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43858$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43859    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43860  fi
43861
43862  # Call helper function which possibly converts this using DOS-style short mode.
43863  # If so, the updated path is stored in $new_path.
43864
43865  input_path="$new_path"
43866  # Check if we need to convert this using DOS-style short mode. If the path
43867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43868  # take no chances and rewrite it.
43869  # Note: m4 eats our [], so we need to use [ and ] instead.
43870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43871  if test "x$has_forbidden_chars" != x; then
43872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43873    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43874    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43875    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43876      # Going to short mode and back again did indeed matter. Since short mode is
43877      # case insensitive, let's make it lowercase to improve readability.
43878      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43879      # Now convert it back to Unix-style (cygpath)
43880      input_path=`$CYGPATH -u "$shortmode_path"`
43881      new_path="$input_path"
43882    fi
43883  fi
43884
43885  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43886  if test "x$test_cygdrive_prefix" = x; then
43887    # As a simple fix, exclude /usr/bin since it's not a real path.
43888    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43889      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43890      # a path prefixed by /cygdrive for fixpath to work.
43891      new_path="$CYGWIN_ROOT_PATH$input_path"
43892    fi
43893  fi
43894
43895
43896  if test "x$path" != "x$new_path"; then
43897    with_build_devkit="$new_path"
43898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43899$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43900  fi
43901
43902    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43903
43904  path="$with_build_devkit"
43905  has_colon=`$ECHO $path | $GREP ^.:`
43906  new_path="$path"
43907  if test "x$has_colon" = x; then
43908    # Not in mixed or Windows style, start by that.
43909    new_path=`cmd //c echo $path`
43910  fi
43911
43912
43913  input_path="$new_path"
43914  # Check if we need to convert this using DOS-style short mode. If the path
43915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43916  # take no chances and rewrite it.
43917  # Note: m4 eats our [], so we need to use [ and ] instead.
43918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43919  if test "x$has_forbidden_chars" != x; then
43920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43921    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43922  fi
43923
43924
43925  windows_path="$new_path"
43926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43927    unix_path=`$CYGPATH -u "$windows_path"`
43928    new_path="$unix_path"
43929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43931    new_path="$unix_path"
43932  fi
43933
43934  if test "x$path" != "x$new_path"; then
43935    with_build_devkit="$new_path"
43936    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43937$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43938  fi
43939
43940  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43941  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43942
43943    else
43944      # We're on a unix platform. Hooray! :)
43945      path="$with_build_devkit"
43946      has_space=`$ECHO "$path" | $GREP " "`
43947      if test "x$has_space" != x; then
43948        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43949$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43950        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43951      fi
43952
43953      # Use eval to expand a potential ~
43954      eval path="$path"
43955      if test ! -f "$path" && test ! -d "$path"; then
43956        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43957      fi
43958
43959      if test -d "$path"; then
43960        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43961      else
43962        dir="`$DIRNAME "$path"`"
43963        base="`$BASENAME "$path"`"
43964        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43965      fi
43966    fi
43967  fi
43968
43969        BUILD_DEVKIT_ROOT="$with_build_devkit"
43970        # Check for a meta data info file in the root of the devkit
43971        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43972          # Process devkit.info so that existing devkit variables are not
43973          # modified by this
43974          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43975              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43976              -e "s/\$host/\$build/g" \
43977              $BUILD_DEVKIT_ROOT/devkit.info \
43978              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43979          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43980          # This potentially sets the following:
43981          # A descriptive name of the devkit
43982
43983  if test "x$BUILD_DEVKIT_NAME" = x; then
43984    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43985  fi
43986
43987          # Corresponds to --with-extra-path
43988
43989  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43990    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43991  fi
43992
43993          # Corresponds to --with-toolchain-path
43994
43995  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43996    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43997  fi
43998
43999          # Corresponds to --with-sysroot
44000
44001  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44002    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44003  fi
44004
44005          # Skip the Window specific parts
44006        fi
44007
44008        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44009$as_echo_n "checking for build platform devkit... " >&6; }
44010        if test "x$BUILD_DEVKIT_NAME" != x; then
44011          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44012$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44013        else
44014          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44015$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44016        fi
44017
44018        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44019
44020  if test "x$BUILD_SYSROOT" != "x"; then
44021    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44022      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44023        # Solaris Studio does not have a concept of sysroot. Instead we must
44024        # make sure the default include and lib dirs are appended to each
44025        # compile and link command line. Must also add -I-xbuiltin to enable
44026        # inlining of system functions and intrinsics.
44027        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44028        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44029            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44030      fi
44031    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44032      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44033      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44034    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44035      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44036      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44037    fi
44038    # The global CFLAGS and LDFLAGS variables need these for configure to function
44039    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44040    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44041    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44042    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44043  fi
44044
44045  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44046    # We also need -iframework<path>/System/Library/Frameworks
44047    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44048    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44049    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44050    # set this here so it doesn't have to be peppered throughout the forest
44051    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44052    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44053  fi
44054
44055
44056
44057
44058
44059         # Fallback default of just /bin if DEVKIT_PATH is not defined
44060        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44061          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44062        fi
44063        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44064      fi
44065    fi
44066
44067    # FIXME: we should list the discovered compilers as an exclude pattern!
44068    # If we do that, we can do this detection before POST_DETECTION, and still
44069    # find the build compilers in the tools dir, if needed.
44070
44071
44072
44073  # Publish this variable in the help.
44074
44075
44076  if [ -z "${BUILD_CC+x}" ]; then
44077    # The variable is not set by user, try to locate tool using the code snippet
44078    for ac_prog in cl cc gcc
44079do
44080  # Extract the first word of "$ac_prog", so it can be a program name with args.
44081set dummy $ac_prog; ac_word=$2
44082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44083$as_echo_n "checking for $ac_word... " >&6; }
44084if ${ac_cv_path_BUILD_CC+:} false; then :
44085  $as_echo_n "(cached) " >&6
44086else
44087  case $BUILD_CC in
44088  [\\/]* | ?:[\\/]*)
44089  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44090  ;;
44091  *)
44092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44093for as_dir in $PATH
44094do
44095  IFS=$as_save_IFS
44096  test -z "$as_dir" && as_dir=.
44097    for ac_exec_ext in '' $ac_executable_extensions; do
44098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44099    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44101    break 2
44102  fi
44103done
44104  done
44105IFS=$as_save_IFS
44106
44107  ;;
44108esac
44109fi
44110BUILD_CC=$ac_cv_path_BUILD_CC
44111if test -n "$BUILD_CC"; then
44112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44113$as_echo "$BUILD_CC" >&6; }
44114else
44115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44116$as_echo "no" >&6; }
44117fi
44118
44119
44120  test -n "$BUILD_CC" && break
44121done
44122
44123  else
44124    # The variable is set, but is it from the command line or the environment?
44125
44126    # Try to remove the string !BUILD_CC! from our list.
44127    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44128    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44129      # If it failed, the variable was not from the command line. Ignore it,
44130      # but warn the user (except for BASH, which is always set by the calling BASH).
44131      if test "xBUILD_CC" != xBASH; then
44132        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44133$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44134      fi
44135      # Try to locate tool using the code snippet
44136      for ac_prog in cl cc gcc
44137do
44138  # Extract the first word of "$ac_prog", so it can be a program name with args.
44139set dummy $ac_prog; ac_word=$2
44140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44141$as_echo_n "checking for $ac_word... " >&6; }
44142if ${ac_cv_path_BUILD_CC+:} false; then :
44143  $as_echo_n "(cached) " >&6
44144else
44145  case $BUILD_CC in
44146  [\\/]* | ?:[\\/]*)
44147  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44148  ;;
44149  *)
44150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44151for as_dir in $PATH
44152do
44153  IFS=$as_save_IFS
44154  test -z "$as_dir" && as_dir=.
44155    for ac_exec_ext in '' $ac_executable_extensions; do
44156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44157    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44159    break 2
44160  fi
44161done
44162  done
44163IFS=$as_save_IFS
44164
44165  ;;
44166esac
44167fi
44168BUILD_CC=$ac_cv_path_BUILD_CC
44169if test -n "$BUILD_CC"; then
44170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44171$as_echo "$BUILD_CC" >&6; }
44172else
44173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44174$as_echo "no" >&6; }
44175fi
44176
44177
44178  test -n "$BUILD_CC" && break
44179done
44180
44181    else
44182      # If it succeeded, then it was overridden by the user. We will use it
44183      # for the tool.
44184
44185      # First remove it from the list of overridden variables, so we can test
44186      # for unknown variables in the end.
44187      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44188
44189      # Check if we try to supply an empty value
44190      if test "x$BUILD_CC" = x; then
44191        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44192$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44193        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44194$as_echo_n "checking for BUILD_CC... " >&6; }
44195        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44196$as_echo "disabled" >&6; }
44197      else
44198        # Check if the provided tool contains a complete path.
44199        tool_specified="$BUILD_CC"
44200        tool_basename="${tool_specified##*/}"
44201        if test "x$tool_basename" = "x$tool_specified"; then
44202          # A command without a complete path is provided, search $PATH.
44203          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44204$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44205          # Extract the first word of "$tool_basename", so it can be a program name with args.
44206set dummy $tool_basename; ac_word=$2
44207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44208$as_echo_n "checking for $ac_word... " >&6; }
44209if ${ac_cv_path_BUILD_CC+:} false; then :
44210  $as_echo_n "(cached) " >&6
44211else
44212  case $BUILD_CC in
44213  [\\/]* | ?:[\\/]*)
44214  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44215  ;;
44216  *)
44217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44218for as_dir in $PATH
44219do
44220  IFS=$as_save_IFS
44221  test -z "$as_dir" && as_dir=.
44222    for ac_exec_ext in '' $ac_executable_extensions; do
44223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44224    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44226    break 2
44227  fi
44228done
44229  done
44230IFS=$as_save_IFS
44231
44232  ;;
44233esac
44234fi
44235BUILD_CC=$ac_cv_path_BUILD_CC
44236if test -n "$BUILD_CC"; then
44237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44238$as_echo "$BUILD_CC" >&6; }
44239else
44240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44241$as_echo "no" >&6; }
44242fi
44243
44244
44245          if test "x$BUILD_CC" = x; then
44246            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44247          fi
44248        else
44249          # Otherwise we believe it is a complete path. Use it as it is.
44250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44251$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44252          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44253$as_echo_n "checking for BUILD_CC... " >&6; }
44254          if test ! -x "$tool_specified"; then
44255            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44256$as_echo "not found" >&6; }
44257            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44258          fi
44259          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44260$as_echo "$tool_specified" >&6; }
44261        fi
44262      fi
44263    fi
44264
44265  fi
44266
44267
44268
44269  if test "x$BUILD_CC" = x; then
44270    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44271  fi
44272
44273
44274
44275  # Only process if variable expands to non-empty
44276
44277  if test "x$BUILD_CC" != x; then
44278    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44279
44280  # First separate the path from the arguments. This will split at the first
44281  # space.
44282  complete="$BUILD_CC"
44283  path="${complete%% *}"
44284  tmp="$complete EOL"
44285  arguments="${tmp#* }"
44286
44287  # Input might be given as Windows format, start by converting to
44288  # unix format.
44289  new_path=`$CYGPATH -u "$path"`
44290
44291  # Now try to locate executable using which
44292  new_path=`$WHICH "$new_path" 2> /dev/null`
44293  # bat and cmd files are not always considered executable in cygwin causing which
44294  # to not find them
44295  if test "x$new_path" = x \
44296      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44297      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44298    new_path=`$CYGPATH -u "$path"`
44299  fi
44300  if test "x$new_path" = x; then
44301    # Oops. Which didn't find the executable.
44302    # The splitting of arguments from the executable at a space might have been incorrect,
44303    # since paths with space are more likely in Windows. Give it another try with the whole
44304    # argument.
44305    path="$complete"
44306    arguments="EOL"
44307    new_path=`$CYGPATH -u "$path"`
44308    new_path=`$WHICH "$new_path" 2> /dev/null`
44309    # bat and cmd files are not always considered executable in cygwin causing which
44310    # to not find them
44311    if test "x$new_path" = x \
44312        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44313        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44314      new_path=`$CYGPATH -u "$path"`
44315    fi
44316    if test "x$new_path" = x; then
44317      # It's still not found. Now this is an unrecoverable error.
44318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44319$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44320      has_space=`$ECHO "$complete" | $GREP " "`
44321      if test "x$has_space" != x; then
44322        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44323$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44324      fi
44325      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44326    fi
44327  fi
44328
44329  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44330  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44331  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44332  # "foo.exe" is OK but "foo" is an error.
44333  #
44334  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44335  # It is also a way to make sure we got the proper file name for the real test later on.
44336  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44337  if test "x$test_shortpath" = x; then
44338    # Short path failed, file does not exist as specified.
44339    # Try adding .exe or .cmd
44340    if test -f "${new_path}.exe"; then
44341      input_to_shortpath="${new_path}.exe"
44342    elif test -f "${new_path}.cmd"; then
44343      input_to_shortpath="${new_path}.cmd"
44344    else
44345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44346$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44347      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44348$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44349      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44350    fi
44351  else
44352    input_to_shortpath="$new_path"
44353  fi
44354
44355  # Call helper function which possibly converts this using DOS-style short mode.
44356  # If so, the updated path is stored in $new_path.
44357  new_path="$input_to_shortpath"
44358
44359  input_path="$input_to_shortpath"
44360  # Check if we need to convert this using DOS-style short mode. If the path
44361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44362  # take no chances and rewrite it.
44363  # Note: m4 eats our [], so we need to use [ and ] instead.
44364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44365  if test "x$has_forbidden_chars" != x; then
44366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44367    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44368    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44369    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44370      # Going to short mode and back again did indeed matter. Since short mode is
44371      # case insensitive, let's make it lowercase to improve readability.
44372      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44373      # Now convert it back to Unix-style (cygpath)
44374      input_path=`$CYGPATH -u "$shortmode_path"`
44375      new_path="$input_path"
44376    fi
44377  fi
44378
44379  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44380  if test "x$test_cygdrive_prefix" = x; then
44381    # As a simple fix, exclude /usr/bin since it's not a real path.
44382    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44383      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44384      # a path prefixed by /cygdrive for fixpath to work.
44385      new_path="$CYGWIN_ROOT_PATH$input_path"
44386    fi
44387  fi
44388
44389  # remove trailing .exe if any
44390  new_path="${new_path/%.exe/}"
44391
44392    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44393
44394  # First separate the path from the arguments. This will split at the first
44395  # space.
44396  complete="$BUILD_CC"
44397  path="${complete%% *}"
44398  tmp="$complete EOL"
44399  arguments="${tmp#* }"
44400
44401  # Input might be given as Windows format, start by converting to
44402  # unix format.
44403  new_path="$path"
44404
44405  windows_path="$new_path"
44406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44407    unix_path=`$CYGPATH -u "$windows_path"`
44408    new_path="$unix_path"
44409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44411    new_path="$unix_path"
44412  fi
44413
44414
44415  # Now try to locate executable using which
44416  new_path=`$WHICH "$new_path" 2> /dev/null`
44417
44418  if test "x$new_path" = x; then
44419    # Oops. Which didn't find the executable.
44420    # The splitting of arguments from the executable at a space might have been incorrect,
44421    # since paths with space are more likely in Windows. Give it another try with the whole
44422    # argument.
44423    path="$complete"
44424    arguments="EOL"
44425    new_path="$path"
44426
44427  windows_path="$new_path"
44428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44429    unix_path=`$CYGPATH -u "$windows_path"`
44430    new_path="$unix_path"
44431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44433    new_path="$unix_path"
44434  fi
44435
44436
44437    new_path=`$WHICH "$new_path" 2> /dev/null`
44438    # bat and cmd files are not always considered executable in MSYS causing which
44439    # to not find them
44440    if test "x$new_path" = x \
44441        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44442        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44443      new_path="$path"
44444
44445  windows_path="$new_path"
44446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44447    unix_path=`$CYGPATH -u "$windows_path"`
44448    new_path="$unix_path"
44449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44451    new_path="$unix_path"
44452  fi
44453
44454    fi
44455
44456    if test "x$new_path" = x; then
44457      # It's still not found. Now this is an unrecoverable error.
44458      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44459$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44460      has_space=`$ECHO "$complete" | $GREP " "`
44461      if test "x$has_space" != x; then
44462        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44463$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44464      fi
44465      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44466    fi
44467  fi
44468
44469  # Now new_path has a complete unix path to the binary
44470  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44471    # Keep paths in /bin as-is, but remove trailing .exe if any
44472    new_path="${new_path/%.exe/}"
44473    # Do not save /bin paths to all_fixpath_prefixes!
44474  else
44475    # Not in mixed or Windows style, start by that.
44476    new_path=`cmd //c echo $new_path`
44477
44478  input_path="$new_path"
44479  # Check if we need to convert this using DOS-style short mode. If the path
44480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44481  # take no chances and rewrite it.
44482  # Note: m4 eats our [], so we need to use [ and ] instead.
44483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44484  if test "x$has_forbidden_chars" != x; then
44485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44486    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44487  fi
44488
44489    # Output is in $new_path
44490
44491  windows_path="$new_path"
44492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44493    unix_path=`$CYGPATH -u "$windows_path"`
44494    new_path="$unix_path"
44495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44497    new_path="$unix_path"
44498  fi
44499
44500    # remove trailing .exe if any
44501    new_path="${new_path/%.exe/}"
44502
44503    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44504    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44505  fi
44506
44507    else
44508      # We're on a unix platform. Hooray! :)
44509      # First separate the path from the arguments. This will split at the first
44510      # space.
44511      complete="$BUILD_CC"
44512      path="${complete%% *}"
44513      tmp="$complete EOL"
44514      arguments="${tmp#* }"
44515
44516      # Cannot rely on the command "which" here since it doesn't always work.
44517      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44518      if test -z "$is_absolute_path"; then
44519        # Path to executable is not absolute. Find it.
44520        IFS_save="$IFS"
44521        IFS=:
44522        for p in $PATH; do
44523          if test -f "$p/$path" && test -x "$p/$path"; then
44524            new_path="$p/$path"
44525            break
44526          fi
44527        done
44528        IFS="$IFS_save"
44529      else
44530        # This is an absolute path, we can use it without further modifications.
44531        new_path="$path"
44532      fi
44533
44534      if test "x$new_path" = x; then
44535        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44536$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44537        has_space=`$ECHO "$complete" | $GREP " "`
44538        if test "x$has_space" != x; then
44539          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44540$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44541        fi
44542        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44543      fi
44544    fi
44545
44546    # Now join together the path and the arguments once again
44547    if test "x$arguments" != xEOL; then
44548      new_complete="$new_path ${arguments% *}"
44549    else
44550      new_complete="$new_path"
44551    fi
44552
44553    if test "x$complete" != "x$new_complete"; then
44554      BUILD_CC="$new_complete"
44555      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44556$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44557    fi
44558  fi
44559
44560
44561
44562
44563  # Publish this variable in the help.
44564
44565
44566  if [ -z "${BUILD_CXX+x}" ]; then
44567    # The variable is not set by user, try to locate tool using the code snippet
44568    for ac_prog in cl CC g++
44569do
44570  # Extract the first word of "$ac_prog", so it can be a program name with args.
44571set dummy $ac_prog; ac_word=$2
44572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44573$as_echo_n "checking for $ac_word... " >&6; }
44574if ${ac_cv_path_BUILD_CXX+:} false; then :
44575  $as_echo_n "(cached) " >&6
44576else
44577  case $BUILD_CXX in
44578  [\\/]* | ?:[\\/]*)
44579  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44580  ;;
44581  *)
44582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44583for as_dir in $PATH
44584do
44585  IFS=$as_save_IFS
44586  test -z "$as_dir" && as_dir=.
44587    for ac_exec_ext in '' $ac_executable_extensions; do
44588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44589    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44591    break 2
44592  fi
44593done
44594  done
44595IFS=$as_save_IFS
44596
44597  ;;
44598esac
44599fi
44600BUILD_CXX=$ac_cv_path_BUILD_CXX
44601if test -n "$BUILD_CXX"; then
44602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44603$as_echo "$BUILD_CXX" >&6; }
44604else
44605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44606$as_echo "no" >&6; }
44607fi
44608
44609
44610  test -n "$BUILD_CXX" && break
44611done
44612
44613  else
44614    # The variable is set, but is it from the command line or the environment?
44615
44616    # Try to remove the string !BUILD_CXX! from our list.
44617    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44618    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44619      # If it failed, the variable was not from the command line. Ignore it,
44620      # but warn the user (except for BASH, which is always set by the calling BASH).
44621      if test "xBUILD_CXX" != xBASH; then
44622        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44623$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44624      fi
44625      # Try to locate tool using the code snippet
44626      for ac_prog in cl CC g++
44627do
44628  # Extract the first word of "$ac_prog", so it can be a program name with args.
44629set dummy $ac_prog; ac_word=$2
44630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44631$as_echo_n "checking for $ac_word... " >&6; }
44632if ${ac_cv_path_BUILD_CXX+:} false; then :
44633  $as_echo_n "(cached) " >&6
44634else
44635  case $BUILD_CXX in
44636  [\\/]* | ?:[\\/]*)
44637  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44638  ;;
44639  *)
44640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44641for as_dir in $PATH
44642do
44643  IFS=$as_save_IFS
44644  test -z "$as_dir" && as_dir=.
44645    for ac_exec_ext in '' $ac_executable_extensions; do
44646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44647    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44649    break 2
44650  fi
44651done
44652  done
44653IFS=$as_save_IFS
44654
44655  ;;
44656esac
44657fi
44658BUILD_CXX=$ac_cv_path_BUILD_CXX
44659if test -n "$BUILD_CXX"; then
44660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44661$as_echo "$BUILD_CXX" >&6; }
44662else
44663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44664$as_echo "no" >&6; }
44665fi
44666
44667
44668  test -n "$BUILD_CXX" && break
44669done
44670
44671    else
44672      # If it succeeded, then it was overridden by the user. We will use it
44673      # for the tool.
44674
44675      # First remove it from the list of overridden variables, so we can test
44676      # for unknown variables in the end.
44677      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44678
44679      # Check if we try to supply an empty value
44680      if test "x$BUILD_CXX" = x; then
44681        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44682$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44683        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44684$as_echo_n "checking for BUILD_CXX... " >&6; }
44685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44686$as_echo "disabled" >&6; }
44687      else
44688        # Check if the provided tool contains a complete path.
44689        tool_specified="$BUILD_CXX"
44690        tool_basename="${tool_specified##*/}"
44691        if test "x$tool_basename" = "x$tool_specified"; then
44692          # A command without a complete path is provided, search $PATH.
44693          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44694$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44695          # Extract the first word of "$tool_basename", so it can be a program name with args.
44696set dummy $tool_basename; ac_word=$2
44697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44698$as_echo_n "checking for $ac_word... " >&6; }
44699if ${ac_cv_path_BUILD_CXX+:} false; then :
44700  $as_echo_n "(cached) " >&6
44701else
44702  case $BUILD_CXX in
44703  [\\/]* | ?:[\\/]*)
44704  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44705  ;;
44706  *)
44707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44708for as_dir in $PATH
44709do
44710  IFS=$as_save_IFS
44711  test -z "$as_dir" && as_dir=.
44712    for ac_exec_ext in '' $ac_executable_extensions; do
44713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44714    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44716    break 2
44717  fi
44718done
44719  done
44720IFS=$as_save_IFS
44721
44722  ;;
44723esac
44724fi
44725BUILD_CXX=$ac_cv_path_BUILD_CXX
44726if test -n "$BUILD_CXX"; then
44727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44728$as_echo "$BUILD_CXX" >&6; }
44729else
44730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44731$as_echo "no" >&6; }
44732fi
44733
44734
44735          if test "x$BUILD_CXX" = x; then
44736            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44737          fi
44738        else
44739          # Otherwise we believe it is a complete path. Use it as it is.
44740          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44741$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44742          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44743$as_echo_n "checking for BUILD_CXX... " >&6; }
44744          if test ! -x "$tool_specified"; then
44745            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44746$as_echo "not found" >&6; }
44747            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44748          fi
44749          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44750$as_echo "$tool_specified" >&6; }
44751        fi
44752      fi
44753    fi
44754
44755  fi
44756
44757
44758
44759  if test "x$BUILD_CXX" = x; then
44760    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44761  fi
44762
44763
44764
44765  # Only process if variable expands to non-empty
44766
44767  if test "x$BUILD_CXX" != x; then
44768    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44769
44770  # First separate the path from the arguments. This will split at the first
44771  # space.
44772  complete="$BUILD_CXX"
44773  path="${complete%% *}"
44774  tmp="$complete EOL"
44775  arguments="${tmp#* }"
44776
44777  # Input might be given as Windows format, start by converting to
44778  # unix format.
44779  new_path=`$CYGPATH -u "$path"`
44780
44781  # Now try to locate executable using which
44782  new_path=`$WHICH "$new_path" 2> /dev/null`
44783  # bat and cmd files are not always considered executable in cygwin causing which
44784  # to not find them
44785  if test "x$new_path" = x \
44786      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44787      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44788    new_path=`$CYGPATH -u "$path"`
44789  fi
44790  if test "x$new_path" = x; then
44791    # Oops. Which didn't find the executable.
44792    # The splitting of arguments from the executable at a space might have been incorrect,
44793    # since paths with space are more likely in Windows. Give it another try with the whole
44794    # argument.
44795    path="$complete"
44796    arguments="EOL"
44797    new_path=`$CYGPATH -u "$path"`
44798    new_path=`$WHICH "$new_path" 2> /dev/null`
44799    # bat and cmd files are not always considered executable in cygwin causing which
44800    # to not find them
44801    if test "x$new_path" = x \
44802        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44803        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44804      new_path=`$CYGPATH -u "$path"`
44805    fi
44806    if test "x$new_path" = x; then
44807      # It's still not found. Now this is an unrecoverable error.
44808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44809$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44810      has_space=`$ECHO "$complete" | $GREP " "`
44811      if test "x$has_space" != x; then
44812        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44813$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44814      fi
44815      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44816    fi
44817  fi
44818
44819  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44820  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44821  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44822  # "foo.exe" is OK but "foo" is an error.
44823  #
44824  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44825  # It is also a way to make sure we got the proper file name for the real test later on.
44826  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44827  if test "x$test_shortpath" = x; then
44828    # Short path failed, file does not exist as specified.
44829    # Try adding .exe or .cmd
44830    if test -f "${new_path}.exe"; then
44831      input_to_shortpath="${new_path}.exe"
44832    elif test -f "${new_path}.cmd"; then
44833      input_to_shortpath="${new_path}.cmd"
44834    else
44835      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44836$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44837      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44838$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44839      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44840    fi
44841  else
44842    input_to_shortpath="$new_path"
44843  fi
44844
44845  # Call helper function which possibly converts this using DOS-style short mode.
44846  # If so, the updated path is stored in $new_path.
44847  new_path="$input_to_shortpath"
44848
44849  input_path="$input_to_shortpath"
44850  # Check if we need to convert this using DOS-style short mode. If the path
44851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44852  # take no chances and rewrite it.
44853  # Note: m4 eats our [], so we need to use [ and ] instead.
44854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44855  if test "x$has_forbidden_chars" != x; then
44856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44857    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44858    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44859    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44860      # Going to short mode and back again did indeed matter. Since short mode is
44861      # case insensitive, let's make it lowercase to improve readability.
44862      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44863      # Now convert it back to Unix-style (cygpath)
44864      input_path=`$CYGPATH -u "$shortmode_path"`
44865      new_path="$input_path"
44866    fi
44867  fi
44868
44869  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44870  if test "x$test_cygdrive_prefix" = x; then
44871    # As a simple fix, exclude /usr/bin since it's not a real path.
44872    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44873      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44874      # a path prefixed by /cygdrive for fixpath to work.
44875      new_path="$CYGWIN_ROOT_PATH$input_path"
44876    fi
44877  fi
44878
44879  # remove trailing .exe if any
44880  new_path="${new_path/%.exe/}"
44881
44882    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44883
44884  # First separate the path from the arguments. This will split at the first
44885  # space.
44886  complete="$BUILD_CXX"
44887  path="${complete%% *}"
44888  tmp="$complete EOL"
44889  arguments="${tmp#* }"
44890
44891  # Input might be given as Windows format, start by converting to
44892  # unix format.
44893  new_path="$path"
44894
44895  windows_path="$new_path"
44896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44897    unix_path=`$CYGPATH -u "$windows_path"`
44898    new_path="$unix_path"
44899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44901    new_path="$unix_path"
44902  fi
44903
44904
44905  # Now try to locate executable using which
44906  new_path=`$WHICH "$new_path" 2> /dev/null`
44907
44908  if test "x$new_path" = x; then
44909    # Oops. Which didn't find the executable.
44910    # The splitting of arguments from the executable at a space might have been incorrect,
44911    # since paths with space are more likely in Windows. Give it another try with the whole
44912    # argument.
44913    path="$complete"
44914    arguments="EOL"
44915    new_path="$path"
44916
44917  windows_path="$new_path"
44918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44919    unix_path=`$CYGPATH -u "$windows_path"`
44920    new_path="$unix_path"
44921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44923    new_path="$unix_path"
44924  fi
44925
44926
44927    new_path=`$WHICH "$new_path" 2> /dev/null`
44928    # bat and cmd files are not always considered executable in MSYS causing which
44929    # to not find them
44930    if test "x$new_path" = x \
44931        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44932        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44933      new_path="$path"
44934
44935  windows_path="$new_path"
44936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44937    unix_path=`$CYGPATH -u "$windows_path"`
44938    new_path="$unix_path"
44939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44941    new_path="$unix_path"
44942  fi
44943
44944    fi
44945
44946    if test "x$new_path" = x; then
44947      # It's still not found. Now this is an unrecoverable error.
44948      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44949$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44950      has_space=`$ECHO "$complete" | $GREP " "`
44951      if test "x$has_space" != x; then
44952        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44953$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44954      fi
44955      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44956    fi
44957  fi
44958
44959  # Now new_path has a complete unix path to the binary
44960  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44961    # Keep paths in /bin as-is, but remove trailing .exe if any
44962    new_path="${new_path/%.exe/}"
44963    # Do not save /bin paths to all_fixpath_prefixes!
44964  else
44965    # Not in mixed or Windows style, start by that.
44966    new_path=`cmd //c echo $new_path`
44967
44968  input_path="$new_path"
44969  # Check if we need to convert this using DOS-style short mode. If the path
44970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44971  # take no chances and rewrite it.
44972  # Note: m4 eats our [], so we need to use [ and ] instead.
44973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44974  if test "x$has_forbidden_chars" != x; then
44975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44976    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44977  fi
44978
44979    # Output is in $new_path
44980
44981  windows_path="$new_path"
44982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44983    unix_path=`$CYGPATH -u "$windows_path"`
44984    new_path="$unix_path"
44985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44987    new_path="$unix_path"
44988  fi
44989
44990    # remove trailing .exe if any
44991    new_path="${new_path/%.exe/}"
44992
44993    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44994    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44995  fi
44996
44997    else
44998      # We're on a unix platform. Hooray! :)
44999      # First separate the path from the arguments. This will split at the first
45000      # space.
45001      complete="$BUILD_CXX"
45002      path="${complete%% *}"
45003      tmp="$complete EOL"
45004      arguments="${tmp#* }"
45005
45006      # Cannot rely on the command "which" here since it doesn't always work.
45007      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45008      if test -z "$is_absolute_path"; then
45009        # Path to executable is not absolute. Find it.
45010        IFS_save="$IFS"
45011        IFS=:
45012        for p in $PATH; do
45013          if test -f "$p/$path" && test -x "$p/$path"; then
45014            new_path="$p/$path"
45015            break
45016          fi
45017        done
45018        IFS="$IFS_save"
45019      else
45020        # This is an absolute path, we can use it without further modifications.
45021        new_path="$path"
45022      fi
45023
45024      if test "x$new_path" = x; then
45025        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45026$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45027        has_space=`$ECHO "$complete" | $GREP " "`
45028        if test "x$has_space" != x; then
45029          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45030$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45031        fi
45032        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45033      fi
45034    fi
45035
45036    # Now join together the path and the arguments once again
45037    if test "x$arguments" != xEOL; then
45038      new_complete="$new_path ${arguments% *}"
45039    else
45040      new_complete="$new_path"
45041    fi
45042
45043    if test "x$complete" != "x$new_complete"; then
45044      BUILD_CXX="$new_complete"
45045      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45046$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45047    fi
45048  fi
45049
45050
45051
45052  # Publish this variable in the help.
45053
45054
45055  if [ -z "${BUILD_NM+x}" ]; then
45056    # The variable is not set by user, try to locate tool using the code snippet
45057    for ac_prog in nm gcc-nm
45058do
45059  # Extract the first word of "$ac_prog", so it can be a program name with args.
45060set dummy $ac_prog; ac_word=$2
45061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45062$as_echo_n "checking for $ac_word... " >&6; }
45063if ${ac_cv_path_BUILD_NM+:} false; then :
45064  $as_echo_n "(cached) " >&6
45065else
45066  case $BUILD_NM in
45067  [\\/]* | ?:[\\/]*)
45068  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45069  ;;
45070  *)
45071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45072for as_dir in $PATH
45073do
45074  IFS=$as_save_IFS
45075  test -z "$as_dir" && as_dir=.
45076    for ac_exec_ext in '' $ac_executable_extensions; do
45077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45078    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45080    break 2
45081  fi
45082done
45083  done
45084IFS=$as_save_IFS
45085
45086  ;;
45087esac
45088fi
45089BUILD_NM=$ac_cv_path_BUILD_NM
45090if test -n "$BUILD_NM"; then
45091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45092$as_echo "$BUILD_NM" >&6; }
45093else
45094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45095$as_echo "no" >&6; }
45096fi
45097
45098
45099  test -n "$BUILD_NM" && break
45100done
45101
45102  else
45103    # The variable is set, but is it from the command line or the environment?
45104
45105    # Try to remove the string !BUILD_NM! from our list.
45106    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45107    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45108      # If it failed, the variable was not from the command line. Ignore it,
45109      # but warn the user (except for BASH, which is always set by the calling BASH).
45110      if test "xBUILD_NM" != xBASH; then
45111        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45112$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45113      fi
45114      # Try to locate tool using the code snippet
45115      for ac_prog in nm gcc-nm
45116do
45117  # Extract the first word of "$ac_prog", so it can be a program name with args.
45118set dummy $ac_prog; ac_word=$2
45119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45120$as_echo_n "checking for $ac_word... " >&6; }
45121if ${ac_cv_path_BUILD_NM+:} false; then :
45122  $as_echo_n "(cached) " >&6
45123else
45124  case $BUILD_NM in
45125  [\\/]* | ?:[\\/]*)
45126  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45127  ;;
45128  *)
45129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45130for as_dir in $PATH
45131do
45132  IFS=$as_save_IFS
45133  test -z "$as_dir" && as_dir=.
45134    for ac_exec_ext in '' $ac_executable_extensions; do
45135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45136    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45138    break 2
45139  fi
45140done
45141  done
45142IFS=$as_save_IFS
45143
45144  ;;
45145esac
45146fi
45147BUILD_NM=$ac_cv_path_BUILD_NM
45148if test -n "$BUILD_NM"; then
45149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45150$as_echo "$BUILD_NM" >&6; }
45151else
45152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45153$as_echo "no" >&6; }
45154fi
45155
45156
45157  test -n "$BUILD_NM" && break
45158done
45159
45160    else
45161      # If it succeeded, then it was overridden by the user. We will use it
45162      # for the tool.
45163
45164      # First remove it from the list of overridden variables, so we can test
45165      # for unknown variables in the end.
45166      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45167
45168      # Check if we try to supply an empty value
45169      if test "x$BUILD_NM" = x; then
45170        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45171$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45172        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45173$as_echo_n "checking for BUILD_NM... " >&6; }
45174        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45175$as_echo "disabled" >&6; }
45176      else
45177        # Check if the provided tool contains a complete path.
45178        tool_specified="$BUILD_NM"
45179        tool_basename="${tool_specified##*/}"
45180        if test "x$tool_basename" = "x$tool_specified"; then
45181          # A command without a complete path is provided, search $PATH.
45182          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45183$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45184          # Extract the first word of "$tool_basename", so it can be a program name with args.
45185set dummy $tool_basename; ac_word=$2
45186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45187$as_echo_n "checking for $ac_word... " >&6; }
45188if ${ac_cv_path_BUILD_NM+:} false; then :
45189  $as_echo_n "(cached) " >&6
45190else
45191  case $BUILD_NM in
45192  [\\/]* | ?:[\\/]*)
45193  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45194  ;;
45195  *)
45196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45197for as_dir in $PATH
45198do
45199  IFS=$as_save_IFS
45200  test -z "$as_dir" && as_dir=.
45201    for ac_exec_ext in '' $ac_executable_extensions; do
45202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45203    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45205    break 2
45206  fi
45207done
45208  done
45209IFS=$as_save_IFS
45210
45211  ;;
45212esac
45213fi
45214BUILD_NM=$ac_cv_path_BUILD_NM
45215if test -n "$BUILD_NM"; then
45216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45217$as_echo "$BUILD_NM" >&6; }
45218else
45219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45220$as_echo "no" >&6; }
45221fi
45222
45223
45224          if test "x$BUILD_NM" = x; then
45225            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45226          fi
45227        else
45228          # Otherwise we believe it is a complete path. Use it as it is.
45229          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45230$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45231          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45232$as_echo_n "checking for BUILD_NM... " >&6; }
45233          if test ! -x "$tool_specified"; then
45234            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45235$as_echo "not found" >&6; }
45236            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45237          fi
45238          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45239$as_echo "$tool_specified" >&6; }
45240        fi
45241      fi
45242    fi
45243
45244  fi
45245
45246
45247
45248  # Only process if variable expands to non-empty
45249
45250  if test "x$BUILD_NM" != x; then
45251    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45252
45253  # First separate the path from the arguments. This will split at the first
45254  # space.
45255  complete="$BUILD_NM"
45256  path="${complete%% *}"
45257  tmp="$complete EOL"
45258  arguments="${tmp#* }"
45259
45260  # Input might be given as Windows format, start by converting to
45261  # unix format.
45262  new_path=`$CYGPATH -u "$path"`
45263
45264  # Now try to locate executable using which
45265  new_path=`$WHICH "$new_path" 2> /dev/null`
45266  # bat and cmd files are not always considered executable in cygwin causing which
45267  # to not find them
45268  if test "x$new_path" = x \
45269      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45270      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45271    new_path=`$CYGPATH -u "$path"`
45272  fi
45273  if test "x$new_path" = x; then
45274    # Oops. Which didn't find the executable.
45275    # The splitting of arguments from the executable at a space might have been incorrect,
45276    # since paths with space are more likely in Windows. Give it another try with the whole
45277    # argument.
45278    path="$complete"
45279    arguments="EOL"
45280    new_path=`$CYGPATH -u "$path"`
45281    new_path=`$WHICH "$new_path" 2> /dev/null`
45282    # bat and cmd files are not always considered executable in cygwin causing which
45283    # to not find them
45284    if test "x$new_path" = x \
45285        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45286        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45287      new_path=`$CYGPATH -u "$path"`
45288    fi
45289    if test "x$new_path" = x; then
45290      # It's still not found. Now this is an unrecoverable error.
45291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45292$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45293      has_space=`$ECHO "$complete" | $GREP " "`
45294      if test "x$has_space" != x; then
45295        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45296$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45297      fi
45298      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45299    fi
45300  fi
45301
45302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45305  # "foo.exe" is OK but "foo" is an error.
45306  #
45307  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45308  # It is also a way to make sure we got the proper file name for the real test later on.
45309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45310  if test "x$test_shortpath" = x; then
45311    # Short path failed, file does not exist as specified.
45312    # Try adding .exe or .cmd
45313    if test -f "${new_path}.exe"; then
45314      input_to_shortpath="${new_path}.exe"
45315    elif test -f "${new_path}.cmd"; then
45316      input_to_shortpath="${new_path}.cmd"
45317    else
45318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45319$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45320      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45321$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45322      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45323    fi
45324  else
45325    input_to_shortpath="$new_path"
45326  fi
45327
45328  # Call helper function which possibly converts this using DOS-style short mode.
45329  # If so, the updated path is stored in $new_path.
45330  new_path="$input_to_shortpath"
45331
45332  input_path="$input_to_shortpath"
45333  # Check if we need to convert this using DOS-style short mode. If the path
45334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45335  # take no chances and rewrite it.
45336  # Note: m4 eats our [], so we need to use [ and ] instead.
45337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45338  if test "x$has_forbidden_chars" != x; then
45339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45343      # Going to short mode and back again did indeed matter. Since short mode is
45344      # case insensitive, let's make it lowercase to improve readability.
45345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45346      # Now convert it back to Unix-style (cygpath)
45347      input_path=`$CYGPATH -u "$shortmode_path"`
45348      new_path="$input_path"
45349    fi
45350  fi
45351
45352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45353  if test "x$test_cygdrive_prefix" = x; then
45354    # As a simple fix, exclude /usr/bin since it's not a real path.
45355    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45357      # a path prefixed by /cygdrive for fixpath to work.
45358      new_path="$CYGWIN_ROOT_PATH$input_path"
45359    fi
45360  fi
45361
45362  # remove trailing .exe if any
45363  new_path="${new_path/%.exe/}"
45364
45365    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45366
45367  # First separate the path from the arguments. This will split at the first
45368  # space.
45369  complete="$BUILD_NM"
45370  path="${complete%% *}"
45371  tmp="$complete EOL"
45372  arguments="${tmp#* }"
45373
45374  # Input might be given as Windows format, start by converting to
45375  # unix format.
45376  new_path="$path"
45377
45378  windows_path="$new_path"
45379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45380    unix_path=`$CYGPATH -u "$windows_path"`
45381    new_path="$unix_path"
45382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45384    new_path="$unix_path"
45385  fi
45386
45387
45388  # Now try to locate executable using which
45389  new_path=`$WHICH "$new_path" 2> /dev/null`
45390
45391  if test "x$new_path" = x; then
45392    # Oops. Which didn't find the executable.
45393    # The splitting of arguments from the executable at a space might have been incorrect,
45394    # since paths with space are more likely in Windows. Give it another try with the whole
45395    # argument.
45396    path="$complete"
45397    arguments="EOL"
45398    new_path="$path"
45399
45400  windows_path="$new_path"
45401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45402    unix_path=`$CYGPATH -u "$windows_path"`
45403    new_path="$unix_path"
45404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45406    new_path="$unix_path"
45407  fi
45408
45409
45410    new_path=`$WHICH "$new_path" 2> /dev/null`
45411    # bat and cmd files are not always considered executable in MSYS causing which
45412    # to not find them
45413    if test "x$new_path" = x \
45414        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45415        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45416      new_path="$path"
45417
45418  windows_path="$new_path"
45419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45420    unix_path=`$CYGPATH -u "$windows_path"`
45421    new_path="$unix_path"
45422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45424    new_path="$unix_path"
45425  fi
45426
45427    fi
45428
45429    if test "x$new_path" = x; then
45430      # It's still not found. Now this is an unrecoverable error.
45431      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45432$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45433      has_space=`$ECHO "$complete" | $GREP " "`
45434      if test "x$has_space" != x; then
45435        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45436$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45437      fi
45438      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45439    fi
45440  fi
45441
45442  # Now new_path has a complete unix path to the binary
45443  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45444    # Keep paths in /bin as-is, but remove trailing .exe if any
45445    new_path="${new_path/%.exe/}"
45446    # Do not save /bin paths to all_fixpath_prefixes!
45447  else
45448    # Not in mixed or Windows style, start by that.
45449    new_path=`cmd //c echo $new_path`
45450
45451  input_path="$new_path"
45452  # Check if we need to convert this using DOS-style short mode. If the path
45453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45454  # take no chances and rewrite it.
45455  # Note: m4 eats our [], so we need to use [ and ] instead.
45456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45457  if test "x$has_forbidden_chars" != x; then
45458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45459    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45460  fi
45461
45462    # Output is in $new_path
45463
45464  windows_path="$new_path"
45465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45466    unix_path=`$CYGPATH -u "$windows_path"`
45467    new_path="$unix_path"
45468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45470    new_path="$unix_path"
45471  fi
45472
45473    # remove trailing .exe if any
45474    new_path="${new_path/%.exe/}"
45475
45476    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45477    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45478  fi
45479
45480    else
45481      # We're on a unix platform. Hooray! :)
45482      # First separate the path from the arguments. This will split at the first
45483      # space.
45484      complete="$BUILD_NM"
45485      path="${complete%% *}"
45486      tmp="$complete EOL"
45487      arguments="${tmp#* }"
45488
45489      # Cannot rely on the command "which" here since it doesn't always work.
45490      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45491      if test -z "$is_absolute_path"; then
45492        # Path to executable is not absolute. Find it.
45493        IFS_save="$IFS"
45494        IFS=:
45495        for p in $PATH; do
45496          if test -f "$p/$path" && test -x "$p/$path"; then
45497            new_path="$p/$path"
45498            break
45499          fi
45500        done
45501        IFS="$IFS_save"
45502      else
45503        # This is an absolute path, we can use it without further modifications.
45504        new_path="$path"
45505      fi
45506
45507      if test "x$new_path" = x; then
45508        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45509$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45510        has_space=`$ECHO "$complete" | $GREP " "`
45511        if test "x$has_space" != x; then
45512          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45513$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45514        fi
45515        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45516      fi
45517    fi
45518
45519    # Now join together the path and the arguments once again
45520    if test "x$arguments" != xEOL; then
45521      new_complete="$new_path ${arguments% *}"
45522    else
45523      new_complete="$new_path"
45524    fi
45525
45526    if test "x$complete" != "x$new_complete"; then
45527      BUILD_NM="$new_complete"
45528      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45529$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45530    fi
45531  fi
45532
45533
45534
45535  # Publish this variable in the help.
45536
45537
45538  if [ -z "${BUILD_AR+x}" ]; then
45539    # The variable is not set by user, try to locate tool using the code snippet
45540    for ac_prog in ar gcc-ar
45541do
45542  # Extract the first word of "$ac_prog", so it can be a program name with args.
45543set dummy $ac_prog; ac_word=$2
45544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45545$as_echo_n "checking for $ac_word... " >&6; }
45546if ${ac_cv_path_BUILD_AR+:} false; then :
45547  $as_echo_n "(cached) " >&6
45548else
45549  case $BUILD_AR in
45550  [\\/]* | ?:[\\/]*)
45551  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45552  ;;
45553  *)
45554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45555for as_dir in $PATH
45556do
45557  IFS=$as_save_IFS
45558  test -z "$as_dir" && as_dir=.
45559    for ac_exec_ext in '' $ac_executable_extensions; do
45560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45561    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45563    break 2
45564  fi
45565done
45566  done
45567IFS=$as_save_IFS
45568
45569  ;;
45570esac
45571fi
45572BUILD_AR=$ac_cv_path_BUILD_AR
45573if test -n "$BUILD_AR"; then
45574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45575$as_echo "$BUILD_AR" >&6; }
45576else
45577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45578$as_echo "no" >&6; }
45579fi
45580
45581
45582  test -n "$BUILD_AR" && break
45583done
45584
45585  else
45586    # The variable is set, but is it from the command line or the environment?
45587
45588    # Try to remove the string !BUILD_AR! from our list.
45589    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45590    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45591      # If it failed, the variable was not from the command line. Ignore it,
45592      # but warn the user (except for BASH, which is always set by the calling BASH).
45593      if test "xBUILD_AR" != xBASH; then
45594        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45595$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45596      fi
45597      # Try to locate tool using the code snippet
45598      for ac_prog in ar gcc-ar
45599do
45600  # Extract the first word of "$ac_prog", so it can be a program name with args.
45601set dummy $ac_prog; ac_word=$2
45602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45603$as_echo_n "checking for $ac_word... " >&6; }
45604if ${ac_cv_path_BUILD_AR+:} false; then :
45605  $as_echo_n "(cached) " >&6
45606else
45607  case $BUILD_AR in
45608  [\\/]* | ?:[\\/]*)
45609  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45610  ;;
45611  *)
45612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45613for as_dir in $PATH
45614do
45615  IFS=$as_save_IFS
45616  test -z "$as_dir" && as_dir=.
45617    for ac_exec_ext in '' $ac_executable_extensions; do
45618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45619    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45621    break 2
45622  fi
45623done
45624  done
45625IFS=$as_save_IFS
45626
45627  ;;
45628esac
45629fi
45630BUILD_AR=$ac_cv_path_BUILD_AR
45631if test -n "$BUILD_AR"; then
45632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45633$as_echo "$BUILD_AR" >&6; }
45634else
45635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45636$as_echo "no" >&6; }
45637fi
45638
45639
45640  test -n "$BUILD_AR" && break
45641done
45642
45643    else
45644      # If it succeeded, then it was overridden by the user. We will use it
45645      # for the tool.
45646
45647      # First remove it from the list of overridden variables, so we can test
45648      # for unknown variables in the end.
45649      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45650
45651      # Check if we try to supply an empty value
45652      if test "x$BUILD_AR" = x; then
45653        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45654$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45655        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45656$as_echo_n "checking for BUILD_AR... " >&6; }
45657        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45658$as_echo "disabled" >&6; }
45659      else
45660        # Check if the provided tool contains a complete path.
45661        tool_specified="$BUILD_AR"
45662        tool_basename="${tool_specified##*/}"
45663        if test "x$tool_basename" = "x$tool_specified"; then
45664          # A command without a complete path is provided, search $PATH.
45665          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45666$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45667          # Extract the first word of "$tool_basename", so it can be a program name with args.
45668set dummy $tool_basename; ac_word=$2
45669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45670$as_echo_n "checking for $ac_word... " >&6; }
45671if ${ac_cv_path_BUILD_AR+:} false; then :
45672  $as_echo_n "(cached) " >&6
45673else
45674  case $BUILD_AR in
45675  [\\/]* | ?:[\\/]*)
45676  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45677  ;;
45678  *)
45679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45680for as_dir in $PATH
45681do
45682  IFS=$as_save_IFS
45683  test -z "$as_dir" && as_dir=.
45684    for ac_exec_ext in '' $ac_executable_extensions; do
45685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45686    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45688    break 2
45689  fi
45690done
45691  done
45692IFS=$as_save_IFS
45693
45694  ;;
45695esac
45696fi
45697BUILD_AR=$ac_cv_path_BUILD_AR
45698if test -n "$BUILD_AR"; then
45699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45700$as_echo "$BUILD_AR" >&6; }
45701else
45702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45703$as_echo "no" >&6; }
45704fi
45705
45706
45707          if test "x$BUILD_AR" = x; then
45708            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45709          fi
45710        else
45711          # Otherwise we believe it is a complete path. Use it as it is.
45712          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45713$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45714          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45715$as_echo_n "checking for BUILD_AR... " >&6; }
45716          if test ! -x "$tool_specified"; then
45717            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45718$as_echo "not found" >&6; }
45719            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45720          fi
45721          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45722$as_echo "$tool_specified" >&6; }
45723        fi
45724      fi
45725    fi
45726
45727  fi
45728
45729
45730
45731  # Only process if variable expands to non-empty
45732
45733  if test "x$BUILD_AR" != x; then
45734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45735
45736  # First separate the path from the arguments. This will split at the first
45737  # space.
45738  complete="$BUILD_AR"
45739  path="${complete%% *}"
45740  tmp="$complete EOL"
45741  arguments="${tmp#* }"
45742
45743  # Input might be given as Windows format, start by converting to
45744  # unix format.
45745  new_path=`$CYGPATH -u "$path"`
45746
45747  # Now try to locate executable using which
45748  new_path=`$WHICH "$new_path" 2> /dev/null`
45749  # bat and cmd files are not always considered executable in cygwin causing which
45750  # to not find them
45751  if test "x$new_path" = x \
45752      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45753      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45754    new_path=`$CYGPATH -u "$path"`
45755  fi
45756  if test "x$new_path" = x; then
45757    # Oops. Which didn't find the executable.
45758    # The splitting of arguments from the executable at a space might have been incorrect,
45759    # since paths with space are more likely in Windows. Give it another try with the whole
45760    # argument.
45761    path="$complete"
45762    arguments="EOL"
45763    new_path=`$CYGPATH -u "$path"`
45764    new_path=`$WHICH "$new_path" 2> /dev/null`
45765    # bat and cmd files are not always considered executable in cygwin causing which
45766    # to not find them
45767    if test "x$new_path" = x \
45768        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45769        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45770      new_path=`$CYGPATH -u "$path"`
45771    fi
45772    if test "x$new_path" = x; then
45773      # It's still not found. Now this is an unrecoverable error.
45774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45775$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45776      has_space=`$ECHO "$complete" | $GREP " "`
45777      if test "x$has_space" != x; then
45778        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45779$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45780      fi
45781      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45782    fi
45783  fi
45784
45785  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45786  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45787  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45788  # "foo.exe" is OK but "foo" is an error.
45789  #
45790  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45791  # It is also a way to make sure we got the proper file name for the real test later on.
45792  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45793  if test "x$test_shortpath" = x; then
45794    # Short path failed, file does not exist as specified.
45795    # Try adding .exe or .cmd
45796    if test -f "${new_path}.exe"; then
45797      input_to_shortpath="${new_path}.exe"
45798    elif test -f "${new_path}.cmd"; then
45799      input_to_shortpath="${new_path}.cmd"
45800    else
45801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45802$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45803      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45804$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45805      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45806    fi
45807  else
45808    input_to_shortpath="$new_path"
45809  fi
45810
45811  # Call helper function which possibly converts this using DOS-style short mode.
45812  # If so, the updated path is stored in $new_path.
45813  new_path="$input_to_shortpath"
45814
45815  input_path="$input_to_shortpath"
45816  # Check if we need to convert this using DOS-style short mode. If the path
45817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45818  # take no chances and rewrite it.
45819  # Note: m4 eats our [], so we need to use [ and ] instead.
45820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45821  if test "x$has_forbidden_chars" != x; then
45822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45826      # Going to short mode and back again did indeed matter. Since short mode is
45827      # case insensitive, let's make it lowercase to improve readability.
45828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45829      # Now convert it back to Unix-style (cygpath)
45830      input_path=`$CYGPATH -u "$shortmode_path"`
45831      new_path="$input_path"
45832    fi
45833  fi
45834
45835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45836  if test "x$test_cygdrive_prefix" = x; then
45837    # As a simple fix, exclude /usr/bin since it's not a real path.
45838    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45840      # a path prefixed by /cygdrive for fixpath to work.
45841      new_path="$CYGWIN_ROOT_PATH$input_path"
45842    fi
45843  fi
45844
45845  # remove trailing .exe if any
45846  new_path="${new_path/%.exe/}"
45847
45848    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45849
45850  # First separate the path from the arguments. This will split at the first
45851  # space.
45852  complete="$BUILD_AR"
45853  path="${complete%% *}"
45854  tmp="$complete EOL"
45855  arguments="${tmp#* }"
45856
45857  # Input might be given as Windows format, start by converting to
45858  # unix format.
45859  new_path="$path"
45860
45861  windows_path="$new_path"
45862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45863    unix_path=`$CYGPATH -u "$windows_path"`
45864    new_path="$unix_path"
45865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45867    new_path="$unix_path"
45868  fi
45869
45870
45871  # Now try to locate executable using which
45872  new_path=`$WHICH "$new_path" 2> /dev/null`
45873
45874  if test "x$new_path" = x; then
45875    # Oops. Which didn't find the executable.
45876    # The splitting of arguments from the executable at a space might have been incorrect,
45877    # since paths with space are more likely in Windows. Give it another try with the whole
45878    # argument.
45879    path="$complete"
45880    arguments="EOL"
45881    new_path="$path"
45882
45883  windows_path="$new_path"
45884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45885    unix_path=`$CYGPATH -u "$windows_path"`
45886    new_path="$unix_path"
45887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45889    new_path="$unix_path"
45890  fi
45891
45892
45893    new_path=`$WHICH "$new_path" 2> /dev/null`
45894    # bat and cmd files are not always considered executable in MSYS causing which
45895    # to not find them
45896    if test "x$new_path" = x \
45897        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45898        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45899      new_path="$path"
45900
45901  windows_path="$new_path"
45902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45903    unix_path=`$CYGPATH -u "$windows_path"`
45904    new_path="$unix_path"
45905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45907    new_path="$unix_path"
45908  fi
45909
45910    fi
45911
45912    if test "x$new_path" = x; then
45913      # It's still not found. Now this is an unrecoverable error.
45914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45915$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45916      has_space=`$ECHO "$complete" | $GREP " "`
45917      if test "x$has_space" != x; then
45918        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45919$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45920      fi
45921      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45922    fi
45923  fi
45924
45925  # Now new_path has a complete unix path to the binary
45926  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45927    # Keep paths in /bin as-is, but remove trailing .exe if any
45928    new_path="${new_path/%.exe/}"
45929    # Do not save /bin paths to all_fixpath_prefixes!
45930  else
45931    # Not in mixed or Windows style, start by that.
45932    new_path=`cmd //c echo $new_path`
45933
45934  input_path="$new_path"
45935  # Check if we need to convert this using DOS-style short mode. If the path
45936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45937  # take no chances and rewrite it.
45938  # Note: m4 eats our [], so we need to use [ and ] instead.
45939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45940  if test "x$has_forbidden_chars" != x; then
45941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45943  fi
45944
45945    # Output is in $new_path
45946
45947  windows_path="$new_path"
45948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45949    unix_path=`$CYGPATH -u "$windows_path"`
45950    new_path="$unix_path"
45951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45953    new_path="$unix_path"
45954  fi
45955
45956    # remove trailing .exe if any
45957    new_path="${new_path/%.exe/}"
45958
45959    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45960    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45961  fi
45962
45963    else
45964      # We're on a unix platform. Hooray! :)
45965      # First separate the path from the arguments. This will split at the first
45966      # space.
45967      complete="$BUILD_AR"
45968      path="${complete%% *}"
45969      tmp="$complete EOL"
45970      arguments="${tmp#* }"
45971
45972      # Cannot rely on the command "which" here since it doesn't always work.
45973      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45974      if test -z "$is_absolute_path"; then
45975        # Path to executable is not absolute. Find it.
45976        IFS_save="$IFS"
45977        IFS=:
45978        for p in $PATH; do
45979          if test -f "$p/$path" && test -x "$p/$path"; then
45980            new_path="$p/$path"
45981            break
45982          fi
45983        done
45984        IFS="$IFS_save"
45985      else
45986        # This is an absolute path, we can use it without further modifications.
45987        new_path="$path"
45988      fi
45989
45990      if test "x$new_path" = x; then
45991        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45992$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45993        has_space=`$ECHO "$complete" | $GREP " "`
45994        if test "x$has_space" != x; then
45995          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45996$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45997        fi
45998        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45999      fi
46000    fi
46001
46002    # Now join together the path and the arguments once again
46003    if test "x$arguments" != xEOL; then
46004      new_complete="$new_path ${arguments% *}"
46005    else
46006      new_complete="$new_path"
46007    fi
46008
46009    if test "x$complete" != "x$new_complete"; then
46010      BUILD_AR="$new_complete"
46011      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46012$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46013    fi
46014  fi
46015
46016
46017
46018  # Publish this variable in the help.
46019
46020
46021  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46022    # The variable is not set by user, try to locate tool using the code snippet
46023    for ac_prog in objcopy
46024do
46025  # Extract the first word of "$ac_prog", so it can be a program name with args.
46026set dummy $ac_prog; ac_word=$2
46027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46028$as_echo_n "checking for $ac_word... " >&6; }
46029if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46030  $as_echo_n "(cached) " >&6
46031else
46032  case $BUILD_OBJCOPY in
46033  [\\/]* | ?:[\\/]*)
46034  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46035  ;;
46036  *)
46037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46038for as_dir in $PATH
46039do
46040  IFS=$as_save_IFS
46041  test -z "$as_dir" && as_dir=.
46042    for ac_exec_ext in '' $ac_executable_extensions; do
46043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46044    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46046    break 2
46047  fi
46048done
46049  done
46050IFS=$as_save_IFS
46051
46052  ;;
46053esac
46054fi
46055BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46056if test -n "$BUILD_OBJCOPY"; then
46057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46058$as_echo "$BUILD_OBJCOPY" >&6; }
46059else
46060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46061$as_echo "no" >&6; }
46062fi
46063
46064
46065  test -n "$BUILD_OBJCOPY" && break
46066done
46067
46068  else
46069    # The variable is set, but is it from the command line or the environment?
46070
46071    # Try to remove the string !BUILD_OBJCOPY! from our list.
46072    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46073    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46074      # If it failed, the variable was not from the command line. Ignore it,
46075      # but warn the user (except for BASH, which is always set by the calling BASH).
46076      if test "xBUILD_OBJCOPY" != xBASH; then
46077        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46078$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46079      fi
46080      # Try to locate tool using the code snippet
46081      for ac_prog in objcopy
46082do
46083  # Extract the first word of "$ac_prog", so it can be a program name with args.
46084set dummy $ac_prog; ac_word=$2
46085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46086$as_echo_n "checking for $ac_word... " >&6; }
46087if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46088  $as_echo_n "(cached) " >&6
46089else
46090  case $BUILD_OBJCOPY in
46091  [\\/]* | ?:[\\/]*)
46092  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46093  ;;
46094  *)
46095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46096for as_dir in $PATH
46097do
46098  IFS=$as_save_IFS
46099  test -z "$as_dir" && as_dir=.
46100    for ac_exec_ext in '' $ac_executable_extensions; do
46101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46102    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46104    break 2
46105  fi
46106done
46107  done
46108IFS=$as_save_IFS
46109
46110  ;;
46111esac
46112fi
46113BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46114if test -n "$BUILD_OBJCOPY"; then
46115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46116$as_echo "$BUILD_OBJCOPY" >&6; }
46117else
46118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46119$as_echo "no" >&6; }
46120fi
46121
46122
46123  test -n "$BUILD_OBJCOPY" && break
46124done
46125
46126    else
46127      # If it succeeded, then it was overridden by the user. We will use it
46128      # for the tool.
46129
46130      # First remove it from the list of overridden variables, so we can test
46131      # for unknown variables in the end.
46132      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46133
46134      # Check if we try to supply an empty value
46135      if test "x$BUILD_OBJCOPY" = x; then
46136        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46137$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46138        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46139$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46140        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46141$as_echo "disabled" >&6; }
46142      else
46143        # Check if the provided tool contains a complete path.
46144        tool_specified="$BUILD_OBJCOPY"
46145        tool_basename="${tool_specified##*/}"
46146        if test "x$tool_basename" = "x$tool_specified"; then
46147          # A command without a complete path is provided, search $PATH.
46148          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46149$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46150          # Extract the first word of "$tool_basename", so it can be a program name with args.
46151set dummy $tool_basename; ac_word=$2
46152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46153$as_echo_n "checking for $ac_word... " >&6; }
46154if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46155  $as_echo_n "(cached) " >&6
46156else
46157  case $BUILD_OBJCOPY in
46158  [\\/]* | ?:[\\/]*)
46159  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46160  ;;
46161  *)
46162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46163for as_dir in $PATH
46164do
46165  IFS=$as_save_IFS
46166  test -z "$as_dir" && as_dir=.
46167    for ac_exec_ext in '' $ac_executable_extensions; do
46168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46169    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46171    break 2
46172  fi
46173done
46174  done
46175IFS=$as_save_IFS
46176
46177  ;;
46178esac
46179fi
46180BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46181if test -n "$BUILD_OBJCOPY"; then
46182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46183$as_echo "$BUILD_OBJCOPY" >&6; }
46184else
46185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46186$as_echo "no" >&6; }
46187fi
46188
46189
46190          if test "x$BUILD_OBJCOPY" = x; then
46191            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46192          fi
46193        else
46194          # Otherwise we believe it is a complete path. Use it as it is.
46195          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46196$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46197          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46198$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46199          if test ! -x "$tool_specified"; then
46200            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46201$as_echo "not found" >&6; }
46202            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46203          fi
46204          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46205$as_echo "$tool_specified" >&6; }
46206        fi
46207      fi
46208    fi
46209
46210  fi
46211
46212
46213
46214  # Only process if variable expands to non-empty
46215
46216  if test "x$BUILD_OBJCOPY" != x; then
46217    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46218
46219  # First separate the path from the arguments. This will split at the first
46220  # space.
46221  complete="$BUILD_OBJCOPY"
46222  path="${complete%% *}"
46223  tmp="$complete EOL"
46224  arguments="${tmp#* }"
46225
46226  # Input might be given as Windows format, start by converting to
46227  # unix format.
46228  new_path=`$CYGPATH -u "$path"`
46229
46230  # Now try to locate executable using which
46231  new_path=`$WHICH "$new_path" 2> /dev/null`
46232  # bat and cmd files are not always considered executable in cygwin causing which
46233  # to not find them
46234  if test "x$new_path" = x \
46235      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46236      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46237    new_path=`$CYGPATH -u "$path"`
46238  fi
46239  if test "x$new_path" = x; then
46240    # Oops. Which didn't find the executable.
46241    # The splitting of arguments from the executable at a space might have been incorrect,
46242    # since paths with space are more likely in Windows. Give it another try with the whole
46243    # argument.
46244    path="$complete"
46245    arguments="EOL"
46246    new_path=`$CYGPATH -u "$path"`
46247    new_path=`$WHICH "$new_path" 2> /dev/null`
46248    # bat and cmd files are not always considered executable in cygwin causing which
46249    # to not find them
46250    if test "x$new_path" = x \
46251        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46252        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46253      new_path=`$CYGPATH -u "$path"`
46254    fi
46255    if test "x$new_path" = x; then
46256      # It's still not found. Now this is an unrecoverable error.
46257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46258$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46259      has_space=`$ECHO "$complete" | $GREP " "`
46260      if test "x$has_space" != x; then
46261        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46262$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46263      fi
46264      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46265    fi
46266  fi
46267
46268  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46269  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46270  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46271  # "foo.exe" is OK but "foo" is an error.
46272  #
46273  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46274  # It is also a way to make sure we got the proper file name for the real test later on.
46275  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46276  if test "x$test_shortpath" = x; then
46277    # Short path failed, file does not exist as specified.
46278    # Try adding .exe or .cmd
46279    if test -f "${new_path}.exe"; then
46280      input_to_shortpath="${new_path}.exe"
46281    elif test -f "${new_path}.cmd"; then
46282      input_to_shortpath="${new_path}.cmd"
46283    else
46284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46285$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46286      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46287$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46288      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46289    fi
46290  else
46291    input_to_shortpath="$new_path"
46292  fi
46293
46294  # Call helper function which possibly converts this using DOS-style short mode.
46295  # If so, the updated path is stored in $new_path.
46296  new_path="$input_to_shortpath"
46297
46298  input_path="$input_to_shortpath"
46299  # Check if we need to convert this using DOS-style short mode. If the path
46300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46301  # take no chances and rewrite it.
46302  # Note: m4 eats our [], so we need to use [ and ] instead.
46303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46304  if test "x$has_forbidden_chars" != x; then
46305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46306    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46307    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46308    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46309      # Going to short mode and back again did indeed matter. Since short mode is
46310      # case insensitive, let's make it lowercase to improve readability.
46311      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46312      # Now convert it back to Unix-style (cygpath)
46313      input_path=`$CYGPATH -u "$shortmode_path"`
46314      new_path="$input_path"
46315    fi
46316  fi
46317
46318  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46319  if test "x$test_cygdrive_prefix" = x; then
46320    # As a simple fix, exclude /usr/bin since it's not a real path.
46321    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46322      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46323      # a path prefixed by /cygdrive for fixpath to work.
46324      new_path="$CYGWIN_ROOT_PATH$input_path"
46325    fi
46326  fi
46327
46328  # remove trailing .exe if any
46329  new_path="${new_path/%.exe/}"
46330
46331    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46332
46333  # First separate the path from the arguments. This will split at the first
46334  # space.
46335  complete="$BUILD_OBJCOPY"
46336  path="${complete%% *}"
46337  tmp="$complete EOL"
46338  arguments="${tmp#* }"
46339
46340  # Input might be given as Windows format, start by converting to
46341  # unix format.
46342  new_path="$path"
46343
46344  windows_path="$new_path"
46345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46346    unix_path=`$CYGPATH -u "$windows_path"`
46347    new_path="$unix_path"
46348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46350    new_path="$unix_path"
46351  fi
46352
46353
46354  # Now try to locate executable using which
46355  new_path=`$WHICH "$new_path" 2> /dev/null`
46356
46357  if test "x$new_path" = x; then
46358    # Oops. Which didn't find the executable.
46359    # The splitting of arguments from the executable at a space might have been incorrect,
46360    # since paths with space are more likely in Windows. Give it another try with the whole
46361    # argument.
46362    path="$complete"
46363    arguments="EOL"
46364    new_path="$path"
46365
46366  windows_path="$new_path"
46367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46368    unix_path=`$CYGPATH -u "$windows_path"`
46369    new_path="$unix_path"
46370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46372    new_path="$unix_path"
46373  fi
46374
46375
46376    new_path=`$WHICH "$new_path" 2> /dev/null`
46377    # bat and cmd files are not always considered executable in MSYS causing which
46378    # to not find them
46379    if test "x$new_path" = x \
46380        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46381        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46382      new_path="$path"
46383
46384  windows_path="$new_path"
46385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46386    unix_path=`$CYGPATH -u "$windows_path"`
46387    new_path="$unix_path"
46388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46390    new_path="$unix_path"
46391  fi
46392
46393    fi
46394
46395    if test "x$new_path" = x; then
46396      # It's still not found. Now this is an unrecoverable error.
46397      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46398$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46399      has_space=`$ECHO "$complete" | $GREP " "`
46400      if test "x$has_space" != x; then
46401        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46402$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46403      fi
46404      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46405    fi
46406  fi
46407
46408  # Now new_path has a complete unix path to the binary
46409  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46410    # Keep paths in /bin as-is, but remove trailing .exe if any
46411    new_path="${new_path/%.exe/}"
46412    # Do not save /bin paths to all_fixpath_prefixes!
46413  else
46414    # Not in mixed or Windows style, start by that.
46415    new_path=`cmd //c echo $new_path`
46416
46417  input_path="$new_path"
46418  # Check if we need to convert this using DOS-style short mode. If the path
46419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46420  # take no chances and rewrite it.
46421  # Note: m4 eats our [], so we need to use [ and ] instead.
46422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46423  if test "x$has_forbidden_chars" != x; then
46424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46425    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46426  fi
46427
46428    # Output is in $new_path
46429
46430  windows_path="$new_path"
46431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46432    unix_path=`$CYGPATH -u "$windows_path"`
46433    new_path="$unix_path"
46434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46436    new_path="$unix_path"
46437  fi
46438
46439    # remove trailing .exe if any
46440    new_path="${new_path/%.exe/}"
46441
46442    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46443    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46444  fi
46445
46446    else
46447      # We're on a unix platform. Hooray! :)
46448      # First separate the path from the arguments. This will split at the first
46449      # space.
46450      complete="$BUILD_OBJCOPY"
46451      path="${complete%% *}"
46452      tmp="$complete EOL"
46453      arguments="${tmp#* }"
46454
46455      # Cannot rely on the command "which" here since it doesn't always work.
46456      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46457      if test -z "$is_absolute_path"; then
46458        # Path to executable is not absolute. Find it.
46459        IFS_save="$IFS"
46460        IFS=:
46461        for p in $PATH; do
46462          if test -f "$p/$path" && test -x "$p/$path"; then
46463            new_path="$p/$path"
46464            break
46465          fi
46466        done
46467        IFS="$IFS_save"
46468      else
46469        # This is an absolute path, we can use it without further modifications.
46470        new_path="$path"
46471      fi
46472
46473      if test "x$new_path" = x; then
46474        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46475$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46476        has_space=`$ECHO "$complete" | $GREP " "`
46477        if test "x$has_space" != x; then
46478          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46479$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46480        fi
46481        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46482      fi
46483    fi
46484
46485    # Now join together the path and the arguments once again
46486    if test "x$arguments" != xEOL; then
46487      new_complete="$new_path ${arguments% *}"
46488    else
46489      new_complete="$new_path"
46490    fi
46491
46492    if test "x$complete" != "x$new_complete"; then
46493      BUILD_OBJCOPY="$new_complete"
46494      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46495$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46496    fi
46497  fi
46498
46499
46500
46501  # Publish this variable in the help.
46502
46503
46504  if [ -z "${BUILD_STRIP+x}" ]; then
46505    # The variable is not set by user, try to locate tool using the code snippet
46506    for ac_prog in strip
46507do
46508  # Extract the first word of "$ac_prog", so it can be a program name with args.
46509set dummy $ac_prog; ac_word=$2
46510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46511$as_echo_n "checking for $ac_word... " >&6; }
46512if ${ac_cv_path_BUILD_STRIP+:} false; then :
46513  $as_echo_n "(cached) " >&6
46514else
46515  case $BUILD_STRIP in
46516  [\\/]* | ?:[\\/]*)
46517  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46518  ;;
46519  *)
46520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46521for as_dir in $PATH
46522do
46523  IFS=$as_save_IFS
46524  test -z "$as_dir" && as_dir=.
46525    for ac_exec_ext in '' $ac_executable_extensions; do
46526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46527    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46529    break 2
46530  fi
46531done
46532  done
46533IFS=$as_save_IFS
46534
46535  ;;
46536esac
46537fi
46538BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46539if test -n "$BUILD_STRIP"; then
46540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46541$as_echo "$BUILD_STRIP" >&6; }
46542else
46543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46544$as_echo "no" >&6; }
46545fi
46546
46547
46548  test -n "$BUILD_STRIP" && break
46549done
46550
46551  else
46552    # The variable is set, but is it from the command line or the environment?
46553
46554    # Try to remove the string !BUILD_STRIP! from our list.
46555    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46556    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46557      # If it failed, the variable was not from the command line. Ignore it,
46558      # but warn the user (except for BASH, which is always set by the calling BASH).
46559      if test "xBUILD_STRIP" != xBASH; then
46560        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46561$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46562      fi
46563      # Try to locate tool using the code snippet
46564      for ac_prog in strip
46565do
46566  # Extract the first word of "$ac_prog", so it can be a program name with args.
46567set dummy $ac_prog; ac_word=$2
46568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46569$as_echo_n "checking for $ac_word... " >&6; }
46570if ${ac_cv_path_BUILD_STRIP+:} false; then :
46571  $as_echo_n "(cached) " >&6
46572else
46573  case $BUILD_STRIP in
46574  [\\/]* | ?:[\\/]*)
46575  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46576  ;;
46577  *)
46578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46579for as_dir in $PATH
46580do
46581  IFS=$as_save_IFS
46582  test -z "$as_dir" && as_dir=.
46583    for ac_exec_ext in '' $ac_executable_extensions; do
46584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46585    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46587    break 2
46588  fi
46589done
46590  done
46591IFS=$as_save_IFS
46592
46593  ;;
46594esac
46595fi
46596BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46597if test -n "$BUILD_STRIP"; then
46598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46599$as_echo "$BUILD_STRIP" >&6; }
46600else
46601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46602$as_echo "no" >&6; }
46603fi
46604
46605
46606  test -n "$BUILD_STRIP" && break
46607done
46608
46609    else
46610      # If it succeeded, then it was overridden by the user. We will use it
46611      # for the tool.
46612
46613      # First remove it from the list of overridden variables, so we can test
46614      # for unknown variables in the end.
46615      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46616
46617      # Check if we try to supply an empty value
46618      if test "x$BUILD_STRIP" = x; then
46619        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46620$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46621        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46622$as_echo_n "checking for BUILD_STRIP... " >&6; }
46623        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46624$as_echo "disabled" >&6; }
46625      else
46626        # Check if the provided tool contains a complete path.
46627        tool_specified="$BUILD_STRIP"
46628        tool_basename="${tool_specified##*/}"
46629        if test "x$tool_basename" = "x$tool_specified"; then
46630          # A command without a complete path is provided, search $PATH.
46631          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46632$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46633          # Extract the first word of "$tool_basename", so it can be a program name with args.
46634set dummy $tool_basename; ac_word=$2
46635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46636$as_echo_n "checking for $ac_word... " >&6; }
46637if ${ac_cv_path_BUILD_STRIP+:} false; then :
46638  $as_echo_n "(cached) " >&6
46639else
46640  case $BUILD_STRIP in
46641  [\\/]* | ?:[\\/]*)
46642  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46643  ;;
46644  *)
46645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46646for as_dir in $PATH
46647do
46648  IFS=$as_save_IFS
46649  test -z "$as_dir" && as_dir=.
46650    for ac_exec_ext in '' $ac_executable_extensions; do
46651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46652    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46654    break 2
46655  fi
46656done
46657  done
46658IFS=$as_save_IFS
46659
46660  ;;
46661esac
46662fi
46663BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46664if test -n "$BUILD_STRIP"; then
46665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46666$as_echo "$BUILD_STRIP" >&6; }
46667else
46668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46669$as_echo "no" >&6; }
46670fi
46671
46672
46673          if test "x$BUILD_STRIP" = x; then
46674            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46675          fi
46676        else
46677          # Otherwise we believe it is a complete path. Use it as it is.
46678          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46679$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46680          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46681$as_echo_n "checking for BUILD_STRIP... " >&6; }
46682          if test ! -x "$tool_specified"; then
46683            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46684$as_echo "not found" >&6; }
46685            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46686          fi
46687          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46688$as_echo "$tool_specified" >&6; }
46689        fi
46690      fi
46691    fi
46692
46693  fi
46694
46695
46696
46697  # Only process if variable expands to non-empty
46698
46699  if test "x$BUILD_STRIP" != x; then
46700    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46701
46702  # First separate the path from the arguments. This will split at the first
46703  # space.
46704  complete="$BUILD_STRIP"
46705  path="${complete%% *}"
46706  tmp="$complete EOL"
46707  arguments="${tmp#* }"
46708
46709  # Input might be given as Windows format, start by converting to
46710  # unix format.
46711  new_path=`$CYGPATH -u "$path"`
46712
46713  # Now try to locate executable using which
46714  new_path=`$WHICH "$new_path" 2> /dev/null`
46715  # bat and cmd files are not always considered executable in cygwin causing which
46716  # to not find them
46717  if test "x$new_path" = x \
46718      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46719      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46720    new_path=`$CYGPATH -u "$path"`
46721  fi
46722  if test "x$new_path" = x; then
46723    # Oops. Which didn't find the executable.
46724    # The splitting of arguments from the executable at a space might have been incorrect,
46725    # since paths with space are more likely in Windows. Give it another try with the whole
46726    # argument.
46727    path="$complete"
46728    arguments="EOL"
46729    new_path=`$CYGPATH -u "$path"`
46730    new_path=`$WHICH "$new_path" 2> /dev/null`
46731    # bat and cmd files are not always considered executable in cygwin causing which
46732    # to not find them
46733    if test "x$new_path" = x \
46734        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46735        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46736      new_path=`$CYGPATH -u "$path"`
46737    fi
46738    if test "x$new_path" = x; then
46739      # It's still not found. Now this is an unrecoverable error.
46740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46741$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46742      has_space=`$ECHO "$complete" | $GREP " "`
46743      if test "x$has_space" != x; then
46744        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46745$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46746      fi
46747      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46748    fi
46749  fi
46750
46751  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46752  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46753  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46754  # "foo.exe" is OK but "foo" is an error.
46755  #
46756  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46757  # It is also a way to make sure we got the proper file name for the real test later on.
46758  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46759  if test "x$test_shortpath" = x; then
46760    # Short path failed, file does not exist as specified.
46761    # Try adding .exe or .cmd
46762    if test -f "${new_path}.exe"; then
46763      input_to_shortpath="${new_path}.exe"
46764    elif test -f "${new_path}.cmd"; then
46765      input_to_shortpath="${new_path}.cmd"
46766    else
46767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46768$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46769      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46770$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46771      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46772    fi
46773  else
46774    input_to_shortpath="$new_path"
46775  fi
46776
46777  # Call helper function which possibly converts this using DOS-style short mode.
46778  # If so, the updated path is stored in $new_path.
46779  new_path="$input_to_shortpath"
46780
46781  input_path="$input_to_shortpath"
46782  # Check if we need to convert this using DOS-style short mode. If the path
46783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46784  # take no chances and rewrite it.
46785  # Note: m4 eats our [], so we need to use [ and ] instead.
46786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46787  if test "x$has_forbidden_chars" != x; then
46788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46789    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46790    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46791    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46792      # Going to short mode and back again did indeed matter. Since short mode is
46793      # case insensitive, let's make it lowercase to improve readability.
46794      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46795      # Now convert it back to Unix-style (cygpath)
46796      input_path=`$CYGPATH -u "$shortmode_path"`
46797      new_path="$input_path"
46798    fi
46799  fi
46800
46801  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46802  if test "x$test_cygdrive_prefix" = x; then
46803    # As a simple fix, exclude /usr/bin since it's not a real path.
46804    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46805      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46806      # a path prefixed by /cygdrive for fixpath to work.
46807      new_path="$CYGWIN_ROOT_PATH$input_path"
46808    fi
46809  fi
46810
46811  # remove trailing .exe if any
46812  new_path="${new_path/%.exe/}"
46813
46814    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46815
46816  # First separate the path from the arguments. This will split at the first
46817  # space.
46818  complete="$BUILD_STRIP"
46819  path="${complete%% *}"
46820  tmp="$complete EOL"
46821  arguments="${tmp#* }"
46822
46823  # Input might be given as Windows format, start by converting to
46824  # unix format.
46825  new_path="$path"
46826
46827  windows_path="$new_path"
46828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46829    unix_path=`$CYGPATH -u "$windows_path"`
46830    new_path="$unix_path"
46831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46833    new_path="$unix_path"
46834  fi
46835
46836
46837  # Now try to locate executable using which
46838  new_path=`$WHICH "$new_path" 2> /dev/null`
46839
46840  if test "x$new_path" = x; then
46841    # Oops. Which didn't find the executable.
46842    # The splitting of arguments from the executable at a space might have been incorrect,
46843    # since paths with space are more likely in Windows. Give it another try with the whole
46844    # argument.
46845    path="$complete"
46846    arguments="EOL"
46847    new_path="$path"
46848
46849  windows_path="$new_path"
46850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46851    unix_path=`$CYGPATH -u "$windows_path"`
46852    new_path="$unix_path"
46853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46855    new_path="$unix_path"
46856  fi
46857
46858
46859    new_path=`$WHICH "$new_path" 2> /dev/null`
46860    # bat and cmd files are not always considered executable in MSYS causing which
46861    # to not find them
46862    if test "x$new_path" = x \
46863        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46864        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46865      new_path="$path"
46866
46867  windows_path="$new_path"
46868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46869    unix_path=`$CYGPATH -u "$windows_path"`
46870    new_path="$unix_path"
46871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46873    new_path="$unix_path"
46874  fi
46875
46876    fi
46877
46878    if test "x$new_path" = x; then
46879      # It's still not found. Now this is an unrecoverable error.
46880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46881$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46882      has_space=`$ECHO "$complete" | $GREP " "`
46883      if test "x$has_space" != x; then
46884        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46885$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46886      fi
46887      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46888    fi
46889  fi
46890
46891  # Now new_path has a complete unix path to the binary
46892  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46893    # Keep paths in /bin as-is, but remove trailing .exe if any
46894    new_path="${new_path/%.exe/}"
46895    # Do not save /bin paths to all_fixpath_prefixes!
46896  else
46897    # Not in mixed or Windows style, start by that.
46898    new_path=`cmd //c echo $new_path`
46899
46900  input_path="$new_path"
46901  # Check if we need to convert this using DOS-style short mode. If the path
46902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46903  # take no chances and rewrite it.
46904  # Note: m4 eats our [], so we need to use [ and ] instead.
46905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46906  if test "x$has_forbidden_chars" != x; then
46907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46909  fi
46910
46911    # Output is in $new_path
46912
46913  windows_path="$new_path"
46914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46915    unix_path=`$CYGPATH -u "$windows_path"`
46916    new_path="$unix_path"
46917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46919    new_path="$unix_path"
46920  fi
46921
46922    # remove trailing .exe if any
46923    new_path="${new_path/%.exe/}"
46924
46925    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46926    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46927  fi
46928
46929    else
46930      # We're on a unix platform. Hooray! :)
46931      # First separate the path from the arguments. This will split at the first
46932      # space.
46933      complete="$BUILD_STRIP"
46934      path="${complete%% *}"
46935      tmp="$complete EOL"
46936      arguments="${tmp#* }"
46937
46938      # Cannot rely on the command "which" here since it doesn't always work.
46939      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46940      if test -z "$is_absolute_path"; then
46941        # Path to executable is not absolute. Find it.
46942        IFS_save="$IFS"
46943        IFS=:
46944        for p in $PATH; do
46945          if test -f "$p/$path" && test -x "$p/$path"; then
46946            new_path="$p/$path"
46947            break
46948          fi
46949        done
46950        IFS="$IFS_save"
46951      else
46952        # This is an absolute path, we can use it without further modifications.
46953        new_path="$path"
46954      fi
46955
46956      if test "x$new_path" = x; then
46957        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46958$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46959        has_space=`$ECHO "$complete" | $GREP " "`
46960        if test "x$has_space" != x; then
46961          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46962$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46963        fi
46964        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46965      fi
46966    fi
46967
46968    # Now join together the path and the arguments once again
46969    if test "x$arguments" != xEOL; then
46970      new_complete="$new_path ${arguments% *}"
46971    else
46972      new_complete="$new_path"
46973    fi
46974
46975    if test "x$complete" != "x$new_complete"; then
46976      BUILD_STRIP="$new_complete"
46977      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46978$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46979    fi
46980  fi
46981
46982    # Assume the C compiler is the assembler
46983    BUILD_AS="$BUILD_CC -c"
46984    # Just like for the target compiler, use the compiler as linker
46985    BUILD_LD="$BUILD_CC"
46986    BUILD_LDCXX="$BUILD_CXX"
46987
46988    PATH="$OLDPATH"
46989
46990
46991  COMPILER=$BUILD_CC
46992  COMPILER_NAME=BuildC
46993
46994  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46995    # cc -V output typically looks like
46996    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46997    # or
46998    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
46999    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47000    # Check that this is likely to be the Solaris Studio cc.
47001    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47002    if test $? -ne 0; then
47003      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47004      { $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
47005$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47006      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47007$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47008      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47009$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47010      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47011    fi
47012    # Remove usage instructions (if present), and
47013    # collapse compiler output into a single line
47014    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47015        $SED -e 's/ *[Uu]sage:.*//'`
47016    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47017        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47018  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47019    # xlc -qversion output typically looks like
47020    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47021    #     Version: 11.01.0000.0015
47022    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47023    # Check that this is likely to be the IBM XL C compiler.
47024    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47025    if test $? -ne 0; then
47026      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47027      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
47028$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47029      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47030$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47031      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47032$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47033      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47034    fi
47035    # Collapse compiler output into a single line
47036    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47037    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47038        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47039  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47040    # There is no specific version flag, but all output starts with a version string.
47041    # First line typically looks something like:
47042    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47043    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47044    # Check that this is likely to be Microsoft CL.EXE.
47045    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47046    if test $? -ne 0; then
47047      { $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
47048$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47049      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47050$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47051      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47052    fi
47053    # Collapse compiler output into a single line
47054    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47055    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47056        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47057  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47058    # gcc --version output typically looks like
47059    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47060    #     Copyright (C) 2013 Free Software Foundation, Inc.
47061    #     This is free software; see the source for copying conditions.  There is NO
47062    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47063    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47064    # Check that this is likely to be GCC.
47065    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47066    if test $? -ne 0; then
47067      { $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
47068$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47069      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47070$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47071      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47072    fi
47073    # Remove Copyright and legalese from version string, and
47074    # collapse into a single line
47075    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47076        $SED -e 's/ *Copyright .*//'`
47077    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47078        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47079  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47080    # clang --version output typically looks like
47081    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47082    #    clang version 3.3 (tags/RELEASE_33/final)
47083    # or
47084    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47085    #    Target: x86_64-pc-linux-gnu
47086    #    Thread model: posix
47087    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47088    # Check that this is likely to be clang
47089    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47090    if test $? -ne 0; then
47091      { $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
47092$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47093      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47094$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47095      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47096    fi
47097    # Collapse compiler output into a single line
47098    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47099    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47100        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47101  else
47102      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47103  fi
47104  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47105  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47106  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47107  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47108
47109  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47110$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47111
47112
47113  COMPILER=$BUILD_CXX
47114  COMPILER_NAME=BuildC++
47115
47116  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47117    # cc -V output typically looks like
47118    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47119    # or
47120    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47121    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47122    # Check that this is likely to be the Solaris Studio cc.
47123    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47124    if test $? -ne 0; then
47125      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47126      { $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
47127$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47128      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47129$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47130      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47131$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47132      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47133    fi
47134    # Remove usage instructions (if present), and
47135    # collapse compiler output into a single line
47136    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47137        $SED -e 's/ *[Uu]sage:.*//'`
47138    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47139        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47140  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47141    # xlc -qversion output typically looks like
47142    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47143    #     Version: 11.01.0000.0015
47144    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47145    # Check that this is likely to be the IBM XL C compiler.
47146    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47147    if test $? -ne 0; then
47148      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47149      { $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
47150$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47151      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47152$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47153      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47154$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47155      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47156    fi
47157    # Collapse compiler output into a single line
47158    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47159    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47160        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47161  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47162    # There is no specific version flag, but all output starts with a version string.
47163    # First line typically looks something like:
47164    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47165    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47166    # Check that this is likely to be Microsoft CL.EXE.
47167    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47168    if test $? -ne 0; then
47169      { $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
47170$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47171      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47172$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47173      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47174    fi
47175    # Collapse compiler output into a single line
47176    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47177    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47178        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47179  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47180    # gcc --version output typically looks like
47181    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47182    #     Copyright (C) 2013 Free Software Foundation, Inc.
47183    #     This is free software; see the source for copying conditions.  There is NO
47184    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47185    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47186    # Check that this is likely to be GCC.
47187    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47188    if test $? -ne 0; then
47189      { $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
47190$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47191      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47192$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47193      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47194    fi
47195    # Remove Copyright and legalese from version string, and
47196    # collapse into a single line
47197    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47198        $SED -e 's/ *Copyright .*//'`
47199    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47200        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47201  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47202    # clang --version output typically looks like
47203    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47204    #    clang version 3.3 (tags/RELEASE_33/final)
47205    # or
47206    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47207    #    Target: x86_64-pc-linux-gnu
47208    #    Thread model: posix
47209    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47210    # Check that this is likely to be clang
47211    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47212    if test $? -ne 0; then
47213      { $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
47214$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47215      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47216$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47217      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47218    fi
47219    # Collapse compiler output into a single line
47220    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47221    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47222        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47223  else
47224      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47225  fi
47226  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47227  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47228  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47229  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47230
47231  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47232$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47233
47234
47235  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47236    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&5
47237$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47238    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47239$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47240  fi
47241
47242  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47243  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47244    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47245$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47246  fi
47247
47248  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47249    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47250$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47251  fi
47252
47253  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47254
47255  else
47256    # If we are not cross compiling, use the normal target compilers for
47257    # building the build platform executables.
47258    BUILD_CC="$CC"
47259    BUILD_CXX="$CXX"
47260    BUILD_LD="$LD"
47261    BUILD_LDCXX="$LDCXX"
47262    BUILD_NM="$NM"
47263    BUILD_AS="$AS"
47264    BUILD_OBJCOPY="$OBJCOPY"
47265    BUILD_STRIP="$STRIP"
47266    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47267    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47268    BUILD_AR="$AR"
47269
47270
47271  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47272    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47273$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47274    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47275$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47276  fi
47277
47278  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47279  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47280    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47281$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47282  fi
47283
47284  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47285    { $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
47286$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47287  fi
47288
47289  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
47290
47291  fi
47292
47293
47294
47295
47296
47297
47298
47299
47300
47301
47302
47303
47304
47305
47306  # The package path is used only on macosx?
47307  # FIXME: clean this up, and/or move it elsewhere.
47308  PACKAGE_PATH=/opt/local
47309
47310
47311  # Check for extra potential brokenness.
47312  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47313    # On Windows, double-check that we got the right compiler.
47314    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47315    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47316    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47317      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47318        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
47319      fi
47320    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47321      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47322        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47323      fi
47324    fi
47325  fi
47326
47327  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47328    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47329    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47330    # This is later checked when setting flags.
47331
47332    # "-Og" suppported for GCC 4.8 and later
47333    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47334
47335
47336
47337
47338
47339
47340
47341
47342
47343
47344
47345
47346
47347
47348
47349
47350
47351
47352
47353
47354
47355
47356
47357
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381    # Execute function body
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403
47404
47405
47406
47407
47408
47409
47410
47411
47412
47413
47414
47415
47416
47417
47418
47419
47420
47421
47422
47423
47424
47425
47426
47427
47428
47429
47430    # Execute function body
47431
47432  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47433$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47434  supports=yes
47435
47436  saved_cflags="$CFLAGS"
47437  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47438  ac_ext=c
47439ac_cpp='$CPP $CPPFLAGS'
47440ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47441ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47442ac_compiler_gnu=$ac_cv_c_compiler_gnu
47443
47444  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47445/* end confdefs.h.  */
47446int i;
47447_ACEOF
47448if ac_fn_c_try_compile "$LINENO"; then :
47449
47450else
47451  supports=no
47452fi
47453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47454  ac_ext=cpp
47455ac_cpp='$CXXCPP $CPPFLAGS'
47456ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47457ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47458ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47459
47460  CFLAGS="$saved_cflags"
47461
47462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47463$as_echo "$supports" >&6; }
47464  if test "x$supports" = "xyes" ; then
47465    :
47466    C_COMP_SUPPORTS="yes"
47467  else
47468    :
47469    C_COMP_SUPPORTS="no"
47470  fi
47471
47472
47473
47474
47475
47476
47477
47478
47479
47480
47481
47482
47483
47484
47485
47486
47487
47488
47489
47490
47491
47492
47493
47494
47495
47496
47497
47498
47499
47500
47501
47502
47503
47504
47505
47506
47507
47508
47509
47510
47511
47512
47513
47514
47515
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526
47527
47528
47529
47530    # Execute function body
47531
47532  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47533$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47534  supports=yes
47535
47536  saved_cxxflags="$CXXFLAGS"
47537  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47538  ac_ext=cpp
47539ac_cpp='$CXXCPP $CPPFLAGS'
47540ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47541ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47542ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47543
47544  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47545/* end confdefs.h.  */
47546int i;
47547_ACEOF
47548if ac_fn_cxx_try_compile "$LINENO"; then :
47549
47550else
47551  supports=no
47552fi
47553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47554  ac_ext=cpp
47555ac_cpp='$CXXCPP $CPPFLAGS'
47556ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47557ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47558ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47559
47560  CXXFLAGS="$saved_cxxflags"
47561
47562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47563$as_echo "$supports" >&6; }
47564  if test "x$supports" = "xyes" ; then
47565    :
47566    CXX_COMP_SUPPORTS="yes"
47567  else
47568    :
47569    CXX_COMP_SUPPORTS="no"
47570  fi
47571
47572
47573
47574
47575
47576
47577
47578
47579
47580
47581
47582
47583
47584  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47585$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47586  supports=no
47587  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47588
47589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47590$as_echo "$supports" >&6; }
47591  if test "x$supports" = "xyes" ; then
47592    :
47593    HAS_CFLAG_OPTIMIZE_DEBUG=true
47594  else
47595    :
47596    HAS_CFLAG_OPTIMIZE_DEBUG=false
47597  fi
47598
47599
47600
47601
47602
47603
47604
47605    # "-z relro" supported in GNU binutils 2.17 and later
47606    LINKER_RELRO_FLAG="-Wl,-z,relro"
47607
47608
47609
47610
47611
47612
47613
47614
47615
47616
47617
47618
47619
47620
47621
47622
47623
47624
47625
47626
47627
47628
47629
47630
47631
47632
47633
47634
47635
47636
47637
47638
47639
47640
47641
47642
47643
47644
47645
47646
47647
47648
47649
47650
47651
47652
47653
47654    # Execute function body
47655
47656  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47657$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47658  supports=yes
47659
47660  saved_ldflags="$LDFLAGS"
47661  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47662  ac_ext=c
47663ac_cpp='$CPP $CPPFLAGS'
47664ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47665ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47666ac_compiler_gnu=$ac_cv_c_compiler_gnu
47667
47668  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47669/* end confdefs.h.  */
47670
47671int
47672main ()
47673{
47674
47675  ;
47676  return 0;
47677}
47678_ACEOF
47679if ac_fn_c_try_link "$LINENO"; then :
47680
47681else
47682  supports=no
47683fi
47684rm -f core conftest.err conftest.$ac_objext \
47685    conftest$ac_exeext conftest.$ac_ext
47686  ac_ext=cpp
47687ac_cpp='$CXXCPP $CPPFLAGS'
47688ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47689ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47690ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47691
47692  LDFLAGS="$saved_ldflags"
47693
47694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47695$as_echo "$supports" >&6; }
47696  if test "x$supports" = "xyes" ; then
47697    :
47698    HAS_LINKER_RELRO=true
47699  else
47700    :
47701    HAS_LINKER_RELRO=false
47702  fi
47703
47704
47705
47706
47707
47708
47709
47710
47711
47712
47713
47714
47715
47716    # "-z now" supported in GNU binutils 2.11 and later
47717    LINKER_NOW_FLAG="-Wl,-z,now"
47718
47719
47720
47721
47722
47723
47724
47725
47726
47727
47728
47729
47730
47731
47732
47733
47734
47735
47736
47737
47738
47739
47740
47741
47742
47743
47744
47745
47746
47747
47748
47749
47750
47751
47752
47753
47754
47755
47756
47757
47758
47759
47760
47761
47762
47763
47764
47765    # Execute function body
47766
47767  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47768$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47769  supports=yes
47770
47771  saved_ldflags="$LDFLAGS"
47772  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47773  ac_ext=c
47774ac_cpp='$CPP $CPPFLAGS'
47775ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47776ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47777ac_compiler_gnu=$ac_cv_c_compiler_gnu
47778
47779  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47780/* end confdefs.h.  */
47781
47782int
47783main ()
47784{
47785
47786  ;
47787  return 0;
47788}
47789_ACEOF
47790if ac_fn_c_try_link "$LINENO"; then :
47791
47792else
47793  supports=no
47794fi
47795rm -f core conftest.err conftest.$ac_objext \
47796    conftest$ac_exeext conftest.$ac_ext
47797  ac_ext=cpp
47798ac_cpp='$CXXCPP $CPPFLAGS'
47799ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47800ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47801ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47802
47803  LDFLAGS="$saved_ldflags"
47804
47805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47806$as_echo "$supports" >&6; }
47807  if test "x$supports" = "xyes" ; then
47808    :
47809    HAS_LINKER_NOW=true
47810  else
47811    :
47812    HAS_LINKER_NOW=false
47813  fi
47814
47815
47816
47817
47818
47819
47820
47821
47822
47823
47824
47825
47826  fi
47827
47828  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47829  # in executable.'
47830  USING_BROKEN_SUSE_LD=no
47831  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47832    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47833$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47834    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47835    $ECHO "int main() { }" > main.c
47836    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47837      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47838$as_echo "no" >&6; }
47839      USING_BROKEN_SUSE_LD=no
47840    else
47841      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47842$as_echo "yes" >&6; }
47843      USING_BROKEN_SUSE_LD=yes
47844    fi
47845    $RM version-script.map main.c a.out
47846  fi
47847
47848
47849  # Setup hotspot lecagy names for toolchains
47850  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47851  if test "x$TOOLCHAIN_TYPE" = xclang; then
47852    HOTSPOT_TOOLCHAIN_TYPE=gcc
47853  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47854    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47855  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47856    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47857  fi
47858
47859
47860
47861# Setup the JTReg Regression Test Harness.
47862
47863
47864# Check whether --with-jtreg was given.
47865if test "${with_jtreg+set}" = set; then :
47866  withval=$with_jtreg;
47867else
47868  with_jtreg=no
47869fi
47870
47871
47872  if test "x$with_jtreg" = xno; then
47873    # jtreg disabled
47874    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47875$as_echo_n "checking for jtreg... " >&6; }
47876    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47877$as_echo "no" >&6; }
47878  else
47879    if test "x$with_jtreg" != xyes; then
47880      # with path specified.
47881      JT_HOME="$with_jtreg"
47882    fi
47883
47884    if test "x$JT_HOME" != x; then
47885      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47886$as_echo_n "checking for jtreg... " >&6; }
47887
47888      # use JT_HOME enviroment var.
47889
47890  # Only process if variable expands to non-empty
47891
47892  if test "x$JT_HOME" != x; then
47893    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47894
47895  # Input might be given as Windows format, start by converting to
47896  # unix format.
47897  path="$JT_HOME"
47898  new_path=`$CYGPATH -u "$path"`
47899
47900  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47901  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47902  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47903  # "foo.exe" is OK but "foo" is an error.
47904  #
47905  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47906  # It is also a way to make sure we got the proper file name for the real test later on.
47907  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47908  if test "x$test_shortpath" = x; then
47909    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47910$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47911    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47912  fi
47913
47914  # Call helper function which possibly converts this using DOS-style short mode.
47915  # If so, the updated path is stored in $new_path.
47916
47917  input_path="$new_path"
47918  # Check if we need to convert this using DOS-style short mode. If the path
47919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47920  # take no chances and rewrite it.
47921  # Note: m4 eats our [], so we need to use [ and ] instead.
47922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47923  if test "x$has_forbidden_chars" != x; then
47924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47925    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47926    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47927    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47928      # Going to short mode and back again did indeed matter. Since short mode is
47929      # case insensitive, let's make it lowercase to improve readability.
47930      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47931      # Now convert it back to Unix-style (cygpath)
47932      input_path=`$CYGPATH -u "$shortmode_path"`
47933      new_path="$input_path"
47934    fi
47935  fi
47936
47937  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47938  if test "x$test_cygdrive_prefix" = x; then
47939    # As a simple fix, exclude /usr/bin since it's not a real path.
47940    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47941      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47942      # a path prefixed by /cygdrive for fixpath to work.
47943      new_path="$CYGWIN_ROOT_PATH$input_path"
47944    fi
47945  fi
47946
47947
47948  if test "x$path" != "x$new_path"; then
47949    JT_HOME="$new_path"
47950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47951$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47952  fi
47953
47954    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47955
47956  path="$JT_HOME"
47957  has_colon=`$ECHO $path | $GREP ^.:`
47958  new_path="$path"
47959  if test "x$has_colon" = x; then
47960    # Not in mixed or Windows style, start by that.
47961    new_path=`cmd //c echo $path`
47962  fi
47963
47964
47965  input_path="$new_path"
47966  # Check if we need to convert this using DOS-style short mode. If the path
47967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47968  # take no chances and rewrite it.
47969  # Note: m4 eats our [], so we need to use [ and ] instead.
47970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47971  if test "x$has_forbidden_chars" != x; then
47972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47973    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47974  fi
47975
47976
47977  windows_path="$new_path"
47978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47979    unix_path=`$CYGPATH -u "$windows_path"`
47980    new_path="$unix_path"
47981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47983    new_path="$unix_path"
47984  fi
47985
47986  if test "x$path" != "x$new_path"; then
47987    JT_HOME="$new_path"
47988    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47989$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47990  fi
47991
47992  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47993  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47994
47995    else
47996      # We're on a unix platform. Hooray! :)
47997      path="$JT_HOME"
47998      has_space=`$ECHO "$path" | $GREP " "`
47999      if test "x$has_space" != x; then
48000        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48001$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48002        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48003      fi
48004
48005      # Use eval to expand a potential ~
48006      eval path="$path"
48007      if test ! -f "$path" && test ! -d "$path"; then
48008        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48009      fi
48010
48011      if test -d "$path"; then
48012        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48013      else
48014        dir="`$DIRNAME "$path"`"
48015        base="`$BASENAME "$path"`"
48016        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48017      fi
48018    fi
48019  fi
48020
48021
48022      # jtreg win32 script works for everybody
48023      JTREGEXE="$JT_HOME/bin/jtreg"
48024
48025      if test ! -f "$JTREGEXE"; then
48026        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48027      fi
48028
48029      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48030$as_echo "$JTREGEXE" >&6; }
48031    else
48032      # try to find jtreg on path
48033
48034
48035
48036  # Publish this variable in the help.
48037
48038
48039  if [ -z "${JTREGEXE+x}" ]; then
48040    # The variable is not set by user, try to locate tool using the code snippet
48041    for ac_prog in jtreg
48042do
48043  # Extract the first word of "$ac_prog", so it can be a program name with args.
48044set dummy $ac_prog; ac_word=$2
48045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48046$as_echo_n "checking for $ac_word... " >&6; }
48047if ${ac_cv_path_JTREGEXE+:} false; then :
48048  $as_echo_n "(cached) " >&6
48049else
48050  case $JTREGEXE in
48051  [\\/]* | ?:[\\/]*)
48052  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48053  ;;
48054  *)
48055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48056for as_dir in $PATH
48057do
48058  IFS=$as_save_IFS
48059  test -z "$as_dir" && as_dir=.
48060    for ac_exec_ext in '' $ac_executable_extensions; do
48061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48062    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48064    break 2
48065  fi
48066done
48067  done
48068IFS=$as_save_IFS
48069
48070  ;;
48071esac
48072fi
48073JTREGEXE=$ac_cv_path_JTREGEXE
48074if test -n "$JTREGEXE"; then
48075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48076$as_echo "$JTREGEXE" >&6; }
48077else
48078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48079$as_echo "no" >&6; }
48080fi
48081
48082
48083  test -n "$JTREGEXE" && break
48084done
48085
48086  else
48087    # The variable is set, but is it from the command line or the environment?
48088
48089    # Try to remove the string !JTREGEXE! from our list.
48090    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48091    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48092      # If it failed, the variable was not from the command line. Ignore it,
48093      # but warn the user (except for BASH, which is always set by the calling BASH).
48094      if test "xJTREGEXE" != xBASH; then
48095        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48096$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48097      fi
48098      # Try to locate tool using the code snippet
48099      for ac_prog in jtreg
48100do
48101  # Extract the first word of "$ac_prog", so it can be a program name with args.
48102set dummy $ac_prog; ac_word=$2
48103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48104$as_echo_n "checking for $ac_word... " >&6; }
48105if ${ac_cv_path_JTREGEXE+:} false; then :
48106  $as_echo_n "(cached) " >&6
48107else
48108  case $JTREGEXE in
48109  [\\/]* | ?:[\\/]*)
48110  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48111  ;;
48112  *)
48113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48114for as_dir in $PATH
48115do
48116  IFS=$as_save_IFS
48117  test -z "$as_dir" && as_dir=.
48118    for ac_exec_ext in '' $ac_executable_extensions; do
48119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48120    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48122    break 2
48123  fi
48124done
48125  done
48126IFS=$as_save_IFS
48127
48128  ;;
48129esac
48130fi
48131JTREGEXE=$ac_cv_path_JTREGEXE
48132if test -n "$JTREGEXE"; then
48133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48134$as_echo "$JTREGEXE" >&6; }
48135else
48136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48137$as_echo "no" >&6; }
48138fi
48139
48140
48141  test -n "$JTREGEXE" && break
48142done
48143
48144    else
48145      # If it succeeded, then it was overridden by the user. We will use it
48146      # for the tool.
48147
48148      # First remove it from the list of overridden variables, so we can test
48149      # for unknown variables in the end.
48150      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48151
48152      # Check if we try to supply an empty value
48153      if test "x$JTREGEXE" = x; then
48154        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48155$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48156        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48157$as_echo_n "checking for JTREGEXE... " >&6; }
48158        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48159$as_echo "disabled" >&6; }
48160      else
48161        # Check if the provided tool contains a complete path.
48162        tool_specified="$JTREGEXE"
48163        tool_basename="${tool_specified##*/}"
48164        if test "x$tool_basename" = "x$tool_specified"; then
48165          # A command without a complete path is provided, search $PATH.
48166          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48167$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48168          # Extract the first word of "$tool_basename", so it can be a program name with args.
48169set dummy $tool_basename; ac_word=$2
48170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48171$as_echo_n "checking for $ac_word... " >&6; }
48172if ${ac_cv_path_JTREGEXE+:} false; then :
48173  $as_echo_n "(cached) " >&6
48174else
48175  case $JTREGEXE in
48176  [\\/]* | ?:[\\/]*)
48177  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48178  ;;
48179  *)
48180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48181for as_dir in $PATH
48182do
48183  IFS=$as_save_IFS
48184  test -z "$as_dir" && as_dir=.
48185    for ac_exec_ext in '' $ac_executable_extensions; do
48186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48187    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48189    break 2
48190  fi
48191done
48192  done
48193IFS=$as_save_IFS
48194
48195  ;;
48196esac
48197fi
48198JTREGEXE=$ac_cv_path_JTREGEXE
48199if test -n "$JTREGEXE"; then
48200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48201$as_echo "$JTREGEXE" >&6; }
48202else
48203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48204$as_echo "no" >&6; }
48205fi
48206
48207
48208          if test "x$JTREGEXE" = x; then
48209            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48210          fi
48211        else
48212          # Otherwise we believe it is a complete path. Use it as it is.
48213          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48214$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48215          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48216$as_echo_n "checking for JTREGEXE... " >&6; }
48217          if test ! -x "$tool_specified"; then
48218            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48219$as_echo "not found" >&6; }
48220            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48221          fi
48222          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48223$as_echo "$tool_specified" >&6; }
48224        fi
48225      fi
48226    fi
48227
48228  fi
48229
48230
48231
48232  if test "x$JTREGEXE" = x; then
48233    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48234  fi
48235
48236
48237      JT_HOME="`$DIRNAME $JTREGEXE`"
48238    fi
48239  fi
48240
48241
48242
48243
48244
48245
48246  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48247  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48248  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48249  #                              commands produced by the link step (currently AIX only)
48250  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48251    COMPILER_TARGET_BITS_FLAG="-q"
48252    COMPILER_COMMAND_FILE_FLAG="-f"
48253    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48254  else
48255    COMPILER_TARGET_BITS_FLAG="-m"
48256    COMPILER_COMMAND_FILE_FLAG="@"
48257    COMPILER_BINDCMD_FILE_FLAG=""
48258
48259    # The solstudio linker does not support @-files.
48260    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48261      COMPILER_COMMAND_FILE_FLAG=
48262    fi
48263
48264    # Check if @file is supported by gcc
48265    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48266      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48267$as_echo_n "checking if @file is supported by gcc... " >&6; }
48268      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48269      $ECHO "" "--version" > command.file
48270      if $CXX @command.file 2>&5 >&5; then
48271        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48272$as_echo "yes" >&6; }
48273        COMPILER_COMMAND_FILE_FLAG="@"
48274      else
48275        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48276$as_echo "no" >&6; }
48277        COMPILER_COMMAND_FILE_FLAG=
48278      fi
48279      $RM command.file
48280    fi
48281  fi
48282
48283
48284
48285
48286  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48287  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48288    ARFLAGS="-r"
48289  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48290    ARFLAGS="-X64"
48291  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48292    # lib.exe is used as AR to create static libraries.
48293    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48294  else
48295    ARFLAGS=""
48296  fi
48297
48298
48299  ## Setup strip.
48300  # FIXME: should this really be per platform, or should it be per toolchain type?
48301  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48302  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48303  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48304    STRIPFLAGS="-g"
48305  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48306    STRIPFLAGS="-x"
48307  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48308    STRIPFLAGS="-S"
48309  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48310    STRIPFLAGS="-X32_64"
48311  fi
48312
48313
48314
48315  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48316    CC_OUT_OPTION=-Fo
48317    EXE_OUT_OPTION=-out:
48318    LD_OUT_OPTION=-out:
48319    AR_OUT_OPTION=-out:
48320  else
48321    # The option used to specify the target .o,.a or .so file.
48322    # When compiling, how to specify the to be created object file.
48323    CC_OUT_OPTION='-o$(SPACE)'
48324    # When linking, how to specify the to be created executable.
48325    EXE_OUT_OPTION='-o$(SPACE)'
48326    # When linking, how to specify the to be created dynamically linkable library.
48327    LD_OUT_OPTION='-o$(SPACE)'
48328    # When archiving, how to specify the to be create static archive for object files.
48329    AR_OUT_OPTION='rcs$(SPACE)'
48330  fi
48331
48332
48333
48334
48335
48336  # On Windows, we need to set RC flags.
48337  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48338    RC_FLAGS="-nologo -l0x409"
48339    JVM_RCFLAGS="-nologo"
48340    if test "x$DEBUG_LEVEL" = xrelease; then
48341      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48342      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48343    fi
48344
48345    # The version variables used to create RC_FLAGS may be overridden
48346    # in a custom configure script, or possibly the command line.
48347    # Let those variables be expanded at make time in spec.gmk.
48348    # The \$ are escaped to the shell, and the $(...) variables
48349    # are evaluated by make.
48350    RC_FLAGS="$RC_FLAGS \
48351        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48352        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48353        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48354        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48355        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48356        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48357        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48358
48359    JVM_RCFLAGS="$JVM_RCFLAGS \
48360        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48361        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48362        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48363        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48364        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48365        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48366        -D\"HS_FNAME=jvm.dll\" \
48367        -D\"HS_INTERNAL_NAME=jvm\""
48368  fi
48369
48370
48371
48372  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48373    # silence copyright notice and other headers.
48374    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48375  fi
48376
48377
48378# Now we can test some aspects on the target using configure macros.
48379
48380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48381$as_echo_n "checking for ANSI C header files... " >&6; }
48382if ${ac_cv_header_stdc+:} false; then :
48383  $as_echo_n "(cached) " >&6
48384else
48385  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48386/* end confdefs.h.  */
48387#include <stdlib.h>
48388#include <stdarg.h>
48389#include <string.h>
48390#include <float.h>
48391
48392int
48393main ()
48394{
48395
48396  ;
48397  return 0;
48398}
48399_ACEOF
48400if ac_fn_cxx_try_compile "$LINENO"; then :
48401  ac_cv_header_stdc=yes
48402else
48403  ac_cv_header_stdc=no
48404fi
48405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48406
48407if test $ac_cv_header_stdc = yes; then
48408  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48409  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48410/* end confdefs.h.  */
48411#include <string.h>
48412
48413_ACEOF
48414if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48415  $EGREP "memchr" >/dev/null 2>&1; then :
48416
48417else
48418  ac_cv_header_stdc=no
48419fi
48420rm -f conftest*
48421
48422fi
48423
48424if test $ac_cv_header_stdc = yes; then
48425  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48426  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48427/* end confdefs.h.  */
48428#include <stdlib.h>
48429
48430_ACEOF
48431if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48432  $EGREP "free" >/dev/null 2>&1; then :
48433
48434else
48435  ac_cv_header_stdc=no
48436fi
48437rm -f conftest*
48438
48439fi
48440
48441if test $ac_cv_header_stdc = yes; then
48442  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48443  if test "$cross_compiling" = yes; then :
48444  :
48445else
48446  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48447/* end confdefs.h.  */
48448#include <ctype.h>
48449#include <stdlib.h>
48450#if ((' ' & 0x0FF) == 0x020)
48451# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48452# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48453#else
48454# define ISLOWER(c) \
48455		   (('a' <= (c) && (c) <= 'i') \
48456		     || ('j' <= (c) && (c) <= 'r') \
48457		     || ('s' <= (c) && (c) <= 'z'))
48458# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48459#endif
48460
48461#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48462int
48463main ()
48464{
48465  int i;
48466  for (i = 0; i < 256; i++)
48467    if (XOR (islower (i), ISLOWER (i))
48468	|| toupper (i) != TOUPPER (i))
48469      return 2;
48470  return 0;
48471}
48472_ACEOF
48473if ac_fn_cxx_try_run "$LINENO"; then :
48474
48475else
48476  ac_cv_header_stdc=no
48477fi
48478rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48479  conftest.$ac_objext conftest.beam conftest.$ac_ext
48480fi
48481
48482fi
48483fi
48484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48485$as_echo "$ac_cv_header_stdc" >&6; }
48486if test $ac_cv_header_stdc = yes; then
48487
48488$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48489
48490fi
48491
48492# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48493for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48494		  inttypes.h stdint.h unistd.h
48495do :
48496  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48497ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48498"
48499if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48500  cat >>confdefs.h <<_ACEOF
48501#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48502_ACEOF
48503
48504fi
48505
48506done
48507
48508
48509
48510  ###############################################################################
48511  #
48512  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48513  # (The JVM can use 32 or 64 bit Java pointers but that decision
48514  # is made at runtime.)
48515  #
48516
48517  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48518    # Always specify -m flag on Solaris
48519    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48520
48521  # When we add flags to the "official" CFLAGS etc, we need to
48522  # keep track of these additions in ADDED_CFLAGS etc. These
48523  # will later be checked to make sure only controlled additions
48524  # have been made to CFLAGS etc.
48525  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48526  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48527  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48528
48529  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48530  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48531  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48532
48533  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48534  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48535  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48536
48537  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48538  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48539  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48540
48541  elif test "x$COMPILE_TYPE" = xreduced; then
48542    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48543      # Specify -m if running reduced on unix platforms
48544
48545  # When we add flags to the "official" CFLAGS etc, we need to
48546  # keep track of these additions in ADDED_CFLAGS etc. These
48547  # will later be checked to make sure only controlled additions
48548  # have been made to CFLAGS etc.
48549  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48550  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48551  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48552
48553  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48554  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48555  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48556
48557  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48558  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48559  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48560
48561  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48562  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48563  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48564
48565    fi
48566  fi
48567  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48568    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48569    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48570    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48571  fi
48572
48573  # Make compilation sanity check
48574  for ac_header in stdio.h
48575do :
48576  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48577if test "x$ac_cv_header_stdio_h" = xyes; then :
48578  cat >>confdefs.h <<_ACEOF
48579#define HAVE_STDIO_H 1
48580_ACEOF
48581
48582else
48583
48584    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48585$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48586    if test "x$COMPILE_TYPE" = xreduced; then
48587
48588  # Print a helpful message on how to acquire the necessary build dependency.
48589  # reduced is the help tag: freetype, cups, alsa etc
48590  MISSING_DEPENDENCY=reduced
48591
48592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48593    cygwin_help $MISSING_DEPENDENCY
48594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48595    msys_help $MISSING_DEPENDENCY
48596  else
48597    PKGHANDLER_COMMAND=
48598
48599    case $PKGHANDLER in
48600      apt-get)
48601        apt_help     $MISSING_DEPENDENCY ;;
48602      yum)
48603        yum_help     $MISSING_DEPENDENCY ;;
48604      brew)
48605        brew_help    $MISSING_DEPENDENCY ;;
48606      port)
48607        port_help    $MISSING_DEPENDENCY ;;
48608      pkgutil)
48609        pkgutil_help $MISSING_DEPENDENCY ;;
48610      pkgadd)
48611        pkgadd_help  $MISSING_DEPENDENCY ;;
48612    esac
48613
48614    if test "x$PKGHANDLER_COMMAND" != x; then
48615      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48616    fi
48617  fi
48618
48619      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48620$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48621    elif test "x$COMPILE_TYPE" = xcross; then
48622      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48623$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48624    fi
48625    as_fn_error $? "Cannot continue." "$LINENO" 5
48626
48627fi
48628
48629done
48630
48631
48632  # The cast to long int works around a bug in the HP C Compiler
48633# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48634# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48635# This bug is HP SR number 8606223364.
48636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48637$as_echo_n "checking size of int *... " >&6; }
48638if ${ac_cv_sizeof_int_p+:} false; then :
48639  $as_echo_n "(cached) " >&6
48640else
48641  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48642
48643else
48644  if test "$ac_cv_type_int_p" = yes; then
48645     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48646$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48647as_fn_error 77 "cannot compute sizeof (int *)
48648See \`config.log' for more details" "$LINENO" 5; }
48649   else
48650     ac_cv_sizeof_int_p=0
48651   fi
48652fi
48653
48654fi
48655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48656$as_echo "$ac_cv_sizeof_int_p" >&6; }
48657
48658
48659
48660cat >>confdefs.h <<_ACEOF
48661#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48662_ACEOF
48663
48664
48665
48666  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48667  if test "x$ac_cv_sizeof_int_p" = x; then
48668    # The test failed, lets stick to the assumed value.
48669    { $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
48670$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48671  else
48672    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48673
48674    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48675      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48676      # Let's try to implicitely set the compilers target architecture and retry the test
48677      { $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
48678$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;}
48679      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48680$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48681
48682  # When we add flags to the "official" CFLAGS etc, we need to
48683  # keep track of these additions in ADDED_CFLAGS etc. These
48684  # will later be checked to make sure only controlled additions
48685  # have been made to CFLAGS etc.
48686  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48687  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48688  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48689
48690  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48691  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48692  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48693
48694  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48695  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48696  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48697
48698  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48699  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48700  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48701
48702
48703      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48704      unset ac_cv_sizeof_int_p
48705      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48706      cat >>confdefs.h <<_ACEOF
48707#undef SIZEOF_INT_P
48708_ACEOF
48709
48710      # The cast to long int works around a bug in the HP C Compiler
48711# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48712# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48713# This bug is HP SR number 8606223364.
48714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48715$as_echo_n "checking size of int *... " >&6; }
48716if ${ac_cv_sizeof_int_p+:} false; then :
48717  $as_echo_n "(cached) " >&6
48718else
48719  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48720
48721else
48722  if test "$ac_cv_type_int_p" = yes; then
48723     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48724$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48725as_fn_error 77 "cannot compute sizeof (int *)
48726See \`config.log' for more details" "$LINENO" 5; }
48727   else
48728     ac_cv_sizeof_int_p=0
48729   fi
48730fi
48731
48732fi
48733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48734$as_echo "$ac_cv_sizeof_int_p" >&6; }
48735
48736
48737
48738cat >>confdefs.h <<_ACEOF
48739#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48740_ACEOF
48741
48742
48743
48744      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48745
48746      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48747        { $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
48748$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;}
48749        if test "x$COMPILE_TYPE" = xreduced; then
48750
48751  # Print a helpful message on how to acquire the necessary build dependency.
48752  # reduced is the help tag: freetype, cups, alsa etc
48753  MISSING_DEPENDENCY=reduced
48754
48755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48756    cygwin_help $MISSING_DEPENDENCY
48757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48758    msys_help $MISSING_DEPENDENCY
48759  else
48760    PKGHANDLER_COMMAND=
48761
48762    case $PKGHANDLER in
48763      apt-get)
48764        apt_help     $MISSING_DEPENDENCY ;;
48765      yum)
48766        yum_help     $MISSING_DEPENDENCY ;;
48767      brew)
48768        brew_help    $MISSING_DEPENDENCY ;;
48769      port)
48770        port_help    $MISSING_DEPENDENCY ;;
48771      pkgutil)
48772        pkgutil_help $MISSING_DEPENDENCY ;;
48773      pkgadd)
48774        pkgadd_help  $MISSING_DEPENDENCY ;;
48775    esac
48776
48777    if test "x$PKGHANDLER_COMMAND" != x; then
48778      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48779    fi
48780  fi
48781
48782          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48783$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48784        elif test "x$COMPILE_TYPE" = xcross; then
48785          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48786$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48787        fi
48788        as_fn_error $? "Cannot continue." "$LINENO" 5
48789      fi
48790    fi
48791  fi
48792
48793  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48794$as_echo_n "checking for target address size... " >&6; }
48795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48796$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48797
48798
48799  ###############################################################################
48800  #
48801  # Is the target little of big endian?
48802  #
48803   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48804$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48805if ${ac_cv_c_bigendian+:} false; then :
48806  $as_echo_n "(cached) " >&6
48807else
48808  ac_cv_c_bigendian=unknown
48809    # See if we're dealing with a universal compiler.
48810    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48811/* end confdefs.h.  */
48812#ifndef __APPLE_CC__
48813	       not a universal capable compiler
48814	     #endif
48815	     typedef int dummy;
48816
48817_ACEOF
48818if ac_fn_cxx_try_compile "$LINENO"; then :
48819
48820	# Check for potential -arch flags.  It is not universal unless
48821	# there are at least two -arch flags with different values.
48822	ac_arch=
48823	ac_prev=
48824	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48825	 if test -n "$ac_prev"; then
48826	   case $ac_word in
48827	     i?86 | x86_64 | ppc | ppc64)
48828	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48829		 ac_arch=$ac_word
48830	       else
48831		 ac_cv_c_bigendian=universal
48832		 break
48833	       fi
48834	       ;;
48835	   esac
48836	   ac_prev=
48837	 elif test "x$ac_word" = "x-arch"; then
48838	   ac_prev=arch
48839	 fi
48840       done
48841fi
48842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48843    if test $ac_cv_c_bigendian = unknown; then
48844      # See if sys/param.h defines the BYTE_ORDER macro.
48845      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48846/* end confdefs.h.  */
48847#include <sys/types.h>
48848	     #include <sys/param.h>
48849
48850int
48851main ()
48852{
48853#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48854		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48855		     && LITTLE_ENDIAN)
48856	      bogus endian macros
48857	     #endif
48858
48859  ;
48860  return 0;
48861}
48862_ACEOF
48863if ac_fn_cxx_try_compile "$LINENO"; then :
48864  # It does; now see whether it defined to BIG_ENDIAN or not.
48865	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48866/* end confdefs.h.  */
48867#include <sys/types.h>
48868		#include <sys/param.h>
48869
48870int
48871main ()
48872{
48873#if BYTE_ORDER != BIG_ENDIAN
48874		 not big endian
48875		#endif
48876
48877  ;
48878  return 0;
48879}
48880_ACEOF
48881if ac_fn_cxx_try_compile "$LINENO"; then :
48882  ac_cv_c_bigendian=yes
48883else
48884  ac_cv_c_bigendian=no
48885fi
48886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48887fi
48888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48889    fi
48890    if test $ac_cv_c_bigendian = unknown; then
48891      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48892      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48893/* end confdefs.h.  */
48894#include <limits.h>
48895
48896int
48897main ()
48898{
48899#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48900	      bogus endian macros
48901	     #endif
48902
48903  ;
48904  return 0;
48905}
48906_ACEOF
48907if ac_fn_cxx_try_compile "$LINENO"; then :
48908  # It does; now see whether it defined to _BIG_ENDIAN or not.
48909	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48910/* end confdefs.h.  */
48911#include <limits.h>
48912
48913int
48914main ()
48915{
48916#ifndef _BIG_ENDIAN
48917		 not big endian
48918		#endif
48919
48920  ;
48921  return 0;
48922}
48923_ACEOF
48924if ac_fn_cxx_try_compile "$LINENO"; then :
48925  ac_cv_c_bigendian=yes
48926else
48927  ac_cv_c_bigendian=no
48928fi
48929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48930fi
48931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48932    fi
48933    if test $ac_cv_c_bigendian = unknown; then
48934      # Compile a test program.
48935      if test "$cross_compiling" = yes; then :
48936  # Try to guess by grepping values from an object file.
48937	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48938/* end confdefs.h.  */
48939short int ascii_mm[] =
48940		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48941		short int ascii_ii[] =
48942		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48943		int use_ascii (int i) {
48944		  return ascii_mm[i] + ascii_ii[i];
48945		}
48946		short int ebcdic_ii[] =
48947		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48948		short int ebcdic_mm[] =
48949		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48950		int use_ebcdic (int i) {
48951		  return ebcdic_mm[i] + ebcdic_ii[i];
48952		}
48953		extern int foo;
48954
48955int
48956main ()
48957{
48958return use_ascii (foo) == use_ebcdic (foo);
48959  ;
48960  return 0;
48961}
48962_ACEOF
48963if ac_fn_cxx_try_compile "$LINENO"; then :
48964  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48965	      ac_cv_c_bigendian=yes
48966	    fi
48967	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48968	      if test "$ac_cv_c_bigendian" = unknown; then
48969		ac_cv_c_bigendian=no
48970	      else
48971		# finding both strings is unlikely to happen, but who knows?
48972		ac_cv_c_bigendian=unknown
48973	      fi
48974	    fi
48975fi
48976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48977else
48978  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48979/* end confdefs.h.  */
48980$ac_includes_default
48981int
48982main ()
48983{
48984
48985	     /* Are we little or big endian?  From Harbison&Steele.  */
48986	     union
48987	     {
48988	       long int l;
48989	       char c[sizeof (long int)];
48990	     } u;
48991	     u.l = 1;
48992	     return u.c[sizeof (long int) - 1] == 1;
48993
48994  ;
48995  return 0;
48996}
48997_ACEOF
48998if ac_fn_cxx_try_run "$LINENO"; then :
48999  ac_cv_c_bigendian=no
49000else
49001  ac_cv_c_bigendian=yes
49002fi
49003rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49004  conftest.$ac_objext conftest.beam conftest.$ac_ext
49005fi
49006
49007    fi
49008fi
49009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49010$as_echo "$ac_cv_c_bigendian" >&6; }
49011 case $ac_cv_c_bigendian in #(
49012   yes)
49013     ENDIAN="big";; #(
49014   no)
49015     ENDIAN="little" ;; #(
49016   universal)
49017     ENDIAN="universal_endianness"
49018     ;; #(
49019   *)
49020     ENDIAN="unknown" ;;
49021 esac
49022
49023
49024  if test "x$ENDIAN" = xuniversal_endianness; then
49025    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49026  fi
49027  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49028    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
49029  fi
49030
49031
49032# Configure flags for the tools
49033
49034  ###############################################################################
49035  #
49036  # How to compile shared libraries.
49037  #
49038
49039  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49040    PICFLAG="-fPIC"
49041    C_FLAG_REORDER=''
49042    CXX_FLAG_REORDER=''
49043
49044    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49045      # Linking is different on MacOSX
49046      if test "x$STATIC_BUILD" = xtrue; then
49047        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49048      else
49049        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49050        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49051      fi
49052      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49053      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49054      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49055      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49056    else
49057      # Default works for linux, might work on other platforms as well.
49058      SHARED_LIBRARY_FLAGS='-shared'
49059      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49060      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49061      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49062      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49063    fi
49064  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49065    C_FLAG_REORDER=''
49066    CXX_FLAG_REORDER=''
49067
49068    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49069      # Linking is different on MacOSX
49070      PICFLAG=''
49071      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49072      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49073      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49074      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49075      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49076
49077      if test "x$STATIC_BUILD" = xfalse; then
49078        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49079      fi
49080    else
49081      # Default works for linux, might work on other platforms as well.
49082      PICFLAG='-fPIC'
49083      SHARED_LIBRARY_FLAGS='-shared'
49084      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49085      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49086      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49087
49088      # arm specific settings
49089      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
49090        # '-Wl,-z,origin' isn't used on arm.
49091        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49092      else
49093        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49094      fi
49095
49096    fi
49097  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49098    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49099      PICFLAG="-xcode=pic32"
49100    else
49101      PICFLAG="-KPIC"
49102    fi
49103    C_FLAG_REORDER='-xF'
49104    CXX_FLAG_REORDER='-xF'
49105    SHARED_LIBRARY_FLAGS="-G"
49106    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49107    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49108    SET_SHARED_LIBRARY_NAME='-h $1'
49109    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49110  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49111    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49112    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49113    # will have to patch this single instruction with a call to some out-of-order code which
49114    # does the load from the TOC. This is of course slow. But in that case we also would have
49115    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49116    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49117    # can be patched directly by the linker and does not require a jump to out-of-order code.
49118    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49119    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49120    # loads for accessing a global variable). But there are rumors that this may be seen as a
49121    # 'performance feature' because of improved code locality of the symbols used in a
49122    # compilation unit.
49123    PICFLAG="-qpic"
49124    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49125    C_FLAG_REORDER=''
49126    CXX_FLAG_REORDER=''
49127    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49128    SET_EXECUTABLE_ORIGIN=""
49129    SET_SHARED_LIBRARY_ORIGIN=''
49130    SET_SHARED_LIBRARY_NAME=''
49131    SET_SHARED_LIBRARY_MAPFILE=''
49132  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49133    PICFLAG=""
49134    C_FLAG_REORDER=''
49135    CXX_FLAG_REORDER=''
49136    SHARED_LIBRARY_FLAGS="-dll"
49137    SET_EXECUTABLE_ORIGIN=''
49138    SET_SHARED_LIBRARY_ORIGIN=''
49139    SET_SHARED_LIBRARY_NAME=''
49140    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49141  fi
49142
49143
49144
49145
49146
49147
49148
49149
49150
49151  # The (cross) compiler is now configured, we can now test capabilities
49152  # of the target platform.
49153
49154
49155
49156  ###############################################################################
49157  #
49158  # Setup the opt flags for different compilers
49159  # and different operating systems.
49160  #
49161
49162  # FIXME: this was indirectly the old default, but just inherited.
49163  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49164  #   C_FLAG_DEPS="-MMD -MF"
49165  # fi
49166
49167  # Generate make dependency files
49168  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49169    C_FLAG_DEPS="-MMD -MF"
49170  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49171    C_FLAG_DEPS="-MMD -MF"
49172  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49173    C_FLAG_DEPS="-xMMD -xMF"
49174  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49175    C_FLAG_DEPS="-qmakedep=gcc -MF"
49176  fi
49177  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49178
49179
49180
49181  # Debug symbols
49182  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49183    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49184      # reduce from default "-g2" option to save space
49185      CFLAGS_DEBUG_SYMBOLS="-g1"
49186      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49187    else
49188      CFLAGS_DEBUG_SYMBOLS="-g"
49189      CXXFLAGS_DEBUG_SYMBOLS="-g"
49190    fi
49191  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49192    CFLAGS_DEBUG_SYMBOLS="-g"
49193    CXXFLAGS_DEBUG_SYMBOLS="-g"
49194  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49195    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49196    # -g0 enables debug symbols without disabling inlining.
49197    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49198  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49199    CFLAGS_DEBUG_SYMBOLS="-g"
49200    CXXFLAGS_DEBUG_SYMBOLS="-g"
49201  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49202    CFLAGS_DEBUG_SYMBOLS="-Zi"
49203    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49204  fi
49205
49206
49207
49208  # Debug symbols for JVM_CFLAGS
49209  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49210    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49211    if test "x$DEBUG_LEVEL" = xslowdebug; then
49212      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49213    else
49214      # -g0 does not disable inlining, which -g does.
49215      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49216    fi
49217  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49218    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49219  else
49220    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49221  fi
49222
49223
49224  # bounds, memory and behavior checking options
49225  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49226    case $DEBUG_LEVEL in
49227    release )
49228      # no adjustment
49229      ;;
49230    fastdebug )
49231      # no adjustment
49232      ;;
49233    slowdebug )
49234      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49235      # get's added conditionally on whether we produce debug symbols or not.
49236      # This is most likely not really correct.
49237
49238      # Add runtime stack smashing and undefined behavior checks.
49239      # Not all versions of gcc support -fstack-protector
49240      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49241
49242
49243
49244
49245
49246
49247
49248
49249
49250
49251
49252
49253
49254
49255
49256
49257
49258
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283    # Execute function body
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
49321
49322
49323
49324
49325
49326
49327
49328
49329
49330
49331
49332    # Execute function body
49333
49334  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49335$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49336  supports=yes
49337
49338  saved_cflags="$CFLAGS"
49339  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49340  ac_ext=c
49341ac_cpp='$CPP $CPPFLAGS'
49342ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49343ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49344ac_compiler_gnu=$ac_cv_c_compiler_gnu
49345
49346  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49347/* end confdefs.h.  */
49348int i;
49349_ACEOF
49350if ac_fn_c_try_compile "$LINENO"; then :
49351
49352else
49353  supports=no
49354fi
49355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49356  ac_ext=cpp
49357ac_cpp='$CXXCPP $CPPFLAGS'
49358ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49359ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49360ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49361
49362  CFLAGS="$saved_cflags"
49363
49364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49365$as_echo "$supports" >&6; }
49366  if test "x$supports" = "xyes" ; then
49367    :
49368    C_COMP_SUPPORTS="yes"
49369  else
49370    :
49371    C_COMP_SUPPORTS="no"
49372  fi
49373
49374
49375
49376
49377
49378
49379
49380
49381
49382
49383
49384
49385
49386
49387
49388
49389
49390
49391
49392
49393
49394
49395
49396
49397
49398
49399
49400
49401
49402
49403
49404
49405
49406
49407
49408
49409
49410
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432    # Execute function body
49433
49434  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49435$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49436  supports=yes
49437
49438  saved_cxxflags="$CXXFLAGS"
49439  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49440  ac_ext=cpp
49441ac_cpp='$CXXCPP $CPPFLAGS'
49442ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49443ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49444ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49445
49446  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49447/* end confdefs.h.  */
49448int i;
49449_ACEOF
49450if ac_fn_cxx_try_compile "$LINENO"; then :
49451
49452else
49453  supports=no
49454fi
49455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49456  ac_ext=cpp
49457ac_cpp='$CXXCPP $CPPFLAGS'
49458ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49459ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49460ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49461
49462  CXXFLAGS="$saved_cxxflags"
49463
49464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49465$as_echo "$supports" >&6; }
49466  if test "x$supports" = "xyes" ; then
49467    :
49468    CXX_COMP_SUPPORTS="yes"
49469  else
49470    :
49471    CXX_COMP_SUPPORTS="no"
49472  fi
49473
49474
49475
49476
49477
49478
49479
49480
49481
49482
49483
49484
49485
49486  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49487$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49488  supports=no
49489  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49490
49491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49492$as_echo "$supports" >&6; }
49493  if test "x$supports" = "xyes" ; then
49494    :
49495
49496  else
49497    :
49498    STACK_PROTECTOR_CFLAG=""
49499  fi
49500
49501
49502
49503
49504
49505
49506
49507      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49508      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49509      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49510        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49511      fi
49512      ;;
49513    esac
49514  fi
49515
49516  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49517    if test "x$DEBUG_LEVEL" != xrelease; then
49518      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49519        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49520      fi
49521    fi
49522  fi
49523
49524  # Optimization levels
49525  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49526    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49527
49528    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49529      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49530      C_O_FLAG_HIGHEST_JVM="-xO4"
49531      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49532      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49533      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49534      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49535      C_O_FLAG_DEBUG_JVM=""
49536      C_O_FLAG_NONE="-xregs=no%frameptr"
49537      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49538      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49539      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49540      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49541      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49542      CXX_O_FLAG_DEBUG_JVM=""
49543      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49544      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49545        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49546        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49547      fi
49548    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49549      C_O_FLAG_HIGHEST_JVM="-xO4"
49550      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49551      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49552      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49553      C_O_FLAG_DEBUG=""
49554      C_O_FLAG_DEBUG_JVM=""
49555      C_O_FLAG_NONE=""
49556      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49557      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49558      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49559      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49560      CXX_O_FLAG_DEBUG=""
49561      CXX_O_FLAG_DEBUG_JVM=""
49562      CXX_O_FLAG_NONE=""
49563    fi
49564  else
49565    # The remaining toolchains share opt flags between CC and CXX;
49566    # setup for C and duplicate afterwards.
49567    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49568      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49569        # On MacOSX we optimize for size, something
49570        # we should do for all platforms?
49571        C_O_FLAG_HIGHEST_JVM="-Os"
49572        C_O_FLAG_HIGHEST="-Os"
49573        C_O_FLAG_HI="-Os"
49574        C_O_FLAG_NORM="-Os"
49575        C_O_FLAG_SIZE="-Os"
49576      else
49577        C_O_FLAG_HIGHEST_JVM="-O3"
49578        C_O_FLAG_HIGHEST="-O3"
49579        C_O_FLAG_HI="-O3"
49580        C_O_FLAG_NORM="-O2"
49581        C_O_FLAG_SIZE="-Os"
49582      fi
49583      C_O_FLAG_DEBUG="-O0"
49584      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49585        C_O_FLAG_DEBUG_JVM=""
49586      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49587        C_O_FLAG_DEBUG_JVM="-O0"
49588      fi
49589      C_O_FLAG_NONE="-O0"
49590    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49591      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49592        # On MacOSX we optimize for size, something
49593        # we should do for all platforms?
49594        C_O_FLAG_HIGHEST_JVM="-Os"
49595        C_O_FLAG_HIGHEST="-Os"
49596        C_O_FLAG_HI="-Os"
49597        C_O_FLAG_NORM="-Os"
49598        C_O_FLAG_SIZE="-Os"
49599      else
49600        C_O_FLAG_HIGHEST_JVM="-O3"
49601        C_O_FLAG_HIGHEST="-O3"
49602        C_O_FLAG_HI="-O3"
49603        C_O_FLAG_NORM="-O2"
49604        C_O_FLAG_SIZE="-Os"
49605      fi
49606      C_O_FLAG_DEBUG="-O0"
49607      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49608        C_O_FLAG_DEBUG_JVM=""
49609      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49610        C_O_FLAG_DEBUG_JVM="-O0"
49611      fi
49612      C_O_FLAG_NONE="-O0"
49613    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49614      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49615      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49616      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49617      C_O_FLAG_NORM="-O2"
49618      C_O_FLAG_DEBUG="-qnoopt"
49619      # FIXME: Value below not verified.
49620      C_O_FLAG_DEBUG_JVM=""
49621      C_O_FLAG_NONE="-qnoopt"
49622    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49623      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49624      C_O_FLAG_HIGHEST="-O2"
49625      C_O_FLAG_HI="-O1"
49626      C_O_FLAG_NORM="-O1"
49627      C_O_FLAG_DEBUG="-Od"
49628      C_O_FLAG_DEBUG_JVM=""
49629      C_O_FLAG_NONE="-Od"
49630      C_O_FLAG_SIZE="-Os"
49631    fi
49632    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49633    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49634    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49635    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49636    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49637    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49638    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49639    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49640  fi
49641
49642  # Adjust optimization flags according to debug level.
49643  case $DEBUG_LEVEL in
49644    release )
49645      # no adjustment
49646      ;;
49647    fastdebug )
49648      # Not quite so much optimization
49649      C_O_FLAG_HI="$C_O_FLAG_NORM"
49650      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49651      ;;
49652    slowdebug )
49653      # Disable optimization
49654      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49655      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49656      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49657      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49658      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49659      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49660      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49661      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49662      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49663      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49664      ;;
49665  esac
49666
49667
49668
49669
49670
49671
49672
49673
49674
49675
49676
49677
49678
49679
49680
49681
49682
49683
49684
49685
49686# Check whether --with-abi-profile was given.
49687if test "${with_abi_profile+set}" = set; then :
49688  withval=$with_abi_profile;
49689fi
49690
49691
49692  if test "x$with_abi_profile" != x; then
49693    if test "x$OPENJDK_TARGET_CPU" != xarm && \
49694        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
49695      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
49696    fi
49697
49698    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
49699    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
49700$as_echo_n "checking for ABI profle... " >&6; }
49701    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
49702$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
49703
49704    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
49705      ARM_FLOAT_TYPE=vfp-sflt
49706      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49707    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
49708      ARM_FLOAT_TYPE=vfp-hflt
49709      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49710    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
49711      ARM_FLOAT_TYPE=sflt
49712      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49713    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
49714      ARM_FLOAT_TYPE=vfp-sflt
49715      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49716    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
49717      ARM_FLOAT_TYPE=vfp-hflt
49718      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
49719    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
49720      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49721      ARM_FLOAT_TYPE=
49722      ARM_ARCH_TYPE_FLAGS=
49723    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
49724      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49725      ARM_FLOAT_TYPE=
49726      ARM_ARCH_TYPE_FLAGS=
49727    else
49728      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
49729    fi
49730
49731    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
49732      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
49733    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
49734      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
49735    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
49736      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
49737    fi
49738    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
49739$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
49740    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
49741$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
49742
49743    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
49744$as_echo_n "checking for arch type flags... " >&6; }
49745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
49746$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
49747
49748    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
49749    # autoconf target triplet.
49750     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
49751    # Sanity check that it is a known ABI.
49752    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
49753        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
49754        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
49755          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
49756$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
49757    fi
49758    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
49759$as_echo_n "checking for ABI property name... " >&6; }
49760    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
49761$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
49762
49763
49764    # Pass these on to the open part of configure as if they were set using
49765    # --with-extra-c[xx]flags.
49766    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49767    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49768    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
49769    # FIXME: This should not really be set using extra_cflags.
49770    if test "x$OPENJDK_TARGET_CPU" = xarm; then
49771        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
49772        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
49773    fi
49774    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
49775    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
49776    # And pass the architecture flags to the linker as well
49777    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49778  fi
49779
49780  # When building with an abi profile, the name of that profile is appended on the
49781  # bundle platform, which is used in bundle names.
49782  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
49783    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
49784  fi
49785
49786
49787  # Special extras...
49788  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49789    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49790      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49791      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49792    fi
49793    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49794    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49795  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49796    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49797    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49798  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49799    CXXSTD_CXXFLAG="-std=gnu++98"
49800
49801
49802
49803
49804
49805
49806
49807
49808
49809
49810
49811
49812
49813
49814
49815
49816
49817
49818
49819
49820
49821
49822
49823
49824
49825
49826
49827
49828
49829
49830
49831
49832
49833
49834
49835
49836
49837
49838
49839
49840
49841
49842    # Execute function body
49843
49844  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49845$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49846  supports=yes
49847
49848  saved_cxxflags="$CXXFLAGS"
49849  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49850  ac_ext=cpp
49851ac_cpp='$CXXCPP $CPPFLAGS'
49852ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49853ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49854ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49855
49856  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49857/* end confdefs.h.  */
49858int i;
49859_ACEOF
49860if ac_fn_cxx_try_compile "$LINENO"; then :
49861
49862else
49863  supports=no
49864fi
49865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49866  ac_ext=cpp
49867ac_cpp='$CXXCPP $CPPFLAGS'
49868ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49869ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49870ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49871
49872  CXXFLAGS="$saved_cxxflags"
49873
49874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49875$as_echo "$supports" >&6; }
49876  if test "x$supports" = "xyes" ; then
49877    :
49878
49879  else
49880    :
49881    CXXSTD_CXXFLAG=""
49882  fi
49883
49884
49885
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49896    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49897
49898  fi
49899  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49900    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49901    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49902  fi
49903
49904  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49905  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49906  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49907
49908  ###############################################################################
49909  #
49910  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49911  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49912  #
49913
49914  # Setup compiler/platform specific flags into
49915  #    CFLAGS_JDK    - C Compiler flags
49916  #    CXXFLAGS_JDK  - C++ Compiler flags
49917  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49918  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49919    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49920    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49921    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49922    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49923      # Force compatibility with i586 on 32 bit intel platforms.
49924      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49925      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49926    fi
49927    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49928        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49929    case $OPENJDK_TARGET_CPU_ARCH in
49930      arm )
49931        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49932        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49933        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
49934        ;;
49935      ppc )
49936        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49937        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49938        ;;
49939      s390 )
49940        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49941        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49942        ;;
49943      * )
49944        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49945        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49946        ;;
49947    esac
49948
49949
49950
49951
49952
49953
49954
49955
49956
49957
49958
49959
49960
49961
49962
49963
49964
49965
49966
49967
49968
49969
49970
49971
49972
49973
49974
49975
49976
49977
49978
49979
49980
49981
49982
49983
49984
49985
49986
49987
49988
49989
49990
49991
49992
49993
49994
49995
49996
49997
49998
49999
50000
50001
50002    # Execute function body
50003
50004  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50005  REFERENCE_VERSION=6
50006
50007  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50008    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50009  fi
50010
50011  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50012    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50013  fi
50014
50015  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50016  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50017
50018  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50019    :
50020
50021  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50022  # runs afoul of the more aggressive versions of these optimisations.
50023  # Notably, value range propagation now assumes that the this pointer of C++
50024  # member functions is non-null.
50025  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50026        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50027        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50028$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50029  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50030  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50031
50032  else
50033    :
50034
50035  fi
50036
50037
50038
50039
50040
50041
50042
50043
50044
50045
50046
50047
50048
50049
50050  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50051    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50052
50053    # Restrict the debug information created by Clang to avoid
50054    # too big object files and speed the build up a little bit
50055    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50056    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50057    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50058      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50059        # Force compatibility with i586 on 32 bit intel platforms.
50060        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50061        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50062      fi
50063      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50064      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50065          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50066      case $OPENJDK_TARGET_CPU_ARCH in
50067        ppc )
50068          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50069          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50070          ;;
50071        * )
50072          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50073          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50074          ;;
50075      esac
50076    fi
50077  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50078    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50079    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50080    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50081      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50082    fi
50083
50084    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50085    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50086  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50087    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50088    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50089    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50090  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50091    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50092        -MD -Zc:wchar_t- -W3 -wd4800 \
50093        -DWIN32_LEAN_AND_MEAN \
50094        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50095        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50096        -DWIN32 -DIAL"
50097    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50098      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50099    else
50100      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50101    fi
50102    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50103    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50104    # studio.
50105    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50106      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50107      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50108      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50109    fi
50110  fi
50111
50112  ###############################################################################
50113
50114  # Adjust flags according to debug level.
50115  case $DEBUG_LEVEL in
50116    fastdebug | slowdebug )
50117      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50118      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50119      ;;
50120    release )
50121      ;;
50122    * )
50123      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50124      ;;
50125  esac
50126
50127  # Set some common defines. These works for all compilers, but assume
50128  # -D is universally accepted.
50129
50130  # Setup endianness
50131  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50132    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50133    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50134    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50135    #   Note: -Dmacro         is the same as    #define macro 1
50136    #         -Dmacro=        is the same as    #define macro
50137    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50138      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50139    else
50140      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50141    fi
50142  else
50143    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50144    # are defined in the system?
50145    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50146      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50147    else
50148      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50149    fi
50150  fi
50151
50152  # Setup target OS define. Use OS target name but in upper case.
50153  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50154  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50155
50156  # Setup target CPU
50157  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50158      $OPENJDK_TARGET_ADD_LP64 \
50159      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50160
50161  # Setup debug/release defines
50162  if test "x$DEBUG_LEVEL" = xrelease; then
50163    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50164    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50165      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50166    fi
50167  else
50168    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50169  fi
50170
50171  # Set some additional per-OS defines.
50172  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50173    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50174    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50175        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50176  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50177    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50178    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50179        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50180  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50181    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50182    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50183    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50184    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50185        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50186        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50187        -fno-omit-frame-pointer"
50188  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50189    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50190    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50191    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50192        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50193        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50194  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50195    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50196  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50197    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50198    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50199  fi
50200
50201  # Set some additional per-CPU defines.
50202  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50203    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50204  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50205    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50206  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50207    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50208      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50209      # fixes `relocation truncated to fit' error for gcc 4.1.
50210      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50211      # Use ppc64 instructions, but schedule for power5
50212      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50213    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50214      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50215    fi
50216  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50217    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50218      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50219      # Little endian machine uses ELFv2 ABI.
50220      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50221      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50222      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50223    fi
50224  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50225    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50226      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50227    fi
50228  fi
50229
50230  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50231    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50232  fi
50233
50234  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50235    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50236      # Solaris does not have _LP64=1 in the old build.
50237      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50238      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50239    fi
50240  fi
50241
50242  # Set JVM_CFLAGS warning handling
50243  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50244    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50245        -Wunused-value -Woverloaded-virtual"
50246
50247    if test "x$TOOLCHAIN_TYPE" = xgcc; then
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
50273
50274
50275
50276
50277
50278
50279
50280
50281
50282
50283
50284
50285
50286
50287
50288
50289
50290
50291
50292
50293
50294
50295
50296
50297
50298
50299
50300
50301
50302    # Execute function body
50303
50304  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50305  REFERENCE_VERSION=4.8
50306
50307  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50308    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50309  fi
50310
50311  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50312    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50313  fi
50314
50315  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50316  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50317
50318  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50319    :
50320
50321            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50322            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50323
50324
50325  else
50326    :
50327
50328  fi
50329
50330
50331
50332
50333
50334
50335
50336
50337
50338
50339
50340
50341
50342
50343    fi
50344    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50345      # Non-zero builds have stricter warnings
50346      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50347    else
50348      if test "x$TOOLCHAIN_TYPE" = xclang; then
50349        # Some versions of llvm do not like -Wundef
50350        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50351      fi
50352    fi
50353  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50354    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50355        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50356  fi
50357
50358  # Additional macosx handling
50359  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50360    # Setting these parameters makes it an error to link to macosx APIs that are
50361    # newer than the given OS version and makes the linked binaries compatible
50362    # even if built on a newer version of the OS.
50363    # The expected format is X.Y.Z
50364    MACOSX_VERSION_MIN=10.7.0
50365
50366
50367    # The macro takes the version with no dots, ex: 1070
50368    # Let the flags variables get resolved in make for easier override on make
50369    # command line.
50370    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50371    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50372  fi
50373
50374  # Setup some hard coded includes
50375  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50376      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50377      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50378      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50379      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50380      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50381      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50382
50383  # The shared libraries are compiled using the picflag.
50384  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50385      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50386  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50387      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50388
50389  # Executable flags
50390  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50391  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50392
50393
50394
50395
50396
50397
50398  # Setup LDFLAGS et al.
50399  #
50400
50401  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50402    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50403    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50404    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50405    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50406      LDFLAGS_SAFESH="-safeseh"
50407      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50408      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50409      # NOTE: Old build added -machine. Probably not needed.
50410      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50411    else
50412      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50413    fi
50414  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50415      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50416      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50417        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50418        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50419    fi
50420  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50421    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50422    # We have previously set HAS_GNU_HASH if this is the case
50423    if test -n "$HAS_GNU_HASH"; then
50424      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50425      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50426      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50427    fi
50428      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50429        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50430    fi
50431    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50432      # And since we now know that the linker is gnu, then add -z defs, to forbid
50433      # undefined symbols in object files.
50434      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50435      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50436      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50437      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50438      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50439      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50440        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50441      fi
50442      case $DEBUG_LEVEL in
50443        release )
50444          # tell linker to optimize libraries.
50445          # Should this be supplied to the OSS linker as well?
50446          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50447          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50448          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50449          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50450            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50451          fi
50452          ;;
50453        slowdebug )
50454          # Hotspot always let the linker optimize
50455          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50456          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50457            # do relocations at load
50458            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50459            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50460            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50461          fi
50462          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50463            # mark relocations read only
50464            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50465            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50466            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50467          fi
50468          ;;
50469        fastdebug )
50470          # Hotspot always let the linker optimize
50471          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50472          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50473            # mark relocations read only
50474            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50475            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50476            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50477          fi
50478          ;;
50479        * )
50480          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50481          ;;
50482        esac
50483    fi
50484  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50485    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50486    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50487    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50488    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50489    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50490    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50491      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50492    fi
50493  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50494    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50495    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50496    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50497  fi
50498
50499  # Customize LDFLAGS for executables
50500
50501  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50502
50503  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50504    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50505      LDFLAGS_STACK_SIZE=1048576
50506    else
50507      LDFLAGS_STACK_SIZE=327680
50508    fi
50509    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50510  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50511    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50512  fi
50513
50514  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50515
50516  # Customize LDFLAGS for libs
50517  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50518
50519  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50520  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50521    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50522        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50523    JDKLIB_LIBS=""
50524  else
50525    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50526        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
50527
50528    if test "xTARGET" = "xTARGET"; then
50529      # On some platforms (mac) the linker warns about non existing -L dirs.
50530      # For any of the variants server, client or minimal, the dir matches the
50531      # variant name. The "main" variant should be used for linking. For the
50532      # rest, the dir is just server.
50533      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
50534          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50535        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50536            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
50537      else
50538        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50539            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50540      fi
50541    elif test "xTARGET" = "xBUILD"; then
50542      # When building a buildjdk, it's always only the server variant
50543      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50544          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50545    fi
50546
50547    JDKLIB_LIBS="-ljava -ljvm"
50548    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50549      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50550    fi
50551
50552  fi
50553
50554LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50555
50556  # Set JVM_LIBS (per os)
50557  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50558    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50559  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50560    # FIXME: This hard-coded path is not really proper.
50561    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50562      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50563    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50564      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50565    fi
50566    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50567        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50568  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50569    JVM_LIBS="$JVM_LIBS -lm"
50570  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50571    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50572  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50573    JVM_LIBS="$JVM_LIBS -lm"
50574  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50575    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50576        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50577        wsock32.lib winmm.lib version.lib psapi.lib"
50578    fi
50579
50580  # Set JVM_ASFLAGS
50581  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50582    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50583      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50584    fi
50585  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50586    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50587  fi
50588
50589  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50590
50591
50592
50593
50594
50595
50596
50597
50598
50599
50600
50601
50602
50603
50604
50605  # Special extras...
50606  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50607    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50608      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50609      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50610    fi
50611    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50612    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50613  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50614    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50615    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50616  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50617    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50618
50619
50620
50621
50622
50623
50624
50625
50626
50627
50628
50629
50630
50631
50632
50633
50634
50635
50636
50637
50638
50639
50640
50641
50642
50643
50644
50645
50646
50647
50648
50649
50650
50651
50652
50653
50654
50655
50656
50657
50658
50659
50660    # Execute function body
50661
50662  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50663$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50664  supports=yes
50665
50666  saved_cxxflags="$CXXFLAGS"
50667  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50668  ac_ext=cpp
50669ac_cpp='$CXXCPP $CPPFLAGS'
50670ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50671ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50672ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50673
50674  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50675/* end confdefs.h.  */
50676int i;
50677_ACEOF
50678if ac_fn_cxx_try_compile "$LINENO"; then :
50679
50680else
50681  supports=no
50682fi
50683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50684  ac_ext=cpp
50685ac_cpp='$CXXCPP $CPPFLAGS'
50686ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50687ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50688ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50689
50690  CXXFLAGS="$saved_cxxflags"
50691
50692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50693$as_echo "$supports" >&6; }
50694  if test "x$supports" = "xyes" ; then
50695    :
50696
50697  else
50698    :
50699    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50700  fi
50701
50702
50703
50704
50705
50706
50707
50708
50709
50710
50711
50712
50713    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50714    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50715
50716  fi
50717  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50718    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50719    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50720  fi
50721
50722  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50723  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50724  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50725
50726  ###############################################################################
50727  #
50728  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50729  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50730  #
50731
50732  # Setup compiler/platform specific flags into
50733  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50734  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50735  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50736  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50737    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50738    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50739    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50740    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50741      # Force compatibility with i586 on 32 bit intel platforms.
50742      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50743      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50744    fi
50745    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50746        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50747    case $OPENJDK_BUILD_CPU_ARCH in
50748      arm )
50749        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50750        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50751        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
50752        ;;
50753      ppc )
50754        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50755        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50756        ;;
50757      s390 )
50758        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50759        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50760        ;;
50761      * )
50762        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50763        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50764        ;;
50765    esac
50766
50767
50768
50769
50770
50771
50772
50773
50774
50775
50776
50777
50778
50779
50780
50781
50782
50783
50784
50785
50786
50787
50788
50789
50790
50791
50792
50793
50794
50795
50796
50797
50798
50799
50800
50801
50802
50803
50804
50805
50806
50807
50808
50809
50810
50811
50812
50813
50814
50815
50816
50817
50818
50819
50820    # Execute function body
50821
50822  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50823  REFERENCE_VERSION=6
50824
50825  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50826    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50827  fi
50828
50829  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50830    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50831  fi
50832
50833  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50834  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50835
50836  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50837    :
50838
50839  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50840  # runs afoul of the more aggressive versions of these optimisations.
50841  # Notably, value range propagation now assumes that the this pointer of C++
50842  # member functions is non-null.
50843  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50844        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50845        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50846$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50847  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50848  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50849
50850  else
50851    :
50852
50853  fi
50854
50855
50856
50857
50858
50859
50860
50861
50862
50863
50864
50865
50866
50867
50868  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50869    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50870
50871    # Restrict the debug information created by Clang to avoid
50872    # too big object files and speed the build up a little bit
50873    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50874    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50875    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50876      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50877        # Force compatibility with i586 on 32 bit intel platforms.
50878        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50879        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50880      fi
50881      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50882      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50883          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50884      case $OPENJDK_BUILD_CPU_ARCH in
50885        ppc )
50886          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50887          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50888          ;;
50889        * )
50890          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50891          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50892          ;;
50893      esac
50894    fi
50895  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50896    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50897    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50898    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50899      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50900    fi
50901
50902    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50903    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50904  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50905    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50906    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50907    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50908  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50909    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50910        -MD -Zc:wchar_t- -W3 -wd4800 \
50911        -DWIN32_LEAN_AND_MEAN \
50912        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50913        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50914        -DWIN32 -DIAL"
50915    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50916      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50917    else
50918      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50919    fi
50920    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50921    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50922    # studio.
50923    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50924      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50925      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50926      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50927    fi
50928  fi
50929
50930  ###############################################################################
50931
50932  # Adjust flags according to debug level.
50933  case $DEBUG_LEVEL in
50934    fastdebug | slowdebug )
50935      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50936      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50937      ;;
50938    release )
50939      ;;
50940    * )
50941      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50942      ;;
50943  esac
50944
50945  # Set some common defines. These works for all compilers, but assume
50946  # -D is universally accepted.
50947
50948  # Setup endianness
50949  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50950    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50951    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50952    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50953    #   Note: -Dmacro         is the same as    #define macro 1
50954    #         -Dmacro=        is the same as    #define macro
50955    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50956      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50957    else
50958      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50959    fi
50960  else
50961    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50962    # are defined in the system?
50963    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50964      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50965    else
50966      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50967    fi
50968  fi
50969
50970  # Setup target OS define. Use OS target name but in upper case.
50971  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50972  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50973
50974  # Setup target CPU
50975  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50976      $OPENJDK_BUILD_ADD_LP64 \
50977      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50978
50979  # Setup debug/release defines
50980  if test "x$DEBUG_LEVEL" = xrelease; then
50981    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50982    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50983      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50984    fi
50985  else
50986    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50987  fi
50988
50989  # Set some additional per-OS defines.
50990  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50991    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50992    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50993        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50994  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50995    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50996    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50997        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50998  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50999    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51000    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51001    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51002    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51003        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51004        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51005        -fno-omit-frame-pointer"
51006  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51007    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51008    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51009    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51010        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51011        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51012  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51013    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51014  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51015    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51016    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51017  fi
51018
51019  # Set some additional per-CPU defines.
51020  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51021    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51022  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51023    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51024  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51025    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51026      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51027      # fixes `relocation truncated to fit' error for gcc 4.1.
51028      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51029      # Use ppc64 instructions, but schedule for power5
51030      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51031    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51032      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51033    fi
51034  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51035    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51036      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51037      # Little endian machine uses ELFv2 ABI.
51038      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51039      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51040      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
51041    fi
51042  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
51043    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51044      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
51045    fi
51046  fi
51047
51048  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51049    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51050  fi
51051
51052  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51053    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51054      # Solaris does not have _LP64=1 in the old build.
51055      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51056      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51057    fi
51058  fi
51059
51060  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51061  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51062    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51063        -Wunused-value -Woverloaded-virtual"
51064
51065    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51066
51067
51068
51069
51070
51071
51072
51073
51074
51075
51076
51077
51078
51079
51080
51081
51082
51083
51084
51085
51086
51087
51088
51089
51090
51091
51092
51093
51094
51095
51096
51097
51098
51099
51100
51101
51102
51103
51104
51105
51106
51107
51108
51109
51110
51111
51112
51113
51114
51115
51116
51117
51118
51119
51120    # Execute function body
51121
51122  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51123  REFERENCE_VERSION=4.8
51124
51125  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51126    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51127  fi
51128
51129  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51130    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51131  fi
51132
51133  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51134  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51135
51136  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51137    :
51138
51139            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51140            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51141
51142
51143  else
51144    :
51145
51146  fi
51147
51148
51149
51150
51151
51152
51153
51154
51155
51156
51157
51158
51159
51160
51161    fi
51162    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51163      # Non-zero builds have stricter warnings
51164      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51165    else
51166      if test "x$TOOLCHAIN_TYPE" = xclang; then
51167        # Some versions of llvm do not like -Wundef
51168        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51169      fi
51170    fi
51171  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51172    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51173        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51174  fi
51175
51176  # Additional macosx handling
51177  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51178    # Setting these parameters makes it an error to link to macosx APIs that are
51179    # newer than the given OS version and makes the linked binaries compatible
51180    # even if built on a newer version of the OS.
51181    # The expected format is X.Y.Z
51182    MACOSX_VERSION_MIN=10.7.0
51183
51184
51185    # The macro takes the version with no dots, ex: 1070
51186    # Let the flags variables get resolved in make for easier override on make
51187    # command line.
51188    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)"
51189    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51190  fi
51191
51192  # Setup some hard coded includes
51193  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51194      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51195      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51196      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51197      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51198      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51199      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51200
51201  # The shared libraries are compiled using the picflag.
51202  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51203      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51204  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51205      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51206
51207  # Executable flags
51208  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51209  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51210
51211
51212
51213
51214
51215
51216  # Setup LDFLAGS et al.
51217  #
51218
51219  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51220    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51221    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51222    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51223    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51224      LDFLAGS_SAFESH="-safeseh"
51225      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51226      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51227      # NOTE: Old build added -machine. Probably not needed.
51228      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51229    else
51230      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51231    fi
51232  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51233      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51234      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51235        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51236        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51237    fi
51238  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51239    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51240    # We have previously set HAS_GNU_HASH if this is the case
51241    if test -n "$HAS_GNU_HASH"; then
51242      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51243      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51244      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51245    fi
51246      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51247        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51248    fi
51249    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51250      # And since we now know that the linker is gnu, then add -z defs, to forbid
51251      # undefined symbols in object files.
51252      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51253      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51254      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51255      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51256      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51257      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51258        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51259      fi
51260      case $DEBUG_LEVEL in
51261        release )
51262          # tell linker to optimize libraries.
51263          # Should this be supplied to the OSS linker as well?
51264          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51265          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51266          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51267          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51268            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51269          fi
51270          ;;
51271        slowdebug )
51272          # Hotspot always let the linker optimize
51273          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51274          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51275            # do relocations at load
51276            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51277            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51278            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51279          fi
51280          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51281            # mark relocations read only
51282            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51283            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51284            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51285          fi
51286          ;;
51287        fastdebug )
51288          # Hotspot always let the linker optimize
51289          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51290          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51291            # mark relocations read only
51292            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51293            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51294            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51295          fi
51296          ;;
51297        * )
51298          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51299          ;;
51300        esac
51301    fi
51302  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51303    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51304    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51305    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51306    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51307    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51308    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51309      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51310    fi
51311  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51312    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51313    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51314    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51315  fi
51316
51317  # Customize LDFLAGS for executables
51318
51319  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51320
51321  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51322    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51323      LDFLAGS_STACK_SIZE=1048576
51324    else
51325      LDFLAGS_STACK_SIZE=327680
51326    fi
51327    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51328  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51329    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51330  fi
51331
51332  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51333
51334  # Customize LDFLAGS for libs
51335  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51336
51337  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51338  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51339    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51340        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51341    OPENJDK_BUILD_JDKLIB_LIBS=""
51342  else
51343    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51344        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51345
51346    if test "xBUILD" = "xTARGET"; then
51347      # On some platforms (mac) the linker warns about non existing -L dirs.
51348      # For any of the variants server, client or minimal, the dir matches the
51349      # variant name. The "main" variant should be used for linking. For the
51350      # rest, the dir is just server.
51351      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51352          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51353        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51354            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51355      else
51356        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51357            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51358      fi
51359    elif test "xBUILD" = "xBUILD"; then
51360      # When building a buildjdk, it's always only the server variant
51361      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51362          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51363    fi
51364
51365    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51366    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51367      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51368    fi
51369
51370  fi
51371
51372OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51373
51374  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51375  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51376    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51377  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51378    # FIXME: This hard-coded path is not really proper.
51379    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51380      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51381    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51382      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51383    fi
51384    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51385        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51386  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51387    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51388  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51389    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51390  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51391    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51392  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51393    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51394        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51395        wsock32.lib winmm.lib version.lib psapi.lib"
51396    fi
51397
51398  # Set OPENJDK_BUILD_JVM_ASFLAGS
51399  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51400    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51401      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51402    fi
51403  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51404    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51405  fi
51406
51407  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51408
51409
51410
51411
51412
51413
51414
51415
51416
51417
51418
51419
51420
51421
51422
51423  # Tests are only ever compiled for TARGET
51424  # Flags for compiling test libraries
51425  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51426  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51427
51428  # Flags for compiling test executables
51429  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51430  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51431
51432
51433
51434
51435
51436
51437  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51438  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51439
51440
51441
51442
51443
51444
51445  # Some Zero and Shark settings.
51446  # ZERO_ARCHFLAG tells the compiler which mode to build for
51447  case "${OPENJDK_TARGET_CPU}" in
51448    s390)
51449      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51450      ;;
51451    *)
51452      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51453  esac
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
51491
51492
51493
51494
51495
51496    # Execute function body
51497
51498
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534
51535
51536
51537
51538
51539
51540
51541
51542
51543
51544
51545    # Execute function body
51546
51547  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51548$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51549  supports=yes
51550
51551  saved_cflags="$CFLAGS"
51552  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51553  ac_ext=c
51554ac_cpp='$CPP $CPPFLAGS'
51555ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51556ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51557ac_compiler_gnu=$ac_cv_c_compiler_gnu
51558
51559  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51560/* end confdefs.h.  */
51561int i;
51562_ACEOF
51563if ac_fn_c_try_compile "$LINENO"; then :
51564
51565else
51566  supports=no
51567fi
51568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51569  ac_ext=cpp
51570ac_cpp='$CXXCPP $CPPFLAGS'
51571ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51572ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51573ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51574
51575  CFLAGS="$saved_cflags"
51576
51577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51578$as_echo "$supports" >&6; }
51579  if test "x$supports" = "xyes" ; then
51580    :
51581    C_COMP_SUPPORTS="yes"
51582  else
51583    :
51584    C_COMP_SUPPORTS="no"
51585  fi
51586
51587
51588
51589
51590
51591
51592
51593
51594
51595
51596
51597
51598
51599
51600
51601
51602
51603
51604
51605
51606
51607
51608
51609
51610
51611
51612
51613
51614
51615
51616
51617
51618
51619
51620
51621
51622
51623
51624
51625
51626
51627
51628
51629
51630
51631
51632
51633
51634
51635
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645    # Execute function body
51646
51647  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51648$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51649  supports=yes
51650
51651  saved_cxxflags="$CXXFLAGS"
51652  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51653  ac_ext=cpp
51654ac_cpp='$CXXCPP $CPPFLAGS'
51655ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51656ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51657ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51658
51659  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51660/* end confdefs.h.  */
51661int i;
51662_ACEOF
51663if ac_fn_cxx_try_compile "$LINENO"; then :
51664
51665else
51666  supports=no
51667fi
51668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51669  ac_ext=cpp
51670ac_cpp='$CXXCPP $CPPFLAGS'
51671ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51672ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51673ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51674
51675  CXXFLAGS="$saved_cxxflags"
51676
51677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51678$as_echo "$supports" >&6; }
51679  if test "x$supports" = "xyes" ; then
51680    :
51681    CXX_COMP_SUPPORTS="yes"
51682  else
51683    :
51684    CXX_COMP_SUPPORTS="no"
51685  fi
51686
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51700$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51701  supports=no
51702  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51703
51704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51705$as_echo "$supports" >&6; }
51706  if test "x$supports" = "xyes" ; then
51707    :
51708
51709  else
51710    :
51711    ZERO_ARCHFLAG=""
51712  fi
51713
51714
51715
51716
51717
51718
51719
51720
51721  # Check that the compiler supports -mX (or -qX on AIX) flags
51722  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51723
51724
51725
51726
51727
51728
51729
51730
51731
51732
51733
51734
51735
51736
51737
51738
51739
51740
51741
51742
51743
51744
51745
51746
51747
51748
51749
51750
51751
51752
51753
51754
51755
51756
51757
51758
51759
51760
51761
51762
51763
51764
51765
51766
51767
51768
51769
51770    # Execute function body
51771
51772
51773
51774
51775
51776
51777
51778
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799
51800
51801
51802
51803
51804
51805
51806
51807
51808
51809
51810
51811
51812
51813
51814
51815
51816
51817
51818
51819    # Execute function body
51820
51821  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51822$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51823  supports=yes
51824
51825  saved_cflags="$CFLAGS"
51826  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51827  ac_ext=c
51828ac_cpp='$CPP $CPPFLAGS'
51829ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51830ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51831ac_compiler_gnu=$ac_cv_c_compiler_gnu
51832
51833  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51834/* end confdefs.h.  */
51835int i;
51836_ACEOF
51837if ac_fn_c_try_compile "$LINENO"; then :
51838
51839else
51840  supports=no
51841fi
51842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51843  ac_ext=cpp
51844ac_cpp='$CXXCPP $CPPFLAGS'
51845ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51846ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51847ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51848
51849  CFLAGS="$saved_cflags"
51850
51851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51852$as_echo "$supports" >&6; }
51853  if test "x$supports" = "xyes" ; then
51854    :
51855    C_COMP_SUPPORTS="yes"
51856  else
51857    :
51858    C_COMP_SUPPORTS="no"
51859  fi
51860
51861
51862
51863
51864
51865
51866
51867
51868
51869
51870
51871
51872
51873
51874
51875
51876
51877
51878
51879
51880
51881
51882
51883
51884
51885
51886
51887
51888
51889
51890
51891
51892
51893
51894
51895
51896
51897
51898
51899
51900
51901
51902
51903
51904
51905
51906
51907
51908
51909
51910
51911
51912
51913
51914
51915
51916
51917
51918
51919    # Execute function body
51920
51921  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51922$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51923  supports=yes
51924
51925  saved_cxxflags="$CXXFLAGS"
51926  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51927  ac_ext=cpp
51928ac_cpp='$CXXCPP $CPPFLAGS'
51929ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51930ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51931ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51932
51933  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51934/* end confdefs.h.  */
51935int i;
51936_ACEOF
51937if ac_fn_cxx_try_compile "$LINENO"; then :
51938
51939else
51940  supports=no
51941fi
51942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51943  ac_ext=cpp
51944ac_cpp='$CXXCPP $CPPFLAGS'
51945ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51946ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51947ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51948
51949  CXXFLAGS="$saved_cxxflags"
51950
51951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51952$as_echo "$supports" >&6; }
51953  if test "x$supports" = "xyes" ; then
51954    :
51955    CXX_COMP_SUPPORTS="yes"
51956  else
51957    :
51958    CXX_COMP_SUPPORTS="no"
51959  fi
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51974$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51975  supports=no
51976  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51977
51978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51979$as_echo "$supports" >&6; }
51980  if test "x$supports" = "xyes" ; then
51981    :
51982    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51983  else
51984    :
51985    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51986  fi
51987
51988
51989
51990
51991
51992
51993
51994
51995  # Check whether --enable-warnings-as-errors was given.
51996if test "${enable_warnings_as_errors+set}" = set; then :
51997  enableval=$enable_warnings_as_errors;
51998fi
51999
52000
52001  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52002$as_echo_n "checking if native warnings are errors... " >&6; }
52003  if test "x$enable_warnings_as_errors" = "xyes"; then
52004    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
52005$as_echo "yes (explicitly set)" >&6; }
52006    WARNINGS_AS_ERRORS=true
52007  elif test "x$enable_warnings_as_errors" = "xno"; then
52008    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52009$as_echo "no" >&6; }
52010    WARNINGS_AS_ERRORS=false
52011  elif test "x$enable_warnings_as_errors" = "x"; then
52012    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52013$as_echo "yes (default)" >&6; }
52014    WARNINGS_AS_ERRORS=true
52015  else
52016    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52017  fi
52018
52019  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
52020    # Set legacy hotspot variable
52021    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
52022  else
52023    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
52024  fi
52025
52026
52027
52028
52029  case "${TOOLCHAIN_TYPE}" in
52030    microsoft)
52031      DISABLE_WARNING_PREFIX="-wd"
52032      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52033      ;;
52034    solstudio)
52035      DISABLE_WARNING_PREFIX="-erroff="
52036      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52037      ;;
52038    gcc)
52039      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
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
52090
52091
52092
52093
52094
52095
52096
52097
52098
52099
52100
52101
52102
52103
52104
52105
52106
52107
52108
52109
52110
52111
52112
52113
52114
52115
52116
52117
52118
52119
52120
52121
52122
52123
52124
52125
52126
52127
52128
52129
52130
52131
52132
52133
52134
52135
52136    # Execute function body
52137
52138  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52139$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52140  supports=yes
52141
52142  saved_cflags="$CFLAGS"
52143  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52144  ac_ext=c
52145ac_cpp='$CPP $CPPFLAGS'
52146ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52147ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52148ac_compiler_gnu=$ac_cv_c_compiler_gnu
52149
52150  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52151/* end confdefs.h.  */
52152int i;
52153_ACEOF
52154if ac_fn_c_try_compile "$LINENO"; then :
52155
52156else
52157  supports=no
52158fi
52159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52160  ac_ext=cpp
52161ac_cpp='$CXXCPP $CPPFLAGS'
52162ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52163ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52164ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52165
52166  CFLAGS="$saved_cflags"
52167
52168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52169$as_echo "$supports" >&6; }
52170  if test "x$supports" = "xyes" ; then
52171    :
52172    C_COMP_SUPPORTS="yes"
52173  else
52174    :
52175    C_COMP_SUPPORTS="no"
52176  fi
52177
52178
52179
52180
52181
52182
52183
52184
52185
52186
52187
52188
52189
52190
52191
52192
52193
52194
52195
52196
52197
52198
52199
52200
52201
52202
52203
52204
52205
52206
52207
52208
52209
52210
52211
52212
52213
52214
52215
52216
52217
52218
52219
52220
52221
52222
52223
52224
52225
52226
52227
52228
52229
52230
52231
52232
52233
52234
52235
52236    # Execute function body
52237
52238  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52239$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52240  supports=yes
52241
52242  saved_cxxflags="$CXXFLAGS"
52243  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52244  ac_ext=cpp
52245ac_cpp='$CXXCPP $CPPFLAGS'
52246ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52247ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52248ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52249
52250  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52251/* end confdefs.h.  */
52252int i;
52253_ACEOF
52254if ac_fn_cxx_try_compile "$LINENO"; then :
52255
52256else
52257  supports=no
52258fi
52259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52260  ac_ext=cpp
52261ac_cpp='$CXXCPP $CPPFLAGS'
52262ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52263ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52264ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52265
52266  CXXFLAGS="$saved_cxxflags"
52267
52268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52269$as_echo "$supports" >&6; }
52270  if test "x$supports" = "xyes" ; then
52271    :
52272    CXX_COMP_SUPPORTS="yes"
52273  else
52274    :
52275    CXX_COMP_SUPPORTS="no"
52276  fi
52277
52278
52279
52280
52281
52282
52283
52284
52285
52286
52287
52288
52289
52290  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52291$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52292  supports=no
52293  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52294
52295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52296$as_echo "$supports" >&6; }
52297  if test "x$supports" = "xyes" ; then
52298    :
52299    GCC_CAN_DISABLE_WARNINGS=true
52300  else
52301    :
52302    GCC_CAN_DISABLE_WARNINGS=false
52303
52304  fi
52305
52306
52307
52308
52309
52310
52311      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52312        DISABLE_WARNING_PREFIX="-Wno-"
52313      else
52314        DISABLE_WARNING_PREFIX=
52315      fi
52316      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52317      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52318      # CFLAGS since any target specific flags will likely not work with the
52319      # build compiler
52320      CC_OLD="$CC"
52321      CXX_OLD="$CXX"
52322      CC="$BUILD_CC"
52323      CXX="$BUILD_CXX"
52324      CFLAGS_OLD="$CFLAGS"
52325      CFLAGS=""
52326
52327
52328
52329
52330
52331
52332
52333
52334
52335
52336
52337
52338
52339
52340
52341
52342
52343
52344
52345
52346
52347
52348
52349
52350
52351
52352
52353
52354
52355
52356
52357
52358
52359
52360
52361
52362
52363
52364
52365
52366
52367
52368
52369
52370
52371
52372
52373    # Execute function body
52374
52375
52376
52377
52378
52379
52380
52381
52382
52383
52384
52385
52386
52387
52388
52389
52390
52391
52392
52393
52394
52395
52396
52397
52398
52399
52400
52401
52402
52403
52404
52405
52406
52407
52408
52409
52410
52411
52412
52413
52414
52415
52416
52417
52418
52419
52420
52421
52422    # Execute function body
52423
52424  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52425$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52426  supports=yes
52427
52428  saved_cflags="$CFLAGS"
52429  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52430  ac_ext=c
52431ac_cpp='$CPP $CPPFLAGS'
52432ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52433ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52434ac_compiler_gnu=$ac_cv_c_compiler_gnu
52435
52436  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52437/* end confdefs.h.  */
52438int i;
52439_ACEOF
52440if ac_fn_c_try_compile "$LINENO"; then :
52441
52442else
52443  supports=no
52444fi
52445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52446  ac_ext=cpp
52447ac_cpp='$CXXCPP $CPPFLAGS'
52448ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52449ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52450ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52451
52452  CFLAGS="$saved_cflags"
52453
52454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52455$as_echo "$supports" >&6; }
52456  if test "x$supports" = "xyes" ; then
52457    :
52458    C_COMP_SUPPORTS="yes"
52459  else
52460    :
52461    C_COMP_SUPPORTS="no"
52462  fi
52463
52464
52465
52466
52467
52468
52469
52470
52471
52472
52473
52474
52475
52476
52477
52478
52479
52480
52481
52482
52483
52484
52485
52486
52487
52488
52489
52490
52491
52492
52493
52494
52495
52496
52497
52498
52499
52500
52501
52502
52503
52504
52505
52506
52507
52508
52509
52510
52511
52512
52513
52514
52515
52516
52517
52518
52519
52520
52521
52522    # Execute function body
52523
52524  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52525$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52526  supports=yes
52527
52528  saved_cxxflags="$CXXFLAGS"
52529  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52530  ac_ext=cpp
52531ac_cpp='$CXXCPP $CPPFLAGS'
52532ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52533ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52534ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52535
52536  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52537/* end confdefs.h.  */
52538int i;
52539_ACEOF
52540if ac_fn_cxx_try_compile "$LINENO"; then :
52541
52542else
52543  supports=no
52544fi
52545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52546  ac_ext=cpp
52547ac_cpp='$CXXCPP $CPPFLAGS'
52548ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52549ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52550ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52551
52552  CXXFLAGS="$saved_cxxflags"
52553
52554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52555$as_echo "$supports" >&6; }
52556  if test "x$supports" = "xyes" ; then
52557    :
52558    CXX_COMP_SUPPORTS="yes"
52559  else
52560    :
52561    CXX_COMP_SUPPORTS="no"
52562  fi
52563
52564
52565
52566
52567
52568
52569
52570
52571
52572
52573
52574
52575
52576  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52577$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52578  supports=no
52579  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52580
52581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52582$as_echo "$supports" >&6; }
52583  if test "x$supports" = "xyes" ; then
52584    :
52585    BUILD_CC_CAN_DISABLE_WARNINGS=true
52586  else
52587    :
52588    BUILD_CC_CAN_DISABLE_WARNINGS=false
52589
52590  fi
52591
52592
52593
52594
52595
52596
52597      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52598        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52599      else
52600        BUILD_CC_DISABLE_WARNING_PREFIX=
52601      fi
52602      CC="$CC_OLD"
52603      CXX="$CXX_OLD"
52604      CFLAGS="$CFLAGS_OLD"
52605      ;;
52606    clang)
52607      DISABLE_WARNING_PREFIX="-Wno-"
52608      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52609      ;;
52610    xlc)
52611      DISABLE_WARNING_PREFIX="-qsuppress="
52612      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52613      ;;
52614  esac
52615
52616
52617
52618
52619
52620# Setup debug symbols (need objcopy from the toolchain for that)
52621
52622  #
52623  # NATIVE_DEBUG_SYMBOLS
52624  # This must be done after the toolchain is setup, since we're looking at objcopy.
52625  #
52626  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52627$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52628
52629# Check whether --with-native-debug-symbols was given.
52630if test "${with_native_debug_symbols+set}" = set; then :
52631  withval=$with_native_debug_symbols;
52632        if test "x$OPENJDK_TARGET_OS" = xaix; then
52633          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52634            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52635          fi
52636        fi
52637
52638else
52639
52640        if test "x$OPENJDK_TARGET_OS" = xaix; then
52641          # AIX doesn't support 'zipped' so use 'internal' as default
52642          with_native_debug_symbols="internal"
52643        else
52644          if test "x$STATIC_BUILD" = xtrue; then
52645            with_native_debug_symbols="none"
52646          else
52647            with_native_debug_symbols="zipped"
52648          fi
52649        fi
52650
52651fi
52652
52653  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52655$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52656
52657  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52658
52659    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52660      if test "x$OBJCOPY" = x; then
52661        # enabling of enable-debug-symbols and can't find objcopy
52662        # this is an error
52663        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52664      fi
52665    fi
52666
52667    COMPILE_WITH_DEBUG_SYMBOLS=true
52668    COPY_DEBUG_SYMBOLS=true
52669    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52670  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52671    COMPILE_WITH_DEBUG_SYMBOLS=false
52672    COPY_DEBUG_SYMBOLS=false
52673    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52674  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52675    COMPILE_WITH_DEBUG_SYMBOLS=true
52676    COPY_DEBUG_SYMBOLS=false
52677    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52678  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52679
52680    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52681      if test "x$OBJCOPY" = x; then
52682        # enabling of enable-debug-symbols and can't find objcopy
52683        # this is an error
52684        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52685      fi
52686    fi
52687
52688    COMPILE_WITH_DEBUG_SYMBOLS=true
52689    COPY_DEBUG_SYMBOLS=true
52690    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52691  else
52692    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52693  fi
52694
52695  # --enable-debug-symbols is deprecated.
52696  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52697
52698  # Check whether --enable-debug-symbols was given.
52699if test "${enable_debug_symbols+set}" = set; then :
52700  enableval=$enable_debug_symbols;
52701fi
52702
52703  if test "x$enable_debug_symbols" != x; then
52704    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52705$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52706
52707    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52708      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52709$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52710    fi
52711
52712  fi
52713
52714
52715  # --enable-zip-debug-info is deprecated.
52716  # Please use --with-native-debug-symbols=zipped .
52717
52718  # Check whether --enable-zip-debug-info was given.
52719if test "${enable_zip_debug_info+set}" = set; then :
52720  enableval=$enable_zip_debug_info;
52721fi
52722
52723  if test "x$enable_zip_debug_info" != x; then
52724    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52725$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52726
52727    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52728      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52729$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52730    fi
52731
52732  fi
52733
52734
52735
52736
52737
52738
52739
52740  # Check whether --enable-native-coverage was given.
52741if test "${enable_native_coverage+set}" = set; then :
52742  enableval=$enable_native_coverage;
52743fi
52744
52745  GCOV_ENABLED="false"
52746  if test "x$enable_native_coverage" = "xyes"; then
52747    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52748      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52749$as_echo_n "checking if native coverage is enabled... " >&6; }
52750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52751$as_echo "yes" >&6; }
52752      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52753      GCOV_LDFLAGS="-fprofile-arcs"
52754      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
52755      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
52756      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52757      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52758      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52759      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52760      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52761      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52762      GCOV_ENABLED="true"
52763    else
52764      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52765    fi
52766  elif test "x$enable_native_coverage" = "xno"; then
52767    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52768$as_echo_n "checking if native coverage is enabled... " >&6; }
52769    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52770$as_echo "no" >&6; }
52771  elif test "x$enable_native_coverage" != "x"; then
52772    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52773  fi
52774
52775
52776
52777
52778# Need toolchain to setup dtrace
52779
52780  # Test for dtrace dependencies
52781  # Check whether --enable-dtrace was given.
52782if test "${enable_dtrace+set}" = set; then :
52783  enableval=$enable_dtrace;
52784fi
52785
52786
52787  DTRACE_DEP_MISSING=false
52788
52789  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52790$as_echo_n "checking for dtrace tool... " >&6; }
52791  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52792    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52793$as_echo "$DTRACE" >&6; }
52794  else
52795    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52796$as_echo "not found, cannot build dtrace" >&6; }
52797    DTRACE_DEP_MISSING=true
52798  fi
52799
52800  for ac_header in sys/sdt.h
52801do :
52802  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52803if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52804  cat >>confdefs.h <<_ACEOF
52805#define HAVE_SYS_SDT_H 1
52806_ACEOF
52807 DTRACE_HEADERS_OK=yes
52808else
52809  DTRACE_HEADERS_OK=no
52810fi
52811
52812done
52813
52814  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52815    DTRACE_DEP_MISSING=true
52816  fi
52817
52818  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52819$as_echo_n "checking if dtrace should be built... " >&6; }
52820  if test "x$enable_dtrace" = "xyes"; then
52821    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52822      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52823$as_echo "no, missing dependencies" >&6; }
52824
52825  # Print a helpful message on how to acquire the necessary build dependency.
52826  # dtrace is the help tag: freetype, cups, alsa etc
52827  MISSING_DEPENDENCY=dtrace
52828
52829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52830    cygwin_help $MISSING_DEPENDENCY
52831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52832    msys_help $MISSING_DEPENDENCY
52833  else
52834    PKGHANDLER_COMMAND=
52835
52836    case $PKGHANDLER in
52837      apt-get)
52838        apt_help     $MISSING_DEPENDENCY ;;
52839      yum)
52840        yum_help     $MISSING_DEPENDENCY ;;
52841      brew)
52842        brew_help    $MISSING_DEPENDENCY ;;
52843      port)
52844        port_help    $MISSING_DEPENDENCY ;;
52845      pkgutil)
52846        pkgutil_help $MISSING_DEPENDENCY ;;
52847      pkgadd)
52848        pkgadd_help  $MISSING_DEPENDENCY ;;
52849    esac
52850
52851    if test "x$PKGHANDLER_COMMAND" != x; then
52852      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52853    fi
52854  fi
52855
52856      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52857    else
52858      INCLUDE_DTRACE=true
52859      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52860$as_echo "yes, forced" >&6; }
52861    fi
52862  elif test "x$enable_dtrace" = "xno"; then
52863    INCLUDE_DTRACE=false
52864    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52865$as_echo "no, forced" >&6; }
52866  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52867    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52868      INCLUDE_DTRACE=false
52869      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52870$as_echo "no, missing dependencies" >&6; }
52871    else
52872      INCLUDE_DTRACE=true
52873      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52874$as_echo "yes, dependencies present" >&6; }
52875    fi
52876  else
52877    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52878  fi
52879
52880
52881
52882  # Check whether --enable-aot was given.
52883if test "${enable_aot+set}" = set; then :
52884  enableval=$enable_aot;
52885fi
52886
52887
52888  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
52889    ENABLE_AOT="true"
52890  elif test "x$enable_aot" = "xyes"; then
52891    ENABLE_AOT="true"
52892  elif test "x$enable_aot" = "xno"; then
52893    ENABLE_AOT="false"
52894    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
52895$as_echo_n "checking if aot should be enabled... " >&6; }
52896    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52897$as_echo "no, forced" >&6; }
52898  else
52899    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
52900  fi
52901
52902  if test "x$ENABLE_AOT" = "xtrue"; then
52903    # Only enable AOT on X64 platforms.
52904    if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
52905      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
52906        if test -e "$HOTSPOT_TOPDIR/src/jdk.vm.compiler"; then
52907          ENABLE_AOT="true"
52908        else
52909          ENABLE_AOT="false"
52910          if test "x$enable_aot" = "xyes"; then
52911            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
52912          fi
52913        fi
52914      else
52915        ENABLE_AOT="false"
52916        if test "x$enable_aot" = "xyes"; then
52917          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
52918        fi
52919      fi
52920    else
52921      ENABLE_AOT="false"
52922      if test "x$enable_aot" = "xyes"; then
52923        as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
52924      fi
52925    fi
52926  fi
52927
52928
52929
52930
52931  # Check whether --enable-hotspot-gtest was given.
52932if test "${enable_hotspot_gtest+set}" = set; then :
52933  enableval=$enable_hotspot_gtest;
52934fi
52935
52936
52937  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52938    GTEST_DIR_EXISTS="true"
52939  else
52940    GTEST_DIR_EXISTS="false"
52941  fi
52942
52943  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52944$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52945  if test "x$enable_hotspot_gtest" = "xyes"; then
52946    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52947      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52948$as_echo "yes, forced" >&6; }
52949      BUILD_GTEST="true"
52950    else
52951      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52952    fi
52953  elif test "x$enable_hotspot_gtest" = "xno"; then
52954    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52955$as_echo "no, forced" >&6; }
52956    BUILD_GTEST="false"
52957  elif test "x$enable_hotspot_gtest" = "x"; then
52958    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52959      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52960$as_echo "yes" >&6; }
52961      BUILD_GTEST="true"
52962    else
52963      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52964$as_echo "no" >&6; }
52965      BUILD_GTEST="false"
52966    fi
52967  else
52968    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52969  fi
52970
52971
52972
52973
52974###############################################################################
52975#
52976# Check dependencies for external and internal libraries.
52977#
52978###############################################################################
52979
52980# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52981
52982  # When using cygwin or msys, we need a wrapper binary that renames
52983  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52984  # @files and rewrites these too! This wrapper binary is
52985  # called fixpath.
52986  FIXPATH=
52987  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52988    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52989$as_echo_n "checking if fixpath can be created... " >&6; }
52990    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52991    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52992    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52993    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52994      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52995      FIXPATH="$FIXPATH_BIN -c"
52996    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52997      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52998      # @ was chosen as separator to minimize risk of other tools messing around with it
52999      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53000          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53001      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53002      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53003    fi
53004    FIXPATH_SRC_W="$FIXPATH_SRC"
53005    FIXPATH_BIN_W="$FIXPATH_BIN"
53006
53007  unix_path="$FIXPATH_SRC_W"
53008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53009    windows_path=`$CYGPATH -m "$unix_path"`
53010    FIXPATH_SRC_W="$windows_path"
53011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53012    windows_path=`cmd //c echo $unix_path`
53013    FIXPATH_SRC_W="$windows_path"
53014  fi
53015
53016
53017  unix_path="$FIXPATH_BIN_W"
53018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53019    windows_path=`$CYGPATH -m "$unix_path"`
53020    FIXPATH_BIN_W="$windows_path"
53021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53022    windows_path=`cmd //c echo $unix_path`
53023    FIXPATH_BIN_W="$windows_path"
53024  fi
53025
53026    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53027    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53028    cd $FIXPATH_DIR
53029    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53030    cd $CURDIR
53031
53032    if test ! -x $FIXPATH_BIN; then
53033      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53034$as_echo "no" >&6; }
53035      cat $FIXPATH_DIR/fixpath1.log
53036      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53037    fi
53038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53039$as_echo "yes" >&6; }
53040    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53041$as_echo_n "checking if fixpath.exe works... " >&6; }
53042    cd $FIXPATH_DIR
53043    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53044        > $FIXPATH_DIR/fixpath2.log 2>&1
53045    cd $CURDIR
53046    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53047      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53048$as_echo "no" >&6; }
53049      cat $FIXPATH_DIR/fixpath2.log
53050      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53051    fi
53052    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53053$as_echo "yes" >&6; }
53054
53055    FIXPATH_DETACH_FLAG="--detach"
53056  fi
53057
53058
53059
53060
53061
53062
53063  # Check if X11 is needed
53064  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53065    # No X11 support on windows or macosx
53066    NEEDS_LIB_X11=false
53067  else
53068    # All other instances need X11, even if building headless only, libawt still
53069    # needs X11 headers.
53070    NEEDS_LIB_X11=true
53071  fi
53072
53073  # Check if cups is needed
53074  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53075    # Windows have a separate print system
53076    NEEDS_LIB_CUPS=false
53077  else
53078    NEEDS_LIB_CUPS=true
53079  fi
53080
53081  # A custom hook may have set this already
53082  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53083    NEEDS_LIB_FREETYPE=true
53084  fi
53085
53086  # Check if alsa is needed
53087  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53088    NEEDS_LIB_ALSA=true
53089  else
53090    NEEDS_LIB_ALSA=false
53091  fi
53092
53093  # Check if ffi is needed
53094  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53095    NEEDS_LIB_FFI=true
53096  else
53097    NEEDS_LIB_FFI=false
53098  fi
53099
53100
53101  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53102  # dynamic build is configured on command line.
53103
53104# Check whether --with-stdc++lib was given.
53105if test "${with_stdc__lib+set}" = set; then :
53106  withval=$with_stdc__lib;
53107        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53108                && test "x$with_stdc__lib" != xdefault; then
53109          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53110        fi
53111
53112else
53113  with_stdc__lib=default
53114
53115fi
53116
53117
53118  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53119    # Test if stdc++ can be linked statically.
53120    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53121$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53122    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53123    ac_ext=cpp
53124ac_cpp='$CXXCPP $CPPFLAGS'
53125ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53126ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53127ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53128
53129    OLD_LIBS="$LIBS"
53130    LIBS="$STATIC_STDCXX_FLAGS"
53131    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53132/* end confdefs.h.  */
53133
53134int
53135main ()
53136{
53137return 0;
53138  ;
53139  return 0;
53140}
53141_ACEOF
53142if ac_fn_cxx_try_link "$LINENO"; then :
53143  has_static_libstdcxx=yes
53144else
53145  has_static_libstdcxx=no
53146fi
53147rm -f core conftest.err conftest.$ac_objext \
53148    conftest$ac_exeext conftest.$ac_ext
53149    LIBS="$OLD_LIBS"
53150    ac_ext=cpp
53151ac_cpp='$CXXCPP $CPPFLAGS'
53152ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53153ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53154ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53155
53156    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53157$as_echo "$has_static_libstdcxx" >&6; }
53158
53159    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53160      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53161    fi
53162
53163    # If dynamic was requested, it's available since it would fail above otherwise.
53164    # If dynamic wasn't requested, go with static unless it isn't available.
53165    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53166$as_echo_n "checking how to link with libstdc++... " >&6; }
53167    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53168        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53169      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53170$as_echo "dynamic" >&6; }
53171    else
53172      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53173      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53174      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53175      # just use the same setting as for the TARGET toolchain.
53176      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53177      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53178$as_echo "static" >&6; }
53179    fi
53180  fi
53181
53182  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53183  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53184    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53185  fi
53186
53187
53188
53189  # Setup Windows runtime dlls
53190  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53191
53192
53193# Check whether --with-msvcr-dll was given.
53194if test "${with_msvcr_dll+set}" = set; then :
53195  withval=$with_msvcr_dll;
53196fi
53197
53198
53199  if test "x$with_msvcr_dll" != x; then
53200    # If given explicitly by user, do not probe. If not present, fail directly.
53201
53202  DLL_NAME="$MSVCR_NAME"
53203  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53204  METHOD="--with-msvcr-dll"
53205  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53206    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53207$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53208
53209    # Need to check if the found msvcr is correct architecture
53210    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53211$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53212    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53213    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53214      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53215      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53216      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53217        CORRECT_MSVCR_ARCH="PE32 executable"
53218      else
53219        CORRECT_MSVCR_ARCH="PE32+ executable"
53220      fi
53221    else
53222      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53223        CORRECT_MSVCR_ARCH=386
53224      else
53225        CORRECT_MSVCR_ARCH=x86-64
53226      fi
53227    fi
53228    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53229      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53230$as_echo "ok" >&6; }
53231      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53232
53233  # Only process if variable expands to non-empty
53234
53235  if test "x$MSVC_DLL" != x; then
53236    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53237
53238  # Input might be given as Windows format, start by converting to
53239  # unix format.
53240  path="$MSVC_DLL"
53241  new_path=`$CYGPATH -u "$path"`
53242
53243  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53244  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53245  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53246  # "foo.exe" is OK but "foo" is an error.
53247  #
53248  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53249  # It is also a way to make sure we got the proper file name for the real test later on.
53250  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53251  if test "x$test_shortpath" = x; then
53252    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53253$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53254    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53255  fi
53256
53257  # Call helper function which possibly converts this using DOS-style short mode.
53258  # If so, the updated path is stored in $new_path.
53259
53260  input_path="$new_path"
53261  # Check if we need to convert this using DOS-style short mode. If the path
53262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53263  # take no chances and rewrite it.
53264  # Note: m4 eats our [], so we need to use [ and ] instead.
53265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53266  if test "x$has_forbidden_chars" != x; then
53267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53268    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53269    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53270    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53271      # Going to short mode and back again did indeed matter. Since short mode is
53272      # case insensitive, let's make it lowercase to improve readability.
53273      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53274      # Now convert it back to Unix-style (cygpath)
53275      input_path=`$CYGPATH -u "$shortmode_path"`
53276      new_path="$input_path"
53277    fi
53278  fi
53279
53280  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53281  if test "x$test_cygdrive_prefix" = x; then
53282    # As a simple fix, exclude /usr/bin since it's not a real path.
53283    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53284      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53285      # a path prefixed by /cygdrive for fixpath to work.
53286      new_path="$CYGWIN_ROOT_PATH$input_path"
53287    fi
53288  fi
53289
53290
53291  if test "x$path" != "x$new_path"; then
53292    MSVC_DLL="$new_path"
53293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53294$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53295  fi
53296
53297    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53298
53299  path="$MSVC_DLL"
53300  has_colon=`$ECHO $path | $GREP ^.:`
53301  new_path="$path"
53302  if test "x$has_colon" = x; then
53303    # Not in mixed or Windows style, start by that.
53304    new_path=`cmd //c echo $path`
53305  fi
53306
53307
53308  input_path="$new_path"
53309  # Check if we need to convert this using DOS-style short mode. If the path
53310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53311  # take no chances and rewrite it.
53312  # Note: m4 eats our [], so we need to use [ and ] instead.
53313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53314  if test "x$has_forbidden_chars" != x; then
53315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53316    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53317  fi
53318
53319
53320  windows_path="$new_path"
53321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53322    unix_path=`$CYGPATH -u "$windows_path"`
53323    new_path="$unix_path"
53324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53326    new_path="$unix_path"
53327  fi
53328
53329  if test "x$path" != "x$new_path"; then
53330    MSVC_DLL="$new_path"
53331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53332$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53333  fi
53334
53335  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53336  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53337
53338    else
53339      # We're on a unix platform. Hooray! :)
53340      path="$MSVC_DLL"
53341      has_space=`$ECHO "$path" | $GREP " "`
53342      if test "x$has_space" != x; then
53343        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53344$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53345        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53346      fi
53347
53348      # Use eval to expand a potential ~
53349      eval path="$path"
53350      if test ! -f "$path" && test ! -d "$path"; then
53351        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53352      fi
53353
53354      if test -d "$path"; then
53355        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53356      else
53357        dir="`$DIRNAME "$path"`"
53358        base="`$BASENAME "$path"`"
53359        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53360      fi
53361    fi
53362  fi
53363
53364      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53365$as_echo_n "checking for $DLL_NAME... " >&6; }
53366      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53367$as_echo "$MSVC_DLL" >&6; }
53368    else
53369      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53370$as_echo "incorrect, ignoring" >&6; }
53371      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53372$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53373    fi
53374  fi
53375
53376    if test "x$MSVC_DLL" = x; then
53377      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53378    fi
53379    MSVCR_DLL="$MSVC_DLL"
53380  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53381
53382  DLL_NAME="$MSVCR_NAME"
53383  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53384  METHOD="devkit"
53385  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53386    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53387$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53388
53389    # Need to check if the found msvcr is correct architecture
53390    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53391$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53392    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53393    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53394      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53395      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53396      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53397        CORRECT_MSVCR_ARCH="PE32 executable"
53398      else
53399        CORRECT_MSVCR_ARCH="PE32+ executable"
53400      fi
53401    else
53402      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53403        CORRECT_MSVCR_ARCH=386
53404      else
53405        CORRECT_MSVCR_ARCH=x86-64
53406      fi
53407    fi
53408    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53409      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53410$as_echo "ok" >&6; }
53411      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53412
53413  # Only process if variable expands to non-empty
53414
53415  if test "x$MSVC_DLL" != x; then
53416    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53417
53418  # Input might be given as Windows format, start by converting to
53419  # unix format.
53420  path="$MSVC_DLL"
53421  new_path=`$CYGPATH -u "$path"`
53422
53423  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53424  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53425  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53426  # "foo.exe" is OK but "foo" is an error.
53427  #
53428  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53429  # It is also a way to make sure we got the proper file name for the real test later on.
53430  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53431  if test "x$test_shortpath" = x; then
53432    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53433$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53434    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53435  fi
53436
53437  # Call helper function which possibly converts this using DOS-style short mode.
53438  # If so, the updated path is stored in $new_path.
53439
53440  input_path="$new_path"
53441  # Check if we need to convert this using DOS-style short mode. If the path
53442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53443  # take no chances and rewrite it.
53444  # Note: m4 eats our [], so we need to use [ and ] instead.
53445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53446  if test "x$has_forbidden_chars" != x; then
53447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53448    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53449    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53450    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53451      # Going to short mode and back again did indeed matter. Since short mode is
53452      # case insensitive, let's make it lowercase to improve readability.
53453      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53454      # Now convert it back to Unix-style (cygpath)
53455      input_path=`$CYGPATH -u "$shortmode_path"`
53456      new_path="$input_path"
53457    fi
53458  fi
53459
53460  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53461  if test "x$test_cygdrive_prefix" = x; then
53462    # As a simple fix, exclude /usr/bin since it's not a real path.
53463    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53464      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53465      # a path prefixed by /cygdrive for fixpath to work.
53466      new_path="$CYGWIN_ROOT_PATH$input_path"
53467    fi
53468  fi
53469
53470
53471  if test "x$path" != "x$new_path"; then
53472    MSVC_DLL="$new_path"
53473    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53474$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53475  fi
53476
53477    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53478
53479  path="$MSVC_DLL"
53480  has_colon=`$ECHO $path | $GREP ^.:`
53481  new_path="$path"
53482  if test "x$has_colon" = x; then
53483    # Not in mixed or Windows style, start by that.
53484    new_path=`cmd //c echo $path`
53485  fi
53486
53487
53488  input_path="$new_path"
53489  # Check if we need to convert this using DOS-style short mode. If the path
53490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53491  # take no chances and rewrite it.
53492  # Note: m4 eats our [], so we need to use [ and ] instead.
53493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53494  if test "x$has_forbidden_chars" != x; then
53495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53496    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53497  fi
53498
53499
53500  windows_path="$new_path"
53501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53502    unix_path=`$CYGPATH -u "$windows_path"`
53503    new_path="$unix_path"
53504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53506    new_path="$unix_path"
53507  fi
53508
53509  if test "x$path" != "x$new_path"; then
53510    MSVC_DLL="$new_path"
53511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53512$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53513  fi
53514
53515  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53516  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53517
53518    else
53519      # We're on a unix platform. Hooray! :)
53520      path="$MSVC_DLL"
53521      has_space=`$ECHO "$path" | $GREP " "`
53522      if test "x$has_space" != x; then
53523        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53524$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53525        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53526      fi
53527
53528      # Use eval to expand a potential ~
53529      eval path="$path"
53530      if test ! -f "$path" && test ! -d "$path"; then
53531        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53532      fi
53533
53534      if test -d "$path"; then
53535        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53536      else
53537        dir="`$DIRNAME "$path"`"
53538        base="`$BASENAME "$path"`"
53539        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53540      fi
53541    fi
53542  fi
53543
53544      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53545$as_echo_n "checking for $DLL_NAME... " >&6; }
53546      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53547$as_echo "$MSVC_DLL" >&6; }
53548    else
53549      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53550$as_echo "incorrect, ignoring" >&6; }
53551      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53552$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53553    fi
53554  fi
53555
53556    if test "x$MSVC_DLL" = x; then
53557      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53558    fi
53559    MSVCR_DLL="$MSVC_DLL"
53560  else
53561
53562  DLL_NAME="${MSVCR_NAME}"
53563  MSVC_DLL=
53564
53565  if test "x$MSVC_DLL" = x; then
53566    # Probe: Using well-known location from Visual Studio 10.0
53567    if test "x$VCINSTALLDIR" != x; then
53568      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53569
53570  windows_path="$CYGWIN_VC_INSTALL_DIR"
53571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53572    unix_path=`$CYGPATH -u "$windows_path"`
53573    CYGWIN_VC_INSTALL_DIR="$unix_path"
53574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53576    CYGWIN_VC_INSTALL_DIR="$unix_path"
53577  fi
53578
53579      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53580        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53581      else
53582        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53583      fi
53584      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53585
53586  DLL_NAME="$DLL_NAME"
53587  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53588  METHOD="well-known location in VCINSTALLDIR"
53589  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53590    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53591$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53592
53593    # Need to check if the found msvcr is correct architecture
53594    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53595$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53596    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53597    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53598      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53599      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53600      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53601        CORRECT_MSVCR_ARCH="PE32 executable"
53602      else
53603        CORRECT_MSVCR_ARCH="PE32+ executable"
53604      fi
53605    else
53606      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53607        CORRECT_MSVCR_ARCH=386
53608      else
53609        CORRECT_MSVCR_ARCH=x86-64
53610      fi
53611    fi
53612    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53613      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53614$as_echo "ok" >&6; }
53615      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53616
53617  # Only process if variable expands to non-empty
53618
53619  if test "x$MSVC_DLL" != x; then
53620    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53621
53622  # Input might be given as Windows format, start by converting to
53623  # unix format.
53624  path="$MSVC_DLL"
53625  new_path=`$CYGPATH -u "$path"`
53626
53627  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53628  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53629  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53630  # "foo.exe" is OK but "foo" is an error.
53631  #
53632  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53633  # It is also a way to make sure we got the proper file name for the real test later on.
53634  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53635  if test "x$test_shortpath" = x; then
53636    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53637$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53638    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53639  fi
53640
53641  # Call helper function which possibly converts this using DOS-style short mode.
53642  # If so, the updated path is stored in $new_path.
53643
53644  input_path="$new_path"
53645  # Check if we need to convert this using DOS-style short mode. If the path
53646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53647  # take no chances and rewrite it.
53648  # Note: m4 eats our [], so we need to use [ and ] instead.
53649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53650  if test "x$has_forbidden_chars" != x; then
53651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53652    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53653    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53654    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53655      # Going to short mode and back again did indeed matter. Since short mode is
53656      # case insensitive, let's make it lowercase to improve readability.
53657      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53658      # Now convert it back to Unix-style (cygpath)
53659      input_path=`$CYGPATH -u "$shortmode_path"`
53660      new_path="$input_path"
53661    fi
53662  fi
53663
53664  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53665  if test "x$test_cygdrive_prefix" = x; then
53666    # As a simple fix, exclude /usr/bin since it's not a real path.
53667    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53668      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53669      # a path prefixed by /cygdrive for fixpath to work.
53670      new_path="$CYGWIN_ROOT_PATH$input_path"
53671    fi
53672  fi
53673
53674
53675  if test "x$path" != "x$new_path"; then
53676    MSVC_DLL="$new_path"
53677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53678$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53679  fi
53680
53681    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53682
53683  path="$MSVC_DLL"
53684  has_colon=`$ECHO $path | $GREP ^.:`
53685  new_path="$path"
53686  if test "x$has_colon" = x; then
53687    # Not in mixed or Windows style, start by that.
53688    new_path=`cmd //c echo $path`
53689  fi
53690
53691
53692  input_path="$new_path"
53693  # Check if we need to convert this using DOS-style short mode. If the path
53694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53695  # take no chances and rewrite it.
53696  # Note: m4 eats our [], so we need to use [ and ] instead.
53697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53698  if test "x$has_forbidden_chars" != x; then
53699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53700    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53701  fi
53702
53703
53704  windows_path="$new_path"
53705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53706    unix_path=`$CYGPATH -u "$windows_path"`
53707    new_path="$unix_path"
53708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53710    new_path="$unix_path"
53711  fi
53712
53713  if test "x$path" != "x$new_path"; then
53714    MSVC_DLL="$new_path"
53715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53716$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53717  fi
53718
53719  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53720  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53721
53722    else
53723      # We're on a unix platform. Hooray! :)
53724      path="$MSVC_DLL"
53725      has_space=`$ECHO "$path" | $GREP " "`
53726      if test "x$has_space" != x; then
53727        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53728$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53729        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53730      fi
53731
53732      # Use eval to expand a potential ~
53733      eval path="$path"
53734      if test ! -f "$path" && test ! -d "$path"; then
53735        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53736      fi
53737
53738      if test -d "$path"; then
53739        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53740      else
53741        dir="`$DIRNAME "$path"`"
53742        base="`$BASENAME "$path"`"
53743        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53744      fi
53745    fi
53746  fi
53747
53748      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53749$as_echo_n "checking for $DLL_NAME... " >&6; }
53750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53751$as_echo "$MSVC_DLL" >&6; }
53752    else
53753      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53754$as_echo "incorrect, ignoring" >&6; }
53755      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53756$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53757    fi
53758  fi
53759
53760    fi
53761  fi
53762
53763  if test "x$MSVC_DLL" = x; then
53764    # Probe: Check in the Boot JDK directory.
53765    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53766
53767  DLL_NAME="$DLL_NAME"
53768  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53769  METHOD="well-known location in Boot JDK"
53770  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53771    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53772$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53773
53774    # Need to check if the found msvcr is correct architecture
53775    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53776$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53777    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53778    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53779      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53780      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53781      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53782        CORRECT_MSVCR_ARCH="PE32 executable"
53783      else
53784        CORRECT_MSVCR_ARCH="PE32+ executable"
53785      fi
53786    else
53787      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53788        CORRECT_MSVCR_ARCH=386
53789      else
53790        CORRECT_MSVCR_ARCH=x86-64
53791      fi
53792    fi
53793    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53794      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53795$as_echo "ok" >&6; }
53796      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53797
53798  # Only process if variable expands to non-empty
53799
53800  if test "x$MSVC_DLL" != x; then
53801    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53802
53803  # Input might be given as Windows format, start by converting to
53804  # unix format.
53805  path="$MSVC_DLL"
53806  new_path=`$CYGPATH -u "$path"`
53807
53808  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53809  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53810  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53811  # "foo.exe" is OK but "foo" is an error.
53812  #
53813  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53814  # It is also a way to make sure we got the proper file name for the real test later on.
53815  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53816  if test "x$test_shortpath" = x; then
53817    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53818$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53819    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53820  fi
53821
53822  # Call helper function which possibly converts this using DOS-style short mode.
53823  # If so, the updated path is stored in $new_path.
53824
53825  input_path="$new_path"
53826  # Check if we need to convert this using DOS-style short mode. If the path
53827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53828  # take no chances and rewrite it.
53829  # Note: m4 eats our [], so we need to use [ and ] instead.
53830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53831  if test "x$has_forbidden_chars" != x; then
53832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53836      # Going to short mode and back again did indeed matter. Since short mode is
53837      # case insensitive, let's make it lowercase to improve readability.
53838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53839      # Now convert it back to Unix-style (cygpath)
53840      input_path=`$CYGPATH -u "$shortmode_path"`
53841      new_path="$input_path"
53842    fi
53843  fi
53844
53845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53846  if test "x$test_cygdrive_prefix" = x; then
53847    # As a simple fix, exclude /usr/bin since it's not a real path.
53848    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53850      # a path prefixed by /cygdrive for fixpath to work.
53851      new_path="$CYGWIN_ROOT_PATH$input_path"
53852    fi
53853  fi
53854
53855
53856  if test "x$path" != "x$new_path"; then
53857    MSVC_DLL="$new_path"
53858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53859$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53860  fi
53861
53862    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53863
53864  path="$MSVC_DLL"
53865  has_colon=`$ECHO $path | $GREP ^.:`
53866  new_path="$path"
53867  if test "x$has_colon" = x; then
53868    # Not in mixed or Windows style, start by that.
53869    new_path=`cmd //c echo $path`
53870  fi
53871
53872
53873  input_path="$new_path"
53874  # Check if we need to convert this using DOS-style short mode. If the path
53875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53876  # take no chances and rewrite it.
53877  # Note: m4 eats our [], so we need to use [ and ] instead.
53878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53879  if test "x$has_forbidden_chars" != x; then
53880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53881    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53882  fi
53883
53884
53885  windows_path="$new_path"
53886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53887    unix_path=`$CYGPATH -u "$windows_path"`
53888    new_path="$unix_path"
53889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53891    new_path="$unix_path"
53892  fi
53893
53894  if test "x$path" != "x$new_path"; then
53895    MSVC_DLL="$new_path"
53896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53897$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53898  fi
53899
53900  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53901  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53902
53903    else
53904      # We're on a unix platform. Hooray! :)
53905      path="$MSVC_DLL"
53906      has_space=`$ECHO "$path" | $GREP " "`
53907      if test "x$has_space" != x; then
53908        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53909$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53910        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53911      fi
53912
53913      # Use eval to expand a potential ~
53914      eval path="$path"
53915      if test ! -f "$path" && test ! -d "$path"; then
53916        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53917      fi
53918
53919      if test -d "$path"; then
53920        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53921      else
53922        dir="`$DIRNAME "$path"`"
53923        base="`$BASENAME "$path"`"
53924        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53925      fi
53926    fi
53927  fi
53928
53929      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53930$as_echo_n "checking for $DLL_NAME... " >&6; }
53931      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53932$as_echo "$MSVC_DLL" >&6; }
53933    else
53934      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53935$as_echo "incorrect, ignoring" >&6; }
53936      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53937$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53938    fi
53939  fi
53940
53941  fi
53942
53943  if test "x$MSVC_DLL" = x; then
53944    # Probe: Look in the Windows system32 directory
53945    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53946
53947  windows_path="$CYGWIN_SYSTEMROOT"
53948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53949    unix_path=`$CYGPATH -u "$windows_path"`
53950    CYGWIN_SYSTEMROOT="$unix_path"
53951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53953    CYGWIN_SYSTEMROOT="$unix_path"
53954  fi
53955
53956    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53957
53958  DLL_NAME="$DLL_NAME"
53959  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53960  METHOD="well-known location in SYSTEMROOT"
53961  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53962    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53963$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53964
53965    # Need to check if the found msvcr is correct architecture
53966    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53967$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53968    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53969    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53970      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53971      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53972      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53973        CORRECT_MSVCR_ARCH="PE32 executable"
53974      else
53975        CORRECT_MSVCR_ARCH="PE32+ executable"
53976      fi
53977    else
53978      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53979        CORRECT_MSVCR_ARCH=386
53980      else
53981        CORRECT_MSVCR_ARCH=x86-64
53982      fi
53983    fi
53984    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53985      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53986$as_echo "ok" >&6; }
53987      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53988
53989  # Only process if variable expands to non-empty
53990
53991  if test "x$MSVC_DLL" != x; then
53992    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53993
53994  # Input might be given as Windows format, start by converting to
53995  # unix format.
53996  path="$MSVC_DLL"
53997  new_path=`$CYGPATH -u "$path"`
53998
53999  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54000  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54001  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54002  # "foo.exe" is OK but "foo" is an error.
54003  #
54004  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54005  # It is also a way to make sure we got the proper file name for the real test later on.
54006  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54007  if test "x$test_shortpath" = x; then
54008    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54009$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54010    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54011  fi
54012
54013  # Call helper function which possibly converts this using DOS-style short mode.
54014  # If so, the updated path is stored in $new_path.
54015
54016  input_path="$new_path"
54017  # Check if we need to convert this using DOS-style short mode. If the path
54018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54019  # take no chances and rewrite it.
54020  # Note: m4 eats our [], so we need to use [ and ] instead.
54021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54022  if test "x$has_forbidden_chars" != x; then
54023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54024    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54025    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54026    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54027      # Going to short mode and back again did indeed matter. Since short mode is
54028      # case insensitive, let's make it lowercase to improve readability.
54029      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54030      # Now convert it back to Unix-style (cygpath)
54031      input_path=`$CYGPATH -u "$shortmode_path"`
54032      new_path="$input_path"
54033    fi
54034  fi
54035
54036  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54037  if test "x$test_cygdrive_prefix" = x; then
54038    # As a simple fix, exclude /usr/bin since it's not a real path.
54039    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54040      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54041      # a path prefixed by /cygdrive for fixpath to work.
54042      new_path="$CYGWIN_ROOT_PATH$input_path"
54043    fi
54044  fi
54045
54046
54047  if test "x$path" != "x$new_path"; then
54048    MSVC_DLL="$new_path"
54049    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54050$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54051  fi
54052
54053    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54054
54055  path="$MSVC_DLL"
54056  has_colon=`$ECHO $path | $GREP ^.:`
54057  new_path="$path"
54058  if test "x$has_colon" = x; then
54059    # Not in mixed or Windows style, start by that.
54060    new_path=`cmd //c echo $path`
54061  fi
54062
54063
54064  input_path="$new_path"
54065  # Check if we need to convert this using DOS-style short mode. If the path
54066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54067  # take no chances and rewrite it.
54068  # Note: m4 eats our [], so we need to use [ and ] instead.
54069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54070  if test "x$has_forbidden_chars" != x; then
54071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54072    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54073  fi
54074
54075
54076  windows_path="$new_path"
54077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54078    unix_path=`$CYGPATH -u "$windows_path"`
54079    new_path="$unix_path"
54080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54082    new_path="$unix_path"
54083  fi
54084
54085  if test "x$path" != "x$new_path"; then
54086    MSVC_DLL="$new_path"
54087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54088$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54089  fi
54090
54091  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54092  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54093
54094    else
54095      # We're on a unix platform. Hooray! :)
54096      path="$MSVC_DLL"
54097      has_space=`$ECHO "$path" | $GREP " "`
54098      if test "x$has_space" != x; then
54099        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54100$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54101        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54102      fi
54103
54104      # Use eval to expand a potential ~
54105      eval path="$path"
54106      if test ! -f "$path" && test ! -d "$path"; then
54107        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54108      fi
54109
54110      if test -d "$path"; then
54111        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54112      else
54113        dir="`$DIRNAME "$path"`"
54114        base="`$BASENAME "$path"`"
54115        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54116      fi
54117    fi
54118  fi
54119
54120      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54121$as_echo_n "checking for $DLL_NAME... " >&6; }
54122      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54123$as_echo "$MSVC_DLL" >&6; }
54124    else
54125      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54126$as_echo "incorrect, ignoring" >&6; }
54127      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54128$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54129    fi
54130  fi
54131
54132  fi
54133
54134  if test "x$MSVC_DLL" = x; then
54135    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54136    if test "x$VS100COMNTOOLS" != x; then
54137      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54138
54139  windows_path="$CYGWIN_VS_TOOLS_DIR"
54140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54141    unix_path=`$CYGPATH -u "$windows_path"`
54142    CYGWIN_VS_TOOLS_DIR="$unix_path"
54143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54145    CYGWIN_VS_TOOLS_DIR="$unix_path"
54146  fi
54147
54148      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54149        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54150	    | $GREP -i /x64/ | $HEAD --lines 1`
54151      else
54152        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54153	    | $GREP -i /x86/ | $HEAD --lines 1`
54154      fi
54155
54156  DLL_NAME="$DLL_NAME"
54157  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54158  METHOD="search of VS100COMNTOOLS"
54159  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54160    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54161$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54162
54163    # Need to check if the found msvcr is correct architecture
54164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54165$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54166    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54167    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54168      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54169      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54170      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54171        CORRECT_MSVCR_ARCH="PE32 executable"
54172      else
54173        CORRECT_MSVCR_ARCH="PE32+ executable"
54174      fi
54175    else
54176      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54177        CORRECT_MSVCR_ARCH=386
54178      else
54179        CORRECT_MSVCR_ARCH=x86-64
54180      fi
54181    fi
54182    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54183      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54184$as_echo "ok" >&6; }
54185      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54186
54187  # Only process if variable expands to non-empty
54188
54189  if test "x$MSVC_DLL" != x; then
54190    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54191
54192  # Input might be given as Windows format, start by converting to
54193  # unix format.
54194  path="$MSVC_DLL"
54195  new_path=`$CYGPATH -u "$path"`
54196
54197  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54198  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54199  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54200  # "foo.exe" is OK but "foo" is an error.
54201  #
54202  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54203  # It is also a way to make sure we got the proper file name for the real test later on.
54204  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54205  if test "x$test_shortpath" = x; then
54206    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54207$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54208    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54209  fi
54210
54211  # Call helper function which possibly converts this using DOS-style short mode.
54212  # If so, the updated path is stored in $new_path.
54213
54214  input_path="$new_path"
54215  # Check if we need to convert this using DOS-style short mode. If the path
54216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54217  # take no chances and rewrite it.
54218  # Note: m4 eats our [], so we need to use [ and ] instead.
54219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54220  if test "x$has_forbidden_chars" != x; then
54221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54222    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54223    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54224    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54225      # Going to short mode and back again did indeed matter. Since short mode is
54226      # case insensitive, let's make it lowercase to improve readability.
54227      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54228      # Now convert it back to Unix-style (cygpath)
54229      input_path=`$CYGPATH -u "$shortmode_path"`
54230      new_path="$input_path"
54231    fi
54232  fi
54233
54234  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54235  if test "x$test_cygdrive_prefix" = x; then
54236    # As a simple fix, exclude /usr/bin since it's not a real path.
54237    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54238      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54239      # a path prefixed by /cygdrive for fixpath to work.
54240      new_path="$CYGWIN_ROOT_PATH$input_path"
54241    fi
54242  fi
54243
54244
54245  if test "x$path" != "x$new_path"; then
54246    MSVC_DLL="$new_path"
54247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54248$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54249  fi
54250
54251    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54252
54253  path="$MSVC_DLL"
54254  has_colon=`$ECHO $path | $GREP ^.:`
54255  new_path="$path"
54256  if test "x$has_colon" = x; then
54257    # Not in mixed or Windows style, start by that.
54258    new_path=`cmd //c echo $path`
54259  fi
54260
54261
54262  input_path="$new_path"
54263  # Check if we need to convert this using DOS-style short mode. If the path
54264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54265  # take no chances and rewrite it.
54266  # Note: m4 eats our [], so we need to use [ and ] instead.
54267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54268  if test "x$has_forbidden_chars" != x; then
54269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54270    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54271  fi
54272
54273
54274  windows_path="$new_path"
54275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54276    unix_path=`$CYGPATH -u "$windows_path"`
54277    new_path="$unix_path"
54278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54280    new_path="$unix_path"
54281  fi
54282
54283  if test "x$path" != "x$new_path"; then
54284    MSVC_DLL="$new_path"
54285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54286$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54287  fi
54288
54289  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54290  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54291
54292    else
54293      # We're on a unix platform. Hooray! :)
54294      path="$MSVC_DLL"
54295      has_space=`$ECHO "$path" | $GREP " "`
54296      if test "x$has_space" != x; then
54297        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54298$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54299        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54300      fi
54301
54302      # Use eval to expand a potential ~
54303      eval path="$path"
54304      if test ! -f "$path" && test ! -d "$path"; then
54305        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54306      fi
54307
54308      if test -d "$path"; then
54309        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54310      else
54311        dir="`$DIRNAME "$path"`"
54312        base="`$BASENAME "$path"`"
54313        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54314      fi
54315    fi
54316  fi
54317
54318      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54319$as_echo_n "checking for $DLL_NAME... " >&6; }
54320      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54321$as_echo "$MSVC_DLL" >&6; }
54322    else
54323      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54324$as_echo "incorrect, ignoring" >&6; }
54325      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54326$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54327    fi
54328  fi
54329
54330    fi
54331  fi
54332
54333  if test "x$MSVC_DLL" = x; then
54334    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54335    # (This was the original behaviour; kept since it might turn something up)
54336    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54337      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54338        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54339	    | $GREP x64 | $HEAD --lines 1`
54340      else
54341        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54342	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54343        if test "x$POSSIBLE_MSVC_DLL" = x; then
54344          # We're grasping at straws now...
54345          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54346	      | $HEAD --lines 1`
54347        fi
54348      fi
54349
54350
54351  DLL_NAME="$DLL_NAME"
54352  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54353  METHOD="search of VCINSTALLDIR"
54354  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54355    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54356$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54357
54358    # Need to check if the found msvcr is correct architecture
54359    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54360$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54361    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54362    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54363      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54364      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54365      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54366        CORRECT_MSVCR_ARCH="PE32 executable"
54367      else
54368        CORRECT_MSVCR_ARCH="PE32+ executable"
54369      fi
54370    else
54371      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54372        CORRECT_MSVCR_ARCH=386
54373      else
54374        CORRECT_MSVCR_ARCH=x86-64
54375      fi
54376    fi
54377    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54378      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54379$as_echo "ok" >&6; }
54380      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54381
54382  # Only process if variable expands to non-empty
54383
54384  if test "x$MSVC_DLL" != x; then
54385    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54386
54387  # Input might be given as Windows format, start by converting to
54388  # unix format.
54389  path="$MSVC_DLL"
54390  new_path=`$CYGPATH -u "$path"`
54391
54392  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54393  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54394  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54395  # "foo.exe" is OK but "foo" is an error.
54396  #
54397  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54398  # It is also a way to make sure we got the proper file name for the real test later on.
54399  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54400  if test "x$test_shortpath" = x; then
54401    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54402$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54403    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54404  fi
54405
54406  # Call helper function which possibly converts this using DOS-style short mode.
54407  # If so, the updated path is stored in $new_path.
54408
54409  input_path="$new_path"
54410  # Check if we need to convert this using DOS-style short mode. If the path
54411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54412  # take no chances and rewrite it.
54413  # Note: m4 eats our [], so we need to use [ and ] instead.
54414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54415  if test "x$has_forbidden_chars" != x; then
54416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54420      # Going to short mode and back again did indeed matter. Since short mode is
54421      # case insensitive, let's make it lowercase to improve readability.
54422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54423      # Now convert it back to Unix-style (cygpath)
54424      input_path=`$CYGPATH -u "$shortmode_path"`
54425      new_path="$input_path"
54426    fi
54427  fi
54428
54429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54430  if test "x$test_cygdrive_prefix" = x; then
54431    # As a simple fix, exclude /usr/bin since it's not a real path.
54432    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54434      # a path prefixed by /cygdrive for fixpath to work.
54435      new_path="$CYGWIN_ROOT_PATH$input_path"
54436    fi
54437  fi
54438
54439
54440  if test "x$path" != "x$new_path"; then
54441    MSVC_DLL="$new_path"
54442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54443$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54444  fi
54445
54446    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54447
54448  path="$MSVC_DLL"
54449  has_colon=`$ECHO $path | $GREP ^.:`
54450  new_path="$path"
54451  if test "x$has_colon" = x; then
54452    # Not in mixed or Windows style, start by that.
54453    new_path=`cmd //c echo $path`
54454  fi
54455
54456
54457  input_path="$new_path"
54458  # Check if we need to convert this using DOS-style short mode. If the path
54459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54460  # take no chances and rewrite it.
54461  # Note: m4 eats our [], so we need to use [ and ] instead.
54462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54463  if test "x$has_forbidden_chars" != x; then
54464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54465    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54466  fi
54467
54468
54469  windows_path="$new_path"
54470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54471    unix_path=`$CYGPATH -u "$windows_path"`
54472    new_path="$unix_path"
54473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54475    new_path="$unix_path"
54476  fi
54477
54478  if test "x$path" != "x$new_path"; then
54479    MSVC_DLL="$new_path"
54480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54481$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54482  fi
54483
54484  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54485  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54486
54487    else
54488      # We're on a unix platform. Hooray! :)
54489      path="$MSVC_DLL"
54490      has_space=`$ECHO "$path" | $GREP " "`
54491      if test "x$has_space" != x; then
54492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54493$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54494        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54495      fi
54496
54497      # Use eval to expand a potential ~
54498      eval path="$path"
54499      if test ! -f "$path" && test ! -d "$path"; then
54500        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54501      fi
54502
54503      if test -d "$path"; then
54504        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54505      else
54506        dir="`$DIRNAME "$path"`"
54507        base="`$BASENAME "$path"`"
54508        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54509      fi
54510    fi
54511  fi
54512
54513      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54514$as_echo_n "checking for $DLL_NAME... " >&6; }
54515      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54516$as_echo "$MSVC_DLL" >&6; }
54517    else
54518      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54519$as_echo "incorrect, ignoring" >&6; }
54520      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54521$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54522    fi
54523  fi
54524
54525    fi
54526  fi
54527
54528  if test "x$MSVC_DLL" = x; then
54529    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54530$as_echo_n "checking for $DLL_NAME... " >&6; }
54531    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54532$as_echo "no" >&6; }
54533    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54534  fi
54535
54536    MSVCR_DLL="$MSVC_DLL"
54537  fi
54538
54539
54540
54541# Check whether --with-msvcp-dll was given.
54542if test "${with_msvcp_dll+set}" = set; then :
54543  withval=$with_msvcp_dll;
54544fi
54545
54546
54547  if test "x$MSVCP_NAME" != "x"; then
54548    if test "x$with_msvcp_dll" != x; then
54549      # If given explicitly by user, do not probe. If not present, fail directly.
54550
54551  DLL_NAME="$MSVCP_NAME"
54552  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54553  METHOD="--with-msvcp-dll"
54554  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54555    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54556$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54557
54558    # Need to check if the found msvcr is correct architecture
54559    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54560$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54561    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54562    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54563      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54564      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54565      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54566        CORRECT_MSVCR_ARCH="PE32 executable"
54567      else
54568        CORRECT_MSVCR_ARCH="PE32+ executable"
54569      fi
54570    else
54571      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54572        CORRECT_MSVCR_ARCH=386
54573      else
54574        CORRECT_MSVCR_ARCH=x86-64
54575      fi
54576    fi
54577    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54578      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54579$as_echo "ok" >&6; }
54580      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54581
54582  # Only process if variable expands to non-empty
54583
54584  if test "x$MSVC_DLL" != x; then
54585    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54586
54587  # Input might be given as Windows format, start by converting to
54588  # unix format.
54589  path="$MSVC_DLL"
54590  new_path=`$CYGPATH -u "$path"`
54591
54592  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54593  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54594  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54595  # "foo.exe" is OK but "foo" is an error.
54596  #
54597  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54598  # It is also a way to make sure we got the proper file name for the real test later on.
54599  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54600  if test "x$test_shortpath" = x; then
54601    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54602$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54603    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54604  fi
54605
54606  # Call helper function which possibly converts this using DOS-style short mode.
54607  # If so, the updated path is stored in $new_path.
54608
54609  input_path="$new_path"
54610  # Check if we need to convert this using DOS-style short mode. If the path
54611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54612  # take no chances and rewrite it.
54613  # Note: m4 eats our [], so we need to use [ and ] instead.
54614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54615  if test "x$has_forbidden_chars" != x; then
54616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54617    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54618    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54619    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54620      # Going to short mode and back again did indeed matter. Since short mode is
54621      # case insensitive, let's make it lowercase to improve readability.
54622      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54623      # Now convert it back to Unix-style (cygpath)
54624      input_path=`$CYGPATH -u "$shortmode_path"`
54625      new_path="$input_path"
54626    fi
54627  fi
54628
54629  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54630  if test "x$test_cygdrive_prefix" = x; then
54631    # As a simple fix, exclude /usr/bin since it's not a real path.
54632    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54633      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54634      # a path prefixed by /cygdrive for fixpath to work.
54635      new_path="$CYGWIN_ROOT_PATH$input_path"
54636    fi
54637  fi
54638
54639
54640  if test "x$path" != "x$new_path"; then
54641    MSVC_DLL="$new_path"
54642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54643$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54644  fi
54645
54646    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54647
54648  path="$MSVC_DLL"
54649  has_colon=`$ECHO $path | $GREP ^.:`
54650  new_path="$path"
54651  if test "x$has_colon" = x; then
54652    # Not in mixed or Windows style, start by that.
54653    new_path=`cmd //c echo $path`
54654  fi
54655
54656
54657  input_path="$new_path"
54658  # Check if we need to convert this using DOS-style short mode. If the path
54659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54660  # take no chances and rewrite it.
54661  # Note: m4 eats our [], so we need to use [ and ] instead.
54662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54663  if test "x$has_forbidden_chars" != x; then
54664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54665    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54666  fi
54667
54668
54669  windows_path="$new_path"
54670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54671    unix_path=`$CYGPATH -u "$windows_path"`
54672    new_path="$unix_path"
54673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54675    new_path="$unix_path"
54676  fi
54677
54678  if test "x$path" != "x$new_path"; then
54679    MSVC_DLL="$new_path"
54680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54681$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54682  fi
54683
54684  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54685  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54686
54687    else
54688      # We're on a unix platform. Hooray! :)
54689      path="$MSVC_DLL"
54690      has_space=`$ECHO "$path" | $GREP " "`
54691      if test "x$has_space" != x; then
54692        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54693$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54694        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54695      fi
54696
54697      # Use eval to expand a potential ~
54698      eval path="$path"
54699      if test ! -f "$path" && test ! -d "$path"; then
54700        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54701      fi
54702
54703      if test -d "$path"; then
54704        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54705      else
54706        dir="`$DIRNAME "$path"`"
54707        base="`$BASENAME "$path"`"
54708        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54709      fi
54710    fi
54711  fi
54712
54713      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54714$as_echo_n "checking for $DLL_NAME... " >&6; }
54715      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54716$as_echo "$MSVC_DLL" >&6; }
54717    else
54718      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54719$as_echo "incorrect, ignoring" >&6; }
54720      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54721$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54722    fi
54723  fi
54724
54725      if test "x$MSVC_DLL" = x; then
54726        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54727      fi
54728      MSVCP_DLL="$MSVC_DLL"
54729    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54730
54731  DLL_NAME="$MSVCP_NAME"
54732  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54733  METHOD="devkit"
54734  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54735    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54736$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54737
54738    # Need to check if the found msvcr is correct architecture
54739    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54740$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54741    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54742    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54743      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54744      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54745      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54746        CORRECT_MSVCR_ARCH="PE32 executable"
54747      else
54748        CORRECT_MSVCR_ARCH="PE32+ executable"
54749      fi
54750    else
54751      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54752        CORRECT_MSVCR_ARCH=386
54753      else
54754        CORRECT_MSVCR_ARCH=x86-64
54755      fi
54756    fi
54757    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54758      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54759$as_echo "ok" >&6; }
54760      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54761
54762  # Only process if variable expands to non-empty
54763
54764  if test "x$MSVC_DLL" != x; then
54765    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54766
54767  # Input might be given as Windows format, start by converting to
54768  # unix format.
54769  path="$MSVC_DLL"
54770  new_path=`$CYGPATH -u "$path"`
54771
54772  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54773  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54774  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54775  # "foo.exe" is OK but "foo" is an error.
54776  #
54777  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54778  # It is also a way to make sure we got the proper file name for the real test later on.
54779  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54780  if test "x$test_shortpath" = x; then
54781    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54782$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54783    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54784  fi
54785
54786  # Call helper function which possibly converts this using DOS-style short mode.
54787  # If so, the updated path is stored in $new_path.
54788
54789  input_path="$new_path"
54790  # Check if we need to convert this using DOS-style short mode. If the path
54791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54792  # take no chances and rewrite it.
54793  # Note: m4 eats our [], so we need to use [ and ] instead.
54794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54795  if test "x$has_forbidden_chars" != x; then
54796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54797    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54798    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54799    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54800      # Going to short mode and back again did indeed matter. Since short mode is
54801      # case insensitive, let's make it lowercase to improve readability.
54802      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54803      # Now convert it back to Unix-style (cygpath)
54804      input_path=`$CYGPATH -u "$shortmode_path"`
54805      new_path="$input_path"
54806    fi
54807  fi
54808
54809  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54810  if test "x$test_cygdrive_prefix" = x; then
54811    # As a simple fix, exclude /usr/bin since it's not a real path.
54812    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54813      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54814      # a path prefixed by /cygdrive for fixpath to work.
54815      new_path="$CYGWIN_ROOT_PATH$input_path"
54816    fi
54817  fi
54818
54819
54820  if test "x$path" != "x$new_path"; then
54821    MSVC_DLL="$new_path"
54822    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54823$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54824  fi
54825
54826    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54827
54828  path="$MSVC_DLL"
54829  has_colon=`$ECHO $path | $GREP ^.:`
54830  new_path="$path"
54831  if test "x$has_colon" = x; then
54832    # Not in mixed or Windows style, start by that.
54833    new_path=`cmd //c echo $path`
54834  fi
54835
54836
54837  input_path="$new_path"
54838  # Check if we need to convert this using DOS-style short mode. If the path
54839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54840  # take no chances and rewrite it.
54841  # Note: m4 eats our [], so we need to use [ and ] instead.
54842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54843  if test "x$has_forbidden_chars" != x; then
54844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54845    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54846  fi
54847
54848
54849  windows_path="$new_path"
54850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54851    unix_path=`$CYGPATH -u "$windows_path"`
54852    new_path="$unix_path"
54853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54855    new_path="$unix_path"
54856  fi
54857
54858  if test "x$path" != "x$new_path"; then
54859    MSVC_DLL="$new_path"
54860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54861$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54862  fi
54863
54864  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54865  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54866
54867    else
54868      # We're on a unix platform. Hooray! :)
54869      path="$MSVC_DLL"
54870      has_space=`$ECHO "$path" | $GREP " "`
54871      if test "x$has_space" != x; then
54872        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54873$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54874        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54875      fi
54876
54877      # Use eval to expand a potential ~
54878      eval path="$path"
54879      if test ! -f "$path" && test ! -d "$path"; then
54880        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54881      fi
54882
54883      if test -d "$path"; then
54884        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54885      else
54886        dir="`$DIRNAME "$path"`"
54887        base="`$BASENAME "$path"`"
54888        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54889      fi
54890    fi
54891  fi
54892
54893      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54894$as_echo_n "checking for $DLL_NAME... " >&6; }
54895      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54896$as_echo "$MSVC_DLL" >&6; }
54897    else
54898      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54899$as_echo "incorrect, ignoring" >&6; }
54900      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54901$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54902    fi
54903  fi
54904
54905      if test "x$MSVC_DLL" = x; then
54906        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54907      fi
54908      MSVCP_DLL="$MSVC_DLL"
54909    else
54910
54911  DLL_NAME="${MSVCP_NAME}"
54912  MSVC_DLL=
54913
54914  if test "x$MSVC_DLL" = x; then
54915    # Probe: Using well-known location from Visual Studio 10.0
54916    if test "x$VCINSTALLDIR" != x; then
54917      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54918
54919  windows_path="$CYGWIN_VC_INSTALL_DIR"
54920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54921    unix_path=`$CYGPATH -u "$windows_path"`
54922    CYGWIN_VC_INSTALL_DIR="$unix_path"
54923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54925    CYGWIN_VC_INSTALL_DIR="$unix_path"
54926  fi
54927
54928      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54929        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54930      else
54931        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54932      fi
54933      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54934
54935  DLL_NAME="$DLL_NAME"
54936  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54937  METHOD="well-known location in VCINSTALLDIR"
54938  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54939    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54940$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54941
54942    # Need to check if the found msvcr is correct architecture
54943    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54944$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54945    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54946    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54947      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54948      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54949      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54950        CORRECT_MSVCR_ARCH="PE32 executable"
54951      else
54952        CORRECT_MSVCR_ARCH="PE32+ executable"
54953      fi
54954    else
54955      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54956        CORRECT_MSVCR_ARCH=386
54957      else
54958        CORRECT_MSVCR_ARCH=x86-64
54959      fi
54960    fi
54961    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54962      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54963$as_echo "ok" >&6; }
54964      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54965
54966  # Only process if variable expands to non-empty
54967
54968  if test "x$MSVC_DLL" != x; then
54969    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54970
54971  # Input might be given as Windows format, start by converting to
54972  # unix format.
54973  path="$MSVC_DLL"
54974  new_path=`$CYGPATH -u "$path"`
54975
54976  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54977  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54978  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54979  # "foo.exe" is OK but "foo" is an error.
54980  #
54981  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54982  # It is also a way to make sure we got the proper file name for the real test later on.
54983  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54984  if test "x$test_shortpath" = x; then
54985    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54986$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54987    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54988  fi
54989
54990  # Call helper function which possibly converts this using DOS-style short mode.
54991  # If so, the updated path is stored in $new_path.
54992
54993  input_path="$new_path"
54994  # Check if we need to convert this using DOS-style short mode. If the path
54995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54996  # take no chances and rewrite it.
54997  # Note: m4 eats our [], so we need to use [ and ] instead.
54998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54999  if test "x$has_forbidden_chars" != x; then
55000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55001    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55002    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55003    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55004      # Going to short mode and back again did indeed matter. Since short mode is
55005      # case insensitive, let's make it lowercase to improve readability.
55006      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55007      # Now convert it back to Unix-style (cygpath)
55008      input_path=`$CYGPATH -u "$shortmode_path"`
55009      new_path="$input_path"
55010    fi
55011  fi
55012
55013  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55014  if test "x$test_cygdrive_prefix" = x; then
55015    # As a simple fix, exclude /usr/bin since it's not a real path.
55016    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55017      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55018      # a path prefixed by /cygdrive for fixpath to work.
55019      new_path="$CYGWIN_ROOT_PATH$input_path"
55020    fi
55021  fi
55022
55023
55024  if test "x$path" != "x$new_path"; then
55025    MSVC_DLL="$new_path"
55026    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55027$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55028  fi
55029
55030    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55031
55032  path="$MSVC_DLL"
55033  has_colon=`$ECHO $path | $GREP ^.:`
55034  new_path="$path"
55035  if test "x$has_colon" = x; then
55036    # Not in mixed or Windows style, start by that.
55037    new_path=`cmd //c echo $path`
55038  fi
55039
55040
55041  input_path="$new_path"
55042  # Check if we need to convert this using DOS-style short mode. If the path
55043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55044  # take no chances and rewrite it.
55045  # Note: m4 eats our [], so we need to use [ and ] instead.
55046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55047  if test "x$has_forbidden_chars" != x; then
55048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55049    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55050  fi
55051
55052
55053  windows_path="$new_path"
55054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55055    unix_path=`$CYGPATH -u "$windows_path"`
55056    new_path="$unix_path"
55057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55059    new_path="$unix_path"
55060  fi
55061
55062  if test "x$path" != "x$new_path"; then
55063    MSVC_DLL="$new_path"
55064    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55065$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55066  fi
55067
55068  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55069  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55070
55071    else
55072      # We're on a unix platform. Hooray! :)
55073      path="$MSVC_DLL"
55074      has_space=`$ECHO "$path" | $GREP " "`
55075      if test "x$has_space" != x; then
55076        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55077$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55078        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55079      fi
55080
55081      # Use eval to expand a potential ~
55082      eval path="$path"
55083      if test ! -f "$path" && test ! -d "$path"; then
55084        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55085      fi
55086
55087      if test -d "$path"; then
55088        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55089      else
55090        dir="`$DIRNAME "$path"`"
55091        base="`$BASENAME "$path"`"
55092        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55093      fi
55094    fi
55095  fi
55096
55097      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55098$as_echo_n "checking for $DLL_NAME... " >&6; }
55099      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55100$as_echo "$MSVC_DLL" >&6; }
55101    else
55102      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55103$as_echo "incorrect, ignoring" >&6; }
55104      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55105$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55106    fi
55107  fi
55108
55109    fi
55110  fi
55111
55112  if test "x$MSVC_DLL" = x; then
55113    # Probe: Check in the Boot JDK directory.
55114    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55115
55116  DLL_NAME="$DLL_NAME"
55117  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55118  METHOD="well-known location in Boot JDK"
55119  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55120    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55121$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55122
55123    # Need to check if the found msvcr is correct architecture
55124    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55125$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55126    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55127    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55128      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55129      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55130      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55131        CORRECT_MSVCR_ARCH="PE32 executable"
55132      else
55133        CORRECT_MSVCR_ARCH="PE32+ executable"
55134      fi
55135    else
55136      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55137        CORRECT_MSVCR_ARCH=386
55138      else
55139        CORRECT_MSVCR_ARCH=x86-64
55140      fi
55141    fi
55142    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55143      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55144$as_echo "ok" >&6; }
55145      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55146
55147  # Only process if variable expands to non-empty
55148
55149  if test "x$MSVC_DLL" != x; then
55150    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55151
55152  # Input might be given as Windows format, start by converting to
55153  # unix format.
55154  path="$MSVC_DLL"
55155  new_path=`$CYGPATH -u "$path"`
55156
55157  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55158  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55159  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55160  # "foo.exe" is OK but "foo" is an error.
55161  #
55162  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55163  # It is also a way to make sure we got the proper file name for the real test later on.
55164  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55165  if test "x$test_shortpath" = x; then
55166    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55167$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55168    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55169  fi
55170
55171  # Call helper function which possibly converts this using DOS-style short mode.
55172  # If so, the updated path is stored in $new_path.
55173
55174  input_path="$new_path"
55175  # Check if we need to convert this using DOS-style short mode. If the path
55176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55177  # take no chances and rewrite it.
55178  # Note: m4 eats our [], so we need to use [ and ] instead.
55179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55180  if test "x$has_forbidden_chars" != x; then
55181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55185      # Going to short mode and back again did indeed matter. Since short mode is
55186      # case insensitive, let's make it lowercase to improve readability.
55187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55188      # Now convert it back to Unix-style (cygpath)
55189      input_path=`$CYGPATH -u "$shortmode_path"`
55190      new_path="$input_path"
55191    fi
55192  fi
55193
55194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55195  if test "x$test_cygdrive_prefix" = x; then
55196    # As a simple fix, exclude /usr/bin since it's not a real path.
55197    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55199      # a path prefixed by /cygdrive for fixpath to work.
55200      new_path="$CYGWIN_ROOT_PATH$input_path"
55201    fi
55202  fi
55203
55204
55205  if test "x$path" != "x$new_path"; then
55206    MSVC_DLL="$new_path"
55207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55208$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55209  fi
55210
55211    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55212
55213  path="$MSVC_DLL"
55214  has_colon=`$ECHO $path | $GREP ^.:`
55215  new_path="$path"
55216  if test "x$has_colon" = x; then
55217    # Not in mixed or Windows style, start by that.
55218    new_path=`cmd //c echo $path`
55219  fi
55220
55221
55222  input_path="$new_path"
55223  # Check if we need to convert this using DOS-style short mode. If the path
55224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55225  # take no chances and rewrite it.
55226  # Note: m4 eats our [], so we need to use [ and ] instead.
55227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55228  if test "x$has_forbidden_chars" != x; then
55229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55231  fi
55232
55233
55234  windows_path="$new_path"
55235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55236    unix_path=`$CYGPATH -u "$windows_path"`
55237    new_path="$unix_path"
55238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55240    new_path="$unix_path"
55241  fi
55242
55243  if test "x$path" != "x$new_path"; then
55244    MSVC_DLL="$new_path"
55245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55246$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55247  fi
55248
55249  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55250  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55251
55252    else
55253      # We're on a unix platform. Hooray! :)
55254      path="$MSVC_DLL"
55255      has_space=`$ECHO "$path" | $GREP " "`
55256      if test "x$has_space" != x; then
55257        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55258$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55259        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55260      fi
55261
55262      # Use eval to expand a potential ~
55263      eval path="$path"
55264      if test ! -f "$path" && test ! -d "$path"; then
55265        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55266      fi
55267
55268      if test -d "$path"; then
55269        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55270      else
55271        dir="`$DIRNAME "$path"`"
55272        base="`$BASENAME "$path"`"
55273        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55274      fi
55275    fi
55276  fi
55277
55278      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55279$as_echo_n "checking for $DLL_NAME... " >&6; }
55280      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55281$as_echo "$MSVC_DLL" >&6; }
55282    else
55283      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55284$as_echo "incorrect, ignoring" >&6; }
55285      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55286$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55287    fi
55288  fi
55289
55290  fi
55291
55292  if test "x$MSVC_DLL" = x; then
55293    # Probe: Look in the Windows system32 directory
55294    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55295
55296  windows_path="$CYGWIN_SYSTEMROOT"
55297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55298    unix_path=`$CYGPATH -u "$windows_path"`
55299    CYGWIN_SYSTEMROOT="$unix_path"
55300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55302    CYGWIN_SYSTEMROOT="$unix_path"
55303  fi
55304
55305    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55306
55307  DLL_NAME="$DLL_NAME"
55308  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55309  METHOD="well-known location in SYSTEMROOT"
55310  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55311    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55312$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55313
55314    # Need to check if the found msvcr is correct architecture
55315    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55316$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55317    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55318    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55319      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55320      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55321      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55322        CORRECT_MSVCR_ARCH="PE32 executable"
55323      else
55324        CORRECT_MSVCR_ARCH="PE32+ executable"
55325      fi
55326    else
55327      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55328        CORRECT_MSVCR_ARCH=386
55329      else
55330        CORRECT_MSVCR_ARCH=x86-64
55331      fi
55332    fi
55333    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55334      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55335$as_echo "ok" >&6; }
55336      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55337
55338  # Only process if variable expands to non-empty
55339
55340  if test "x$MSVC_DLL" != x; then
55341    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55342
55343  # Input might be given as Windows format, start by converting to
55344  # unix format.
55345  path="$MSVC_DLL"
55346  new_path=`$CYGPATH -u "$path"`
55347
55348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55351  # "foo.exe" is OK but "foo" is an error.
55352  #
55353  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55354  # It is also a way to make sure we got the proper file name for the real test later on.
55355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55356  if test "x$test_shortpath" = x; then
55357    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55358$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55359    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55360  fi
55361
55362  # Call helper function which possibly converts this using DOS-style short mode.
55363  # If so, the updated path is stored in $new_path.
55364
55365  input_path="$new_path"
55366  # Check if we need to convert this using DOS-style short mode. If the path
55367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55368  # take no chances and rewrite it.
55369  # Note: m4 eats our [], so we need to use [ and ] instead.
55370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55371  if test "x$has_forbidden_chars" != x; then
55372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55373    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55374    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55375    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55376      # Going to short mode and back again did indeed matter. Since short mode is
55377      # case insensitive, let's make it lowercase to improve readability.
55378      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55379      # Now convert it back to Unix-style (cygpath)
55380      input_path=`$CYGPATH -u "$shortmode_path"`
55381      new_path="$input_path"
55382    fi
55383  fi
55384
55385  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55386  if test "x$test_cygdrive_prefix" = x; then
55387    # As a simple fix, exclude /usr/bin since it's not a real path.
55388    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55389      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55390      # a path prefixed by /cygdrive for fixpath to work.
55391      new_path="$CYGWIN_ROOT_PATH$input_path"
55392    fi
55393  fi
55394
55395
55396  if test "x$path" != "x$new_path"; then
55397    MSVC_DLL="$new_path"
55398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55399$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55400  fi
55401
55402    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55403
55404  path="$MSVC_DLL"
55405  has_colon=`$ECHO $path | $GREP ^.:`
55406  new_path="$path"
55407  if test "x$has_colon" = x; then
55408    # Not in mixed or Windows style, start by that.
55409    new_path=`cmd //c echo $path`
55410  fi
55411
55412
55413  input_path="$new_path"
55414  # Check if we need to convert this using DOS-style short mode. If the path
55415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55416  # take no chances and rewrite it.
55417  # Note: m4 eats our [], so we need to use [ and ] instead.
55418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55419  if test "x$has_forbidden_chars" != x; then
55420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55422  fi
55423
55424
55425  windows_path="$new_path"
55426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55427    unix_path=`$CYGPATH -u "$windows_path"`
55428    new_path="$unix_path"
55429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55431    new_path="$unix_path"
55432  fi
55433
55434  if test "x$path" != "x$new_path"; then
55435    MSVC_DLL="$new_path"
55436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55437$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55438  fi
55439
55440  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55441  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55442
55443    else
55444      # We're on a unix platform. Hooray! :)
55445      path="$MSVC_DLL"
55446      has_space=`$ECHO "$path" | $GREP " "`
55447      if test "x$has_space" != x; then
55448        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55449$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55450        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55451      fi
55452
55453      # Use eval to expand a potential ~
55454      eval path="$path"
55455      if test ! -f "$path" && test ! -d "$path"; then
55456        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55457      fi
55458
55459      if test -d "$path"; then
55460        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55461      else
55462        dir="`$DIRNAME "$path"`"
55463        base="`$BASENAME "$path"`"
55464        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55465      fi
55466    fi
55467  fi
55468
55469      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55470$as_echo_n "checking for $DLL_NAME... " >&6; }
55471      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55472$as_echo "$MSVC_DLL" >&6; }
55473    else
55474      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55475$as_echo "incorrect, ignoring" >&6; }
55476      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55477$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55478    fi
55479  fi
55480
55481  fi
55482
55483  if test "x$MSVC_DLL" = x; then
55484    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55485    if test "x$VS100COMNTOOLS" != x; then
55486      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55487
55488  windows_path="$CYGWIN_VS_TOOLS_DIR"
55489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55490    unix_path=`$CYGPATH -u "$windows_path"`
55491    CYGWIN_VS_TOOLS_DIR="$unix_path"
55492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55494    CYGWIN_VS_TOOLS_DIR="$unix_path"
55495  fi
55496
55497      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55498        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55499	    | $GREP -i /x64/ | $HEAD --lines 1`
55500      else
55501        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55502	    | $GREP -i /x86/ | $HEAD --lines 1`
55503      fi
55504
55505  DLL_NAME="$DLL_NAME"
55506  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55507  METHOD="search of VS100COMNTOOLS"
55508  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55509    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55510$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55511
55512    # Need to check if the found msvcr is correct architecture
55513    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55514$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55515    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55516    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55517      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55518      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55519      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55520        CORRECT_MSVCR_ARCH="PE32 executable"
55521      else
55522        CORRECT_MSVCR_ARCH="PE32+ executable"
55523      fi
55524    else
55525      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55526        CORRECT_MSVCR_ARCH=386
55527      else
55528        CORRECT_MSVCR_ARCH=x86-64
55529      fi
55530    fi
55531    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55532      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55533$as_echo "ok" >&6; }
55534      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55535
55536  # Only process if variable expands to non-empty
55537
55538  if test "x$MSVC_DLL" != x; then
55539    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55540
55541  # Input might be given as Windows format, start by converting to
55542  # unix format.
55543  path="$MSVC_DLL"
55544  new_path=`$CYGPATH -u "$path"`
55545
55546  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55547  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55548  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55549  # "foo.exe" is OK but "foo" is an error.
55550  #
55551  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55552  # It is also a way to make sure we got the proper file name for the real test later on.
55553  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55554  if test "x$test_shortpath" = x; then
55555    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55556$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55557    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55558  fi
55559
55560  # Call helper function which possibly converts this using DOS-style short mode.
55561  # If so, the updated path is stored in $new_path.
55562
55563  input_path="$new_path"
55564  # Check if we need to convert this using DOS-style short mode. If the path
55565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55566  # take no chances and rewrite it.
55567  # Note: m4 eats our [], so we need to use [ and ] instead.
55568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55569  if test "x$has_forbidden_chars" != x; then
55570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55571    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55572    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55573    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55574      # Going to short mode and back again did indeed matter. Since short mode is
55575      # case insensitive, let's make it lowercase to improve readability.
55576      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55577      # Now convert it back to Unix-style (cygpath)
55578      input_path=`$CYGPATH -u "$shortmode_path"`
55579      new_path="$input_path"
55580    fi
55581  fi
55582
55583  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55584  if test "x$test_cygdrive_prefix" = x; then
55585    # As a simple fix, exclude /usr/bin since it's not a real path.
55586    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55587      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55588      # a path prefixed by /cygdrive for fixpath to work.
55589      new_path="$CYGWIN_ROOT_PATH$input_path"
55590    fi
55591  fi
55592
55593
55594  if test "x$path" != "x$new_path"; then
55595    MSVC_DLL="$new_path"
55596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55597$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55598  fi
55599
55600    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55601
55602  path="$MSVC_DLL"
55603  has_colon=`$ECHO $path | $GREP ^.:`
55604  new_path="$path"
55605  if test "x$has_colon" = x; then
55606    # Not in mixed or Windows style, start by that.
55607    new_path=`cmd //c echo $path`
55608  fi
55609
55610
55611  input_path="$new_path"
55612  # Check if we need to convert this using DOS-style short mode. If the path
55613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55614  # take no chances and rewrite it.
55615  # Note: m4 eats our [], so we need to use [ and ] instead.
55616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55617  if test "x$has_forbidden_chars" != x; then
55618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55620  fi
55621
55622
55623  windows_path="$new_path"
55624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55625    unix_path=`$CYGPATH -u "$windows_path"`
55626    new_path="$unix_path"
55627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55629    new_path="$unix_path"
55630  fi
55631
55632  if test "x$path" != "x$new_path"; then
55633    MSVC_DLL="$new_path"
55634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55635$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55636  fi
55637
55638  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55639  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55640
55641    else
55642      # We're on a unix platform. Hooray! :)
55643      path="$MSVC_DLL"
55644      has_space=`$ECHO "$path" | $GREP " "`
55645      if test "x$has_space" != x; then
55646        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55647$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55648        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55649      fi
55650
55651      # Use eval to expand a potential ~
55652      eval path="$path"
55653      if test ! -f "$path" && test ! -d "$path"; then
55654        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55655      fi
55656
55657      if test -d "$path"; then
55658        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55659      else
55660        dir="`$DIRNAME "$path"`"
55661        base="`$BASENAME "$path"`"
55662        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55663      fi
55664    fi
55665  fi
55666
55667      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55668$as_echo_n "checking for $DLL_NAME... " >&6; }
55669      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55670$as_echo "$MSVC_DLL" >&6; }
55671    else
55672      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55673$as_echo "incorrect, ignoring" >&6; }
55674      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55675$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55676    fi
55677  fi
55678
55679    fi
55680  fi
55681
55682  if test "x$MSVC_DLL" = x; then
55683    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55684    # (This was the original behaviour; kept since it might turn something up)
55685    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55686      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55687        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55688	    | $GREP x64 | $HEAD --lines 1`
55689      else
55690        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55691	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55692        if test "x$POSSIBLE_MSVC_DLL" = x; then
55693          # We're grasping at straws now...
55694          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55695	      | $HEAD --lines 1`
55696        fi
55697      fi
55698
55699
55700  DLL_NAME="$DLL_NAME"
55701  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55702  METHOD="search of VCINSTALLDIR"
55703  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55704    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55705$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55706
55707    # Need to check if the found msvcr is correct architecture
55708    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55709$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55710    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55711    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55712      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55713      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55714      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55715        CORRECT_MSVCR_ARCH="PE32 executable"
55716      else
55717        CORRECT_MSVCR_ARCH="PE32+ executable"
55718      fi
55719    else
55720      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55721        CORRECT_MSVCR_ARCH=386
55722      else
55723        CORRECT_MSVCR_ARCH=x86-64
55724      fi
55725    fi
55726    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55727      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55728$as_echo "ok" >&6; }
55729      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55730
55731  # Only process if variable expands to non-empty
55732
55733  if test "x$MSVC_DLL" != x; then
55734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55735
55736  # Input might be given as Windows format, start by converting to
55737  # unix format.
55738  path="$MSVC_DLL"
55739  new_path=`$CYGPATH -u "$path"`
55740
55741  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55742  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55743  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55744  # "foo.exe" is OK but "foo" is an error.
55745  #
55746  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55747  # It is also a way to make sure we got the proper file name for the real test later on.
55748  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55749  if test "x$test_shortpath" = x; then
55750    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55751$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55752    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55753  fi
55754
55755  # Call helper function which possibly converts this using DOS-style short mode.
55756  # If so, the updated path is stored in $new_path.
55757
55758  input_path="$new_path"
55759  # Check if we need to convert this using DOS-style short mode. If the path
55760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55761  # take no chances and rewrite it.
55762  # Note: m4 eats our [], so we need to use [ and ] instead.
55763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55764  if test "x$has_forbidden_chars" != x; then
55765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55769      # Going to short mode and back again did indeed matter. Since short mode is
55770      # case insensitive, let's make it lowercase to improve readability.
55771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55772      # Now convert it back to Unix-style (cygpath)
55773      input_path=`$CYGPATH -u "$shortmode_path"`
55774      new_path="$input_path"
55775    fi
55776  fi
55777
55778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55779  if test "x$test_cygdrive_prefix" = x; then
55780    # As a simple fix, exclude /usr/bin since it's not a real path.
55781    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55783      # a path prefixed by /cygdrive for fixpath to work.
55784      new_path="$CYGWIN_ROOT_PATH$input_path"
55785    fi
55786  fi
55787
55788
55789  if test "x$path" != "x$new_path"; then
55790    MSVC_DLL="$new_path"
55791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55792$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55793  fi
55794
55795    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55796
55797  path="$MSVC_DLL"
55798  has_colon=`$ECHO $path | $GREP ^.:`
55799  new_path="$path"
55800  if test "x$has_colon" = x; then
55801    # Not in mixed or Windows style, start by that.
55802    new_path=`cmd //c echo $path`
55803  fi
55804
55805
55806  input_path="$new_path"
55807  # Check if we need to convert this using DOS-style short mode. If the path
55808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55809  # take no chances and rewrite it.
55810  # Note: m4 eats our [], so we need to use [ and ] instead.
55811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55812  if test "x$has_forbidden_chars" != x; then
55813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55814    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55815  fi
55816
55817
55818  windows_path="$new_path"
55819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55820    unix_path=`$CYGPATH -u "$windows_path"`
55821    new_path="$unix_path"
55822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55824    new_path="$unix_path"
55825  fi
55826
55827  if test "x$path" != "x$new_path"; then
55828    MSVC_DLL="$new_path"
55829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55830$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55831  fi
55832
55833  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55834  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55835
55836    else
55837      # We're on a unix platform. Hooray! :)
55838      path="$MSVC_DLL"
55839      has_space=`$ECHO "$path" | $GREP " "`
55840      if test "x$has_space" != x; then
55841        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55842$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55843        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55844      fi
55845
55846      # Use eval to expand a potential ~
55847      eval path="$path"
55848      if test ! -f "$path" && test ! -d "$path"; then
55849        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55850      fi
55851
55852      if test -d "$path"; then
55853        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55854      else
55855        dir="`$DIRNAME "$path"`"
55856        base="`$BASENAME "$path"`"
55857        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55858      fi
55859    fi
55860  fi
55861
55862      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55863$as_echo_n "checking for $DLL_NAME... " >&6; }
55864      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55865$as_echo "$MSVC_DLL" >&6; }
55866    else
55867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55868$as_echo "incorrect, ignoring" >&6; }
55869      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55870$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55871    fi
55872  fi
55873
55874    fi
55875  fi
55876
55877  if test "x$MSVC_DLL" = x; then
55878    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55879$as_echo_n "checking for $DLL_NAME... " >&6; }
55880    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55881$as_echo "no" >&6; }
55882    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55883  fi
55884
55885      MSVCP_DLL="$MSVC_DLL"
55886    fi
55887
55888  fi
55889
55890  fi
55891
55892
55893  if test "x$NEEDS_LIB_X11" = xfalse; then
55894    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55895      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55896$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55897    fi
55898    X_CFLAGS=
55899    X_LIBS=
55900  else
55901
55902    if test "x${with_x}" = xno; then
55903      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55904    fi
55905
55906    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55907      # The user has specified a X11 base directory. Use it for includes and
55908      # libraries, unless explicitly overridden.
55909      if test "x$x_includes" = xNONE; then
55910        x_includes="${with_x}/include"
55911      fi
55912      if test "x$x_libraries" = xNONE; then
55913        x_libraries="${with_x}/lib"
55914      fi
55915    else
55916      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55917      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55918      # --x-libraries for the sysroot, if that seems to be correct.
55919      if test "x$SYSROOT" != "x"; then
55920        if test "x$x_includes" = xNONE; then
55921          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55922            x_includes="$SYSROOT/usr/X11R6/include"
55923          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55924            x_includes="$SYSROOT/usr/include"
55925          fi
55926        fi
55927        if test "x$x_libraries" = xNONE; then
55928          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55929            x_libraries="$SYSROOT/usr/X11R6/lib"
55930          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55931            x_libraries="$SYSROOT/usr/lib64"
55932          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55933            x_libraries="$SYSROOT/usr/lib"
55934          fi
55935        fi
55936      fi
55937    fi
55938
55939    # Now let autoconf do it's magic
55940    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55941$as_echo_n "checking for X... " >&6; }
55942
55943
55944# Check whether --with-x was given.
55945if test "${with_x+set}" = set; then :
55946  withval=$with_x;
55947fi
55948
55949# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55950if test "x$with_x" = xno; then
55951  # The user explicitly disabled X.
55952  have_x=disabled
55953else
55954  case $x_includes,$x_libraries in #(
55955    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55956    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55957  $as_echo_n "(cached) " >&6
55958else
55959  # One or both of the vars are not set, and there is no cached value.
55960ac_x_includes=no ac_x_libraries=no
55961rm -f -r conftest.dir
55962if mkdir conftest.dir; then
55963  cd conftest.dir
55964  cat >Imakefile <<'_ACEOF'
55965incroot:
55966	@echo incroot='${INCROOT}'
55967usrlibdir:
55968	@echo usrlibdir='${USRLIBDIR}'
55969libdir:
55970	@echo libdir='${LIBDIR}'
55971_ACEOF
55972  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55973    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55974    for ac_var in incroot usrlibdir libdir; do
55975      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55976    done
55977    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55978    for ac_extension in a so sl dylib la dll; do
55979      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55980	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55981	ac_im_usrlibdir=$ac_im_libdir; break
55982      fi
55983    done
55984    # Screen out bogus values from the imake configuration.  They are
55985    # bogus both because they are the default anyway, and because
55986    # using them would break gcc on systems where it needs fixed includes.
55987    case $ac_im_incroot in
55988	/usr/include) ac_x_includes= ;;
55989	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55990    esac
55991    case $ac_im_usrlibdir in
55992	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55993	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55994    esac
55995  fi
55996  cd ..
55997  rm -f -r conftest.dir
55998fi
55999
56000# Standard set of common directories for X headers.
56001# Check X11 before X11Rn because it is often a symlink to the current release.
56002ac_x_header_dirs='
56003/usr/X11/include
56004/usr/X11R7/include
56005/usr/X11R6/include
56006/usr/X11R5/include
56007/usr/X11R4/include
56008
56009/usr/include/X11
56010/usr/include/X11R7
56011/usr/include/X11R6
56012/usr/include/X11R5
56013/usr/include/X11R4
56014
56015/usr/local/X11/include
56016/usr/local/X11R7/include
56017/usr/local/X11R6/include
56018/usr/local/X11R5/include
56019/usr/local/X11R4/include
56020
56021/usr/local/include/X11
56022/usr/local/include/X11R7
56023/usr/local/include/X11R6
56024/usr/local/include/X11R5
56025/usr/local/include/X11R4
56026
56027/usr/X386/include
56028/usr/x386/include
56029/usr/XFree86/include/X11
56030
56031/usr/include
56032/usr/local/include
56033/usr/unsupported/include
56034/usr/athena/include
56035/usr/local/x11r5/include
56036/usr/lpp/Xamples/include
56037
56038/usr/openwin/include
56039/usr/openwin/share/include'
56040
56041if test "$ac_x_includes" = no; then
56042  # Guess where to find include files, by looking for Xlib.h.
56043  # First, try using that file with no special directory specified.
56044  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56045/* end confdefs.h.  */
56046#include <X11/Xlib.h>
56047_ACEOF
56048if ac_fn_cxx_try_cpp "$LINENO"; then :
56049  # We can compile using X headers with no special include directory.
56050ac_x_includes=
56051else
56052  for ac_dir in $ac_x_header_dirs; do
56053  if test -r "$ac_dir/X11/Xlib.h"; then
56054    ac_x_includes=$ac_dir
56055    break
56056  fi
56057done
56058fi
56059rm -f conftest.err conftest.i conftest.$ac_ext
56060fi # $ac_x_includes = no
56061
56062if test "$ac_x_libraries" = no; then
56063  # Check for the libraries.
56064  # See if we find them without any special options.
56065  # Don't add to $LIBS permanently.
56066  ac_save_LIBS=$LIBS
56067  LIBS="-lX11 $LIBS"
56068  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56069/* end confdefs.h.  */
56070#include <X11/Xlib.h>
56071int
56072main ()
56073{
56074XrmInitialize ()
56075  ;
56076  return 0;
56077}
56078_ACEOF
56079if ac_fn_cxx_try_link "$LINENO"; then :
56080  LIBS=$ac_save_LIBS
56081# We can link X programs with no special library path.
56082ac_x_libraries=
56083else
56084  LIBS=$ac_save_LIBS
56085for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56086do
56087  # Don't even attempt the hair of trying to link an X program!
56088  for ac_extension in a so sl dylib la dll; do
56089    if test -r "$ac_dir/libX11.$ac_extension"; then
56090      ac_x_libraries=$ac_dir
56091      break 2
56092    fi
56093  done
56094done
56095fi
56096rm -f core conftest.err conftest.$ac_objext \
56097    conftest$ac_exeext conftest.$ac_ext
56098fi # $ac_x_libraries = no
56099
56100case $ac_x_includes,$ac_x_libraries in #(
56101  no,* | *,no | *\'*)
56102    # Didn't find X, or a directory has "'" in its name.
56103    ac_cv_have_x="have_x=no";; #(
56104  *)
56105    # Record where we found X for the cache.
56106    ac_cv_have_x="have_x=yes\
56107	ac_x_includes='$ac_x_includes'\
56108	ac_x_libraries='$ac_x_libraries'"
56109esac
56110fi
56111;; #(
56112    *) have_x=yes;;
56113  esac
56114  eval "$ac_cv_have_x"
56115fi # $with_x != no
56116
56117if test "$have_x" != yes; then
56118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56119$as_echo "$have_x" >&6; }
56120  no_x=yes
56121else
56122  # If each of the values was on the command line, it overrides each guess.
56123  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56124  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56125  # Update the cache value to reflect the command line values.
56126  ac_cv_have_x="have_x=yes\
56127	ac_x_includes='$x_includes'\
56128	ac_x_libraries='$x_libraries'"
56129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56130$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56131fi
56132
56133    if test "$no_x" = yes; then
56134  # Not all programs may use this symbol, but it does not hurt to define it.
56135
56136$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56137
56138  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56139else
56140  if test -n "$x_includes"; then
56141    X_CFLAGS="$X_CFLAGS -I$x_includes"
56142  fi
56143
56144  # It would also be nice to do this for all -L options, not just this one.
56145  if test -n "$x_libraries"; then
56146    X_LIBS="$X_LIBS -L$x_libraries"
56147    # For Solaris; some versions of Sun CC require a space after -R and
56148    # others require no space.  Words are not sufficient . . . .
56149    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56150$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56151    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56152    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56153    ac_cxx_werror_flag=yes
56154    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56155/* end confdefs.h.  */
56156
56157int
56158main ()
56159{
56160
56161  ;
56162  return 0;
56163}
56164_ACEOF
56165if ac_fn_cxx_try_link "$LINENO"; then :
56166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56167$as_echo "no" >&6; }
56168       X_LIBS="$X_LIBS -R$x_libraries"
56169else
56170  LIBS="$ac_xsave_LIBS -R $x_libraries"
56171       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56172/* end confdefs.h.  */
56173
56174int
56175main ()
56176{
56177
56178  ;
56179  return 0;
56180}
56181_ACEOF
56182if ac_fn_cxx_try_link "$LINENO"; then :
56183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56184$as_echo "yes" >&6; }
56185	  X_LIBS="$X_LIBS -R $x_libraries"
56186else
56187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56188$as_echo "neither works" >&6; }
56189fi
56190rm -f core conftest.err conftest.$ac_objext \
56191    conftest$ac_exeext conftest.$ac_ext
56192fi
56193rm -f core conftest.err conftest.$ac_objext \
56194    conftest$ac_exeext conftest.$ac_ext
56195    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56196    LIBS=$ac_xsave_LIBS
56197  fi
56198
56199  # Check for system-dependent libraries X programs must link with.
56200  # Do this before checking for the system-independent R6 libraries
56201  # (-lICE), since we may need -lsocket or whatever for X linking.
56202
56203  if test "$ISC" = yes; then
56204    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56205  else
56206    # Martyn Johnson says this is needed for Ultrix, if the X
56207    # libraries were built with DECnet support.  And Karl Berry says
56208    # the Alpha needs dnet_stub (dnet does not exist).
56209    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56210    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56211/* end confdefs.h.  */
56212
56213/* Override any GCC internal prototype to avoid an error.
56214   Use char because int might match the return type of a GCC
56215   builtin and then its argument prototype would still apply.  */
56216#ifdef __cplusplus
56217extern "C"
56218#endif
56219char XOpenDisplay ();
56220int
56221main ()
56222{
56223return XOpenDisplay ();
56224  ;
56225  return 0;
56226}
56227_ACEOF
56228if ac_fn_cxx_try_link "$LINENO"; then :
56229
56230else
56231  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56232$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56233if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56234  $as_echo_n "(cached) " >&6
56235else
56236  ac_check_lib_save_LIBS=$LIBS
56237LIBS="-ldnet  $LIBS"
56238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56239/* end confdefs.h.  */
56240
56241/* Override any GCC internal prototype to avoid an error.
56242   Use char because int might match the return type of a GCC
56243   builtin and then its argument prototype would still apply.  */
56244#ifdef __cplusplus
56245extern "C"
56246#endif
56247char dnet_ntoa ();
56248int
56249main ()
56250{
56251return dnet_ntoa ();
56252  ;
56253  return 0;
56254}
56255_ACEOF
56256if ac_fn_cxx_try_link "$LINENO"; then :
56257  ac_cv_lib_dnet_dnet_ntoa=yes
56258else
56259  ac_cv_lib_dnet_dnet_ntoa=no
56260fi
56261rm -f core conftest.err conftest.$ac_objext \
56262    conftest$ac_exeext conftest.$ac_ext
56263LIBS=$ac_check_lib_save_LIBS
56264fi
56265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56266$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56267if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56268  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56269fi
56270
56271    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56272      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56273$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56274if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56275  $as_echo_n "(cached) " >&6
56276else
56277  ac_check_lib_save_LIBS=$LIBS
56278LIBS="-ldnet_stub  $LIBS"
56279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56280/* end confdefs.h.  */
56281
56282/* Override any GCC internal prototype to avoid an error.
56283   Use char because int might match the return type of a GCC
56284   builtin and then its argument prototype would still apply.  */
56285#ifdef __cplusplus
56286extern "C"
56287#endif
56288char dnet_ntoa ();
56289int
56290main ()
56291{
56292return dnet_ntoa ();
56293  ;
56294  return 0;
56295}
56296_ACEOF
56297if ac_fn_cxx_try_link "$LINENO"; then :
56298  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56299else
56300  ac_cv_lib_dnet_stub_dnet_ntoa=no
56301fi
56302rm -f core conftest.err conftest.$ac_objext \
56303    conftest$ac_exeext conftest.$ac_ext
56304LIBS=$ac_check_lib_save_LIBS
56305fi
56306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56307$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56308if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56309  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56310fi
56311
56312    fi
56313fi
56314rm -f core conftest.err conftest.$ac_objext \
56315    conftest$ac_exeext conftest.$ac_ext
56316    LIBS="$ac_xsave_LIBS"
56317
56318    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56319    # to get the SysV transport functions.
56320    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56321    # needs -lnsl.
56322    # The nsl library prevents programs from opening the X display
56323    # on Irix 5.2, according to T.E. Dickey.
56324    # The functions gethostbyname, getservbyname, and inet_addr are
56325    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56326    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56327if test "x$ac_cv_func_gethostbyname" = xyes; then :
56328
56329fi
56330
56331    if test $ac_cv_func_gethostbyname = no; then
56332      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56333$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56334if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56335  $as_echo_n "(cached) " >&6
56336else
56337  ac_check_lib_save_LIBS=$LIBS
56338LIBS="-lnsl  $LIBS"
56339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56340/* end confdefs.h.  */
56341
56342/* Override any GCC internal prototype to avoid an error.
56343   Use char because int might match the return type of a GCC
56344   builtin and then its argument prototype would still apply.  */
56345#ifdef __cplusplus
56346extern "C"
56347#endif
56348char gethostbyname ();
56349int
56350main ()
56351{
56352return gethostbyname ();
56353  ;
56354  return 0;
56355}
56356_ACEOF
56357if ac_fn_cxx_try_link "$LINENO"; then :
56358  ac_cv_lib_nsl_gethostbyname=yes
56359else
56360  ac_cv_lib_nsl_gethostbyname=no
56361fi
56362rm -f core conftest.err conftest.$ac_objext \
56363    conftest$ac_exeext conftest.$ac_ext
56364LIBS=$ac_check_lib_save_LIBS
56365fi
56366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56367$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56368if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56369  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56370fi
56371
56372      if test $ac_cv_lib_nsl_gethostbyname = no; then
56373	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56374$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56375if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56376  $as_echo_n "(cached) " >&6
56377else
56378  ac_check_lib_save_LIBS=$LIBS
56379LIBS="-lbsd  $LIBS"
56380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56381/* end confdefs.h.  */
56382
56383/* Override any GCC internal prototype to avoid an error.
56384   Use char because int might match the return type of a GCC
56385   builtin and then its argument prototype would still apply.  */
56386#ifdef __cplusplus
56387extern "C"
56388#endif
56389char gethostbyname ();
56390int
56391main ()
56392{
56393return gethostbyname ();
56394  ;
56395  return 0;
56396}
56397_ACEOF
56398if ac_fn_cxx_try_link "$LINENO"; then :
56399  ac_cv_lib_bsd_gethostbyname=yes
56400else
56401  ac_cv_lib_bsd_gethostbyname=no
56402fi
56403rm -f core conftest.err conftest.$ac_objext \
56404    conftest$ac_exeext conftest.$ac_ext
56405LIBS=$ac_check_lib_save_LIBS
56406fi
56407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56408$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56409if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56410  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56411fi
56412
56413      fi
56414    fi
56415
56416    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56417    # socket/setsockopt and other routines are undefined under SCO ODT
56418    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56419    # on later versions), says Simon Leinen: it contains gethostby*
56420    # variants that don't use the name server (or something).  -lsocket
56421    # must be given before -lnsl if both are needed.  We assume that
56422    # if connect needs -lnsl, so does gethostbyname.
56423    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56424if test "x$ac_cv_func_connect" = xyes; then :
56425
56426fi
56427
56428    if test $ac_cv_func_connect = no; then
56429      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56430$as_echo_n "checking for connect in -lsocket... " >&6; }
56431if ${ac_cv_lib_socket_connect+:} false; then :
56432  $as_echo_n "(cached) " >&6
56433else
56434  ac_check_lib_save_LIBS=$LIBS
56435LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56437/* end confdefs.h.  */
56438
56439/* Override any GCC internal prototype to avoid an error.
56440   Use char because int might match the return type of a GCC
56441   builtin and then its argument prototype would still apply.  */
56442#ifdef __cplusplus
56443extern "C"
56444#endif
56445char connect ();
56446int
56447main ()
56448{
56449return connect ();
56450  ;
56451  return 0;
56452}
56453_ACEOF
56454if ac_fn_cxx_try_link "$LINENO"; then :
56455  ac_cv_lib_socket_connect=yes
56456else
56457  ac_cv_lib_socket_connect=no
56458fi
56459rm -f core conftest.err conftest.$ac_objext \
56460    conftest$ac_exeext conftest.$ac_ext
56461LIBS=$ac_check_lib_save_LIBS
56462fi
56463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56464$as_echo "$ac_cv_lib_socket_connect" >&6; }
56465if test "x$ac_cv_lib_socket_connect" = xyes; then :
56466  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56467fi
56468
56469    fi
56470
56471    # Guillermo Gomez says -lposix is necessary on A/UX.
56472    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56473if test "x$ac_cv_func_remove" = xyes; then :
56474
56475fi
56476
56477    if test $ac_cv_func_remove = no; then
56478      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56479$as_echo_n "checking for remove in -lposix... " >&6; }
56480if ${ac_cv_lib_posix_remove+:} false; then :
56481  $as_echo_n "(cached) " >&6
56482else
56483  ac_check_lib_save_LIBS=$LIBS
56484LIBS="-lposix  $LIBS"
56485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56486/* end confdefs.h.  */
56487
56488/* Override any GCC internal prototype to avoid an error.
56489   Use char because int might match the return type of a GCC
56490   builtin and then its argument prototype would still apply.  */
56491#ifdef __cplusplus
56492extern "C"
56493#endif
56494char remove ();
56495int
56496main ()
56497{
56498return remove ();
56499  ;
56500  return 0;
56501}
56502_ACEOF
56503if ac_fn_cxx_try_link "$LINENO"; then :
56504  ac_cv_lib_posix_remove=yes
56505else
56506  ac_cv_lib_posix_remove=no
56507fi
56508rm -f core conftest.err conftest.$ac_objext \
56509    conftest$ac_exeext conftest.$ac_ext
56510LIBS=$ac_check_lib_save_LIBS
56511fi
56512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56513$as_echo "$ac_cv_lib_posix_remove" >&6; }
56514if test "x$ac_cv_lib_posix_remove" = xyes; then :
56515  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56516fi
56517
56518    fi
56519
56520    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56521    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56522if test "x$ac_cv_func_shmat" = xyes; then :
56523
56524fi
56525
56526    if test $ac_cv_func_shmat = no; then
56527      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56528$as_echo_n "checking for shmat in -lipc... " >&6; }
56529if ${ac_cv_lib_ipc_shmat+:} false; then :
56530  $as_echo_n "(cached) " >&6
56531else
56532  ac_check_lib_save_LIBS=$LIBS
56533LIBS="-lipc  $LIBS"
56534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56535/* end confdefs.h.  */
56536
56537/* Override any GCC internal prototype to avoid an error.
56538   Use char because int might match the return type of a GCC
56539   builtin and then its argument prototype would still apply.  */
56540#ifdef __cplusplus
56541extern "C"
56542#endif
56543char shmat ();
56544int
56545main ()
56546{
56547return shmat ();
56548  ;
56549  return 0;
56550}
56551_ACEOF
56552if ac_fn_cxx_try_link "$LINENO"; then :
56553  ac_cv_lib_ipc_shmat=yes
56554else
56555  ac_cv_lib_ipc_shmat=no
56556fi
56557rm -f core conftest.err conftest.$ac_objext \
56558    conftest$ac_exeext conftest.$ac_ext
56559LIBS=$ac_check_lib_save_LIBS
56560fi
56561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56562$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56563if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56564  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56565fi
56566
56567    fi
56568  fi
56569
56570  # Check for libraries that X11R6 Xt/Xaw programs need.
56571  ac_save_LDFLAGS=$LDFLAGS
56572  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56573  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56574  # check for ICE first), but we must link in the order -lSM -lICE or
56575  # we get undefined symbols.  So assume we have SM if we have ICE.
56576  # These have to be linked with before -lX11, unlike the other
56577  # libraries we check for below, so use a different variable.
56578  # John Interrante, Karl Berry
56579  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56580$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56581if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56582  $as_echo_n "(cached) " >&6
56583else
56584  ac_check_lib_save_LIBS=$LIBS
56585LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56587/* end confdefs.h.  */
56588
56589/* Override any GCC internal prototype to avoid an error.
56590   Use char because int might match the return type of a GCC
56591   builtin and then its argument prototype would still apply.  */
56592#ifdef __cplusplus
56593extern "C"
56594#endif
56595char IceConnectionNumber ();
56596int
56597main ()
56598{
56599return IceConnectionNumber ();
56600  ;
56601  return 0;
56602}
56603_ACEOF
56604if ac_fn_cxx_try_link "$LINENO"; then :
56605  ac_cv_lib_ICE_IceConnectionNumber=yes
56606else
56607  ac_cv_lib_ICE_IceConnectionNumber=no
56608fi
56609rm -f core conftest.err conftest.$ac_objext \
56610    conftest$ac_exeext conftest.$ac_ext
56611LIBS=$ac_check_lib_save_LIBS
56612fi
56613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56614$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56615if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56616  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56617fi
56618
56619  LDFLAGS=$ac_save_LDFLAGS
56620
56621fi
56622
56623
56624    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56625    # this doesn't make sense so we remove it.
56626    if test "x$COMPILE_TYPE" = xcross; then
56627      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56628    fi
56629
56630    if test "x$no_x" = xyes; then
56631
56632  # Print a helpful message on how to acquire the necessary build dependency.
56633  # x11 is the help tag: freetype, cups, alsa etc
56634  MISSING_DEPENDENCY=x11
56635
56636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56637    cygwin_help $MISSING_DEPENDENCY
56638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56639    msys_help $MISSING_DEPENDENCY
56640  else
56641    PKGHANDLER_COMMAND=
56642
56643    case $PKGHANDLER in
56644      apt-get)
56645        apt_help     $MISSING_DEPENDENCY ;;
56646      yum)
56647        yum_help     $MISSING_DEPENDENCY ;;
56648      brew)
56649        brew_help    $MISSING_DEPENDENCY ;;
56650      port)
56651        port_help    $MISSING_DEPENDENCY ;;
56652      pkgutil)
56653        pkgutil_help $MISSING_DEPENDENCY ;;
56654      pkgadd)
56655        pkgadd_help  $MISSING_DEPENDENCY ;;
56656    esac
56657
56658    if test "x$PKGHANDLER_COMMAND" != x; then
56659      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56660    fi
56661  fi
56662
56663      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56664    fi
56665
56666    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56667      OPENWIN_HOME="/usr/openwin"
56668      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56669      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56670          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56671    fi
56672
56673    ac_ext=c
56674ac_cpp='$CPP $CPPFLAGS'
56675ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56676ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56677ac_compiler_gnu=$ac_cv_c_compiler_gnu
56678
56679    OLD_CFLAGS="$CFLAGS"
56680    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56681
56682    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56683    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56684do :
56685  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56686ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56687          # include <X11/Xlib.h>
56688          # include <X11/Xutil.h>
56689
56690
56691"
56692if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56693  cat >>confdefs.h <<_ACEOF
56694#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56695_ACEOF
56696 X11_HEADERS_OK=yes
56697else
56698  X11_HEADERS_OK=no; break
56699fi
56700
56701done
56702
56703
56704    if test "x$X11_HEADERS_OK" = xno; then
56705
56706  # Print a helpful message on how to acquire the necessary build dependency.
56707  # x11 is the help tag: freetype, cups, alsa etc
56708  MISSING_DEPENDENCY=x11
56709
56710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56711    cygwin_help $MISSING_DEPENDENCY
56712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56713    msys_help $MISSING_DEPENDENCY
56714  else
56715    PKGHANDLER_COMMAND=
56716
56717    case $PKGHANDLER in
56718      apt-get)
56719        apt_help     $MISSING_DEPENDENCY ;;
56720      yum)
56721        yum_help     $MISSING_DEPENDENCY ;;
56722      brew)
56723        brew_help    $MISSING_DEPENDENCY ;;
56724      port)
56725        port_help    $MISSING_DEPENDENCY ;;
56726      pkgutil)
56727        pkgutil_help $MISSING_DEPENDENCY ;;
56728      pkgadd)
56729        pkgadd_help  $MISSING_DEPENDENCY ;;
56730    esac
56731
56732    if test "x$PKGHANDLER_COMMAND" != x; then
56733      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56734    fi
56735  fi
56736
56737      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56738    fi
56739
56740    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56741    # defined in libawt_xawt.
56742    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56743$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56744    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56745/* end confdefs.h.  */
56746#include <X11/extensions/Xrender.h>
56747int
56748main ()
56749{
56750XLinearGradient x;
56751  ;
56752  return 0;
56753}
56754_ACEOF
56755if ac_fn_c_try_compile "$LINENO"; then :
56756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56757$as_echo "yes" >&6; }
56758else
56759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56760$as_echo "no" >&6; }
56761         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56762fi
56763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56764
56765    CFLAGS="$OLD_CFLAGS"
56766    ac_ext=cpp
56767ac_cpp='$CXXCPP $CPPFLAGS'
56768ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56769ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56770ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56771
56772  fi # NEEDS_LIB_X11
56773
56774
56775
56776
56777
56778
56779# Check whether --with-cups was given.
56780if test "${with_cups+set}" = set; then :
56781  withval=$with_cups;
56782fi
56783
56784
56785# Check whether --with-cups-include was given.
56786if test "${with_cups_include+set}" = set; then :
56787  withval=$with_cups_include;
56788fi
56789
56790
56791  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56792    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56793        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56794      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56795$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56796    fi
56797    CUPS_CFLAGS=
56798  else
56799    CUPS_FOUND=no
56800
56801    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56802      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56803    fi
56804
56805    if test "x${with_cups}" != x; then
56806      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56807$as_echo_n "checking for cups headers... " >&6; }
56808      if test -s "${with_cups}/include/cups/cups.h"; then
56809        CUPS_CFLAGS="-I${with_cups}/include"
56810        CUPS_FOUND=yes
56811        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56812$as_echo "$CUPS_FOUND" >&6; }
56813      else
56814        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56815      fi
56816    fi
56817    if test "x${with_cups_include}" != x; then
56818      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56819$as_echo_n "checking for cups headers... " >&6; }
56820      if test -s "${with_cups_include}/cups/cups.h"; then
56821        CUPS_CFLAGS="-I${with_cups_include}"
56822        CUPS_FOUND=yes
56823        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56824$as_echo "$CUPS_FOUND" >&6; }
56825      else
56826        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56827      fi
56828    fi
56829    if test "x$CUPS_FOUND" = xno; then
56830      # Are the cups headers installed in the default /usr/include location?
56831      for ac_header in cups/cups.h cups/ppd.h
56832do :
56833  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56834ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56835if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56836  cat >>confdefs.h <<_ACEOF
56837#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56838_ACEOF
56839
56840          CUPS_FOUND=yes
56841          CUPS_CFLAGS=
56842          DEFAULT_CUPS=yes
56843
56844fi
56845
56846done
56847
56848    fi
56849    if test "x$CUPS_FOUND" = xno; then
56850
56851  # Print a helpful message on how to acquire the necessary build dependency.
56852  # cups is the help tag: freetype, cups, alsa etc
56853  MISSING_DEPENDENCY=cups
56854
56855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56856    cygwin_help $MISSING_DEPENDENCY
56857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56858    msys_help $MISSING_DEPENDENCY
56859  else
56860    PKGHANDLER_COMMAND=
56861
56862    case $PKGHANDLER in
56863      apt-get)
56864        apt_help     $MISSING_DEPENDENCY ;;
56865      yum)
56866        yum_help     $MISSING_DEPENDENCY ;;
56867      brew)
56868        brew_help    $MISSING_DEPENDENCY ;;
56869      port)
56870        port_help    $MISSING_DEPENDENCY ;;
56871      pkgutil)
56872        pkgutil_help $MISSING_DEPENDENCY ;;
56873      pkgadd)
56874        pkgadd_help  $MISSING_DEPENDENCY ;;
56875    esac
56876
56877    if test "x$PKGHANDLER_COMMAND" != x; then
56878      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56879    fi
56880  fi
56881
56882      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56883    fi
56884  fi
56885
56886
56887
56888
56889
56890# Check whether --with-freetype was given.
56891if test "${with_freetype+set}" = set; then :
56892  withval=$with_freetype;
56893fi
56894
56895
56896# Check whether --with-freetype-include was given.
56897if test "${with_freetype_include+set}" = set; then :
56898  withval=$with_freetype_include;
56899fi
56900
56901
56902# Check whether --with-freetype-lib was given.
56903if test "${with_freetype_lib+set}" = set; then :
56904  withval=$with_freetype_lib;
56905fi
56906
56907
56908# Check whether --with-freetype-src was given.
56909if test "${with_freetype_src+set}" = set; then :
56910  withval=$with_freetype_src;
56911fi
56912
56913  # Check whether --enable-freetype-bundling was given.
56914if test "${enable_freetype_bundling+set}" = set; then :
56915  enableval=$enable_freetype_bundling;
56916fi
56917
56918
56919  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56920  FREETYPE_BASE_NAME=freetype
56921  FREETYPE_CFLAGS=
56922  FREETYPE_LIBS=
56923  FREETYPE_BUNDLE_LIB_PATH=
56924
56925  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56926    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56927        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56928        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56929        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56930      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56931$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56932    fi
56933    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56934      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56935$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56936    fi
56937  else
56938    # freetype is needed to build; go get it!
56939
56940    BUNDLE_FREETYPE="$enable_freetype_bundling"
56941
56942    if  test "x$with_freetype_src" != x; then
56943      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56944        # Try to build freetype if --with-freetype-src was given on Windows
56945
56946  FREETYPE_SRC_PATH="$with_freetype_src"
56947  BUILD_FREETYPE=yes
56948
56949  # Check if the freetype sources are acessible..
56950  if ! test -d $FREETYPE_SRC_PATH; then
56951    { $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
56952$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56953    BUILD_FREETYPE=no
56954  fi
56955  # ..and contain a vc2010 project file
56956  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56957  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56958    { $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
56959$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56960    BUILD_FREETYPE=no
56961  fi
56962  # Now check if configure found a version of 'msbuild.exe'
56963  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56964    { $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
56965$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;}
56966    BUILD_FREETYPE=no
56967  fi
56968
56969  # Ready to go..
56970  if test "x$BUILD_FREETYPE" = xyes; then
56971    # msbuild requires trailing slashes for output directories
56972    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56973    freetype_lib_path_unix="$freetype_lib_path"
56974    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56975
56976  unix_path="$vcxproj_path"
56977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56978    windows_path=`$CYGPATH -m "$unix_path"`
56979    vcxproj_path="$windows_path"
56980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56981    windows_path=`cmd //c echo $unix_path`
56982    vcxproj_path="$windows_path"
56983  fi
56984
56985
56986  unix_path="$freetype_lib_path"
56987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56988    windows_path=`$CYGPATH -m "$unix_path"`
56989    freetype_lib_path="$windows_path"
56990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56991    windows_path=`cmd //c echo $unix_path`
56992    freetype_lib_path="$windows_path"
56993  fi
56994
56995
56996  unix_path="$freetype_obj_path"
56997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56998    windows_path=`$CYGPATH -m "$unix_path"`
56999    freetype_obj_path="$windows_path"
57000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57001    windows_path=`cmd //c echo $unix_path`
57002    freetype_obj_path="$windows_path"
57003  fi
57004
57005    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57006      freetype_platform=x64
57007    else
57008      freetype_platform=win32
57009    fi
57010
57011    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57012    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57013    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57014    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57015    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57016$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57017
57018    # First we try to build the freetype.dll
57019    $ECHO -e "@echo off\n"\
57020        "$MSBUILD $vcxproj_path "\
57021        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57022        "/p:Configuration=\"Release Multithreaded\" "\
57023        "/p:Platform=$freetype_platform "\
57024        "/p:ConfigurationType=DynamicLibrary "\
57025        "/p:TargetName=freetype "\
57026        "/p:OutDir=\"$freetype_lib_path\" "\
57027        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57028    cmd /c freetype.bat
57029
57030    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57031      # If that succeeds we also build freetype.lib
57032      $ECHO -e "@echo off\n"\
57033          "$MSBUILD $vcxproj_path "\
57034          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57035          "/p:Configuration=\"Release Multithreaded\" "\
57036          "/p:Platform=$freetype_platform "\
57037          "/p:ConfigurationType=StaticLibrary "\
57038          "/p:TargetName=freetype "\
57039          "/p:OutDir=\"$freetype_lib_path\" "\
57040          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57041      cmd /c freetype.bat
57042
57043      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57044        # Once we build both, lib and dll, set freetype lib and include path appropriately
57045        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57046        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57047        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57048$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57049      else
57050        BUILD_FREETYPE=no
57051      fi
57052    else
57053      BUILD_FREETYPE=no
57054    fi
57055  fi
57056
57057        if test "x$BUILD_FREETYPE" = xyes; then
57058          # Okay, we built it. Check that it works.
57059
57060  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57061  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57062  METHOD="--with-freetype-src"
57063
57064  # Let's start with an optimistic view of the world :-)
57065  FOUND_FREETYPE=yes
57066
57067  # First look for the canonical freetype main include file ft2build.h.
57068  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57069    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57070    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57071    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57072      # Fail.
57073      FOUND_FREETYPE=no
57074    fi
57075  fi
57076
57077  if test "x$FOUND_FREETYPE" = xyes; then
57078    # Include file found, let's continue the sanity check.
57079    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57080$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57081
57082    # Reset to default value
57083    FREETYPE_BASE_NAME=freetype
57084    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57085    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57086      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57087          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57088        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57089        # for the .6 version explicitly.
57090        FREETYPE_BASE_NAME=freetype.6
57091        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57092        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57093$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57094      else
57095        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57096$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57097        FOUND_FREETYPE=no
57098      fi
57099    else
57100      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57101        # On Windows, we will need both .lib and .dll file.
57102        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57103          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57104$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57105          FOUND_FREETYPE=no
57106        fi
57107      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57108          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57109        # Found lib in isa dir, use that instead.
57110        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57111        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57112$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57113      fi
57114    fi
57115  fi
57116
57117  if test "x$FOUND_FREETYPE" = xyes; then
57118
57119  # Only process if variable expands to non-empty
57120
57121  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57122    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57123
57124  # Input might be given as Windows format, start by converting to
57125  # unix format.
57126  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57127  new_path=`$CYGPATH -u "$path"`
57128
57129  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57130  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57131  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57132  # "foo.exe" is OK but "foo" is an error.
57133  #
57134  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57135  # It is also a way to make sure we got the proper file name for the real test later on.
57136  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57137  if test "x$test_shortpath" = x; then
57138    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57139$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57140    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57141  fi
57142
57143  # Call helper function which possibly converts this using DOS-style short mode.
57144  # If so, the updated path is stored in $new_path.
57145
57146  input_path="$new_path"
57147  # Check if we need to convert this using DOS-style short mode. If the path
57148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57149  # take no chances and rewrite it.
57150  # Note: m4 eats our [], so we need to use [ and ] instead.
57151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57152  if test "x$has_forbidden_chars" != x; then
57153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57154    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57155    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57156    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57157      # Going to short mode and back again did indeed matter. Since short mode is
57158      # case insensitive, let's make it lowercase to improve readability.
57159      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57160      # Now convert it back to Unix-style (cygpath)
57161      input_path=`$CYGPATH -u "$shortmode_path"`
57162      new_path="$input_path"
57163    fi
57164  fi
57165
57166  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57167  if test "x$test_cygdrive_prefix" = x; then
57168    # As a simple fix, exclude /usr/bin since it's not a real path.
57169    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57170      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57171      # a path prefixed by /cygdrive for fixpath to work.
57172      new_path="$CYGWIN_ROOT_PATH$input_path"
57173    fi
57174  fi
57175
57176
57177  if test "x$path" != "x$new_path"; then
57178    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57180$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57181  fi
57182
57183    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57184
57185  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57186  has_colon=`$ECHO $path | $GREP ^.:`
57187  new_path="$path"
57188  if test "x$has_colon" = x; then
57189    # Not in mixed or Windows style, start by that.
57190    new_path=`cmd //c echo $path`
57191  fi
57192
57193
57194  input_path="$new_path"
57195  # Check if we need to convert this using DOS-style short mode. If the path
57196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57197  # take no chances and rewrite it.
57198  # Note: m4 eats our [], so we need to use [ and ] instead.
57199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57200  if test "x$has_forbidden_chars" != x; then
57201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57202    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57203  fi
57204
57205
57206  windows_path="$new_path"
57207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57208    unix_path=`$CYGPATH -u "$windows_path"`
57209    new_path="$unix_path"
57210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57212    new_path="$unix_path"
57213  fi
57214
57215  if test "x$path" != "x$new_path"; then
57216    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57218$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57219  fi
57220
57221  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57222  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57223
57224    else
57225      # We're on a unix platform. Hooray! :)
57226      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57227      has_space=`$ECHO "$path" | $GREP " "`
57228      if test "x$has_space" != x; then
57229        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57230$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57231        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57232      fi
57233
57234      # Use eval to expand a potential ~
57235      eval path="$path"
57236      if test ! -f "$path" && test ! -d "$path"; then
57237        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57238      fi
57239
57240      if test -d "$path"; then
57241        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57242      else
57243        dir="`$DIRNAME "$path"`"
57244        base="`$BASENAME "$path"`"
57245        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57246      fi
57247    fi
57248  fi
57249
57250
57251  # Only process if variable expands to non-empty
57252
57253  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57254    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57255
57256  # Input might be given as Windows format, start by converting to
57257  # unix format.
57258  path="$POTENTIAL_FREETYPE_LIB_PATH"
57259  new_path=`$CYGPATH -u "$path"`
57260
57261  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57262  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57263  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57264  # "foo.exe" is OK but "foo" is an error.
57265  #
57266  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57267  # It is also a way to make sure we got the proper file name for the real test later on.
57268  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57269  if test "x$test_shortpath" = x; then
57270    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57271$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57272    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57273  fi
57274
57275  # Call helper function which possibly converts this using DOS-style short mode.
57276  # If so, the updated path is stored in $new_path.
57277
57278  input_path="$new_path"
57279  # Check if we need to convert this using DOS-style short mode. If the path
57280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57281  # take no chances and rewrite it.
57282  # Note: m4 eats our [], so we need to use [ and ] instead.
57283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57284  if test "x$has_forbidden_chars" != x; then
57285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57286    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57287    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57288    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57289      # Going to short mode and back again did indeed matter. Since short mode is
57290      # case insensitive, let's make it lowercase to improve readability.
57291      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57292      # Now convert it back to Unix-style (cygpath)
57293      input_path=`$CYGPATH -u "$shortmode_path"`
57294      new_path="$input_path"
57295    fi
57296  fi
57297
57298  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57299  if test "x$test_cygdrive_prefix" = x; then
57300    # As a simple fix, exclude /usr/bin since it's not a real path.
57301    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57302      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57303      # a path prefixed by /cygdrive for fixpath to work.
57304      new_path="$CYGWIN_ROOT_PATH$input_path"
57305    fi
57306  fi
57307
57308
57309  if test "x$path" != "x$new_path"; then
57310    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57312$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57313  fi
57314
57315    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57316
57317  path="$POTENTIAL_FREETYPE_LIB_PATH"
57318  has_colon=`$ECHO $path | $GREP ^.:`
57319  new_path="$path"
57320  if test "x$has_colon" = x; then
57321    # Not in mixed or Windows style, start by that.
57322    new_path=`cmd //c echo $path`
57323  fi
57324
57325
57326  input_path="$new_path"
57327  # Check if we need to convert this using DOS-style short mode. If the path
57328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57329  # take no chances and rewrite it.
57330  # Note: m4 eats our [], so we need to use [ and ] instead.
57331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57332  if test "x$has_forbidden_chars" != x; then
57333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57334    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57335  fi
57336
57337
57338  windows_path="$new_path"
57339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57340    unix_path=`$CYGPATH -u "$windows_path"`
57341    new_path="$unix_path"
57342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57344    new_path="$unix_path"
57345  fi
57346
57347  if test "x$path" != "x$new_path"; then
57348    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57350$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57351  fi
57352
57353  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57354  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57355
57356    else
57357      # We're on a unix platform. Hooray! :)
57358      path="$POTENTIAL_FREETYPE_LIB_PATH"
57359      has_space=`$ECHO "$path" | $GREP " "`
57360      if test "x$has_space" != x; then
57361        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57362$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57363        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57364      fi
57365
57366      # Use eval to expand a potential ~
57367      eval path="$path"
57368      if test ! -f "$path" && test ! -d "$path"; then
57369        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57370      fi
57371
57372      if test -d "$path"; then
57373        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57374      else
57375        dir="`$DIRNAME "$path"`"
57376        base="`$BASENAME "$path"`"
57377        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57378      fi
57379    fi
57380  fi
57381
57382
57383    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57384    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57385$as_echo_n "checking for freetype includes... " >&6; }
57386    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57387$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57388    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57389    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57390$as_echo_n "checking for freetype libraries... " >&6; }
57391    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57392$as_echo "$FREETYPE_LIB_PATH" >&6; }
57393  fi
57394
57395          if test "x$FOUND_FREETYPE" != xyes; then
57396            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57397          fi
57398        else
57399          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57400$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57401          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57402        fi
57403      else
57404        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57405$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57406      fi
57407    fi
57408
57409    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57410      # User has specified settings
57411
57412      if test "x$BUNDLE_FREETYPE" = x; then
57413        # If not specified, default is to bundle freetype
57414        BUNDLE_FREETYPE=yes
57415      fi
57416
57417      if test "x$with_freetype" != x; then
57418        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57419        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57420      fi
57421
57422      # Allow --with-freetype-lib and --with-freetype-include to override
57423      if test "x$with_freetype_include" != x; then
57424        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57425      fi
57426      if test "x$with_freetype_lib" != x; then
57427        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57428      fi
57429
57430      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57431        # Okay, we got it. Check that it works.
57432
57433  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57434  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57435  METHOD="--with-freetype"
57436
57437  # Let's start with an optimistic view of the world :-)
57438  FOUND_FREETYPE=yes
57439
57440  # First look for the canonical freetype main include file ft2build.h.
57441  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57442    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57443    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57444    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57445      # Fail.
57446      FOUND_FREETYPE=no
57447    fi
57448  fi
57449
57450  if test "x$FOUND_FREETYPE" = xyes; then
57451    # Include file found, let's continue the sanity check.
57452    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57453$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57454
57455    # Reset to default value
57456    FREETYPE_BASE_NAME=freetype
57457    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57458    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57459      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57460          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57461        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57462        # for the .6 version explicitly.
57463        FREETYPE_BASE_NAME=freetype.6
57464        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57465        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57466$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57467      else
57468        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57469$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57470        FOUND_FREETYPE=no
57471      fi
57472    else
57473      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57474        # On Windows, we will need both .lib and .dll file.
57475        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57476          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57477$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57478          FOUND_FREETYPE=no
57479        fi
57480      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57481          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57482        # Found lib in isa dir, use that instead.
57483        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57484        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57485$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57486      fi
57487    fi
57488  fi
57489
57490  if test "x$FOUND_FREETYPE" = xyes; then
57491
57492  # Only process if variable expands to non-empty
57493
57494  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57495    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57496
57497  # Input might be given as Windows format, start by converting to
57498  # unix format.
57499  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57500  new_path=`$CYGPATH -u "$path"`
57501
57502  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57503  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57504  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57505  # "foo.exe" is OK but "foo" is an error.
57506  #
57507  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57508  # It is also a way to make sure we got the proper file name for the real test later on.
57509  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57510  if test "x$test_shortpath" = x; then
57511    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57512$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57513    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57514  fi
57515
57516  # Call helper function which possibly converts this using DOS-style short mode.
57517  # If so, the updated path is stored in $new_path.
57518
57519  input_path="$new_path"
57520  # Check if we need to convert this using DOS-style short mode. If the path
57521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57522  # take no chances and rewrite it.
57523  # Note: m4 eats our [], so we need to use [ and ] instead.
57524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57525  if test "x$has_forbidden_chars" != x; then
57526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57527    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57528    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57529    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57530      # Going to short mode and back again did indeed matter. Since short mode is
57531      # case insensitive, let's make it lowercase to improve readability.
57532      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57533      # Now convert it back to Unix-style (cygpath)
57534      input_path=`$CYGPATH -u "$shortmode_path"`
57535      new_path="$input_path"
57536    fi
57537  fi
57538
57539  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57540  if test "x$test_cygdrive_prefix" = x; then
57541    # As a simple fix, exclude /usr/bin since it's not a real path.
57542    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57543      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57544      # a path prefixed by /cygdrive for fixpath to work.
57545      new_path="$CYGWIN_ROOT_PATH$input_path"
57546    fi
57547  fi
57548
57549
57550  if test "x$path" != "x$new_path"; then
57551    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57553$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57554  fi
57555
57556    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57557
57558  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57559  has_colon=`$ECHO $path | $GREP ^.:`
57560  new_path="$path"
57561  if test "x$has_colon" = x; then
57562    # Not in mixed or Windows style, start by that.
57563    new_path=`cmd //c echo $path`
57564  fi
57565
57566
57567  input_path="$new_path"
57568  # Check if we need to convert this using DOS-style short mode. If the path
57569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57570  # take no chances and rewrite it.
57571  # Note: m4 eats our [], so we need to use [ and ] instead.
57572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57573  if test "x$has_forbidden_chars" != x; then
57574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57575    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57576  fi
57577
57578
57579  windows_path="$new_path"
57580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57581    unix_path=`$CYGPATH -u "$windows_path"`
57582    new_path="$unix_path"
57583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57585    new_path="$unix_path"
57586  fi
57587
57588  if test "x$path" != "x$new_path"; then
57589    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57591$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57592  fi
57593
57594  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57595  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57596
57597    else
57598      # We're on a unix platform. Hooray! :)
57599      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57600      has_space=`$ECHO "$path" | $GREP " "`
57601      if test "x$has_space" != x; then
57602        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57603$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57604        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57605      fi
57606
57607      # Use eval to expand a potential ~
57608      eval path="$path"
57609      if test ! -f "$path" && test ! -d "$path"; then
57610        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57611      fi
57612
57613      if test -d "$path"; then
57614        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57615      else
57616        dir="`$DIRNAME "$path"`"
57617        base="`$BASENAME "$path"`"
57618        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57619      fi
57620    fi
57621  fi
57622
57623
57624  # Only process if variable expands to non-empty
57625
57626  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57627    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57628
57629  # Input might be given as Windows format, start by converting to
57630  # unix format.
57631  path="$POTENTIAL_FREETYPE_LIB_PATH"
57632  new_path=`$CYGPATH -u "$path"`
57633
57634  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57635  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57636  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57637  # "foo.exe" is OK but "foo" is an error.
57638  #
57639  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57640  # It is also a way to make sure we got the proper file name for the real test later on.
57641  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57642  if test "x$test_shortpath" = x; then
57643    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57644$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57645    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57646  fi
57647
57648  # Call helper function which possibly converts this using DOS-style short mode.
57649  # If so, the updated path is stored in $new_path.
57650
57651  input_path="$new_path"
57652  # Check if we need to convert this using DOS-style short mode. If the path
57653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57654  # take no chances and rewrite it.
57655  # Note: m4 eats our [], so we need to use [ and ] instead.
57656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57657  if test "x$has_forbidden_chars" != x; then
57658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57659    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57660    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57661    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57662      # Going to short mode and back again did indeed matter. Since short mode is
57663      # case insensitive, let's make it lowercase to improve readability.
57664      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57665      # Now convert it back to Unix-style (cygpath)
57666      input_path=`$CYGPATH -u "$shortmode_path"`
57667      new_path="$input_path"
57668    fi
57669  fi
57670
57671  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57672  if test "x$test_cygdrive_prefix" = x; then
57673    # As a simple fix, exclude /usr/bin since it's not a real path.
57674    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57675      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57676      # a path prefixed by /cygdrive for fixpath to work.
57677      new_path="$CYGWIN_ROOT_PATH$input_path"
57678    fi
57679  fi
57680
57681
57682  if test "x$path" != "x$new_path"; then
57683    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57685$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57686  fi
57687
57688    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57689
57690  path="$POTENTIAL_FREETYPE_LIB_PATH"
57691  has_colon=`$ECHO $path | $GREP ^.:`
57692  new_path="$path"
57693  if test "x$has_colon" = x; then
57694    # Not in mixed or Windows style, start by that.
57695    new_path=`cmd //c echo $path`
57696  fi
57697
57698
57699  input_path="$new_path"
57700  # Check if we need to convert this using DOS-style short mode. If the path
57701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57702  # take no chances and rewrite it.
57703  # Note: m4 eats our [], so we need to use [ and ] instead.
57704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57705  if test "x$has_forbidden_chars" != x; then
57706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57707    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57708  fi
57709
57710
57711  windows_path="$new_path"
57712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57713    unix_path=`$CYGPATH -u "$windows_path"`
57714    new_path="$unix_path"
57715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57717    new_path="$unix_path"
57718  fi
57719
57720  if test "x$path" != "x$new_path"; then
57721    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57723$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57724  fi
57725
57726  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57727  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57728
57729    else
57730      # We're on a unix platform. Hooray! :)
57731      path="$POTENTIAL_FREETYPE_LIB_PATH"
57732      has_space=`$ECHO "$path" | $GREP " "`
57733      if test "x$has_space" != x; then
57734        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57735$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57736        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57737      fi
57738
57739      # Use eval to expand a potential ~
57740      eval path="$path"
57741      if test ! -f "$path" && test ! -d "$path"; then
57742        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57743      fi
57744
57745      if test -d "$path"; then
57746        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57747      else
57748        dir="`$DIRNAME "$path"`"
57749        base="`$BASENAME "$path"`"
57750        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57751      fi
57752    fi
57753  fi
57754
57755
57756    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57757    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57758$as_echo_n "checking for freetype includes... " >&6; }
57759    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57760$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57761    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57762    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57763$as_echo_n "checking for freetype libraries... " >&6; }
57764    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57765$as_echo "$FREETYPE_LIB_PATH" >&6; }
57766  fi
57767
57768        if test "x$FOUND_FREETYPE" != xyes; then
57769          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57770        fi
57771      else
57772        # User specified only one of lib or include. This is an error.
57773        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57774          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57775$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57776          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57777        else
57778          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57779$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57780          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57781        fi
57782      fi
57783    else
57784      # User did not specify settings, but we need freetype. Try to locate it.
57785
57786      if test "x$BUNDLE_FREETYPE" = x; then
57787        # If not specified, default is to bundle freetype only on windows
57788        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57789          BUNDLE_FREETYPE=yes
57790        else
57791          BUNDLE_FREETYPE=no
57792        fi
57793      fi
57794
57795      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57796      if test "x$SYSROOT" = x; then
57797        if test "x$FOUND_FREETYPE" != xyes; then
57798          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57799          if test "x$PKG_CONFIG" != x; then
57800
57801pkg_failed=no
57802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57803$as_echo_n "checking for FREETYPE... " >&6; }
57804
57805if test -n "$FREETYPE_CFLAGS"; then
57806    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57807 elif test -n "$PKG_CONFIG"; then
57808    if test -n "$PKG_CONFIG" && \
57809    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57810  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57811  ac_status=$?
57812  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57813  test $ac_status = 0; }; then
57814  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57815else
57816  pkg_failed=yes
57817fi
57818 else
57819    pkg_failed=untried
57820fi
57821if test -n "$FREETYPE_LIBS"; then
57822    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57823 elif test -n "$PKG_CONFIG"; then
57824    if test -n "$PKG_CONFIG" && \
57825    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57826  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57827  ac_status=$?
57828  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57829  test $ac_status = 0; }; then
57830  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57831else
57832  pkg_failed=yes
57833fi
57834 else
57835    pkg_failed=untried
57836fi
57837
57838
57839
57840if test $pkg_failed = yes; then
57841
57842if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57843        _pkg_short_errors_supported=yes
57844else
57845        _pkg_short_errors_supported=no
57846fi
57847        if test $_pkg_short_errors_supported = yes; then
57848	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57849        else
57850	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57851        fi
57852	# Put the nasty error message in config.log where it belongs
57853	echo "$FREETYPE_PKG_ERRORS" >&5
57854
57855	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57856$as_echo "no" >&6; }
57857                FOUND_FREETYPE=no
57858elif test $pkg_failed = untried; then
57859	FOUND_FREETYPE=no
57860else
57861	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57862	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57863        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57864$as_echo "yes" >&6; }
57865	FOUND_FREETYPE=yes
57866fi
57867            if test "x$FOUND_FREETYPE" = xyes; then
57868              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57869              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57870              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57871              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57872                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57873              fi
57874              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57875              if test "x$BUNDLE_FREETYPE" = xyes; then
57876                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57877$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57878                FOUND_FREETYPE=no
57879              else
57880                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57881$as_echo_n "checking for freetype... " >&6; }
57882                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57883$as_echo "yes (using pkg-config)" >&6; }
57884              fi
57885            fi
57886          fi
57887        fi
57888      fi
57889
57890      if test "x$FOUND_FREETYPE" != xyes; then
57891        # Check in well-known locations
57892        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57893          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57894
57895  windows_path="$FREETYPE_BASE_DIR"
57896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57897    unix_path=`$CYGPATH -u "$windows_path"`
57898    FREETYPE_BASE_DIR="$unix_path"
57899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57901    FREETYPE_BASE_DIR="$unix_path"
57902  fi
57903
57904
57905  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57906  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57907  METHOD="well-known location"
57908
57909  # Let's start with an optimistic view of the world :-)
57910  FOUND_FREETYPE=yes
57911
57912  # First look for the canonical freetype main include file ft2build.h.
57913  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57914    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57915    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57916    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57917      # Fail.
57918      FOUND_FREETYPE=no
57919    fi
57920  fi
57921
57922  if test "x$FOUND_FREETYPE" = xyes; then
57923    # Include file found, let's continue the sanity check.
57924    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57925$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57926
57927    # Reset to default value
57928    FREETYPE_BASE_NAME=freetype
57929    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57930    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57931      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57932          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57933        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57934        # for the .6 version explicitly.
57935        FREETYPE_BASE_NAME=freetype.6
57936        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57937        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57938$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57939      else
57940        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57941$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57942        FOUND_FREETYPE=no
57943      fi
57944    else
57945      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57946        # On Windows, we will need both .lib and .dll file.
57947        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57948          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57949$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57950          FOUND_FREETYPE=no
57951        fi
57952      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57953          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57954        # Found lib in isa dir, use that instead.
57955        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57956        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57957$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57958      fi
57959    fi
57960  fi
57961
57962  if test "x$FOUND_FREETYPE" = xyes; then
57963
57964  # Only process if variable expands to non-empty
57965
57966  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57967    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57968
57969  # Input might be given as Windows format, start by converting to
57970  # unix format.
57971  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57972  new_path=`$CYGPATH -u "$path"`
57973
57974  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57975  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57976  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57977  # "foo.exe" is OK but "foo" is an error.
57978  #
57979  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57980  # It is also a way to make sure we got the proper file name for the real test later on.
57981  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57982  if test "x$test_shortpath" = x; then
57983    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57984$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57985    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57986  fi
57987
57988  # Call helper function which possibly converts this using DOS-style short mode.
57989  # If so, the updated path is stored in $new_path.
57990
57991  input_path="$new_path"
57992  # Check if we need to convert this using DOS-style short mode. If the path
57993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57994  # take no chances and rewrite it.
57995  # Note: m4 eats our [], so we need to use [ and ] instead.
57996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57997  if test "x$has_forbidden_chars" != x; then
57998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57999    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58000    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58001    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58002      # Going to short mode and back again did indeed matter. Since short mode is
58003      # case insensitive, let's make it lowercase to improve readability.
58004      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58005      # Now convert it back to Unix-style (cygpath)
58006      input_path=`$CYGPATH -u "$shortmode_path"`
58007      new_path="$input_path"
58008    fi
58009  fi
58010
58011  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58012  if test "x$test_cygdrive_prefix" = x; then
58013    # As a simple fix, exclude /usr/bin since it's not a real path.
58014    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58015      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58016      # a path prefixed by /cygdrive for fixpath to work.
58017      new_path="$CYGWIN_ROOT_PATH$input_path"
58018    fi
58019  fi
58020
58021
58022  if test "x$path" != "x$new_path"; then
58023    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58024    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58025$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58026  fi
58027
58028    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58029
58030  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58031  has_colon=`$ECHO $path | $GREP ^.:`
58032  new_path="$path"
58033  if test "x$has_colon" = x; then
58034    # Not in mixed or Windows style, start by that.
58035    new_path=`cmd //c echo $path`
58036  fi
58037
58038
58039  input_path="$new_path"
58040  # Check if we need to convert this using DOS-style short mode. If the path
58041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58042  # take no chances and rewrite it.
58043  # Note: m4 eats our [], so we need to use [ and ] instead.
58044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58045  if test "x$has_forbidden_chars" != x; then
58046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58047    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58048  fi
58049
58050
58051  windows_path="$new_path"
58052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58053    unix_path=`$CYGPATH -u "$windows_path"`
58054    new_path="$unix_path"
58055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58057    new_path="$unix_path"
58058  fi
58059
58060  if test "x$path" != "x$new_path"; then
58061    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58063$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58064  fi
58065
58066  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58067  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58068
58069    else
58070      # We're on a unix platform. Hooray! :)
58071      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58072      has_space=`$ECHO "$path" | $GREP " "`
58073      if test "x$has_space" != x; then
58074        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58075$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58076        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58077      fi
58078
58079      # Use eval to expand a potential ~
58080      eval path="$path"
58081      if test ! -f "$path" && test ! -d "$path"; then
58082        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58083      fi
58084
58085      if test -d "$path"; then
58086        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58087      else
58088        dir="`$DIRNAME "$path"`"
58089        base="`$BASENAME "$path"`"
58090        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58091      fi
58092    fi
58093  fi
58094
58095
58096  # Only process if variable expands to non-empty
58097
58098  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58099    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58100
58101  # Input might be given as Windows format, start by converting to
58102  # unix format.
58103  path="$POTENTIAL_FREETYPE_LIB_PATH"
58104  new_path=`$CYGPATH -u "$path"`
58105
58106  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58107  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58108  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58109  # "foo.exe" is OK but "foo" is an error.
58110  #
58111  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58112  # It is also a way to make sure we got the proper file name for the real test later on.
58113  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58114  if test "x$test_shortpath" = x; then
58115    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58116$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58117    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58118  fi
58119
58120  # Call helper function which possibly converts this using DOS-style short mode.
58121  # If so, the updated path is stored in $new_path.
58122
58123  input_path="$new_path"
58124  # Check if we need to convert this using DOS-style short mode. If the path
58125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58126  # take no chances and rewrite it.
58127  # Note: m4 eats our [], so we need to use [ and ] instead.
58128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58129  if test "x$has_forbidden_chars" != x; then
58130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58131    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58132    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58133    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58134      # Going to short mode and back again did indeed matter. Since short mode is
58135      # case insensitive, let's make it lowercase to improve readability.
58136      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58137      # Now convert it back to Unix-style (cygpath)
58138      input_path=`$CYGPATH -u "$shortmode_path"`
58139      new_path="$input_path"
58140    fi
58141  fi
58142
58143  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58144  if test "x$test_cygdrive_prefix" = x; then
58145    # As a simple fix, exclude /usr/bin since it's not a real path.
58146    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58147      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58148      # a path prefixed by /cygdrive for fixpath to work.
58149      new_path="$CYGWIN_ROOT_PATH$input_path"
58150    fi
58151  fi
58152
58153
58154  if test "x$path" != "x$new_path"; then
58155    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58157$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58158  fi
58159
58160    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58161
58162  path="$POTENTIAL_FREETYPE_LIB_PATH"
58163  has_colon=`$ECHO $path | $GREP ^.:`
58164  new_path="$path"
58165  if test "x$has_colon" = x; then
58166    # Not in mixed or Windows style, start by that.
58167    new_path=`cmd //c echo $path`
58168  fi
58169
58170
58171  input_path="$new_path"
58172  # Check if we need to convert this using DOS-style short mode. If the path
58173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58174  # take no chances and rewrite it.
58175  # Note: m4 eats our [], so we need to use [ and ] instead.
58176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58177  if test "x$has_forbidden_chars" != x; then
58178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58179    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58180  fi
58181
58182
58183  windows_path="$new_path"
58184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58185    unix_path=`$CYGPATH -u "$windows_path"`
58186    new_path="$unix_path"
58187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58189    new_path="$unix_path"
58190  fi
58191
58192  if test "x$path" != "x$new_path"; then
58193    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58194    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58195$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58196  fi
58197
58198  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58199  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58200
58201    else
58202      # We're on a unix platform. Hooray! :)
58203      path="$POTENTIAL_FREETYPE_LIB_PATH"
58204      has_space=`$ECHO "$path" | $GREP " "`
58205      if test "x$has_space" != x; then
58206        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58207$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58208        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58209      fi
58210
58211      # Use eval to expand a potential ~
58212      eval path="$path"
58213      if test ! -f "$path" && test ! -d "$path"; then
58214        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58215      fi
58216
58217      if test -d "$path"; then
58218        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58219      else
58220        dir="`$DIRNAME "$path"`"
58221        base="`$BASENAME "$path"`"
58222        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58223      fi
58224    fi
58225  fi
58226
58227
58228    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58229    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58230$as_echo_n "checking for freetype includes... " >&6; }
58231    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58232$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58233    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58235$as_echo_n "checking for freetype libraries... " >&6; }
58236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58237$as_echo "$FREETYPE_LIB_PATH" >&6; }
58238  fi
58239
58240          if test "x$FOUND_FREETYPE" != xyes; then
58241            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58242
58243  windows_path="$FREETYPE_BASE_DIR"
58244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58245    unix_path=`$CYGPATH -u "$windows_path"`
58246    FREETYPE_BASE_DIR="$unix_path"
58247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58249    FREETYPE_BASE_DIR="$unix_path"
58250  fi
58251
58252
58253  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58254  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58255  METHOD="well-known location"
58256
58257  # Let's start with an optimistic view of the world :-)
58258  FOUND_FREETYPE=yes
58259
58260  # First look for the canonical freetype main include file ft2build.h.
58261  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58262    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58263    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58264    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58265      # Fail.
58266      FOUND_FREETYPE=no
58267    fi
58268  fi
58269
58270  if test "x$FOUND_FREETYPE" = xyes; then
58271    # Include file found, let's continue the sanity check.
58272    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58273$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58274
58275    # Reset to default value
58276    FREETYPE_BASE_NAME=freetype
58277    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58278    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58279      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58280          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58281        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58282        # for the .6 version explicitly.
58283        FREETYPE_BASE_NAME=freetype.6
58284        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58285        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58286$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58287      else
58288        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58289$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58290        FOUND_FREETYPE=no
58291      fi
58292    else
58293      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58294        # On Windows, we will need both .lib and .dll file.
58295        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58296          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58297$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58298          FOUND_FREETYPE=no
58299        fi
58300      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58301          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58302        # Found lib in isa dir, use that instead.
58303        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58304        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58305$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58306      fi
58307    fi
58308  fi
58309
58310  if test "x$FOUND_FREETYPE" = xyes; then
58311
58312  # Only process if variable expands to non-empty
58313
58314  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58315    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58316
58317  # Input might be given as Windows format, start by converting to
58318  # unix format.
58319  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58320  new_path=`$CYGPATH -u "$path"`
58321
58322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58325  # "foo.exe" is OK but "foo" is an error.
58326  #
58327  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58328  # It is also a way to make sure we got the proper file name for the real test later on.
58329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58330  if test "x$test_shortpath" = x; then
58331    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58332$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58333    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58334  fi
58335
58336  # Call helper function which possibly converts this using DOS-style short mode.
58337  # If so, the updated path is stored in $new_path.
58338
58339  input_path="$new_path"
58340  # Check if we need to convert this using DOS-style short mode. If the path
58341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58342  # take no chances and rewrite it.
58343  # Note: m4 eats our [], so we need to use [ and ] instead.
58344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58345  if test "x$has_forbidden_chars" != x; then
58346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58347    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58348    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58349    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58350      # Going to short mode and back again did indeed matter. Since short mode is
58351      # case insensitive, let's make it lowercase to improve readability.
58352      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58353      # Now convert it back to Unix-style (cygpath)
58354      input_path=`$CYGPATH -u "$shortmode_path"`
58355      new_path="$input_path"
58356    fi
58357  fi
58358
58359  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58360  if test "x$test_cygdrive_prefix" = x; then
58361    # As a simple fix, exclude /usr/bin since it's not a real path.
58362    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58363      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58364      # a path prefixed by /cygdrive for fixpath to work.
58365      new_path="$CYGWIN_ROOT_PATH$input_path"
58366    fi
58367  fi
58368
58369
58370  if test "x$path" != "x$new_path"; then
58371    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58372    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58373$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58374  fi
58375
58376    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58377
58378  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58379  has_colon=`$ECHO $path | $GREP ^.:`
58380  new_path="$path"
58381  if test "x$has_colon" = x; then
58382    # Not in mixed or Windows style, start by that.
58383    new_path=`cmd //c echo $path`
58384  fi
58385
58386
58387  input_path="$new_path"
58388  # Check if we need to convert this using DOS-style short mode. If the path
58389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58390  # take no chances and rewrite it.
58391  # Note: m4 eats our [], so we need to use [ and ] instead.
58392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58393  if test "x$has_forbidden_chars" != x; then
58394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58396  fi
58397
58398
58399  windows_path="$new_path"
58400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58401    unix_path=`$CYGPATH -u "$windows_path"`
58402    new_path="$unix_path"
58403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58405    new_path="$unix_path"
58406  fi
58407
58408  if test "x$path" != "x$new_path"; then
58409    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58411$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58412  fi
58413
58414  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58415  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58416
58417    else
58418      # We're on a unix platform. Hooray! :)
58419      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58420      has_space=`$ECHO "$path" | $GREP " "`
58421      if test "x$has_space" != x; then
58422        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58423$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58424        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58425      fi
58426
58427      # Use eval to expand a potential ~
58428      eval path="$path"
58429      if test ! -f "$path" && test ! -d "$path"; then
58430        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58431      fi
58432
58433      if test -d "$path"; then
58434        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58435      else
58436        dir="`$DIRNAME "$path"`"
58437        base="`$BASENAME "$path"`"
58438        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58439      fi
58440    fi
58441  fi
58442
58443
58444  # Only process if variable expands to non-empty
58445
58446  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58447    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58448
58449  # Input might be given as Windows format, start by converting to
58450  # unix format.
58451  path="$POTENTIAL_FREETYPE_LIB_PATH"
58452  new_path=`$CYGPATH -u "$path"`
58453
58454  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58455  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58456  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58457  # "foo.exe" is OK but "foo" is an error.
58458  #
58459  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58460  # It is also a way to make sure we got the proper file name for the real test later on.
58461  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58462  if test "x$test_shortpath" = x; then
58463    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58464$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58465    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58466  fi
58467
58468  # Call helper function which possibly converts this using DOS-style short mode.
58469  # If so, the updated path is stored in $new_path.
58470
58471  input_path="$new_path"
58472  # Check if we need to convert this using DOS-style short mode. If the path
58473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58474  # take no chances and rewrite it.
58475  # Note: m4 eats our [], so we need to use [ and ] instead.
58476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58477  if test "x$has_forbidden_chars" != x; then
58478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58479    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58480    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58481    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58482      # Going to short mode and back again did indeed matter. Since short mode is
58483      # case insensitive, let's make it lowercase to improve readability.
58484      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58485      # Now convert it back to Unix-style (cygpath)
58486      input_path=`$CYGPATH -u "$shortmode_path"`
58487      new_path="$input_path"
58488    fi
58489  fi
58490
58491  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58492  if test "x$test_cygdrive_prefix" = x; then
58493    # As a simple fix, exclude /usr/bin since it's not a real path.
58494    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58495      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58496      # a path prefixed by /cygdrive for fixpath to work.
58497      new_path="$CYGWIN_ROOT_PATH$input_path"
58498    fi
58499  fi
58500
58501
58502  if test "x$path" != "x$new_path"; then
58503    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58505$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58506  fi
58507
58508    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58509
58510  path="$POTENTIAL_FREETYPE_LIB_PATH"
58511  has_colon=`$ECHO $path | $GREP ^.:`
58512  new_path="$path"
58513  if test "x$has_colon" = x; then
58514    # Not in mixed or Windows style, start by that.
58515    new_path=`cmd //c echo $path`
58516  fi
58517
58518
58519  input_path="$new_path"
58520  # Check if we need to convert this using DOS-style short mode. If the path
58521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58522  # take no chances and rewrite it.
58523  # Note: m4 eats our [], so we need to use [ and ] instead.
58524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58525  if test "x$has_forbidden_chars" != x; then
58526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58527    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58528  fi
58529
58530
58531  windows_path="$new_path"
58532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58533    unix_path=`$CYGPATH -u "$windows_path"`
58534    new_path="$unix_path"
58535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58537    new_path="$unix_path"
58538  fi
58539
58540  if test "x$path" != "x$new_path"; then
58541    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58543$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58544  fi
58545
58546  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58547  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58548
58549    else
58550      # We're on a unix platform. Hooray! :)
58551      path="$POTENTIAL_FREETYPE_LIB_PATH"
58552      has_space=`$ECHO "$path" | $GREP " "`
58553      if test "x$has_space" != x; then
58554        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58555$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58556        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58557      fi
58558
58559      # Use eval to expand a potential ~
58560      eval path="$path"
58561      if test ! -f "$path" && test ! -d "$path"; then
58562        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58563      fi
58564
58565      if test -d "$path"; then
58566        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58567      else
58568        dir="`$DIRNAME "$path"`"
58569        base="`$BASENAME "$path"`"
58570        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58571      fi
58572    fi
58573  fi
58574
58575
58576    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58577    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58578$as_echo_n "checking for freetype includes... " >&6; }
58579    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58580$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58581    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58582    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58583$as_echo_n "checking for freetype libraries... " >&6; }
58584    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58585$as_echo "$FREETYPE_LIB_PATH" >&6; }
58586  fi
58587
58588          fi
58589          if test "x$FOUND_FREETYPE" != xyes; then
58590            FREETYPE_BASE_DIR="$HOME/freetype"
58591
58592  windows_path="$FREETYPE_BASE_DIR"
58593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58594    unix_path=`$CYGPATH -u "$windows_path"`
58595    FREETYPE_BASE_DIR="$unix_path"
58596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58598    FREETYPE_BASE_DIR="$unix_path"
58599  fi
58600
58601            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58602
58603  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58604  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58605  METHOD="well-known location"
58606
58607  # Let's start with an optimistic view of the world :-)
58608  FOUND_FREETYPE=yes
58609
58610  # First look for the canonical freetype main include file ft2build.h.
58611  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58612    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58613    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58614    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58615      # Fail.
58616      FOUND_FREETYPE=no
58617    fi
58618  fi
58619
58620  if test "x$FOUND_FREETYPE" = xyes; then
58621    # Include file found, let's continue the sanity check.
58622    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58623$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58624
58625    # Reset to default value
58626    FREETYPE_BASE_NAME=freetype
58627    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58628    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58629      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58630          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58631        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58632        # for the .6 version explicitly.
58633        FREETYPE_BASE_NAME=freetype.6
58634        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58635        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58636$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58637      else
58638        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58639$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58640        FOUND_FREETYPE=no
58641      fi
58642    else
58643      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58644        # On Windows, we will need both .lib and .dll file.
58645        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58646          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58647$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58648          FOUND_FREETYPE=no
58649        fi
58650      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58651          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58652        # Found lib in isa dir, use that instead.
58653        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58654        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58655$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58656      fi
58657    fi
58658  fi
58659
58660  if test "x$FOUND_FREETYPE" = xyes; then
58661
58662  # Only process if variable expands to non-empty
58663
58664  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58665    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58666
58667  # Input might be given as Windows format, start by converting to
58668  # unix format.
58669  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58670  new_path=`$CYGPATH -u "$path"`
58671
58672  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58673  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58674  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58675  # "foo.exe" is OK but "foo" is an error.
58676  #
58677  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58678  # It is also a way to make sure we got the proper file name for the real test later on.
58679  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58680  if test "x$test_shortpath" = x; then
58681    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58682$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58683    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58684  fi
58685
58686  # Call helper function which possibly converts this using DOS-style short mode.
58687  # If so, the updated path is stored in $new_path.
58688
58689  input_path="$new_path"
58690  # Check if we need to convert this using DOS-style short mode. If the path
58691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58692  # take no chances and rewrite it.
58693  # Note: m4 eats our [], so we need to use [ and ] instead.
58694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58695  if test "x$has_forbidden_chars" != x; then
58696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58697    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58698    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58699    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58700      # Going to short mode and back again did indeed matter. Since short mode is
58701      # case insensitive, let's make it lowercase to improve readability.
58702      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58703      # Now convert it back to Unix-style (cygpath)
58704      input_path=`$CYGPATH -u "$shortmode_path"`
58705      new_path="$input_path"
58706    fi
58707  fi
58708
58709  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58710  if test "x$test_cygdrive_prefix" = x; then
58711    # As a simple fix, exclude /usr/bin since it's not a real path.
58712    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58713      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58714      # a path prefixed by /cygdrive for fixpath to work.
58715      new_path="$CYGWIN_ROOT_PATH$input_path"
58716    fi
58717  fi
58718
58719
58720  if test "x$path" != "x$new_path"; then
58721    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58723$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58724  fi
58725
58726    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58727
58728  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58729  has_colon=`$ECHO $path | $GREP ^.:`
58730  new_path="$path"
58731  if test "x$has_colon" = x; then
58732    # Not in mixed or Windows style, start by that.
58733    new_path=`cmd //c echo $path`
58734  fi
58735
58736
58737  input_path="$new_path"
58738  # Check if we need to convert this using DOS-style short mode. If the path
58739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58740  # take no chances and rewrite it.
58741  # Note: m4 eats our [], so we need to use [ and ] instead.
58742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58743  if test "x$has_forbidden_chars" != x; then
58744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58745    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58746  fi
58747
58748
58749  windows_path="$new_path"
58750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58751    unix_path=`$CYGPATH -u "$windows_path"`
58752    new_path="$unix_path"
58753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58755    new_path="$unix_path"
58756  fi
58757
58758  if test "x$path" != "x$new_path"; then
58759    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58761$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58762  fi
58763
58764  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58765  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58766
58767    else
58768      # We're on a unix platform. Hooray! :)
58769      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58770      has_space=`$ECHO "$path" | $GREP " "`
58771      if test "x$has_space" != x; then
58772        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58773$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58774        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58775      fi
58776
58777      # Use eval to expand a potential ~
58778      eval path="$path"
58779      if test ! -f "$path" && test ! -d "$path"; then
58780        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58781      fi
58782
58783      if test -d "$path"; then
58784        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58785      else
58786        dir="`$DIRNAME "$path"`"
58787        base="`$BASENAME "$path"`"
58788        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58789      fi
58790    fi
58791  fi
58792
58793
58794  # Only process if variable expands to non-empty
58795
58796  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58797    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58798
58799  # Input might be given as Windows format, start by converting to
58800  # unix format.
58801  path="$POTENTIAL_FREETYPE_LIB_PATH"
58802  new_path=`$CYGPATH -u "$path"`
58803
58804  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58805  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58806  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58807  # "foo.exe" is OK but "foo" is an error.
58808  #
58809  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58810  # It is also a way to make sure we got the proper file name for the real test later on.
58811  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58812  if test "x$test_shortpath" = x; then
58813    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58814$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58815    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58816  fi
58817
58818  # Call helper function which possibly converts this using DOS-style short mode.
58819  # If so, the updated path is stored in $new_path.
58820
58821  input_path="$new_path"
58822  # Check if we need to convert this using DOS-style short mode. If the path
58823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58824  # take no chances and rewrite it.
58825  # Note: m4 eats our [], so we need to use [ and ] instead.
58826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58827  if test "x$has_forbidden_chars" != x; then
58828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58829    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58830    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58831    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58832      # Going to short mode and back again did indeed matter. Since short mode is
58833      # case insensitive, let's make it lowercase to improve readability.
58834      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58835      # Now convert it back to Unix-style (cygpath)
58836      input_path=`$CYGPATH -u "$shortmode_path"`
58837      new_path="$input_path"
58838    fi
58839  fi
58840
58841  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58842  if test "x$test_cygdrive_prefix" = x; then
58843    # As a simple fix, exclude /usr/bin since it's not a real path.
58844    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58845      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58846      # a path prefixed by /cygdrive for fixpath to work.
58847      new_path="$CYGWIN_ROOT_PATH$input_path"
58848    fi
58849  fi
58850
58851
58852  if test "x$path" != "x$new_path"; then
58853    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58854    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58855$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58856  fi
58857
58858    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58859
58860  path="$POTENTIAL_FREETYPE_LIB_PATH"
58861  has_colon=`$ECHO $path | $GREP ^.:`
58862  new_path="$path"
58863  if test "x$has_colon" = x; then
58864    # Not in mixed or Windows style, start by that.
58865    new_path=`cmd //c echo $path`
58866  fi
58867
58868
58869  input_path="$new_path"
58870  # Check if we need to convert this using DOS-style short mode. If the path
58871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58872  # take no chances and rewrite it.
58873  # Note: m4 eats our [], so we need to use [ and ] instead.
58874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58875  if test "x$has_forbidden_chars" != x; then
58876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58877    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58878  fi
58879
58880
58881  windows_path="$new_path"
58882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58883    unix_path=`$CYGPATH -u "$windows_path"`
58884    new_path="$unix_path"
58885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58887    new_path="$unix_path"
58888  fi
58889
58890  if test "x$path" != "x$new_path"; then
58891    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58893$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58894  fi
58895
58896  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58897  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58898
58899    else
58900      # We're on a unix platform. Hooray! :)
58901      path="$POTENTIAL_FREETYPE_LIB_PATH"
58902      has_space=`$ECHO "$path" | $GREP " "`
58903      if test "x$has_space" != x; then
58904        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58905$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58906        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58907      fi
58908
58909      # Use eval to expand a potential ~
58910      eval path="$path"
58911      if test ! -f "$path" && test ! -d "$path"; then
58912        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58913      fi
58914
58915      if test -d "$path"; then
58916        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58917      else
58918        dir="`$DIRNAME "$path"`"
58919        base="`$BASENAME "$path"`"
58920        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58921      fi
58922    fi
58923  fi
58924
58925
58926    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58927    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58928$as_echo_n "checking for freetype includes... " >&6; }
58929    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58930$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58931    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58932    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58933$as_echo_n "checking for freetype libraries... " >&6; }
58934    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58935$as_echo "$FREETYPE_LIB_PATH" >&6; }
58936  fi
58937
58938            else
58939
58940  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58941  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58942  METHOD="well-known location"
58943
58944  # Let's start with an optimistic view of the world :-)
58945  FOUND_FREETYPE=yes
58946
58947  # First look for the canonical freetype main include file ft2build.h.
58948  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58949    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58950    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58951    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58952      # Fail.
58953      FOUND_FREETYPE=no
58954    fi
58955  fi
58956
58957  if test "x$FOUND_FREETYPE" = xyes; then
58958    # Include file found, let's continue the sanity check.
58959    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58960$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58961
58962    # Reset to default value
58963    FREETYPE_BASE_NAME=freetype
58964    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58965    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58966      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58967          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58968        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58969        # for the .6 version explicitly.
58970        FREETYPE_BASE_NAME=freetype.6
58971        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58972        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58973$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58974      else
58975        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58976$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58977        FOUND_FREETYPE=no
58978      fi
58979    else
58980      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58981        # On Windows, we will need both .lib and .dll file.
58982        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58983          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58984$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58985          FOUND_FREETYPE=no
58986        fi
58987      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58988          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58989        # Found lib in isa dir, use that instead.
58990        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58991        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58992$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58993      fi
58994    fi
58995  fi
58996
58997  if test "x$FOUND_FREETYPE" = xyes; then
58998
58999  # Only process if variable expands to non-empty
59000
59001  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59002    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59003
59004  # Input might be given as Windows format, start by converting to
59005  # unix format.
59006  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59007  new_path=`$CYGPATH -u "$path"`
59008
59009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59012  # "foo.exe" is OK but "foo" is an error.
59013  #
59014  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59015  # It is also a way to make sure we got the proper file name for the real test later on.
59016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59017  if test "x$test_shortpath" = x; then
59018    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59019$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59020    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59021  fi
59022
59023  # Call helper function which possibly converts this using DOS-style short mode.
59024  # If so, the updated path is stored in $new_path.
59025
59026  input_path="$new_path"
59027  # Check if we need to convert this using DOS-style short mode. If the path
59028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59029  # take no chances and rewrite it.
59030  # Note: m4 eats our [], so we need to use [ and ] instead.
59031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59032  if test "x$has_forbidden_chars" != x; then
59033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59037      # Going to short mode and back again did indeed matter. Since short mode is
59038      # case insensitive, let's make it lowercase to improve readability.
59039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59040      # Now convert it back to Unix-style (cygpath)
59041      input_path=`$CYGPATH -u "$shortmode_path"`
59042      new_path="$input_path"
59043    fi
59044  fi
59045
59046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59047  if test "x$test_cygdrive_prefix" = x; then
59048    # As a simple fix, exclude /usr/bin since it's not a real path.
59049    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59051      # a path prefixed by /cygdrive for fixpath to work.
59052      new_path="$CYGWIN_ROOT_PATH$input_path"
59053    fi
59054  fi
59055
59056
59057  if test "x$path" != "x$new_path"; then
59058    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59060$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59061  fi
59062
59063    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59064
59065  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59066  has_colon=`$ECHO $path | $GREP ^.:`
59067  new_path="$path"
59068  if test "x$has_colon" = x; then
59069    # Not in mixed or Windows style, start by that.
59070    new_path=`cmd //c echo $path`
59071  fi
59072
59073
59074  input_path="$new_path"
59075  # Check if we need to convert this using DOS-style short mode. If the path
59076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59077  # take no chances and rewrite it.
59078  # Note: m4 eats our [], so we need to use [ and ] instead.
59079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59080  if test "x$has_forbidden_chars" != x; then
59081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59082    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59083  fi
59084
59085
59086  windows_path="$new_path"
59087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59088    unix_path=`$CYGPATH -u "$windows_path"`
59089    new_path="$unix_path"
59090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59092    new_path="$unix_path"
59093  fi
59094
59095  if test "x$path" != "x$new_path"; then
59096    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59098$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59099  fi
59100
59101  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59102  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59103
59104    else
59105      # We're on a unix platform. Hooray! :)
59106      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59107      has_space=`$ECHO "$path" | $GREP " "`
59108      if test "x$has_space" != x; then
59109        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59110$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59111        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59112      fi
59113
59114      # Use eval to expand a potential ~
59115      eval path="$path"
59116      if test ! -f "$path" && test ! -d "$path"; then
59117        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59118      fi
59119
59120      if test -d "$path"; then
59121        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59122      else
59123        dir="`$DIRNAME "$path"`"
59124        base="`$BASENAME "$path"`"
59125        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59126      fi
59127    fi
59128  fi
59129
59130
59131  # Only process if variable expands to non-empty
59132
59133  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59134    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59135
59136  # Input might be given as Windows format, start by converting to
59137  # unix format.
59138  path="$POTENTIAL_FREETYPE_LIB_PATH"
59139  new_path=`$CYGPATH -u "$path"`
59140
59141  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59142  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59143  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59144  # "foo.exe" is OK but "foo" is an error.
59145  #
59146  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59147  # It is also a way to make sure we got the proper file name for the real test later on.
59148  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59149  if test "x$test_shortpath" = x; then
59150    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59151$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59152    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59153  fi
59154
59155  # Call helper function which possibly converts this using DOS-style short mode.
59156  # If so, the updated path is stored in $new_path.
59157
59158  input_path="$new_path"
59159  # Check if we need to convert this using DOS-style short mode. If the path
59160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59161  # take no chances and rewrite it.
59162  # Note: m4 eats our [], so we need to use [ and ] instead.
59163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59164  if test "x$has_forbidden_chars" != x; then
59165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59166    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59167    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59168    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59169      # Going to short mode and back again did indeed matter. Since short mode is
59170      # case insensitive, let's make it lowercase to improve readability.
59171      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59172      # Now convert it back to Unix-style (cygpath)
59173      input_path=`$CYGPATH -u "$shortmode_path"`
59174      new_path="$input_path"
59175    fi
59176  fi
59177
59178  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59179  if test "x$test_cygdrive_prefix" = x; then
59180    # As a simple fix, exclude /usr/bin since it's not a real path.
59181    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59182      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59183      # a path prefixed by /cygdrive for fixpath to work.
59184      new_path="$CYGWIN_ROOT_PATH$input_path"
59185    fi
59186  fi
59187
59188
59189  if test "x$path" != "x$new_path"; then
59190    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59192$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59193  fi
59194
59195    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59196
59197  path="$POTENTIAL_FREETYPE_LIB_PATH"
59198  has_colon=`$ECHO $path | $GREP ^.:`
59199  new_path="$path"
59200  if test "x$has_colon" = x; then
59201    # Not in mixed or Windows style, start by that.
59202    new_path=`cmd //c echo $path`
59203  fi
59204
59205
59206  input_path="$new_path"
59207  # Check if we need to convert this using DOS-style short mode. If the path
59208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59209  # take no chances and rewrite it.
59210  # Note: m4 eats our [], so we need to use [ and ] instead.
59211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59212  if test "x$has_forbidden_chars" != x; then
59213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59214    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59215  fi
59216
59217
59218  windows_path="$new_path"
59219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59220    unix_path=`$CYGPATH -u "$windows_path"`
59221    new_path="$unix_path"
59222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59224    new_path="$unix_path"
59225  fi
59226
59227  if test "x$path" != "x$new_path"; then
59228    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59230$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59231  fi
59232
59233  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59234  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59235
59236    else
59237      # We're on a unix platform. Hooray! :)
59238      path="$POTENTIAL_FREETYPE_LIB_PATH"
59239      has_space=`$ECHO "$path" | $GREP " "`
59240      if test "x$has_space" != x; then
59241        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59242$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59243        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59244      fi
59245
59246      # Use eval to expand a potential ~
59247      eval path="$path"
59248      if test ! -f "$path" && test ! -d "$path"; then
59249        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59250      fi
59251
59252      if test -d "$path"; then
59253        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59254      else
59255        dir="`$DIRNAME "$path"`"
59256        base="`$BASENAME "$path"`"
59257        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59258      fi
59259    fi
59260  fi
59261
59262
59263    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59264    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59265$as_echo_n "checking for freetype includes... " >&6; }
59266    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59267$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59268    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59269    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59270$as_echo_n "checking for freetype libraries... " >&6; }
59271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59272$as_echo "$FREETYPE_LIB_PATH" >&6; }
59273  fi
59274
59275            fi
59276            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59277                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59278              # Source is available, as a last resort try to build freetype in default location
59279
59280  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59281  BUILD_FREETYPE=yes
59282
59283  # Check if the freetype sources are acessible..
59284  if ! test -d $FREETYPE_SRC_PATH; then
59285    { $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
59286$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59287    BUILD_FREETYPE=no
59288  fi
59289  # ..and contain a vc2010 project file
59290  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59291  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59292    { $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
59293$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59294    BUILD_FREETYPE=no
59295  fi
59296  # Now check if configure found a version of 'msbuild.exe'
59297  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59298    { $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
59299$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;}
59300    BUILD_FREETYPE=no
59301  fi
59302
59303  # Ready to go..
59304  if test "x$BUILD_FREETYPE" = xyes; then
59305    # msbuild requires trailing slashes for output directories
59306    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59307    freetype_lib_path_unix="$freetype_lib_path"
59308    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59309
59310  unix_path="$vcxproj_path"
59311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59312    windows_path=`$CYGPATH -m "$unix_path"`
59313    vcxproj_path="$windows_path"
59314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59315    windows_path=`cmd //c echo $unix_path`
59316    vcxproj_path="$windows_path"
59317  fi
59318
59319
59320  unix_path="$freetype_lib_path"
59321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59322    windows_path=`$CYGPATH -m "$unix_path"`
59323    freetype_lib_path="$windows_path"
59324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59325    windows_path=`cmd //c echo $unix_path`
59326    freetype_lib_path="$windows_path"
59327  fi
59328
59329
59330  unix_path="$freetype_obj_path"
59331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59332    windows_path=`$CYGPATH -m "$unix_path"`
59333    freetype_obj_path="$windows_path"
59334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59335    windows_path=`cmd //c echo $unix_path`
59336    freetype_obj_path="$windows_path"
59337  fi
59338
59339    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59340      freetype_platform=x64
59341    else
59342      freetype_platform=win32
59343    fi
59344
59345    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59346    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59347    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59348    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59349    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59350$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59351
59352    # First we try to build the freetype.dll
59353    $ECHO -e "@echo off\n"\
59354        "$MSBUILD $vcxproj_path "\
59355        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59356        "/p:Configuration=\"Release Multithreaded\" "\
59357        "/p:Platform=$freetype_platform "\
59358        "/p:ConfigurationType=DynamicLibrary "\
59359        "/p:TargetName=freetype "\
59360        "/p:OutDir=\"$freetype_lib_path\" "\
59361        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59362    cmd /c freetype.bat
59363
59364    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59365      # If that succeeds we also build freetype.lib
59366      $ECHO -e "@echo off\n"\
59367          "$MSBUILD $vcxproj_path "\
59368          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59369          "/p:Configuration=\"Release Multithreaded\" "\
59370          "/p:Platform=$freetype_platform "\
59371          "/p:ConfigurationType=StaticLibrary "\
59372          "/p:TargetName=freetype "\
59373          "/p:OutDir=\"$freetype_lib_path\" "\
59374          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59375      cmd /c freetype.bat
59376
59377      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59378        # Once we build both, lib and dll, set freetype lib and include path appropriately
59379        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59380        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59381        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59382$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59383      else
59384        BUILD_FREETYPE=no
59385      fi
59386    else
59387      BUILD_FREETYPE=no
59388    fi
59389  fi
59390
59391              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59392
59393  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59394  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59395  METHOD="well-known location"
59396
59397  # Let's start with an optimistic view of the world :-)
59398  FOUND_FREETYPE=yes
59399
59400  # First look for the canonical freetype main include file ft2build.h.
59401  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59402    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59403    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59404    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59405      # Fail.
59406      FOUND_FREETYPE=no
59407    fi
59408  fi
59409
59410  if test "x$FOUND_FREETYPE" = xyes; then
59411    # Include file found, let's continue the sanity check.
59412    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59413$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59414
59415    # Reset to default value
59416    FREETYPE_BASE_NAME=freetype
59417    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59418    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59419      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59420          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59421        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59422        # for the .6 version explicitly.
59423        FREETYPE_BASE_NAME=freetype.6
59424        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59425        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59426$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59427      else
59428        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59429$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59430        FOUND_FREETYPE=no
59431      fi
59432    else
59433      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59434        # On Windows, we will need both .lib and .dll file.
59435        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59436          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59437$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59438          FOUND_FREETYPE=no
59439        fi
59440      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59441          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59442        # Found lib in isa dir, use that instead.
59443        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59444        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59445$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59446      fi
59447    fi
59448  fi
59449
59450  if test "x$FOUND_FREETYPE" = xyes; then
59451
59452  # Only process if variable expands to non-empty
59453
59454  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59455    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59456
59457  # Input might be given as Windows format, start by converting to
59458  # unix format.
59459  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59460  new_path=`$CYGPATH -u "$path"`
59461
59462  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59463  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59464  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59465  # "foo.exe" is OK but "foo" is an error.
59466  #
59467  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59468  # It is also a way to make sure we got the proper file name for the real test later on.
59469  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59470  if test "x$test_shortpath" = x; then
59471    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59472$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59473    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59474  fi
59475
59476  # Call helper function which possibly converts this using DOS-style short mode.
59477  # If so, the updated path is stored in $new_path.
59478
59479  input_path="$new_path"
59480  # Check if we need to convert this using DOS-style short mode. If the path
59481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59482  # take no chances and rewrite it.
59483  # Note: m4 eats our [], so we need to use [ and ] instead.
59484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59485  if test "x$has_forbidden_chars" != x; then
59486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59487    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59488    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59489    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59490      # Going to short mode and back again did indeed matter. Since short mode is
59491      # case insensitive, let's make it lowercase to improve readability.
59492      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59493      # Now convert it back to Unix-style (cygpath)
59494      input_path=`$CYGPATH -u "$shortmode_path"`
59495      new_path="$input_path"
59496    fi
59497  fi
59498
59499  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59500  if test "x$test_cygdrive_prefix" = x; then
59501    # As a simple fix, exclude /usr/bin since it's not a real path.
59502    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59503      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59504      # a path prefixed by /cygdrive for fixpath to work.
59505      new_path="$CYGWIN_ROOT_PATH$input_path"
59506    fi
59507  fi
59508
59509
59510  if test "x$path" != "x$new_path"; then
59511    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59513$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59514  fi
59515
59516    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59517
59518  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59519  has_colon=`$ECHO $path | $GREP ^.:`
59520  new_path="$path"
59521  if test "x$has_colon" = x; then
59522    # Not in mixed or Windows style, start by that.
59523    new_path=`cmd //c echo $path`
59524  fi
59525
59526
59527  input_path="$new_path"
59528  # Check if we need to convert this using DOS-style short mode. If the path
59529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59530  # take no chances and rewrite it.
59531  # Note: m4 eats our [], so we need to use [ and ] instead.
59532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59533  if test "x$has_forbidden_chars" != x; then
59534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59536  fi
59537
59538
59539  windows_path="$new_path"
59540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59541    unix_path=`$CYGPATH -u "$windows_path"`
59542    new_path="$unix_path"
59543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59545    new_path="$unix_path"
59546  fi
59547
59548  if test "x$path" != "x$new_path"; then
59549    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59551$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59552  fi
59553
59554  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59555  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59556
59557    else
59558      # We're on a unix platform. Hooray! :)
59559      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59560      has_space=`$ECHO "$path" | $GREP " "`
59561      if test "x$has_space" != x; then
59562        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59563$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59564        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59565      fi
59566
59567      # Use eval to expand a potential ~
59568      eval path="$path"
59569      if test ! -f "$path" && test ! -d "$path"; then
59570        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59571      fi
59572
59573      if test -d "$path"; then
59574        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59575      else
59576        dir="`$DIRNAME "$path"`"
59577        base="`$BASENAME "$path"`"
59578        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59579      fi
59580    fi
59581  fi
59582
59583
59584  # Only process if variable expands to non-empty
59585
59586  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59587    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59588
59589  # Input might be given as Windows format, start by converting to
59590  # unix format.
59591  path="$POTENTIAL_FREETYPE_LIB_PATH"
59592  new_path=`$CYGPATH -u "$path"`
59593
59594  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59595  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59596  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59597  # "foo.exe" is OK but "foo" is an error.
59598  #
59599  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59600  # It is also a way to make sure we got the proper file name for the real test later on.
59601  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59602  if test "x$test_shortpath" = x; then
59603    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59604$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59605    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59606  fi
59607
59608  # Call helper function which possibly converts this using DOS-style short mode.
59609  # If so, the updated path is stored in $new_path.
59610
59611  input_path="$new_path"
59612  # Check if we need to convert this using DOS-style short mode. If the path
59613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59614  # take no chances and rewrite it.
59615  # Note: m4 eats our [], so we need to use [ and ] instead.
59616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59617  if test "x$has_forbidden_chars" != x; then
59618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59619    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59620    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59621    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59622      # Going to short mode and back again did indeed matter. Since short mode is
59623      # case insensitive, let's make it lowercase to improve readability.
59624      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59625      # Now convert it back to Unix-style (cygpath)
59626      input_path=`$CYGPATH -u "$shortmode_path"`
59627      new_path="$input_path"
59628    fi
59629  fi
59630
59631  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59632  if test "x$test_cygdrive_prefix" = x; then
59633    # As a simple fix, exclude /usr/bin since it's not a real path.
59634    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59635      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59636      # a path prefixed by /cygdrive for fixpath to work.
59637      new_path="$CYGWIN_ROOT_PATH$input_path"
59638    fi
59639  fi
59640
59641
59642  if test "x$path" != "x$new_path"; then
59643    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59645$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59646  fi
59647
59648    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59649
59650  path="$POTENTIAL_FREETYPE_LIB_PATH"
59651  has_colon=`$ECHO $path | $GREP ^.:`
59652  new_path="$path"
59653  if test "x$has_colon" = x; then
59654    # Not in mixed or Windows style, start by that.
59655    new_path=`cmd //c echo $path`
59656  fi
59657
59658
59659  input_path="$new_path"
59660  # Check if we need to convert this using DOS-style short mode. If the path
59661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59662  # take no chances and rewrite it.
59663  # Note: m4 eats our [], so we need to use [ and ] instead.
59664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59665  if test "x$has_forbidden_chars" != x; then
59666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59667    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59668  fi
59669
59670
59671  windows_path="$new_path"
59672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59673    unix_path=`$CYGPATH -u "$windows_path"`
59674    new_path="$unix_path"
59675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59677    new_path="$unix_path"
59678  fi
59679
59680  if test "x$path" != "x$new_path"; then
59681    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59683$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59684  fi
59685
59686  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59687  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59688
59689    else
59690      # We're on a unix platform. Hooray! :)
59691      path="$POTENTIAL_FREETYPE_LIB_PATH"
59692      has_space=`$ECHO "$path" | $GREP " "`
59693      if test "x$has_space" != x; then
59694        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59695$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59696        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59697      fi
59698
59699      # Use eval to expand a potential ~
59700      eval path="$path"
59701      if test ! -f "$path" && test ! -d "$path"; then
59702        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59703      fi
59704
59705      if test -d "$path"; then
59706        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59707      else
59708        dir="`$DIRNAME "$path"`"
59709        base="`$BASENAME "$path"`"
59710        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59711      fi
59712    fi
59713  fi
59714
59715
59716    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59717    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59718$as_echo_n "checking for freetype includes... " >&6; }
59719    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59720$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59721    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59722    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59723$as_echo_n "checking for freetype libraries... " >&6; }
59724    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59725$as_echo "$FREETYPE_LIB_PATH" >&6; }
59726  fi
59727
59728              else
59729
59730  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59731  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59732  METHOD="well-known location"
59733
59734  # Let's start with an optimistic view of the world :-)
59735  FOUND_FREETYPE=yes
59736
59737  # First look for the canonical freetype main include file ft2build.h.
59738  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59739    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59740    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59741    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59742      # Fail.
59743      FOUND_FREETYPE=no
59744    fi
59745  fi
59746
59747  if test "x$FOUND_FREETYPE" = xyes; then
59748    # Include file found, let's continue the sanity check.
59749    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59750$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59751
59752    # Reset to default value
59753    FREETYPE_BASE_NAME=freetype
59754    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59755    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59756      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59757          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59758        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59759        # for the .6 version explicitly.
59760        FREETYPE_BASE_NAME=freetype.6
59761        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59762        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59763$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59764      else
59765        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59766$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59767        FOUND_FREETYPE=no
59768      fi
59769    else
59770      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59771        # On Windows, we will need both .lib and .dll file.
59772        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59773          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59774$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59775          FOUND_FREETYPE=no
59776        fi
59777      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59778          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59779        # Found lib in isa dir, use that instead.
59780        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59781        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59782$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59783      fi
59784    fi
59785  fi
59786
59787  if test "x$FOUND_FREETYPE" = xyes; then
59788
59789  # Only process if variable expands to non-empty
59790
59791  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59793
59794  # Input might be given as Windows format, start by converting to
59795  # unix format.
59796  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59797  new_path=`$CYGPATH -u "$path"`
59798
59799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59802  # "foo.exe" is OK but "foo" is an error.
59803  #
59804  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59805  # It is also a way to make sure we got the proper file name for the real test later on.
59806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59807  if test "x$test_shortpath" = x; then
59808    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59809$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59810    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59811  fi
59812
59813  # Call helper function which possibly converts this using DOS-style short mode.
59814  # If so, the updated path is stored in $new_path.
59815
59816  input_path="$new_path"
59817  # Check if we need to convert this using DOS-style short mode. If the path
59818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59819  # take no chances and rewrite it.
59820  # Note: m4 eats our [], so we need to use [ and ] instead.
59821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59822  if test "x$has_forbidden_chars" != x; then
59823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59824    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59825    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59826    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59827      # Going to short mode and back again did indeed matter. Since short mode is
59828      # case insensitive, let's make it lowercase to improve readability.
59829      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59830      # Now convert it back to Unix-style (cygpath)
59831      input_path=`$CYGPATH -u "$shortmode_path"`
59832      new_path="$input_path"
59833    fi
59834  fi
59835
59836  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59837  if test "x$test_cygdrive_prefix" = x; then
59838    # As a simple fix, exclude /usr/bin since it's not a real path.
59839    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59840      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59841      # a path prefixed by /cygdrive for fixpath to work.
59842      new_path="$CYGWIN_ROOT_PATH$input_path"
59843    fi
59844  fi
59845
59846
59847  if test "x$path" != "x$new_path"; then
59848    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59850$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59851  fi
59852
59853    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59854
59855  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59856  has_colon=`$ECHO $path | $GREP ^.:`
59857  new_path="$path"
59858  if test "x$has_colon" = x; then
59859    # Not in mixed or Windows style, start by that.
59860    new_path=`cmd //c echo $path`
59861  fi
59862
59863
59864  input_path="$new_path"
59865  # Check if we need to convert this using DOS-style short mode. If the path
59866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59867  # take no chances and rewrite it.
59868  # Note: m4 eats our [], so we need to use [ and ] instead.
59869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59870  if test "x$has_forbidden_chars" != x; then
59871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59872    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59873  fi
59874
59875
59876  windows_path="$new_path"
59877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59878    unix_path=`$CYGPATH -u "$windows_path"`
59879    new_path="$unix_path"
59880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59882    new_path="$unix_path"
59883  fi
59884
59885  if test "x$path" != "x$new_path"; then
59886    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59888$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59889  fi
59890
59891  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59892  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59893
59894    else
59895      # We're on a unix platform. Hooray! :)
59896      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59897      has_space=`$ECHO "$path" | $GREP " "`
59898      if test "x$has_space" != x; then
59899        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59900$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59901        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59902      fi
59903
59904      # Use eval to expand a potential ~
59905      eval path="$path"
59906      if test ! -f "$path" && test ! -d "$path"; then
59907        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59908      fi
59909
59910      if test -d "$path"; then
59911        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59912      else
59913        dir="`$DIRNAME "$path"`"
59914        base="`$BASENAME "$path"`"
59915        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59916      fi
59917    fi
59918  fi
59919
59920
59921  # Only process if variable expands to non-empty
59922
59923  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59924    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59925
59926  # Input might be given as Windows format, start by converting to
59927  # unix format.
59928  path="$POTENTIAL_FREETYPE_LIB_PATH"
59929  new_path=`$CYGPATH -u "$path"`
59930
59931  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59932  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59933  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59934  # "foo.exe" is OK but "foo" is an error.
59935  #
59936  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59937  # It is also a way to make sure we got the proper file name for the real test later on.
59938  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59939  if test "x$test_shortpath" = x; then
59940    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59941$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59942    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59943  fi
59944
59945  # Call helper function which possibly converts this using DOS-style short mode.
59946  # If so, the updated path is stored in $new_path.
59947
59948  input_path="$new_path"
59949  # Check if we need to convert this using DOS-style short mode. If the path
59950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59951  # take no chances and rewrite it.
59952  # Note: m4 eats our [], so we need to use [ and ] instead.
59953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59954  if test "x$has_forbidden_chars" != x; then
59955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59956    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59957    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59958    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59959      # Going to short mode and back again did indeed matter. Since short mode is
59960      # case insensitive, let's make it lowercase to improve readability.
59961      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59962      # Now convert it back to Unix-style (cygpath)
59963      input_path=`$CYGPATH -u "$shortmode_path"`
59964      new_path="$input_path"
59965    fi
59966  fi
59967
59968  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59969  if test "x$test_cygdrive_prefix" = x; then
59970    # As a simple fix, exclude /usr/bin since it's not a real path.
59971    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59972      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59973      # a path prefixed by /cygdrive for fixpath to work.
59974      new_path="$CYGWIN_ROOT_PATH$input_path"
59975    fi
59976  fi
59977
59978
59979  if test "x$path" != "x$new_path"; then
59980    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59982$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59983  fi
59984
59985    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59986
59987  path="$POTENTIAL_FREETYPE_LIB_PATH"
59988  has_colon=`$ECHO $path | $GREP ^.:`
59989  new_path="$path"
59990  if test "x$has_colon" = x; then
59991    # Not in mixed or Windows style, start by that.
59992    new_path=`cmd //c echo $path`
59993  fi
59994
59995
59996  input_path="$new_path"
59997  # Check if we need to convert this using DOS-style short mode. If the path
59998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59999  # take no chances and rewrite it.
60000  # Note: m4 eats our [], so we need to use [ and ] instead.
60001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60002  if test "x$has_forbidden_chars" != x; then
60003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60004    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60005  fi
60006
60007
60008  windows_path="$new_path"
60009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60010    unix_path=`$CYGPATH -u "$windows_path"`
60011    new_path="$unix_path"
60012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60014    new_path="$unix_path"
60015  fi
60016
60017  if test "x$path" != "x$new_path"; then
60018    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60019    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60020$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60021  fi
60022
60023  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60024  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60025
60026    else
60027      # We're on a unix platform. Hooray! :)
60028      path="$POTENTIAL_FREETYPE_LIB_PATH"
60029      has_space=`$ECHO "$path" | $GREP " "`
60030      if test "x$has_space" != x; then
60031        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60032$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60033        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60034      fi
60035
60036      # Use eval to expand a potential ~
60037      eval path="$path"
60038      if test ! -f "$path" && test ! -d "$path"; then
60039        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60040      fi
60041
60042      if test -d "$path"; then
60043        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60044      else
60045        dir="`$DIRNAME "$path"`"
60046        base="`$BASENAME "$path"`"
60047        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60048      fi
60049    fi
60050  fi
60051
60052
60053    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60054    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60055$as_echo_n "checking for freetype includes... " >&6; }
60056    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60057$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60058    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60059    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60060$as_echo_n "checking for freetype libraries... " >&6; }
60061    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60062$as_echo "$FREETYPE_LIB_PATH" >&6; }
60063  fi
60064
60065              fi
60066            fi
60067          fi
60068        else
60069          FREETYPE_BASE_DIR="$SYSROOT/usr"
60070
60071  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60072  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60073  METHOD="well-known location"
60074
60075  # Let's start with an optimistic view of the world :-)
60076  FOUND_FREETYPE=yes
60077
60078  # First look for the canonical freetype main include file ft2build.h.
60079  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60080    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60081    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60082    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60083      # Fail.
60084      FOUND_FREETYPE=no
60085    fi
60086  fi
60087
60088  if test "x$FOUND_FREETYPE" = xyes; then
60089    # Include file found, let's continue the sanity check.
60090    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60091$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60092
60093    # Reset to default value
60094    FREETYPE_BASE_NAME=freetype
60095    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60096    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60097      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60098          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60099        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60100        # for the .6 version explicitly.
60101        FREETYPE_BASE_NAME=freetype.6
60102        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60103        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60104$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60105      else
60106        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60107$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60108        FOUND_FREETYPE=no
60109      fi
60110    else
60111      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60112        # On Windows, we will need both .lib and .dll file.
60113        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60114          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60115$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60116          FOUND_FREETYPE=no
60117        fi
60118      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60119          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60120        # Found lib in isa dir, use that instead.
60121        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60122        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60123$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60124      fi
60125    fi
60126  fi
60127
60128  if test "x$FOUND_FREETYPE" = xyes; then
60129
60130  # Only process if variable expands to non-empty
60131
60132  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60133    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60134
60135  # Input might be given as Windows format, start by converting to
60136  # unix format.
60137  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60138  new_path=`$CYGPATH -u "$path"`
60139
60140  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60141  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60142  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60143  # "foo.exe" is OK but "foo" is an error.
60144  #
60145  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60146  # It is also a way to make sure we got the proper file name for the real test later on.
60147  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60148  if test "x$test_shortpath" = x; then
60149    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60150$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60151    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60152  fi
60153
60154  # Call helper function which possibly converts this using DOS-style short mode.
60155  # If so, the updated path is stored in $new_path.
60156
60157  input_path="$new_path"
60158  # Check if we need to convert this using DOS-style short mode. If the path
60159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60160  # take no chances and rewrite it.
60161  # Note: m4 eats our [], so we need to use [ and ] instead.
60162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60163  if test "x$has_forbidden_chars" != x; then
60164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60165    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60166    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60167    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60168      # Going to short mode and back again did indeed matter. Since short mode is
60169      # case insensitive, let's make it lowercase to improve readability.
60170      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60171      # Now convert it back to Unix-style (cygpath)
60172      input_path=`$CYGPATH -u "$shortmode_path"`
60173      new_path="$input_path"
60174    fi
60175  fi
60176
60177  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60178  if test "x$test_cygdrive_prefix" = x; then
60179    # As a simple fix, exclude /usr/bin since it's not a real path.
60180    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60181      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60182      # a path prefixed by /cygdrive for fixpath to work.
60183      new_path="$CYGWIN_ROOT_PATH$input_path"
60184    fi
60185  fi
60186
60187
60188  if test "x$path" != "x$new_path"; then
60189    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60191$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60192  fi
60193
60194    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60195
60196  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60197  has_colon=`$ECHO $path | $GREP ^.:`
60198  new_path="$path"
60199  if test "x$has_colon" = x; then
60200    # Not in mixed or Windows style, start by that.
60201    new_path=`cmd //c echo $path`
60202  fi
60203
60204
60205  input_path="$new_path"
60206  # Check if we need to convert this using DOS-style short mode. If the path
60207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60208  # take no chances and rewrite it.
60209  # Note: m4 eats our [], so we need to use [ and ] instead.
60210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60211  if test "x$has_forbidden_chars" != x; then
60212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60214  fi
60215
60216
60217  windows_path="$new_path"
60218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60219    unix_path=`$CYGPATH -u "$windows_path"`
60220    new_path="$unix_path"
60221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60223    new_path="$unix_path"
60224  fi
60225
60226  if test "x$path" != "x$new_path"; then
60227    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60229$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60230  fi
60231
60232  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60233  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60234
60235    else
60236      # We're on a unix platform. Hooray! :)
60237      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60238      has_space=`$ECHO "$path" | $GREP " "`
60239      if test "x$has_space" != x; then
60240        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60241$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60242        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60243      fi
60244
60245      # Use eval to expand a potential ~
60246      eval path="$path"
60247      if test ! -f "$path" && test ! -d "$path"; then
60248        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60249      fi
60250
60251      if test -d "$path"; then
60252        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60253      else
60254        dir="`$DIRNAME "$path"`"
60255        base="`$BASENAME "$path"`"
60256        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60257      fi
60258    fi
60259  fi
60260
60261
60262  # Only process if variable expands to non-empty
60263
60264  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60265    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60266
60267  # Input might be given as Windows format, start by converting to
60268  # unix format.
60269  path="$POTENTIAL_FREETYPE_LIB_PATH"
60270  new_path=`$CYGPATH -u "$path"`
60271
60272  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60273  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60274  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60275  # "foo.exe" is OK but "foo" is an error.
60276  #
60277  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60278  # It is also a way to make sure we got the proper file name for the real test later on.
60279  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60280  if test "x$test_shortpath" = x; then
60281    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60282$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60283    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60284  fi
60285
60286  # Call helper function which possibly converts this using DOS-style short mode.
60287  # If so, the updated path is stored in $new_path.
60288
60289  input_path="$new_path"
60290  # Check if we need to convert this using DOS-style short mode. If the path
60291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60292  # take no chances and rewrite it.
60293  # Note: m4 eats our [], so we need to use [ and ] instead.
60294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60295  if test "x$has_forbidden_chars" != x; then
60296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60300      # Going to short mode and back again did indeed matter. Since short mode is
60301      # case insensitive, let's make it lowercase to improve readability.
60302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60303      # Now convert it back to Unix-style (cygpath)
60304      input_path=`$CYGPATH -u "$shortmode_path"`
60305      new_path="$input_path"
60306    fi
60307  fi
60308
60309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60310  if test "x$test_cygdrive_prefix" = x; then
60311    # As a simple fix, exclude /usr/bin since it's not a real path.
60312    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60314      # a path prefixed by /cygdrive for fixpath to work.
60315      new_path="$CYGWIN_ROOT_PATH$input_path"
60316    fi
60317  fi
60318
60319
60320  if test "x$path" != "x$new_path"; then
60321    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60323$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60324  fi
60325
60326    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60327
60328  path="$POTENTIAL_FREETYPE_LIB_PATH"
60329  has_colon=`$ECHO $path | $GREP ^.:`
60330  new_path="$path"
60331  if test "x$has_colon" = x; then
60332    # Not in mixed or Windows style, start by that.
60333    new_path=`cmd //c echo $path`
60334  fi
60335
60336
60337  input_path="$new_path"
60338  # Check if we need to convert this using DOS-style short mode. If the path
60339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60340  # take no chances and rewrite it.
60341  # Note: m4 eats our [], so we need to use [ and ] instead.
60342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60343  if test "x$has_forbidden_chars" != x; then
60344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60345    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60346  fi
60347
60348
60349  windows_path="$new_path"
60350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60351    unix_path=`$CYGPATH -u "$windows_path"`
60352    new_path="$unix_path"
60353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60355    new_path="$unix_path"
60356  fi
60357
60358  if test "x$path" != "x$new_path"; then
60359    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60361$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60362  fi
60363
60364  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60365  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60366
60367    else
60368      # We're on a unix platform. Hooray! :)
60369      path="$POTENTIAL_FREETYPE_LIB_PATH"
60370      has_space=`$ECHO "$path" | $GREP " "`
60371      if test "x$has_space" != x; then
60372        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60373$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60374        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60375      fi
60376
60377      # Use eval to expand a potential ~
60378      eval path="$path"
60379      if test ! -f "$path" && test ! -d "$path"; then
60380        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60381      fi
60382
60383      if test -d "$path"; then
60384        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60385      else
60386        dir="`$DIRNAME "$path"`"
60387        base="`$BASENAME "$path"`"
60388        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60389      fi
60390    fi
60391  fi
60392
60393
60394    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60395    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60396$as_echo_n "checking for freetype includes... " >&6; }
60397    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60398$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60399    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60400    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60401$as_echo_n "checking for freetype libraries... " >&6; }
60402    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60403$as_echo "$FREETYPE_LIB_PATH" >&6; }
60404  fi
60405
60406
60407          if test "x$FOUND_FREETYPE" != xyes; then
60408            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60409
60410  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60411  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60412  METHOD="well-known location"
60413
60414  # Let's start with an optimistic view of the world :-)
60415  FOUND_FREETYPE=yes
60416
60417  # First look for the canonical freetype main include file ft2build.h.
60418  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60419    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60420    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60421    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60422      # Fail.
60423      FOUND_FREETYPE=no
60424    fi
60425  fi
60426
60427  if test "x$FOUND_FREETYPE" = xyes; then
60428    # Include file found, let's continue the sanity check.
60429    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60430$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60431
60432    # Reset to default value
60433    FREETYPE_BASE_NAME=freetype
60434    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60435    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60436      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60437          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60438        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60439        # for the .6 version explicitly.
60440        FREETYPE_BASE_NAME=freetype.6
60441        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60442        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60443$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60444      else
60445        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60446$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60447        FOUND_FREETYPE=no
60448      fi
60449    else
60450      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60451        # On Windows, we will need both .lib and .dll file.
60452        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60453          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60454$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60455          FOUND_FREETYPE=no
60456        fi
60457      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60458          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60459        # Found lib in isa dir, use that instead.
60460        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60461        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60462$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60463      fi
60464    fi
60465  fi
60466
60467  if test "x$FOUND_FREETYPE" = xyes; then
60468
60469  # Only process if variable expands to non-empty
60470
60471  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60472    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60473
60474  # Input might be given as Windows format, start by converting to
60475  # unix format.
60476  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60477  new_path=`$CYGPATH -u "$path"`
60478
60479  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60480  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60481  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60482  # "foo.exe" is OK but "foo" is an error.
60483  #
60484  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60485  # It is also a way to make sure we got the proper file name for the real test later on.
60486  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60487  if test "x$test_shortpath" = x; then
60488    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60489$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60490    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60491  fi
60492
60493  # Call helper function which possibly converts this using DOS-style short mode.
60494  # If so, the updated path is stored in $new_path.
60495
60496  input_path="$new_path"
60497  # Check if we need to convert this using DOS-style short mode. If the path
60498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60499  # take no chances and rewrite it.
60500  # Note: m4 eats our [], so we need to use [ and ] instead.
60501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60502  if test "x$has_forbidden_chars" != x; then
60503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60504    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60505    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60506    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60507      # Going to short mode and back again did indeed matter. Since short mode is
60508      # case insensitive, let's make it lowercase to improve readability.
60509      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60510      # Now convert it back to Unix-style (cygpath)
60511      input_path=`$CYGPATH -u "$shortmode_path"`
60512      new_path="$input_path"
60513    fi
60514  fi
60515
60516  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60517  if test "x$test_cygdrive_prefix" = x; then
60518    # As a simple fix, exclude /usr/bin since it's not a real path.
60519    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60520      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60521      # a path prefixed by /cygdrive for fixpath to work.
60522      new_path="$CYGWIN_ROOT_PATH$input_path"
60523    fi
60524  fi
60525
60526
60527  if test "x$path" != "x$new_path"; then
60528    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60530$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60531  fi
60532
60533    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60534
60535  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60536  has_colon=`$ECHO $path | $GREP ^.:`
60537  new_path="$path"
60538  if test "x$has_colon" = x; then
60539    # Not in mixed or Windows style, start by that.
60540    new_path=`cmd //c echo $path`
60541  fi
60542
60543
60544  input_path="$new_path"
60545  # Check if we need to convert this using DOS-style short mode. If the path
60546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60547  # take no chances and rewrite it.
60548  # Note: m4 eats our [], so we need to use [ and ] instead.
60549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60550  if test "x$has_forbidden_chars" != x; then
60551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60552    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60553  fi
60554
60555
60556  windows_path="$new_path"
60557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60558    unix_path=`$CYGPATH -u "$windows_path"`
60559    new_path="$unix_path"
60560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60562    new_path="$unix_path"
60563  fi
60564
60565  if test "x$path" != "x$new_path"; then
60566    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60568$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60569  fi
60570
60571  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60572  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60573
60574    else
60575      # We're on a unix platform. Hooray! :)
60576      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60577      has_space=`$ECHO "$path" | $GREP " "`
60578      if test "x$has_space" != x; then
60579        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60580$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60581        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60582      fi
60583
60584      # Use eval to expand a potential ~
60585      eval path="$path"
60586      if test ! -f "$path" && test ! -d "$path"; then
60587        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60588      fi
60589
60590      if test -d "$path"; then
60591        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60592      else
60593        dir="`$DIRNAME "$path"`"
60594        base="`$BASENAME "$path"`"
60595        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60596      fi
60597    fi
60598  fi
60599
60600
60601  # Only process if variable expands to non-empty
60602
60603  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60604    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60605
60606  # Input might be given as Windows format, start by converting to
60607  # unix format.
60608  path="$POTENTIAL_FREETYPE_LIB_PATH"
60609  new_path=`$CYGPATH -u "$path"`
60610
60611  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60612  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60613  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60614  # "foo.exe" is OK but "foo" is an error.
60615  #
60616  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60617  # It is also a way to make sure we got the proper file name for the real test later on.
60618  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60619  if test "x$test_shortpath" = x; then
60620    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60621$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60622    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60623  fi
60624
60625  # Call helper function which possibly converts this using DOS-style short mode.
60626  # If so, the updated path is stored in $new_path.
60627
60628  input_path="$new_path"
60629  # Check if we need to convert this using DOS-style short mode. If the path
60630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60631  # take no chances and rewrite it.
60632  # Note: m4 eats our [], so we need to use [ and ] instead.
60633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60634  if test "x$has_forbidden_chars" != x; then
60635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60636    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60637    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60638    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60639      # Going to short mode and back again did indeed matter. Since short mode is
60640      # case insensitive, let's make it lowercase to improve readability.
60641      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60642      # Now convert it back to Unix-style (cygpath)
60643      input_path=`$CYGPATH -u "$shortmode_path"`
60644      new_path="$input_path"
60645    fi
60646  fi
60647
60648  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60649  if test "x$test_cygdrive_prefix" = x; then
60650    # As a simple fix, exclude /usr/bin since it's not a real path.
60651    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60652      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60653      # a path prefixed by /cygdrive for fixpath to work.
60654      new_path="$CYGWIN_ROOT_PATH$input_path"
60655    fi
60656  fi
60657
60658
60659  if test "x$path" != "x$new_path"; then
60660    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60662$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60663  fi
60664
60665    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60666
60667  path="$POTENTIAL_FREETYPE_LIB_PATH"
60668  has_colon=`$ECHO $path | $GREP ^.:`
60669  new_path="$path"
60670  if test "x$has_colon" = x; then
60671    # Not in mixed or Windows style, start by that.
60672    new_path=`cmd //c echo $path`
60673  fi
60674
60675
60676  input_path="$new_path"
60677  # Check if we need to convert this using DOS-style short mode. If the path
60678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60679  # take no chances and rewrite it.
60680  # Note: m4 eats our [], so we need to use [ and ] instead.
60681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60682  if test "x$has_forbidden_chars" != x; then
60683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60684    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60685  fi
60686
60687
60688  windows_path="$new_path"
60689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60690    unix_path=`$CYGPATH -u "$windows_path"`
60691    new_path="$unix_path"
60692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60694    new_path="$unix_path"
60695  fi
60696
60697  if test "x$path" != "x$new_path"; then
60698    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60699    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60700$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60701  fi
60702
60703  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60704  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60705
60706    else
60707      # We're on a unix platform. Hooray! :)
60708      path="$POTENTIAL_FREETYPE_LIB_PATH"
60709      has_space=`$ECHO "$path" | $GREP " "`
60710      if test "x$has_space" != x; then
60711        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60712$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60713        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60714      fi
60715
60716      # Use eval to expand a potential ~
60717      eval path="$path"
60718      if test ! -f "$path" && test ! -d "$path"; then
60719        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60720      fi
60721
60722      if test -d "$path"; then
60723        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60724      else
60725        dir="`$DIRNAME "$path"`"
60726        base="`$BASENAME "$path"`"
60727        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60728      fi
60729    fi
60730  fi
60731
60732
60733    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60734    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60735$as_echo_n "checking for freetype includes... " >&6; }
60736    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60737$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60738    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60739    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60740$as_echo_n "checking for freetype libraries... " >&6; }
60741    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60742$as_echo "$FREETYPE_LIB_PATH" >&6; }
60743  fi
60744
60745          fi
60746          if test "x$FOUND_FREETYPE" != xyes; then
60747            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
60748
60749  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60750  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60751  METHOD="well-known location"
60752
60753  # Let's start with an optimistic view of the world :-)
60754  FOUND_FREETYPE=yes
60755
60756  # First look for the canonical freetype main include file ft2build.h.
60757  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60758    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60759    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60760    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60761      # Fail.
60762      FOUND_FREETYPE=no
60763    fi
60764  fi
60765
60766  if test "x$FOUND_FREETYPE" = xyes; then
60767    # Include file found, let's continue the sanity check.
60768    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60769$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60770
60771    # Reset to default value
60772    FREETYPE_BASE_NAME=freetype
60773    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60774    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60775      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60776          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60777        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60778        # for the .6 version explicitly.
60779        FREETYPE_BASE_NAME=freetype.6
60780        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60781        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60782$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60783      else
60784        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60785$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60786        FOUND_FREETYPE=no
60787      fi
60788    else
60789      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60790        # On Windows, we will need both .lib and .dll file.
60791        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60792          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60793$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60794          FOUND_FREETYPE=no
60795        fi
60796      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60797          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60798        # Found lib in isa dir, use that instead.
60799        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60800        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60801$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60802      fi
60803    fi
60804  fi
60805
60806  if test "x$FOUND_FREETYPE" = xyes; then
60807
60808  # Only process if variable expands to non-empty
60809
60810  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60811    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60812
60813  # Input might be given as Windows format, start by converting to
60814  # unix format.
60815  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60816  new_path=`$CYGPATH -u "$path"`
60817
60818  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60819  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60820  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60821  # "foo.exe" is OK but "foo" is an error.
60822  #
60823  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60824  # It is also a way to make sure we got the proper file name for the real test later on.
60825  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60826  if test "x$test_shortpath" = x; then
60827    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60828$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60829    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60830  fi
60831
60832  # Call helper function which possibly converts this using DOS-style short mode.
60833  # If so, the updated path is stored in $new_path.
60834
60835  input_path="$new_path"
60836  # Check if we need to convert this using DOS-style short mode. If the path
60837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60838  # take no chances and rewrite it.
60839  # Note: m4 eats our [], so we need to use [ and ] instead.
60840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60841  if test "x$has_forbidden_chars" != x; then
60842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60843    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60844    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60845    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60846      # Going to short mode and back again did indeed matter. Since short mode is
60847      # case insensitive, let's make it lowercase to improve readability.
60848      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60849      # Now convert it back to Unix-style (cygpath)
60850      input_path=`$CYGPATH -u "$shortmode_path"`
60851      new_path="$input_path"
60852    fi
60853  fi
60854
60855  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60856  if test "x$test_cygdrive_prefix" = x; then
60857    # As a simple fix, exclude /usr/bin since it's not a real path.
60858    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60859      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60860      # a path prefixed by /cygdrive for fixpath to work.
60861      new_path="$CYGWIN_ROOT_PATH$input_path"
60862    fi
60863  fi
60864
60865
60866  if test "x$path" != "x$new_path"; then
60867    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60869$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60870  fi
60871
60872    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60873
60874  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60875  has_colon=`$ECHO $path | $GREP ^.:`
60876  new_path="$path"
60877  if test "x$has_colon" = x; then
60878    # Not in mixed or Windows style, start by that.
60879    new_path=`cmd //c echo $path`
60880  fi
60881
60882
60883  input_path="$new_path"
60884  # Check if we need to convert this using DOS-style short mode. If the path
60885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60886  # take no chances and rewrite it.
60887  # Note: m4 eats our [], so we need to use [ and ] instead.
60888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60889  if test "x$has_forbidden_chars" != x; then
60890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60891    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60892  fi
60893
60894
60895  windows_path="$new_path"
60896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60897    unix_path=`$CYGPATH -u "$windows_path"`
60898    new_path="$unix_path"
60899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60901    new_path="$unix_path"
60902  fi
60903
60904  if test "x$path" != "x$new_path"; then
60905    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60907$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60908  fi
60909
60910  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60911  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60912
60913    else
60914      # We're on a unix platform. Hooray! :)
60915      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60916      has_space=`$ECHO "$path" | $GREP " "`
60917      if test "x$has_space" != x; then
60918        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60919$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60920        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60921      fi
60922
60923      # Use eval to expand a potential ~
60924      eval path="$path"
60925      if test ! -f "$path" && test ! -d "$path"; then
60926        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60927      fi
60928
60929      if test -d "$path"; then
60930        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60931      else
60932        dir="`$DIRNAME "$path"`"
60933        base="`$BASENAME "$path"`"
60934        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60935      fi
60936    fi
60937  fi
60938
60939
60940  # Only process if variable expands to non-empty
60941
60942  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60943    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60944
60945  # Input might be given as Windows format, start by converting to
60946  # unix format.
60947  path="$POTENTIAL_FREETYPE_LIB_PATH"
60948  new_path=`$CYGPATH -u "$path"`
60949
60950  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60951  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60952  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60953  # "foo.exe" is OK but "foo" is an error.
60954  #
60955  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60956  # It is also a way to make sure we got the proper file name for the real test later on.
60957  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60958  if test "x$test_shortpath" = x; then
60959    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60960$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60961    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60962  fi
60963
60964  # Call helper function which possibly converts this using DOS-style short mode.
60965  # If so, the updated path is stored in $new_path.
60966
60967  input_path="$new_path"
60968  # Check if we need to convert this using DOS-style short mode. If the path
60969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60970  # take no chances and rewrite it.
60971  # Note: m4 eats our [], so we need to use [ and ] instead.
60972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60973  if test "x$has_forbidden_chars" != x; then
60974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60975    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60976    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60977    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60978      # Going to short mode and back again did indeed matter. Since short mode is
60979      # case insensitive, let's make it lowercase to improve readability.
60980      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60981      # Now convert it back to Unix-style (cygpath)
60982      input_path=`$CYGPATH -u "$shortmode_path"`
60983      new_path="$input_path"
60984    fi
60985  fi
60986
60987  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60988  if test "x$test_cygdrive_prefix" = x; then
60989    # As a simple fix, exclude /usr/bin since it's not a real path.
60990    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60991      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60992      # a path prefixed by /cygdrive for fixpath to work.
60993      new_path="$CYGWIN_ROOT_PATH$input_path"
60994    fi
60995  fi
60996
60997
60998  if test "x$path" != "x$new_path"; then
60999    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61000    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61001$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61002  fi
61003
61004    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61005
61006  path="$POTENTIAL_FREETYPE_LIB_PATH"
61007  has_colon=`$ECHO $path | $GREP ^.:`
61008  new_path="$path"
61009  if test "x$has_colon" = x; then
61010    # Not in mixed or Windows style, start by that.
61011    new_path=`cmd //c echo $path`
61012  fi
61013
61014
61015  input_path="$new_path"
61016  # Check if we need to convert this using DOS-style short mode. If the path
61017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61018  # take no chances and rewrite it.
61019  # Note: m4 eats our [], so we need to use [ and ] instead.
61020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61021  if test "x$has_forbidden_chars" != x; then
61022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61023    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61024  fi
61025
61026
61027  windows_path="$new_path"
61028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61029    unix_path=`$CYGPATH -u "$windows_path"`
61030    new_path="$unix_path"
61031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61033    new_path="$unix_path"
61034  fi
61035
61036  if test "x$path" != "x$new_path"; then
61037    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61038    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61039$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61040  fi
61041
61042  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61043  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61044
61045    else
61046      # We're on a unix platform. Hooray! :)
61047      path="$POTENTIAL_FREETYPE_LIB_PATH"
61048      has_space=`$ECHO "$path" | $GREP " "`
61049      if test "x$has_space" != x; then
61050        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61051$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61052        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61053      fi
61054
61055      # Use eval to expand a potential ~
61056      eval path="$path"
61057      if test ! -f "$path" && test ! -d "$path"; then
61058        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61059      fi
61060
61061      if test -d "$path"; then
61062        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61063      else
61064        dir="`$DIRNAME "$path"`"
61065        base="`$BASENAME "$path"`"
61066        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61067      fi
61068    fi
61069  fi
61070
61071
61072    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61073    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61074$as_echo_n "checking for freetype includes... " >&6; }
61075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61076$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61077    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61078    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61079$as_echo_n "checking for freetype libraries... " >&6; }
61080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61081$as_echo "$FREETYPE_LIB_PATH" >&6; }
61082  fi
61083
61084          fi
61085
61086          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61087            if test "x$FOUND_FREETYPE" != xyes; then
61088              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61089              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61090
61091  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61092  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61093  METHOD="well-known location"
61094
61095  # Let's start with an optimistic view of the world :-)
61096  FOUND_FREETYPE=yes
61097
61098  # First look for the canonical freetype main include file ft2build.h.
61099  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61100    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61101    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61102    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61103      # Fail.
61104      FOUND_FREETYPE=no
61105    fi
61106  fi
61107
61108  if test "x$FOUND_FREETYPE" = xyes; then
61109    # Include file found, let's continue the sanity check.
61110    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61111$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61112
61113    # Reset to default value
61114    FREETYPE_BASE_NAME=freetype
61115    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61116    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61117      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61118          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61119        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61120        # for the .6 version explicitly.
61121        FREETYPE_BASE_NAME=freetype.6
61122        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61123        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61124$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61125      else
61126        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61127$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61128        FOUND_FREETYPE=no
61129      fi
61130    else
61131      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61132        # On Windows, we will need both .lib and .dll file.
61133        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61134          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61135$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61136          FOUND_FREETYPE=no
61137        fi
61138      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61139          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61140        # Found lib in isa dir, use that instead.
61141        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61142        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61143$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61144      fi
61145    fi
61146  fi
61147
61148  if test "x$FOUND_FREETYPE" = xyes; then
61149
61150  # Only process if variable expands to non-empty
61151
61152  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61153    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61154
61155  # Input might be given as Windows format, start by converting to
61156  # unix format.
61157  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61158  new_path=`$CYGPATH -u "$path"`
61159
61160  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61161  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61162  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61163  # "foo.exe" is OK but "foo" is an error.
61164  #
61165  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61166  # It is also a way to make sure we got the proper file name for the real test later on.
61167  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61168  if test "x$test_shortpath" = x; then
61169    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61170$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61171    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61172  fi
61173
61174  # Call helper function which possibly converts this using DOS-style short mode.
61175  # If so, the updated path is stored in $new_path.
61176
61177  input_path="$new_path"
61178  # Check if we need to convert this using DOS-style short mode. If the path
61179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61180  # take no chances and rewrite it.
61181  # Note: m4 eats our [], so we need to use [ and ] instead.
61182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61183  if test "x$has_forbidden_chars" != x; then
61184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61185    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61186    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61187    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61188      # Going to short mode and back again did indeed matter. Since short mode is
61189      # case insensitive, let's make it lowercase to improve readability.
61190      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61191      # Now convert it back to Unix-style (cygpath)
61192      input_path=`$CYGPATH -u "$shortmode_path"`
61193      new_path="$input_path"
61194    fi
61195  fi
61196
61197  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61198  if test "x$test_cygdrive_prefix" = x; then
61199    # As a simple fix, exclude /usr/bin since it's not a real path.
61200    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61201      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61202      # a path prefixed by /cygdrive for fixpath to work.
61203      new_path="$CYGWIN_ROOT_PATH$input_path"
61204    fi
61205  fi
61206
61207
61208  if test "x$path" != "x$new_path"; then
61209    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61211$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61212  fi
61213
61214    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61215
61216  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61217  has_colon=`$ECHO $path | $GREP ^.:`
61218  new_path="$path"
61219  if test "x$has_colon" = x; then
61220    # Not in mixed or Windows style, start by that.
61221    new_path=`cmd //c echo $path`
61222  fi
61223
61224
61225  input_path="$new_path"
61226  # Check if we need to convert this using DOS-style short mode. If the path
61227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61228  # take no chances and rewrite it.
61229  # Note: m4 eats our [], so we need to use [ and ] instead.
61230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61231  if test "x$has_forbidden_chars" != x; then
61232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61234  fi
61235
61236
61237  windows_path="$new_path"
61238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61239    unix_path=`$CYGPATH -u "$windows_path"`
61240    new_path="$unix_path"
61241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61243    new_path="$unix_path"
61244  fi
61245
61246  if test "x$path" != "x$new_path"; then
61247    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61249$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61250  fi
61251
61252  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61253  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61254
61255    else
61256      # We're on a unix platform. Hooray! :)
61257      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61258      has_space=`$ECHO "$path" | $GREP " "`
61259      if test "x$has_space" != x; then
61260        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61261$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61262        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61263      fi
61264
61265      # Use eval to expand a potential ~
61266      eval path="$path"
61267      if test ! -f "$path" && test ! -d "$path"; then
61268        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61269      fi
61270
61271      if test -d "$path"; then
61272        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61273      else
61274        dir="`$DIRNAME "$path"`"
61275        base="`$BASENAME "$path"`"
61276        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61277      fi
61278    fi
61279  fi
61280
61281
61282  # Only process if variable expands to non-empty
61283
61284  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61285    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61286
61287  # Input might be given as Windows format, start by converting to
61288  # unix format.
61289  path="$POTENTIAL_FREETYPE_LIB_PATH"
61290  new_path=`$CYGPATH -u "$path"`
61291
61292  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61293  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61294  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61295  # "foo.exe" is OK but "foo" is an error.
61296  #
61297  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61298  # It is also a way to make sure we got the proper file name for the real test later on.
61299  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61300  if test "x$test_shortpath" = x; then
61301    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61302$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61303    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61304  fi
61305
61306  # Call helper function which possibly converts this using DOS-style short mode.
61307  # If so, the updated path is stored in $new_path.
61308
61309  input_path="$new_path"
61310  # Check if we need to convert this using DOS-style short mode. If the path
61311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61312  # take no chances and rewrite it.
61313  # Note: m4 eats our [], so we need to use [ and ] instead.
61314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61315  if test "x$has_forbidden_chars" != x; then
61316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61317    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61318    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61319    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61320      # Going to short mode and back again did indeed matter. Since short mode is
61321      # case insensitive, let's make it lowercase to improve readability.
61322      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61323      # Now convert it back to Unix-style (cygpath)
61324      input_path=`$CYGPATH -u "$shortmode_path"`
61325      new_path="$input_path"
61326    fi
61327  fi
61328
61329  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61330  if test "x$test_cygdrive_prefix" = x; then
61331    # As a simple fix, exclude /usr/bin since it's not a real path.
61332    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61333      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61334      # a path prefixed by /cygdrive for fixpath to work.
61335      new_path="$CYGWIN_ROOT_PATH$input_path"
61336    fi
61337  fi
61338
61339
61340  if test "x$path" != "x$new_path"; then
61341    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61342    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61343$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61344  fi
61345
61346    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61347
61348  path="$POTENTIAL_FREETYPE_LIB_PATH"
61349  has_colon=`$ECHO $path | $GREP ^.:`
61350  new_path="$path"
61351  if test "x$has_colon" = x; then
61352    # Not in mixed or Windows style, start by that.
61353    new_path=`cmd //c echo $path`
61354  fi
61355
61356
61357  input_path="$new_path"
61358  # Check if we need to convert this using DOS-style short mode. If the path
61359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61360  # take no chances and rewrite it.
61361  # Note: m4 eats our [], so we need to use [ and ] instead.
61362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61363  if test "x$has_forbidden_chars" != x; then
61364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61365    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61366  fi
61367
61368
61369  windows_path="$new_path"
61370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61371    unix_path=`$CYGPATH -u "$windows_path"`
61372    new_path="$unix_path"
61373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61375    new_path="$unix_path"
61376  fi
61377
61378  if test "x$path" != "x$new_path"; then
61379    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61381$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61382  fi
61383
61384  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61385  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61386
61387    else
61388      # We're on a unix platform. Hooray! :)
61389      path="$POTENTIAL_FREETYPE_LIB_PATH"
61390      has_space=`$ECHO "$path" | $GREP " "`
61391      if test "x$has_space" != x; then
61392        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61393$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61394        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61395      fi
61396
61397      # Use eval to expand a potential ~
61398      eval path="$path"
61399      if test ! -f "$path" && test ! -d "$path"; then
61400        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61401      fi
61402
61403      if test -d "$path"; then
61404        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61405      else
61406        dir="`$DIRNAME "$path"`"
61407        base="`$BASENAME "$path"`"
61408        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61409      fi
61410    fi
61411  fi
61412
61413
61414    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61415    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61416$as_echo_n "checking for freetype includes... " >&6; }
61417    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61418$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61419    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61420    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61421$as_echo_n "checking for freetype libraries... " >&6; }
61422    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61423$as_echo "$FREETYPE_LIB_PATH" >&6; }
61424  fi
61425
61426            fi
61427          fi
61428
61429          if test "x$FOUND_FREETYPE" != xyes; then
61430            FREETYPE_BASE_DIR="$SYSROOT/usr"
61431            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61432
61433  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61434  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61435  METHOD="well-known location"
61436
61437  # Let's start with an optimistic view of the world :-)
61438  FOUND_FREETYPE=yes
61439
61440  # First look for the canonical freetype main include file ft2build.h.
61441  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61442    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61443    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61444    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61445      # Fail.
61446      FOUND_FREETYPE=no
61447    fi
61448  fi
61449
61450  if test "x$FOUND_FREETYPE" = xyes; then
61451    # Include file found, let's continue the sanity check.
61452    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61453$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61454
61455    # Reset to default value
61456    FREETYPE_BASE_NAME=freetype
61457    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61458    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61459      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61460          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61461        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61462        # for the .6 version explicitly.
61463        FREETYPE_BASE_NAME=freetype.6
61464        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61465        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61466$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61467      else
61468        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61469$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61470        FOUND_FREETYPE=no
61471      fi
61472    else
61473      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61474        # On Windows, we will need both .lib and .dll file.
61475        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61476          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61477$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61478          FOUND_FREETYPE=no
61479        fi
61480      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61481          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61482        # Found lib in isa dir, use that instead.
61483        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61484        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61485$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61486      fi
61487    fi
61488  fi
61489
61490  if test "x$FOUND_FREETYPE" = xyes; then
61491
61492  # Only process if variable expands to non-empty
61493
61494  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61495    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61496
61497  # Input might be given as Windows format, start by converting to
61498  # unix format.
61499  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61500  new_path=`$CYGPATH -u "$path"`
61501
61502  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61503  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61504  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61505  # "foo.exe" is OK but "foo" is an error.
61506  #
61507  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61508  # It is also a way to make sure we got the proper file name for the real test later on.
61509  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61510  if test "x$test_shortpath" = x; then
61511    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61512$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61513    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61514  fi
61515
61516  # Call helper function which possibly converts this using DOS-style short mode.
61517  # If so, the updated path is stored in $new_path.
61518
61519  input_path="$new_path"
61520  # Check if we need to convert this using DOS-style short mode. If the path
61521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61522  # take no chances and rewrite it.
61523  # Note: m4 eats our [], so we need to use [ and ] instead.
61524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61525  if test "x$has_forbidden_chars" != x; then
61526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61527    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61528    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61529    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61530      # Going to short mode and back again did indeed matter. Since short mode is
61531      # case insensitive, let's make it lowercase to improve readability.
61532      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61533      # Now convert it back to Unix-style (cygpath)
61534      input_path=`$CYGPATH -u "$shortmode_path"`
61535      new_path="$input_path"
61536    fi
61537  fi
61538
61539  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61540  if test "x$test_cygdrive_prefix" = x; then
61541    # As a simple fix, exclude /usr/bin since it's not a real path.
61542    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61543      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61544      # a path prefixed by /cygdrive for fixpath to work.
61545      new_path="$CYGWIN_ROOT_PATH$input_path"
61546    fi
61547  fi
61548
61549
61550  if test "x$path" != "x$new_path"; then
61551    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61553$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61554  fi
61555
61556    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61557
61558  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61559  has_colon=`$ECHO $path | $GREP ^.:`
61560  new_path="$path"
61561  if test "x$has_colon" = x; then
61562    # Not in mixed or Windows style, start by that.
61563    new_path=`cmd //c echo $path`
61564  fi
61565
61566
61567  input_path="$new_path"
61568  # Check if we need to convert this using DOS-style short mode. If the path
61569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61570  # take no chances and rewrite it.
61571  # Note: m4 eats our [], so we need to use [ and ] instead.
61572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61573  if test "x$has_forbidden_chars" != x; then
61574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61575    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61576  fi
61577
61578
61579  windows_path="$new_path"
61580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61581    unix_path=`$CYGPATH -u "$windows_path"`
61582    new_path="$unix_path"
61583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61585    new_path="$unix_path"
61586  fi
61587
61588  if test "x$path" != "x$new_path"; then
61589    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61591$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61592  fi
61593
61594  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61595  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61596
61597    else
61598      # We're on a unix platform. Hooray! :)
61599      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61600      has_space=`$ECHO "$path" | $GREP " "`
61601      if test "x$has_space" != x; then
61602        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61603$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61604        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61605      fi
61606
61607      # Use eval to expand a potential ~
61608      eval path="$path"
61609      if test ! -f "$path" && test ! -d "$path"; then
61610        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61611      fi
61612
61613      if test -d "$path"; then
61614        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61615      else
61616        dir="`$DIRNAME "$path"`"
61617        base="`$BASENAME "$path"`"
61618        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61619      fi
61620    fi
61621  fi
61622
61623
61624  # Only process if variable expands to non-empty
61625
61626  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61627    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61628
61629  # Input might be given as Windows format, start by converting to
61630  # unix format.
61631  path="$POTENTIAL_FREETYPE_LIB_PATH"
61632  new_path=`$CYGPATH -u "$path"`
61633
61634  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61635  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61636  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61637  # "foo.exe" is OK but "foo" is an error.
61638  #
61639  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61640  # It is also a way to make sure we got the proper file name for the real test later on.
61641  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61642  if test "x$test_shortpath" = x; then
61643    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61644$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61645    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61646  fi
61647
61648  # Call helper function which possibly converts this using DOS-style short mode.
61649  # If so, the updated path is stored in $new_path.
61650
61651  input_path="$new_path"
61652  # Check if we need to convert this using DOS-style short mode. If the path
61653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61654  # take no chances and rewrite it.
61655  # Note: m4 eats our [], so we need to use [ and ] instead.
61656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61657  if test "x$has_forbidden_chars" != x; then
61658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61659    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61660    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61661    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61662      # Going to short mode and back again did indeed matter. Since short mode is
61663      # case insensitive, let's make it lowercase to improve readability.
61664      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61665      # Now convert it back to Unix-style (cygpath)
61666      input_path=`$CYGPATH -u "$shortmode_path"`
61667      new_path="$input_path"
61668    fi
61669  fi
61670
61671  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61672  if test "x$test_cygdrive_prefix" = x; then
61673    # As a simple fix, exclude /usr/bin since it's not a real path.
61674    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61675      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61676      # a path prefixed by /cygdrive for fixpath to work.
61677      new_path="$CYGWIN_ROOT_PATH$input_path"
61678    fi
61679  fi
61680
61681
61682  if test "x$path" != "x$new_path"; then
61683    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61685$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61686  fi
61687
61688    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61689
61690  path="$POTENTIAL_FREETYPE_LIB_PATH"
61691  has_colon=`$ECHO $path | $GREP ^.:`
61692  new_path="$path"
61693  if test "x$has_colon" = x; then
61694    # Not in mixed or Windows style, start by that.
61695    new_path=`cmd //c echo $path`
61696  fi
61697
61698
61699  input_path="$new_path"
61700  # Check if we need to convert this using DOS-style short mode. If the path
61701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61702  # take no chances and rewrite it.
61703  # Note: m4 eats our [], so we need to use [ and ] instead.
61704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61705  if test "x$has_forbidden_chars" != x; then
61706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61707    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61708  fi
61709
61710
61711  windows_path="$new_path"
61712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61713    unix_path=`$CYGPATH -u "$windows_path"`
61714    new_path="$unix_path"
61715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61717    new_path="$unix_path"
61718  fi
61719
61720  if test "x$path" != "x$new_path"; then
61721    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61723$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61724  fi
61725
61726  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61727  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61728
61729    else
61730      # We're on a unix platform. Hooray! :)
61731      path="$POTENTIAL_FREETYPE_LIB_PATH"
61732      has_space=`$ECHO "$path" | $GREP " "`
61733      if test "x$has_space" != x; then
61734        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61735$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61736        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61737      fi
61738
61739      # Use eval to expand a potential ~
61740      eval path="$path"
61741      if test ! -f "$path" && test ! -d "$path"; then
61742        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61743      fi
61744
61745      if test -d "$path"; then
61746        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61747      else
61748        dir="`$DIRNAME "$path"`"
61749        base="`$BASENAME "$path"`"
61750        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61751      fi
61752    fi
61753  fi
61754
61755
61756    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61757    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61758$as_echo_n "checking for freetype includes... " >&6; }
61759    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61760$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61761    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61762    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61763$as_echo_n "checking for freetype libraries... " >&6; }
61764    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61765$as_echo "$FREETYPE_LIB_PATH" >&6; }
61766  fi
61767
61768            else
61769
61770  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61771  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61772  METHOD="well-known location"
61773
61774  # Let's start with an optimistic view of the world :-)
61775  FOUND_FREETYPE=yes
61776
61777  # First look for the canonical freetype main include file ft2build.h.
61778  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61779    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61780    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61781    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61782      # Fail.
61783      FOUND_FREETYPE=no
61784    fi
61785  fi
61786
61787  if test "x$FOUND_FREETYPE" = xyes; then
61788    # Include file found, let's continue the sanity check.
61789    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61790$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61791
61792    # Reset to default value
61793    FREETYPE_BASE_NAME=freetype
61794    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61795    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61796      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61797          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61798        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61799        # for the .6 version explicitly.
61800        FREETYPE_BASE_NAME=freetype.6
61801        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61802        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61803$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61804      else
61805        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61806$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61807        FOUND_FREETYPE=no
61808      fi
61809    else
61810      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61811        # On Windows, we will need both .lib and .dll file.
61812        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61813          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61814$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61815          FOUND_FREETYPE=no
61816        fi
61817      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61818          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61819        # Found lib in isa dir, use that instead.
61820        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61821        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61822$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61823      fi
61824    fi
61825  fi
61826
61827  if test "x$FOUND_FREETYPE" = xyes; then
61828
61829  # Only process if variable expands to non-empty
61830
61831  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61832    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61833
61834  # Input might be given as Windows format, start by converting to
61835  # unix format.
61836  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61837  new_path=`$CYGPATH -u "$path"`
61838
61839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61842  # "foo.exe" is OK but "foo" is an error.
61843  #
61844  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61845  # It is also a way to make sure we got the proper file name for the real test later on.
61846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61847  if test "x$test_shortpath" = x; then
61848    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61849$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61850    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61851  fi
61852
61853  # Call helper function which possibly converts this using DOS-style short mode.
61854  # If so, the updated path is stored in $new_path.
61855
61856  input_path="$new_path"
61857  # Check if we need to convert this using DOS-style short mode. If the path
61858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61859  # take no chances and rewrite it.
61860  # Note: m4 eats our [], so we need to use [ and ] instead.
61861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61862  if test "x$has_forbidden_chars" != x; then
61863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61864    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61865    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61866    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61867      # Going to short mode and back again did indeed matter. Since short mode is
61868      # case insensitive, let's make it lowercase to improve readability.
61869      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61870      # Now convert it back to Unix-style (cygpath)
61871      input_path=`$CYGPATH -u "$shortmode_path"`
61872      new_path="$input_path"
61873    fi
61874  fi
61875
61876  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61877  if test "x$test_cygdrive_prefix" = x; then
61878    # As a simple fix, exclude /usr/bin since it's not a real path.
61879    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61880      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61881      # a path prefixed by /cygdrive for fixpath to work.
61882      new_path="$CYGWIN_ROOT_PATH$input_path"
61883    fi
61884  fi
61885
61886
61887  if test "x$path" != "x$new_path"; then
61888    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61890$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61891  fi
61892
61893    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61894
61895  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61896  has_colon=`$ECHO $path | $GREP ^.:`
61897  new_path="$path"
61898  if test "x$has_colon" = x; then
61899    # Not in mixed or Windows style, start by that.
61900    new_path=`cmd //c echo $path`
61901  fi
61902
61903
61904  input_path="$new_path"
61905  # Check if we need to convert this using DOS-style short mode. If the path
61906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61907  # take no chances and rewrite it.
61908  # Note: m4 eats our [], so we need to use [ and ] instead.
61909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61910  if test "x$has_forbidden_chars" != x; then
61911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61913  fi
61914
61915
61916  windows_path="$new_path"
61917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61918    unix_path=`$CYGPATH -u "$windows_path"`
61919    new_path="$unix_path"
61920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61922    new_path="$unix_path"
61923  fi
61924
61925  if test "x$path" != "x$new_path"; then
61926    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61928$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61929  fi
61930
61931  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61932  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61933
61934    else
61935      # We're on a unix platform. Hooray! :)
61936      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61937      has_space=`$ECHO "$path" | $GREP " "`
61938      if test "x$has_space" != x; then
61939        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61940$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61941        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61942      fi
61943
61944      # Use eval to expand a potential ~
61945      eval path="$path"
61946      if test ! -f "$path" && test ! -d "$path"; then
61947        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61948      fi
61949
61950      if test -d "$path"; then
61951        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61952      else
61953        dir="`$DIRNAME "$path"`"
61954        base="`$BASENAME "$path"`"
61955        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61956      fi
61957    fi
61958  fi
61959
61960
61961  # Only process if variable expands to non-empty
61962
61963  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61964    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61965
61966  # Input might be given as Windows format, start by converting to
61967  # unix format.
61968  path="$POTENTIAL_FREETYPE_LIB_PATH"
61969  new_path=`$CYGPATH -u "$path"`
61970
61971  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61972  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61973  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61974  # "foo.exe" is OK but "foo" is an error.
61975  #
61976  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61977  # It is also a way to make sure we got the proper file name for the real test later on.
61978  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61979  if test "x$test_shortpath" = x; then
61980    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61981$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61982    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61983  fi
61984
61985  # Call helper function which possibly converts this using DOS-style short mode.
61986  # If so, the updated path is stored in $new_path.
61987
61988  input_path="$new_path"
61989  # Check if we need to convert this using DOS-style short mode. If the path
61990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61991  # take no chances and rewrite it.
61992  # Note: m4 eats our [], so we need to use [ and ] instead.
61993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61994  if test "x$has_forbidden_chars" != x; then
61995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61996    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61997    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61998    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61999      # Going to short mode and back again did indeed matter. Since short mode is
62000      # case insensitive, let's make it lowercase to improve readability.
62001      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62002      # Now convert it back to Unix-style (cygpath)
62003      input_path=`$CYGPATH -u "$shortmode_path"`
62004      new_path="$input_path"
62005    fi
62006  fi
62007
62008  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62009  if test "x$test_cygdrive_prefix" = x; then
62010    # As a simple fix, exclude /usr/bin since it's not a real path.
62011    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62012      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62013      # a path prefixed by /cygdrive for fixpath to work.
62014      new_path="$CYGWIN_ROOT_PATH$input_path"
62015    fi
62016  fi
62017
62018
62019  if test "x$path" != "x$new_path"; then
62020    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62022$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62023  fi
62024
62025    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62026
62027  path="$POTENTIAL_FREETYPE_LIB_PATH"
62028  has_colon=`$ECHO $path | $GREP ^.:`
62029  new_path="$path"
62030  if test "x$has_colon" = x; then
62031    # Not in mixed or Windows style, start by that.
62032    new_path=`cmd //c echo $path`
62033  fi
62034
62035
62036  input_path="$new_path"
62037  # Check if we need to convert this using DOS-style short mode. If the path
62038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62039  # take no chances and rewrite it.
62040  # Note: m4 eats our [], so we need to use [ and ] instead.
62041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62042  if test "x$has_forbidden_chars" != x; then
62043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62044    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62045  fi
62046
62047
62048  windows_path="$new_path"
62049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62050    unix_path=`$CYGPATH -u "$windows_path"`
62051    new_path="$unix_path"
62052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62054    new_path="$unix_path"
62055  fi
62056
62057  if test "x$path" != "x$new_path"; then
62058    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62060$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62061  fi
62062
62063  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62064  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62065
62066    else
62067      # We're on a unix platform. Hooray! :)
62068      path="$POTENTIAL_FREETYPE_LIB_PATH"
62069      has_space=`$ECHO "$path" | $GREP " "`
62070      if test "x$has_space" != x; then
62071        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62072$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62073        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62074      fi
62075
62076      # Use eval to expand a potential ~
62077      eval path="$path"
62078      if test ! -f "$path" && test ! -d "$path"; then
62079        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62080      fi
62081
62082      if test -d "$path"; then
62083        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62084      else
62085        dir="`$DIRNAME "$path"`"
62086        base="`$BASENAME "$path"`"
62087        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62088      fi
62089    fi
62090  fi
62091
62092
62093    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62095$as_echo_n "checking for freetype includes... " >&6; }
62096    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62097$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62098    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62099    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62100$as_echo_n "checking for freetype libraries... " >&6; }
62101    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62102$as_echo "$FREETYPE_LIB_PATH" >&6; }
62103  fi
62104
62105              if test "x$FOUND_FREETYPE" != xyes; then
62106
62107  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62108  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62109  METHOD="well-known location"
62110
62111  # Let's start with an optimistic view of the world :-)
62112  FOUND_FREETYPE=yes
62113
62114  # First look for the canonical freetype main include file ft2build.h.
62115  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62116    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62117    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62118    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62119      # Fail.
62120      FOUND_FREETYPE=no
62121    fi
62122  fi
62123
62124  if test "x$FOUND_FREETYPE" = xyes; then
62125    # Include file found, let's continue the sanity check.
62126    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62127$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62128
62129    # Reset to default value
62130    FREETYPE_BASE_NAME=freetype
62131    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62132    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62133      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62134          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62135        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62136        # for the .6 version explicitly.
62137        FREETYPE_BASE_NAME=freetype.6
62138        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62139        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62140$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62141      else
62142        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62143$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62144        FOUND_FREETYPE=no
62145      fi
62146    else
62147      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62148        # On Windows, we will need both .lib and .dll file.
62149        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62150          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62151$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62152          FOUND_FREETYPE=no
62153        fi
62154      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62155          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62156        # Found lib in isa dir, use that instead.
62157        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62158        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62159$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62160      fi
62161    fi
62162  fi
62163
62164  if test "x$FOUND_FREETYPE" = xyes; then
62165
62166  # Only process if variable expands to non-empty
62167
62168  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62169    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62170
62171  # Input might be given as Windows format, start by converting to
62172  # unix format.
62173  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62174  new_path=`$CYGPATH -u "$path"`
62175
62176  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62177  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62178  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62179  # "foo.exe" is OK but "foo" is an error.
62180  #
62181  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62182  # It is also a way to make sure we got the proper file name for the real test later on.
62183  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62184  if test "x$test_shortpath" = x; then
62185    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62186$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62187    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62188  fi
62189
62190  # Call helper function which possibly converts this using DOS-style short mode.
62191  # If so, the updated path is stored in $new_path.
62192
62193  input_path="$new_path"
62194  # Check if we need to convert this using DOS-style short mode. If the path
62195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62196  # take no chances and rewrite it.
62197  # Note: m4 eats our [], so we need to use [ and ] instead.
62198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62199  if test "x$has_forbidden_chars" != x; then
62200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62201    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62202    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62203    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62204      # Going to short mode and back again did indeed matter. Since short mode is
62205      # case insensitive, let's make it lowercase to improve readability.
62206      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62207      # Now convert it back to Unix-style (cygpath)
62208      input_path=`$CYGPATH -u "$shortmode_path"`
62209      new_path="$input_path"
62210    fi
62211  fi
62212
62213  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62214  if test "x$test_cygdrive_prefix" = x; then
62215    # As a simple fix, exclude /usr/bin since it's not a real path.
62216    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62217      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62218      # a path prefixed by /cygdrive for fixpath to work.
62219      new_path="$CYGWIN_ROOT_PATH$input_path"
62220    fi
62221  fi
62222
62223
62224  if test "x$path" != "x$new_path"; then
62225    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62227$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62228  fi
62229
62230    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62231
62232  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62233  has_colon=`$ECHO $path | $GREP ^.:`
62234  new_path="$path"
62235  if test "x$has_colon" = x; then
62236    # Not in mixed or Windows style, start by that.
62237    new_path=`cmd //c echo $path`
62238  fi
62239
62240
62241  input_path="$new_path"
62242  # Check if we need to convert this using DOS-style short mode. If the path
62243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62244  # take no chances and rewrite it.
62245  # Note: m4 eats our [], so we need to use [ and ] instead.
62246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62247  if test "x$has_forbidden_chars" != x; then
62248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62249    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62250  fi
62251
62252
62253  windows_path="$new_path"
62254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62255    unix_path=`$CYGPATH -u "$windows_path"`
62256    new_path="$unix_path"
62257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62259    new_path="$unix_path"
62260  fi
62261
62262  if test "x$path" != "x$new_path"; then
62263    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62265$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62266  fi
62267
62268  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62269  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62270
62271    else
62272      # We're on a unix platform. Hooray! :)
62273      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62274      has_space=`$ECHO "$path" | $GREP " "`
62275      if test "x$has_space" != x; then
62276        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62277$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62278        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62279      fi
62280
62281      # Use eval to expand a potential ~
62282      eval path="$path"
62283      if test ! -f "$path" && test ! -d "$path"; then
62284        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62285      fi
62286
62287      if test -d "$path"; then
62288        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62289      else
62290        dir="`$DIRNAME "$path"`"
62291        base="`$BASENAME "$path"`"
62292        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62293      fi
62294    fi
62295  fi
62296
62297
62298  # Only process if variable expands to non-empty
62299
62300  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62301    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62302
62303  # Input might be given as Windows format, start by converting to
62304  # unix format.
62305  path="$POTENTIAL_FREETYPE_LIB_PATH"
62306  new_path=`$CYGPATH -u "$path"`
62307
62308  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62309  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62310  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62311  # "foo.exe" is OK but "foo" is an error.
62312  #
62313  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62314  # It is also a way to make sure we got the proper file name for the real test later on.
62315  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62316  if test "x$test_shortpath" = x; then
62317    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62318$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62319    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62320  fi
62321
62322  # Call helper function which possibly converts this using DOS-style short mode.
62323  # If so, the updated path is stored in $new_path.
62324
62325  input_path="$new_path"
62326  # Check if we need to convert this using DOS-style short mode. If the path
62327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62328  # take no chances and rewrite it.
62329  # Note: m4 eats our [], so we need to use [ and ] instead.
62330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62331  if test "x$has_forbidden_chars" != x; then
62332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62333    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62334    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62335    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62336      # Going to short mode and back again did indeed matter. Since short mode is
62337      # case insensitive, let's make it lowercase to improve readability.
62338      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62339      # Now convert it back to Unix-style (cygpath)
62340      input_path=`$CYGPATH -u "$shortmode_path"`
62341      new_path="$input_path"
62342    fi
62343  fi
62344
62345  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62346  if test "x$test_cygdrive_prefix" = x; then
62347    # As a simple fix, exclude /usr/bin since it's not a real path.
62348    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62349      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62350      # a path prefixed by /cygdrive for fixpath to work.
62351      new_path="$CYGWIN_ROOT_PATH$input_path"
62352    fi
62353  fi
62354
62355
62356  if test "x$path" != "x$new_path"; then
62357    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62359$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62360  fi
62361
62362    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62363
62364  path="$POTENTIAL_FREETYPE_LIB_PATH"
62365  has_colon=`$ECHO $path | $GREP ^.:`
62366  new_path="$path"
62367  if test "x$has_colon" = x; then
62368    # Not in mixed or Windows style, start by that.
62369    new_path=`cmd //c echo $path`
62370  fi
62371
62372
62373  input_path="$new_path"
62374  # Check if we need to convert this using DOS-style short mode. If the path
62375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62376  # take no chances and rewrite it.
62377  # Note: m4 eats our [], so we need to use [ and ] instead.
62378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62379  if test "x$has_forbidden_chars" != x; then
62380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62381    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62382  fi
62383
62384
62385  windows_path="$new_path"
62386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62387    unix_path=`$CYGPATH -u "$windows_path"`
62388    new_path="$unix_path"
62389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62391    new_path="$unix_path"
62392  fi
62393
62394  if test "x$path" != "x$new_path"; then
62395    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62397$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62398  fi
62399
62400  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62401  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62402
62403    else
62404      # We're on a unix platform. Hooray! :)
62405      path="$POTENTIAL_FREETYPE_LIB_PATH"
62406      has_space=`$ECHO "$path" | $GREP " "`
62407      if test "x$has_space" != x; then
62408        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62409$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62410        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62411      fi
62412
62413      # Use eval to expand a potential ~
62414      eval path="$path"
62415      if test ! -f "$path" && test ! -d "$path"; then
62416        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62417      fi
62418
62419      if test -d "$path"; then
62420        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62421      else
62422        dir="`$DIRNAME "$path"`"
62423        base="`$BASENAME "$path"`"
62424        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62425      fi
62426    fi
62427  fi
62428
62429
62430    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62431    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62432$as_echo_n "checking for freetype includes... " >&6; }
62433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62434$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62435    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62436    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62437$as_echo_n "checking for freetype libraries... " >&6; }
62438    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62439$as_echo "$FREETYPE_LIB_PATH" >&6; }
62440  fi
62441
62442              fi
62443            fi
62444          fi
62445        fi
62446      fi # end check in well-known locations
62447
62448      if test "x$FOUND_FREETYPE" != xyes; then
62449
62450  # Print a helpful message on how to acquire the necessary build dependency.
62451  # freetype is the help tag: freetype, cups, alsa etc
62452  MISSING_DEPENDENCY=freetype
62453
62454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62455    cygwin_help $MISSING_DEPENDENCY
62456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62457    msys_help $MISSING_DEPENDENCY
62458  else
62459    PKGHANDLER_COMMAND=
62460
62461    case $PKGHANDLER in
62462      apt-get)
62463        apt_help     $MISSING_DEPENDENCY ;;
62464      yum)
62465        yum_help     $MISSING_DEPENDENCY ;;
62466      brew)
62467        brew_help    $MISSING_DEPENDENCY ;;
62468      port)
62469        port_help    $MISSING_DEPENDENCY ;;
62470      pkgutil)
62471        pkgutil_help $MISSING_DEPENDENCY ;;
62472      pkgadd)
62473        pkgadd_help  $MISSING_DEPENDENCY ;;
62474    esac
62475
62476    if test "x$PKGHANDLER_COMMAND" != x; then
62477      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62478    fi
62479  fi
62480
62481        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62482      fi
62483    fi # end user specified settings
62484
62485    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62486    if test "x$FREETYPE_CFLAGS" = x; then
62487
62488  # Only process if variable expands to non-empty
62489
62490  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62491    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62492
62493  # Input might be given as Windows format, start by converting to
62494  # unix format.
62495  path="$FREETYPE_INCLUDE_PATH"
62496  new_path=`$CYGPATH -u "$path"`
62497
62498  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62499  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62500  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62501  # "foo.exe" is OK but "foo" is an error.
62502  #
62503  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62504  # It is also a way to make sure we got the proper file name for the real test later on.
62505  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62506  if test "x$test_shortpath" = x; then
62507    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62508$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62509    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62510  fi
62511
62512  # Call helper function which possibly converts this using DOS-style short mode.
62513  # If so, the updated path is stored in $new_path.
62514
62515  input_path="$new_path"
62516  # Check if we need to convert this using DOS-style short mode. If the path
62517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62518  # take no chances and rewrite it.
62519  # Note: m4 eats our [], so we need to use [ and ] instead.
62520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62521  if test "x$has_forbidden_chars" != x; then
62522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62523    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62524    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62525    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62526      # Going to short mode and back again did indeed matter. Since short mode is
62527      # case insensitive, let's make it lowercase to improve readability.
62528      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62529      # Now convert it back to Unix-style (cygpath)
62530      input_path=`$CYGPATH -u "$shortmode_path"`
62531      new_path="$input_path"
62532    fi
62533  fi
62534
62535  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62536  if test "x$test_cygdrive_prefix" = x; then
62537    # As a simple fix, exclude /usr/bin since it's not a real path.
62538    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62539      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62540      # a path prefixed by /cygdrive for fixpath to work.
62541      new_path="$CYGWIN_ROOT_PATH$input_path"
62542    fi
62543  fi
62544
62545
62546  if test "x$path" != "x$new_path"; then
62547    FREETYPE_INCLUDE_PATH="$new_path"
62548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62549$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62550  fi
62551
62552    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62553
62554  path="$FREETYPE_INCLUDE_PATH"
62555  has_colon=`$ECHO $path | $GREP ^.:`
62556  new_path="$path"
62557  if test "x$has_colon" = x; then
62558    # Not in mixed or Windows style, start by that.
62559    new_path=`cmd //c echo $path`
62560  fi
62561
62562
62563  input_path="$new_path"
62564  # Check if we need to convert this using DOS-style short mode. If the path
62565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62566  # take no chances and rewrite it.
62567  # Note: m4 eats our [], so we need to use [ and ] instead.
62568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62569  if test "x$has_forbidden_chars" != x; then
62570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62571    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62572  fi
62573
62574
62575  windows_path="$new_path"
62576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62577    unix_path=`$CYGPATH -u "$windows_path"`
62578    new_path="$unix_path"
62579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62581    new_path="$unix_path"
62582  fi
62583
62584  if test "x$path" != "x$new_path"; then
62585    FREETYPE_INCLUDE_PATH="$new_path"
62586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62587$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62588  fi
62589
62590  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62591  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62592
62593    else
62594      # We're on a unix platform. Hooray! :)
62595      path="$FREETYPE_INCLUDE_PATH"
62596      has_space=`$ECHO "$path" | $GREP " "`
62597      if test "x$has_space" != x; then
62598        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62599$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62600        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62601      fi
62602
62603      # Use eval to expand a potential ~
62604      eval path="$path"
62605      if test ! -f "$path" && test ! -d "$path"; then
62606        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62607      fi
62608
62609      if test -d "$path"; then
62610        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62611      else
62612        dir="`$DIRNAME "$path"`"
62613        base="`$BASENAME "$path"`"
62614        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62615      fi
62616    fi
62617  fi
62618
62619      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62620        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62621      else
62622        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62623      fi
62624    fi
62625
62626    if test "x$FREETYPE_LIBS" = x; then
62627
62628  # Only process if variable expands to non-empty
62629
62630  if test "x$FREETYPE_LIB_PATH" != x; then
62631    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62632
62633  # Input might be given as Windows format, start by converting to
62634  # unix format.
62635  path="$FREETYPE_LIB_PATH"
62636  new_path=`$CYGPATH -u "$path"`
62637
62638  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62639  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62640  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62641  # "foo.exe" is OK but "foo" is an error.
62642  #
62643  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62644  # It is also a way to make sure we got the proper file name for the real test later on.
62645  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62646  if test "x$test_shortpath" = x; then
62647    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62648$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62649    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62650  fi
62651
62652  # Call helper function which possibly converts this using DOS-style short mode.
62653  # If so, the updated path is stored in $new_path.
62654
62655  input_path="$new_path"
62656  # Check if we need to convert this using DOS-style short mode. If the path
62657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62658  # take no chances and rewrite it.
62659  # Note: m4 eats our [], so we need to use [ and ] instead.
62660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62661  if test "x$has_forbidden_chars" != x; then
62662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62663    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62664    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62665    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62666      # Going to short mode and back again did indeed matter. Since short mode is
62667      # case insensitive, let's make it lowercase to improve readability.
62668      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62669      # Now convert it back to Unix-style (cygpath)
62670      input_path=`$CYGPATH -u "$shortmode_path"`
62671      new_path="$input_path"
62672    fi
62673  fi
62674
62675  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62676  if test "x$test_cygdrive_prefix" = x; then
62677    # As a simple fix, exclude /usr/bin since it's not a real path.
62678    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62679      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62680      # a path prefixed by /cygdrive for fixpath to work.
62681      new_path="$CYGWIN_ROOT_PATH$input_path"
62682    fi
62683  fi
62684
62685
62686  if test "x$path" != "x$new_path"; then
62687    FREETYPE_LIB_PATH="$new_path"
62688    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62689$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62690  fi
62691
62692    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62693
62694  path="$FREETYPE_LIB_PATH"
62695  has_colon=`$ECHO $path | $GREP ^.:`
62696  new_path="$path"
62697  if test "x$has_colon" = x; then
62698    # Not in mixed or Windows style, start by that.
62699    new_path=`cmd //c echo $path`
62700  fi
62701
62702
62703  input_path="$new_path"
62704  # Check if we need to convert this using DOS-style short mode. If the path
62705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62706  # take no chances and rewrite it.
62707  # Note: m4 eats our [], so we need to use [ and ] instead.
62708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62709  if test "x$has_forbidden_chars" != x; then
62710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62711    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62712  fi
62713
62714
62715  windows_path="$new_path"
62716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62717    unix_path=`$CYGPATH -u "$windows_path"`
62718    new_path="$unix_path"
62719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62721    new_path="$unix_path"
62722  fi
62723
62724  if test "x$path" != "x$new_path"; then
62725    FREETYPE_LIB_PATH="$new_path"
62726    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62727$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62728  fi
62729
62730  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62731  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62732
62733    else
62734      # We're on a unix platform. Hooray! :)
62735      path="$FREETYPE_LIB_PATH"
62736      has_space=`$ECHO "$path" | $GREP " "`
62737      if test "x$has_space" != x; then
62738        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62739$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62740        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62741      fi
62742
62743      # Use eval to expand a potential ~
62744      eval path="$path"
62745      if test ! -f "$path" && test ! -d "$path"; then
62746        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62747      fi
62748
62749      if test -d "$path"; then
62750        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62751      else
62752        dir="`$DIRNAME "$path"`"
62753        base="`$BASENAME "$path"`"
62754        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62755      fi
62756    fi
62757  fi
62758
62759      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62760        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62761      else
62762        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62763      fi
62764    fi
62765
62766    # Try to compile it
62767    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62768$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62769    ac_ext=cpp
62770ac_cpp='$CXXCPP $CPPFLAGS'
62771ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62772ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62773ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62774
62775    PREV_CXXCFLAGS="$CXXFLAGS"
62776    PREV_LIBS="$LIBS"
62777    PREV_CXX="$CXX"
62778    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62779    LIBS="$LIBS $FREETYPE_LIBS"
62780    CXX="$FIXPATH $CXX"
62781    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62782/* end confdefs.h.  */
62783
62784          #include<ft2build.h>
62785          #include FT_FREETYPE_H
62786          int main () {
62787            FT_Init_FreeType(NULL);
62788            return 0;
62789          }
62790
62791_ACEOF
62792if ac_fn_cxx_try_link "$LINENO"; then :
62793
62794          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62795$as_echo "yes" >&6; }
62796
62797else
62798
62799          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62800$as_echo "no" >&6; }
62801          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62802$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62803          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62804$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62805
62806
62807  # Print a helpful message on how to acquire the necessary build dependency.
62808  # freetype is the help tag: freetype, cups, alsa etc
62809  MISSING_DEPENDENCY=freetype
62810
62811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62812    cygwin_help $MISSING_DEPENDENCY
62813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62814    msys_help $MISSING_DEPENDENCY
62815  else
62816    PKGHANDLER_COMMAND=
62817
62818    case $PKGHANDLER in
62819      apt-get)
62820        apt_help     $MISSING_DEPENDENCY ;;
62821      yum)
62822        yum_help     $MISSING_DEPENDENCY ;;
62823      brew)
62824        brew_help    $MISSING_DEPENDENCY ;;
62825      port)
62826        port_help    $MISSING_DEPENDENCY ;;
62827      pkgutil)
62828        pkgutil_help $MISSING_DEPENDENCY ;;
62829      pkgadd)
62830        pkgadd_help  $MISSING_DEPENDENCY ;;
62831    esac
62832
62833    if test "x$PKGHANDLER_COMMAND" != x; then
62834      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62835    fi
62836  fi
62837
62838
62839          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62840
62841
62842fi
62843rm -f core conftest.err conftest.$ac_objext \
62844    conftest$ac_exeext conftest.$ac_ext
62845    CXXCFLAGS="$PREV_CXXFLAGS"
62846    LIBS="$PREV_LIBS"
62847    CXX="$PREV_CXX"
62848    ac_ext=cpp
62849ac_cpp='$CXXCPP $CPPFLAGS'
62850ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62851ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62852ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62853
62854
62855    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62856$as_echo_n "checking if we should bundle freetype... " >&6; }
62857    if test "x$BUNDLE_FREETYPE" = xyes; then
62858      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62859    fi
62860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62861$as_echo "$BUNDLE_FREETYPE" >&6; }
62862
62863  fi # end freetype needed
62864
62865
62866
62867
62868
62869
62870
62871# Check whether --with-alsa was given.
62872if test "${with_alsa+set}" = set; then :
62873  withval=$with_alsa;
62874fi
62875
62876
62877# Check whether --with-alsa-include was given.
62878if test "${with_alsa_include+set}" = set; then :
62879  withval=$with_alsa_include;
62880fi
62881
62882
62883# Check whether --with-alsa-lib was given.
62884if test "${with_alsa_lib+set}" = set; then :
62885  withval=$with_alsa_lib;
62886fi
62887
62888
62889  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62890    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62891        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62892        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62893      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62894$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62895    fi
62896    ALSA_CFLAGS=
62897    ALSA_LIBS=
62898  else
62899    ALSA_FOUND=no
62900
62901    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62902      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62903    fi
62904
62905    if test "x${with_alsa}" != x; then
62906      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62907      ALSA_CFLAGS="-I${with_alsa}/include"
62908      ALSA_FOUND=yes
62909    fi
62910    if test "x${with_alsa_include}" != x; then
62911      ALSA_CFLAGS="-I${with_alsa_include}"
62912      ALSA_FOUND=yes
62913    fi
62914    if test "x${with_alsa_lib}" != x; then
62915      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62916      ALSA_FOUND=yes
62917    fi
62918    # Do not try pkg-config if we have a sysroot set.
62919    if test "x$SYSROOT" = x; then
62920      if test "x$ALSA_FOUND" = xno; then
62921
62922pkg_failed=no
62923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62924$as_echo_n "checking for ALSA... " >&6; }
62925
62926if test -n "$ALSA_CFLAGS"; then
62927    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62928 elif test -n "$PKG_CONFIG"; then
62929    if test -n "$PKG_CONFIG" && \
62930    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62931  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62932  ac_status=$?
62933  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62934  test $ac_status = 0; }; then
62935  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62936else
62937  pkg_failed=yes
62938fi
62939 else
62940    pkg_failed=untried
62941fi
62942if test -n "$ALSA_LIBS"; then
62943    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62944 elif test -n "$PKG_CONFIG"; then
62945    if test -n "$PKG_CONFIG" && \
62946    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62947  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62948  ac_status=$?
62949  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62950  test $ac_status = 0; }; then
62951  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62952else
62953  pkg_failed=yes
62954fi
62955 else
62956    pkg_failed=untried
62957fi
62958
62959
62960
62961if test $pkg_failed = yes; then
62962
62963if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62964        _pkg_short_errors_supported=yes
62965else
62966        _pkg_short_errors_supported=no
62967fi
62968        if test $_pkg_short_errors_supported = yes; then
62969	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62970        else
62971	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62972        fi
62973	# Put the nasty error message in config.log where it belongs
62974	echo "$ALSA_PKG_ERRORS" >&5
62975
62976	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62977$as_echo "no" >&6; }
62978                ALSA_FOUND=no
62979elif test $pkg_failed = untried; then
62980	ALSA_FOUND=no
62981else
62982	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62983	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62984        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62985$as_echo "yes" >&6; }
62986	ALSA_FOUND=yes
62987fi
62988      fi
62989    fi
62990    if test "x$ALSA_FOUND" = xno; then
62991      for ac_header in alsa/asoundlib.h
62992do :
62993  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62994if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62995  cat >>confdefs.h <<_ACEOF
62996#define HAVE_ALSA_ASOUNDLIB_H 1
62997_ACEOF
62998
62999            ALSA_FOUND=yes
63000            ALSA_CFLAGS=-Iignoreme
63001            ALSA_LIBS=-lasound
63002            DEFAULT_ALSA=yes
63003
63004else
63005  ALSA_FOUND=no
63006
63007fi
63008
63009done
63010
63011    fi
63012    if test "x$ALSA_FOUND" = xno; then
63013
63014  # Print a helpful message on how to acquire the necessary build dependency.
63015  # alsa is the help tag: freetype, cups, alsa etc
63016  MISSING_DEPENDENCY=alsa
63017
63018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63019    cygwin_help $MISSING_DEPENDENCY
63020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63021    msys_help $MISSING_DEPENDENCY
63022  else
63023    PKGHANDLER_COMMAND=
63024
63025    case $PKGHANDLER in
63026      apt-get)
63027        apt_help     $MISSING_DEPENDENCY ;;
63028      yum)
63029        yum_help     $MISSING_DEPENDENCY ;;
63030      brew)
63031        brew_help    $MISSING_DEPENDENCY ;;
63032      port)
63033        port_help    $MISSING_DEPENDENCY ;;
63034      pkgutil)
63035        pkgutil_help $MISSING_DEPENDENCY ;;
63036      pkgadd)
63037        pkgadd_help  $MISSING_DEPENDENCY ;;
63038    esac
63039
63040    if test "x$PKGHANDLER_COMMAND" != x; then
63041      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63042    fi
63043  fi
63044
63045      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63046    fi
63047  fi
63048
63049
63050
63051
63052
63053
63054# Check whether --with-libffi was given.
63055if test "${with_libffi+set}" = set; then :
63056  withval=$with_libffi;
63057fi
63058
63059
63060# Check whether --with-libffi-include was given.
63061if test "${with_libffi_include+set}" = set; then :
63062  withval=$with_libffi_include;
63063fi
63064
63065
63066# Check whether --with-libffi-lib was given.
63067if test "${with_libffi_lib+set}" = set; then :
63068  withval=$with_libffi_lib;
63069fi
63070
63071  # Check whether --enable-libffi-bundling was given.
63072if test "${enable_libffi_bundling+set}" = set; then :
63073  enableval=$enable_libffi_bundling;
63074fi
63075
63076
63077  if test "x$NEEDS_LIB_FFI" = xfalse; then
63078    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63079        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63080        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63081      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63082$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63083    fi
63084    LIBFFI_CFLAGS=
63085    LIBFFI_LIBS=
63086  else
63087    LIBFFI_FOUND=no
63088
63089    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63090      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63091    fi
63092
63093    if test "x${with_libffi}" != x; then
63094      LIBFFI_LIB_PATH="${with_libffi}/lib"
63095      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63096      LIBFFI_CFLAGS="-I${with_libffi}/include"
63097      LIBFFI_FOUND=yes
63098    fi
63099    if test "x${with_libffi_include}" != x; then
63100      LIBFFI_CFLAGS="-I${with_libffi_include}"
63101      LIBFFI_FOUND=yes
63102    fi
63103    if test "x${with_libffi_lib}" != x; then
63104      LIBFFI_LIB_PATH="${with_libffi_lib}"
63105      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63106      LIBFFI_FOUND=yes
63107    fi
63108    # Do not try pkg-config if we have a sysroot set.
63109    if test "x$SYSROOT" = x; then
63110      if test "x$LIBFFI_FOUND" = xno; then
63111        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63112
63113pkg_failed=no
63114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63115$as_echo_n "checking for LIBFFI... " >&6; }
63116
63117if test -n "$LIBFFI_CFLAGS"; then
63118    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63119 elif test -n "$PKG_CONFIG"; then
63120    if test -n "$PKG_CONFIG" && \
63121    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63122  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63123  ac_status=$?
63124  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63125  test $ac_status = 0; }; then
63126  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63127else
63128  pkg_failed=yes
63129fi
63130 else
63131    pkg_failed=untried
63132fi
63133if test -n "$LIBFFI_LIBS"; then
63134    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63135 elif test -n "$PKG_CONFIG"; then
63136    if test -n "$PKG_CONFIG" && \
63137    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63138  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63139  ac_status=$?
63140  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63141  test $ac_status = 0; }; then
63142  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63143else
63144  pkg_failed=yes
63145fi
63146 else
63147    pkg_failed=untried
63148fi
63149
63150
63151
63152if test $pkg_failed = yes; then
63153
63154if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63155        _pkg_short_errors_supported=yes
63156else
63157        _pkg_short_errors_supported=no
63158fi
63159        if test $_pkg_short_errors_supported = yes; then
63160	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63161        else
63162	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63163        fi
63164	# Put the nasty error message in config.log where it belongs
63165	echo "$LIBFFI_PKG_ERRORS" >&5
63166
63167	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63168$as_echo "no" >&6; }
63169                LIBFFI_FOUND=no
63170elif test $pkg_failed = untried; then
63171	LIBFFI_FOUND=no
63172else
63173	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63174	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63175        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63176$as_echo "yes" >&6; }
63177	LIBFFI_FOUND=yes
63178fi
63179      fi
63180    fi
63181    if test "x$LIBFFI_FOUND" = xno; then
63182      for ac_header in ffi.h
63183do :
63184  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63185if test "x$ac_cv_header_ffi_h" = xyes; then :
63186  cat >>confdefs.h <<_ACEOF
63187#define HAVE_FFI_H 1
63188_ACEOF
63189
63190            LIBFFI_FOUND=yes
63191            LIBFFI_CFLAGS=
63192            LIBFFI_LIBS=-lffi
63193
63194else
63195  LIBFFI_FOUND=no
63196
63197fi
63198
63199done
63200
63201    fi
63202    if test "x$LIBFFI_FOUND" = xno; then
63203
63204  # Print a helpful message on how to acquire the necessary build dependency.
63205  # ffi is the help tag: freetype, cups, alsa etc
63206  MISSING_DEPENDENCY=ffi
63207
63208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63209    cygwin_help $MISSING_DEPENDENCY
63210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63211    msys_help $MISSING_DEPENDENCY
63212  else
63213    PKGHANDLER_COMMAND=
63214
63215    case $PKGHANDLER in
63216      apt-get)
63217        apt_help     $MISSING_DEPENDENCY ;;
63218      yum)
63219        yum_help     $MISSING_DEPENDENCY ;;
63220      brew)
63221        brew_help    $MISSING_DEPENDENCY ;;
63222      port)
63223        port_help    $MISSING_DEPENDENCY ;;
63224      pkgutil)
63225        pkgutil_help $MISSING_DEPENDENCY ;;
63226      pkgadd)
63227        pkgadd_help  $MISSING_DEPENDENCY ;;
63228    esac
63229
63230    if test "x$PKGHANDLER_COMMAND" != x; then
63231      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63232    fi
63233  fi
63234
63235      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63236    fi
63237
63238    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63239$as_echo_n "checking if libffi works... " >&6; }
63240    ac_ext=c
63241ac_cpp='$CPP $CPPFLAGS'
63242ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63243ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63244ac_compiler_gnu=$ac_cv_c_compiler_gnu
63245
63246    OLD_CFLAGS="$CFLAGS"
63247    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63248    OLD_LIBS="$LIBS"
63249    LIBS="$LIBS $LIBFFI_LIBS"
63250    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63251/* end confdefs.h.  */
63252#include <ffi.h>
63253int
63254main ()
63255{
63256
63257          ffi_call(NULL, NULL, NULL, NULL);
63258          return 0;
63259
63260  ;
63261  return 0;
63262}
63263_ACEOF
63264if ac_fn_c_try_link "$LINENO"; then :
63265  LIBFFI_WORKS=yes
63266else
63267  LIBFFI_WORKS=no
63268
63269fi
63270rm -f core conftest.err conftest.$ac_objext \
63271    conftest$ac_exeext conftest.$ac_ext
63272    CFLAGS="$OLD_CFLAGS"
63273    LIBS="$OLD_LIBS"
63274    ac_ext=cpp
63275ac_cpp='$CXXCPP $CPPFLAGS'
63276ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63277ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63278ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63279
63280    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63281$as_echo "$LIBFFI_WORKS" >&6; }
63282
63283    if test "x$LIBFFI_WORKS" = xno; then
63284
63285  # Print a helpful message on how to acquire the necessary build dependency.
63286  # ffi is the help tag: freetype, cups, alsa etc
63287  MISSING_DEPENDENCY=ffi
63288
63289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63290    cygwin_help $MISSING_DEPENDENCY
63291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63292    msys_help $MISSING_DEPENDENCY
63293  else
63294    PKGHANDLER_COMMAND=
63295
63296    case $PKGHANDLER in
63297      apt-get)
63298        apt_help     $MISSING_DEPENDENCY ;;
63299      yum)
63300        yum_help     $MISSING_DEPENDENCY ;;
63301      brew)
63302        brew_help    $MISSING_DEPENDENCY ;;
63303      port)
63304        port_help    $MISSING_DEPENDENCY ;;
63305      pkgutil)
63306        pkgutil_help $MISSING_DEPENDENCY ;;
63307      pkgadd)
63308        pkgadd_help  $MISSING_DEPENDENCY ;;
63309    esac
63310
63311    if test "x$PKGHANDLER_COMMAND" != x; then
63312      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63313    fi
63314  fi
63315
63316      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63317    fi
63318
63319    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
63320$as_echo_n "checking if libffi should be bundled... " >&6; }
63321    if test "x$enable_libffi_bundling" = "x"; then
63322      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63323$as_echo "no" >&6; }
63324      ENABLE_LIBFFI_BUNDLING=false
63325    elif  test "x$enable_libffi_bundling" = "xno"; then
63326      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63327$as_echo "no, forced" >&6; }
63328      ENABLE_LIBFFI_BUNDLING=false
63329    elif  test "x$enable_libffi_bundling" = "xyes"; then
63330      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63331$as_echo "yes, forced" >&6; }
63332      ENABLE_LIBFFI_BUNDLING=true
63333    else
63334      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
63335    fi
63336
63337    # Find the libffi.so.X to bundle
63338    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
63339      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
63340$as_echo_n "checking for libffi lib file location... " >&6; }
63341      if test "x${LIBFFI_LIB_PATH}" != x; then
63342        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
63343          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
63344        else
63345          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
63346        fi
63347      else
63348        # If we don't have an explicit path, look in a few obvious places
63349        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
63350          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63351            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63352          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
63353            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
63354          else
63355            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63356          fi
63357        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
63358          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
63359            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
63360          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
63361            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
63362          else
63363            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63364          fi
63365        else
63366          # Fallback on the default /usr/lib dir
63367          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63368            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63369          else
63370            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63371          fi
63372        fi
63373      fi
63374      # Make sure the wildcard is evaluated
63375      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
63376      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
63377$as_echo "${LIBFFI_LIB_FILE}" >&6; }
63378    fi
63379  fi
63380
63381
63382
63383
63384
63385
63386
63387  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63388    # Extract the first word of "llvm-config", so it can be a program name with args.
63389set dummy llvm-config; ac_word=$2
63390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63391$as_echo_n "checking for $ac_word... " >&6; }
63392if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63393  $as_echo_n "(cached) " >&6
63394else
63395  if test -n "$LLVM_CONFIG"; then
63396  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63397else
63398as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63399for as_dir in $PATH
63400do
63401  IFS=$as_save_IFS
63402  test -z "$as_dir" && as_dir=.
63403    for ac_exec_ext in '' $ac_executable_extensions; do
63404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63405    ac_cv_prog_LLVM_CONFIG="llvm-config"
63406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63407    break 2
63408  fi
63409done
63410  done
63411IFS=$as_save_IFS
63412
63413fi
63414fi
63415LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63416if test -n "$LLVM_CONFIG"; then
63417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63418$as_echo "$LLVM_CONFIG" >&6; }
63419else
63420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63421$as_echo "no" >&6; }
63422fi
63423
63424
63425
63426    if test "x$LLVM_CONFIG" != xllvm-config; then
63427      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63428    fi
63429
63430    llvm_components="jit mcjit engine nativecodegen native"
63431    unset LLVM_CFLAGS
63432    for flag in $("$LLVM_CONFIG" --cxxflags); do
63433      if echo "${flag}" | grep -q '^-[ID]'; then
63434        if test "${flag}" != "-D_DEBUG" ; then
63435          if test "${LLVM_CFLAGS}" != "" ; then
63436            LLVM_CFLAGS="${LLVM_CFLAGS} "
63437          fi
63438          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63439        fi
63440      fi
63441    done
63442    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63443    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63444
63445    unset LLVM_LDFLAGS
63446    for flag in $("${LLVM_CONFIG}" --ldflags); do
63447      if echo "${flag}" | grep -q '^-L'; then
63448        if test "${LLVM_LDFLAGS}" != ""; then
63449          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63450        fi
63451        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63452      fi
63453    done
63454
63455    unset LLVM_LIBS
63456    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63457      if echo "${flag}" | grep -q '^-l'; then
63458        if test "${LLVM_LIBS}" != ""; then
63459          LLVM_LIBS="${LLVM_LIBS} "
63460        fi
63461        LLVM_LIBS="${LLVM_LIBS}${flag}"
63462      fi
63463    done
63464
63465    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63466    # always properly detect -ltinfo
63467    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63468
63469
63470
63471
63472  fi
63473
63474
63475
63476# Check whether --with-libjpeg was given.
63477if test "${with_libjpeg+set}" = set; then :
63478  withval=$with_libjpeg;
63479fi
63480
63481
63482  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63483$as_echo_n "checking for which libjpeg to use... " >&6; }
63484  # default is bundled
63485  DEFAULT_LIBJPEG=bundled
63486  # if user didn't specify, use DEFAULT_LIBJPEG
63487  if test "x${with_libjpeg}" = "x"; then
63488    with_libjpeg=${DEFAULT_LIBJPEG}
63489  fi
63490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63491$as_echo "${with_libjpeg}" >&6; }
63492
63493  if test "x${with_libjpeg}" = "xbundled"; then
63494    USE_EXTERNAL_LIBJPEG=false
63495  elif test "x${with_libjpeg}" = "xsystem"; then
63496    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63497if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63498
63499else
63500   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63501fi
63502
63503
63504    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63505$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63506if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63507  $as_echo_n "(cached) " >&6
63508else
63509  ac_check_lib_save_LIBS=$LIBS
63510LIBS="-ljpeg  $LIBS"
63511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63512/* end confdefs.h.  */
63513
63514/* Override any GCC internal prototype to avoid an error.
63515   Use char because int might match the return type of a GCC
63516   builtin and then its argument prototype would still apply.  */
63517#ifdef __cplusplus
63518extern "C"
63519#endif
63520char jpeg_CreateDecompress ();
63521int
63522main ()
63523{
63524return jpeg_CreateDecompress ();
63525  ;
63526  return 0;
63527}
63528_ACEOF
63529if ac_fn_cxx_try_link "$LINENO"; then :
63530  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63531else
63532  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63533fi
63534rm -f core conftest.err conftest.$ac_objext \
63535    conftest$ac_exeext conftest.$ac_ext
63536LIBS=$ac_check_lib_save_LIBS
63537fi
63538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63539$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63540if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63541  cat >>confdefs.h <<_ACEOF
63542#define HAVE_LIBJPEG 1
63543_ACEOF
63544
63545  LIBS="-ljpeg $LIBS"
63546
63547else
63548   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63549fi
63550
63551
63552    USE_EXTERNAL_LIBJPEG=true
63553  else
63554    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63555  fi
63556
63557
63558
63559
63560
63561# Check whether --with-giflib was given.
63562if test "${with_giflib+set}" = set; then :
63563  withval=$with_giflib;
63564fi
63565
63566
63567  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63568$as_echo_n "checking for which giflib to use... " >&6; }
63569  # default is bundled
63570  DEFAULT_GIFLIB=bundled
63571  # if user didn't specify, use DEFAULT_GIFLIB
63572  if test "x${with_giflib}" = "x"; then
63573    with_giflib=${DEFAULT_GIFLIB}
63574  fi
63575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63576$as_echo "${with_giflib}" >&6; }
63577
63578  if test "x${with_giflib}" = "xbundled"; then
63579    USE_EXTERNAL_LIBGIF=false
63580  elif test "x${with_giflib}" = "xsystem"; then
63581    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63582if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63583
63584else
63585   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63586fi
63587
63588
63589    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63590$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63591if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63592  $as_echo_n "(cached) " >&6
63593else
63594  ac_check_lib_save_LIBS=$LIBS
63595LIBS="-lgif  $LIBS"
63596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63597/* end confdefs.h.  */
63598
63599/* Override any GCC internal prototype to avoid an error.
63600   Use char because int might match the return type of a GCC
63601   builtin and then its argument prototype would still apply.  */
63602#ifdef __cplusplus
63603extern "C"
63604#endif
63605char DGifGetCode ();
63606int
63607main ()
63608{
63609return DGifGetCode ();
63610  ;
63611  return 0;
63612}
63613_ACEOF
63614if ac_fn_cxx_try_link "$LINENO"; then :
63615  ac_cv_lib_gif_DGifGetCode=yes
63616else
63617  ac_cv_lib_gif_DGifGetCode=no
63618fi
63619rm -f core conftest.err conftest.$ac_objext \
63620    conftest$ac_exeext conftest.$ac_ext
63621LIBS=$ac_check_lib_save_LIBS
63622fi
63623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63624$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63625if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63626  cat >>confdefs.h <<_ACEOF
63627#define HAVE_LIBGIF 1
63628_ACEOF
63629
63630  LIBS="-lgif $LIBS"
63631
63632else
63633   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63634fi
63635
63636
63637    USE_EXTERNAL_LIBGIF=true
63638  else
63639    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63640  fi
63641
63642
63643
63644
63645
63646# Check whether --with-libpng was given.
63647if test "${with_libpng+set}" = set; then :
63648  withval=$with_libpng;
63649fi
63650
63651
63652  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63653$as_echo_n "checking for which libpng to use... " >&6; }
63654
63655  # default is bundled
63656  DEFAULT_LIBPNG=bundled
63657  # if user didn't specify, use DEFAULT_LIBPNG
63658  if test "x${with_libpng}" = "x"; then
63659      with_libpng=${DEFAULT_LIBPNG}
63660  fi
63661
63662  if test "x${with_libpng}" = "xbundled"; then
63663      USE_EXTERNAL_LIBPNG=false
63664      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63665$as_echo "bundled" >&6; }
63666  elif test "x${with_libpng}" = "xsystem"; then
63667
63668pkg_failed=no
63669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63670$as_echo_n "checking for PNG... " >&6; }
63671
63672if test -n "$PNG_CFLAGS"; then
63673    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63674 elif test -n "$PKG_CONFIG"; then
63675    if test -n "$PKG_CONFIG" && \
63676    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63677  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63678  ac_status=$?
63679  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63680  test $ac_status = 0; }; then
63681  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63682else
63683  pkg_failed=yes
63684fi
63685 else
63686    pkg_failed=untried
63687fi
63688if test -n "$PNG_LIBS"; then
63689    pkg_cv_PNG_LIBS="$PNG_LIBS"
63690 elif test -n "$PKG_CONFIG"; then
63691    if test -n "$PKG_CONFIG" && \
63692    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63693  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63694  ac_status=$?
63695  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63696  test $ac_status = 0; }; then
63697  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63698else
63699  pkg_failed=yes
63700fi
63701 else
63702    pkg_failed=untried
63703fi
63704
63705
63706
63707if test $pkg_failed = yes; then
63708
63709if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63710        _pkg_short_errors_supported=yes
63711else
63712        _pkg_short_errors_supported=no
63713fi
63714        if test $_pkg_short_errors_supported = yes; then
63715	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63716        else
63717	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63718        fi
63719	# Put the nasty error message in config.log where it belongs
63720	echo "$PNG_PKG_ERRORS" >&5
63721
63722	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63723$as_echo "no" >&6; }
63724                 LIBPNG_FOUND=no
63725elif test $pkg_failed = untried; then
63726	 LIBPNG_FOUND=no
63727else
63728	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63729	PNG_LIBS=$pkg_cv_PNG_LIBS
63730        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63731$as_echo "yes" >&6; }
63732	 LIBPNG_FOUND=yes
63733fi
63734      if test "x${LIBPNG_FOUND}" = "xyes"; then
63735          USE_EXTERNAL_LIBPNG=true
63736          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63737$as_echo "system" >&6; }
63738      else
63739          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63740$as_echo "system not found" >&6; }
63741          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63742      fi
63743  else
63744      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63745  fi
63746
63747
63748
63749
63750
63751# Check whether --with-zlib was given.
63752if test "${with_zlib+set}" = set; then :
63753  withval=$with_zlib;
63754fi
63755
63756
63757  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63758$as_echo_n "checking for compress in -lz... " >&6; }
63759if ${ac_cv_lib_z_compress+:} false; then :
63760  $as_echo_n "(cached) " >&6
63761else
63762  ac_check_lib_save_LIBS=$LIBS
63763LIBS="-lz  $LIBS"
63764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63765/* end confdefs.h.  */
63766
63767/* Override any GCC internal prototype to avoid an error.
63768   Use char because int might match the return type of a GCC
63769   builtin and then its argument prototype would still apply.  */
63770#ifdef __cplusplus
63771extern "C"
63772#endif
63773char compress ();
63774int
63775main ()
63776{
63777return compress ();
63778  ;
63779  return 0;
63780}
63781_ACEOF
63782if ac_fn_cxx_try_link "$LINENO"; then :
63783  ac_cv_lib_z_compress=yes
63784else
63785  ac_cv_lib_z_compress=no
63786fi
63787rm -f core conftest.err conftest.$ac_objext \
63788    conftest$ac_exeext conftest.$ac_ext
63789LIBS=$ac_check_lib_save_LIBS
63790fi
63791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63792$as_echo "$ac_cv_lib_z_compress" >&6; }
63793if test "x$ac_cv_lib_z_compress" = xyes; then :
63794   ZLIB_FOUND=yes
63795else
63796   ZLIB_FOUND=no
63797fi
63798
63799
63800  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63801$as_echo_n "checking for which zlib to use... " >&6; }
63802
63803  DEFAULT_ZLIB=system
63804  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63805    # On windows default is bundled...on others default is system
63806    DEFAULT_ZLIB=bundled
63807  fi
63808
63809  if test "x${ZLIB_FOUND}" != "xyes"; then
63810    # If we don't find any system...set default to bundled
63811    DEFAULT_ZLIB=bundled
63812  fi
63813
63814  # If user didn't specify, use DEFAULT_ZLIB
63815  if test "x${with_zlib}" = "x"; then
63816    with_zlib=${DEFAULT_ZLIB}
63817  fi
63818
63819  if test "x${with_zlib}" = "xbundled"; then
63820    USE_EXTERNAL_LIBZ=false
63821    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63822$as_echo "bundled" >&6; }
63823  elif test "x${with_zlib}" = "xsystem"; then
63824    if test "x${ZLIB_FOUND}" = "xyes"; then
63825      USE_EXTERNAL_LIBZ=true
63826      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63827$as_echo "system" >&6; }
63828    else
63829      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63830$as_echo "system not found" >&6; }
63831      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63832    fi
63833  else
63834    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63835  fi
63836
63837
63838
63839
63840
63841# Check whether --with-lcms was given.
63842if test "${with_lcms+set}" = set; then :
63843  withval=$with_lcms;
63844fi
63845
63846
63847  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63848$as_echo_n "checking for which lcms to use... " >&6; }
63849
63850  DEFAULT_LCMS=bundled
63851  # If user didn't specify, use DEFAULT_LCMS
63852  if test "x${with_lcms}" = "x"; then
63853      with_lcms=${DEFAULT_LCMS}
63854  fi
63855
63856  if test "x${with_lcms}" = "xbundled"; then
63857    USE_EXTERNAL_LCMS=false
63858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63859$as_echo "bundled" >&6; }
63860  elif test "x${with_lcms}" = "xsystem"; then
63861    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63862$as_echo "system" >&6; }
63863
63864pkg_failed=no
63865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63866$as_echo_n "checking for LCMS... " >&6; }
63867
63868if test -n "$LCMS_CFLAGS"; then
63869    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63870 elif test -n "$PKG_CONFIG"; then
63871    if test -n "$PKG_CONFIG" && \
63872    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63873  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63874  ac_status=$?
63875  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63876  test $ac_status = 0; }; then
63877  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63878else
63879  pkg_failed=yes
63880fi
63881 else
63882    pkg_failed=untried
63883fi
63884if test -n "$LCMS_LIBS"; then
63885    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63886 elif test -n "$PKG_CONFIG"; then
63887    if test -n "$PKG_CONFIG" && \
63888    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63889  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63890  ac_status=$?
63891  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63892  test $ac_status = 0; }; then
63893  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63894else
63895  pkg_failed=yes
63896fi
63897 else
63898    pkg_failed=untried
63899fi
63900
63901
63902
63903if test $pkg_failed = yes; then
63904
63905if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63906        _pkg_short_errors_supported=yes
63907else
63908        _pkg_short_errors_supported=no
63909fi
63910        if test $_pkg_short_errors_supported = yes; then
63911	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63912        else
63913	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63914        fi
63915	# Put the nasty error message in config.log where it belongs
63916	echo "$LCMS_PKG_ERRORS" >&5
63917
63918	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63919$as_echo "no" >&6; }
63920                LCMS_FOUND=no
63921elif test $pkg_failed = untried; then
63922	LCMS_FOUND=no
63923else
63924	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63925	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63926        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63927$as_echo "yes" >&6; }
63928	LCMS_FOUND=yes
63929fi
63930    if test "x${LCMS_FOUND}" = "xyes"; then
63931      USE_EXTERNAL_LCMS=true
63932    else
63933      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63934    fi
63935  else
63936    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63937  fi
63938
63939
63940
63941
63942
63943
63944
63945
63946
63947
63948
63949  # Setup libm (the maths library)
63950  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63951    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63952$as_echo_n "checking for cos in -lm... " >&6; }
63953if ${ac_cv_lib_m_cos+:} false; then :
63954  $as_echo_n "(cached) " >&6
63955else
63956  ac_check_lib_save_LIBS=$LIBS
63957LIBS="-lm  $LIBS"
63958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63959/* end confdefs.h.  */
63960
63961/* Override any GCC internal prototype to avoid an error.
63962   Use char because int might match the return type of a GCC
63963   builtin and then its argument prototype would still apply.  */
63964#ifdef __cplusplus
63965extern "C"
63966#endif
63967char cos ();
63968int
63969main ()
63970{
63971return cos ();
63972  ;
63973  return 0;
63974}
63975_ACEOF
63976if ac_fn_cxx_try_link "$LINENO"; then :
63977  ac_cv_lib_m_cos=yes
63978else
63979  ac_cv_lib_m_cos=no
63980fi
63981rm -f core conftest.err conftest.$ac_objext \
63982    conftest$ac_exeext conftest.$ac_ext
63983LIBS=$ac_check_lib_save_LIBS
63984fi
63985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63986$as_echo "$ac_cv_lib_m_cos" >&6; }
63987if test "x$ac_cv_lib_m_cos" = xyes; then :
63988  cat >>confdefs.h <<_ACEOF
63989#define HAVE_LIBM 1
63990_ACEOF
63991
63992  LIBS="-lm $LIBS"
63993
63994else
63995
63996        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63997$as_echo "$as_me: Maths library was not found" >&6;}
63998
63999fi
64000
64001    LIBM="-lm"
64002  else
64003    LIBM=""
64004  fi
64005
64006
64007  # Setup libdl (for dynamic library loading)
64008  save_LIBS="$LIBS"
64009  LIBS=""
64010  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64011$as_echo_n "checking for dlopen in -ldl... " >&6; }
64012if ${ac_cv_lib_dl_dlopen+:} false; then :
64013  $as_echo_n "(cached) " >&6
64014else
64015  ac_check_lib_save_LIBS=$LIBS
64016LIBS="-ldl  $LIBS"
64017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64018/* end confdefs.h.  */
64019
64020/* Override any GCC internal prototype to avoid an error.
64021   Use char because int might match the return type of a GCC
64022   builtin and then its argument prototype would still apply.  */
64023#ifdef __cplusplus
64024extern "C"
64025#endif
64026char dlopen ();
64027int
64028main ()
64029{
64030return dlopen ();
64031  ;
64032  return 0;
64033}
64034_ACEOF
64035if ac_fn_cxx_try_link "$LINENO"; then :
64036  ac_cv_lib_dl_dlopen=yes
64037else
64038  ac_cv_lib_dl_dlopen=no
64039fi
64040rm -f core conftest.err conftest.$ac_objext \
64041    conftest$ac_exeext conftest.$ac_ext
64042LIBS=$ac_check_lib_save_LIBS
64043fi
64044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64045$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64046if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64047  cat >>confdefs.h <<_ACEOF
64048#define HAVE_LIBDL 1
64049_ACEOF
64050
64051  LIBS="-ldl $LIBS"
64052
64053fi
64054
64055  LIBDL="$LIBS"
64056
64057  LIBS="$save_LIBS"
64058
64059  # Deprecated libraries, keep the flags for backwards compatibility
64060  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64061
64062
64063# Check whether --with-dxsdk was given.
64064if test "${with_dxsdk+set}" = set; then :
64065  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64066$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64067fi
64068
64069
64070
64071
64072# Check whether --with-dxsdk-lib was given.
64073if test "${with_dxsdk_lib+set}" = set; then :
64074  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64075$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64076fi
64077
64078
64079
64080
64081# Check whether --with-dxsdk-include was given.
64082if test "${with_dxsdk_include+set}" = set; then :
64083  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64084$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64085fi
64086
64087
64088  fi
64089
64090  # Control if libzip can use mmap. Available for purposes of overriding.
64091  LIBZIP_CAN_USE_MMAP=true
64092
64093
64094
64095  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64096    # Find the root of the Solaris Studio installation from the compiler path
64097    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64098    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64099    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64100$as_echo_n "checking for libstlport.so.1... " >&6; }
64101    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64102      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64103      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64104    fi
64105    if test -f "$STLPORT_LIB"; then
64106      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64107$as_echo "yes, $STLPORT_LIB" >&6; }
64108
64109  # Only process if variable expands to non-empty
64110
64111  if test "x$STLPORT_LIB" != x; then
64112    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64113
64114  # Input might be given as Windows format, start by converting to
64115  # unix format.
64116  path="$STLPORT_LIB"
64117  new_path=`$CYGPATH -u "$path"`
64118
64119  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64120  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64121  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64122  # "foo.exe" is OK but "foo" is an error.
64123  #
64124  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64125  # It is also a way to make sure we got the proper file name for the real test later on.
64126  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64127  if test "x$test_shortpath" = x; then
64128    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64129$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64130    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64131  fi
64132
64133  # Call helper function which possibly converts this using DOS-style short mode.
64134  # If so, the updated path is stored in $new_path.
64135
64136  input_path="$new_path"
64137  # Check if we need to convert this using DOS-style short mode. If the path
64138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64139  # take no chances and rewrite it.
64140  # Note: m4 eats our [], so we need to use [ and ] instead.
64141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64142  if test "x$has_forbidden_chars" != x; then
64143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64144    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64145    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64146    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64147      # Going to short mode and back again did indeed matter. Since short mode is
64148      # case insensitive, let's make it lowercase to improve readability.
64149      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64150      # Now convert it back to Unix-style (cygpath)
64151      input_path=`$CYGPATH -u "$shortmode_path"`
64152      new_path="$input_path"
64153    fi
64154  fi
64155
64156  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64157  if test "x$test_cygdrive_prefix" = x; then
64158    # As a simple fix, exclude /usr/bin since it's not a real path.
64159    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64160      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64161      # a path prefixed by /cygdrive for fixpath to work.
64162      new_path="$CYGWIN_ROOT_PATH$input_path"
64163    fi
64164  fi
64165
64166
64167  if test "x$path" != "x$new_path"; then
64168    STLPORT_LIB="$new_path"
64169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64170$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64171  fi
64172
64173    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64174
64175  path="$STLPORT_LIB"
64176  has_colon=`$ECHO $path | $GREP ^.:`
64177  new_path="$path"
64178  if test "x$has_colon" = x; then
64179    # Not in mixed or Windows style, start by that.
64180    new_path=`cmd //c echo $path`
64181  fi
64182
64183
64184  input_path="$new_path"
64185  # Check if we need to convert this using DOS-style short mode. If the path
64186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64187  # take no chances and rewrite it.
64188  # Note: m4 eats our [], so we need to use [ and ] instead.
64189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64190  if test "x$has_forbidden_chars" != x; then
64191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64192    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64193  fi
64194
64195
64196  windows_path="$new_path"
64197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64198    unix_path=`$CYGPATH -u "$windows_path"`
64199    new_path="$unix_path"
64200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64202    new_path="$unix_path"
64203  fi
64204
64205  if test "x$path" != "x$new_path"; then
64206    STLPORT_LIB="$new_path"
64207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64208$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64209  fi
64210
64211  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64212  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64213
64214    else
64215      # We're on a unix platform. Hooray! :)
64216      path="$STLPORT_LIB"
64217      has_space=`$ECHO "$path" | $GREP " "`
64218      if test "x$has_space" != x; then
64219        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64220$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64221        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64222      fi
64223
64224      # Use eval to expand a potential ~
64225      eval path="$path"
64226      if test ! -f "$path" && test ! -d "$path"; then
64227        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64228      fi
64229
64230      if test -d "$path"; then
64231        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64232      else
64233        dir="`$DIRNAME "$path"`"
64234        base="`$BASENAME "$path"`"
64235        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64236      fi
64237    fi
64238  fi
64239
64240    else
64241      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64242$as_echo "no, not found at $STLPORT_LIB" >&6; }
64243      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64244    fi
64245
64246  fi
64247
64248
64249
64250
64251
64252
64253
64254
64255
64256
64257
64258
64259
64260
64261# Hotspot setup depends on lib checks (AOT needs libelf).
64262
64263
64264  # The user can in some cases supply additional jvm features. For the custom
64265  # variant, this defines the entire variant.
64266
64267# Check whether --with-jvm-features was given.
64268if test "${with_jvm_features+set}" = set; then :
64269  withval=$with_jvm_features;
64270fi
64271
64272  if test "x$with_jvm_features" != x; then
64273    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
64274$as_echo_n "checking additional JVM features... " >&6; }
64275    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
64276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
64277$as_echo "$JVM_FEATURES" >&6; }
64278  fi
64279
64280  # Override hotspot cpu definitions for ARM platforms
64281  if test "x$OPENJDK_TARGET_CPU" = xarm; then
64282    HOTSPOT_TARGET_CPU=arm_32
64283    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
64284    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64285    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64286  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
64287    HOTSPOT_TARGET_CPU=arm_64
64288    HOTSPOT_TARGET_CPU_ARCH=arm
64289    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64290    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64291  fi
64292
64293  # Verify that dependencies are met for explicitly set features.
64294  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
64295    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
64296  fi
64297
64298  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
64299    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
64300  fi
64301
64302  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
64303    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
64304  fi
64305
64306  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64307    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
64308  fi
64309
64310  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64311    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
64312  fi
64313
64314  # Turn on additional features based on other parts of configure
64315  if test "x$INCLUDE_DTRACE" = "xtrue"; then
64316    JVM_FEATURES="$JVM_FEATURES dtrace"
64317  else
64318    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
64319      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
64320    fi
64321  fi
64322
64323  if test "x$STATIC_BUILD" = "xtrue"; then
64324    JVM_FEATURES="$JVM_FEATURES static-build"
64325  else
64326    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
64327      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
64328    fi
64329  fi
64330
64331  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64332    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
64333      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
64334    fi
64335  fi
64336
64337  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64338    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
64339      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
64340    fi
64341  fi
64342
64343  # Only enable jvmci on x86_64, sparcv9 and aarch64.
64344  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
64345     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
64346     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
64347    JVM_FEATURES_jvmci="jvmci"
64348  else
64349    JVM_FEATURES_jvmci=""
64350  fi
64351
64352  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.vm.compiler should be built" >&5
64353$as_echo_n "checking if jdk.vm.compiler should be built... " >&6; }
64354  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
64355    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64356$as_echo "yes, forced" >&6; }
64357    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
64358      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
64359    fi
64360    INCLUDE_GRAAL="true"
64361  else
64362    # By default enable graal build where AOT is available
64363    if test "x$ENABLE_AOT" = "xtrue"; then
64364      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64365$as_echo "yes" >&6; }
64366      JVM_FEATURES_graal="graal"
64367      INCLUDE_GRAAL="true"
64368    else
64369      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64370$as_echo "no" >&6; }
64371      JVM_FEATURES_graal=""
64372      INCLUDE_GRAAL="false"
64373    fi
64374  fi
64375
64376
64377
64378  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
64379$as_echo_n "checking if aot should be enabled... " >&6; }
64380  if test "x$ENABLE_AOT" = "xtrue"; then
64381    if test "x$enable_aot" = "xyes"; then
64382      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64383$as_echo "yes, forced" >&6; }
64384    else
64385      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64386$as_echo "yes" >&6; }
64387    fi
64388    JVM_FEATURES_aot="aot"
64389  else
64390    if test "x$enable_aot" = "xno"; then
64391      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64392$as_echo "no, forced" >&6; }
64393    else
64394      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64395$as_echo "no" >&6; }
64396    fi
64397    JVM_FEATURES_aot=""
64398  fi
64399
64400  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
64401    # Default to use link time optimizations on minimal on arm
64402    JVM_FEATURES_link_time_opt="link-time-opt"
64403  else
64404    JVM_FEATURES_link_time_opt=""
64405  fi
64406
64407  # All variants but minimal (and custom) get these features
64408  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
64409
64410  # Enable features depending on variant.
64411  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
64412  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
64413  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
64414  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
64415  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
64416  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
64417  JVM_FEATURES_custom="$JVM_FEATURES"
64418
64419
64420
64421
64422
64423
64424
64425
64426
64427  # Used for verification of Makefiles by check-jvm-feature
64428
64429
64430  # We don't support --with-jvm-interpreter anymore, use zero instead.
64431
64432
64433# Check whether --with-jvm-interpreter was given.
64434if test "${with_jvm_interpreter+set}" = set; then :
64435  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
64436$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
64437fi
64438
64439
64440
64441
64442###############################################################################
64443#
64444# We need to do some final tweaking, when everything else is done.
64445#
64446###############################################################################
64447
64448
64449  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64450$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64451
64452  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64453    ENABLE_INTREE_EC=yes
64454    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64455$as_echo "yes" >&6; }
64456  else
64457    ENABLE_INTREE_EC=no
64458    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64459$as_echo "no" >&6; }
64460  fi
64461
64462
64463
64464
64465  # Check whether --enable-jtreg-failure-handler was given.
64466if test "${enable_jtreg_failure_handler+set}" = set; then :
64467  enableval=$enable_jtreg_failure_handler;
64468fi
64469
64470
64471  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64472$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64473
64474  if test "x$enable_jtreg_failure_handler" = "xyes"; then
64475    if test "x$JT_HOME" = "x"; then
64476      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64477    else
64478      BUILD_FAILURE_HANDLER=true
64479      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64480$as_echo "yes, forced" >&6; }
64481    fi
64482  elif test "x$enable_jtreg_failure_handler" = "xno"; then
64483    BUILD_FAILURE_HANDLER=false
64484    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64485$as_echo "no, forced" >&6; }
64486  elif test "x$enable_jtreg_failure_handler" = "xauto" \
64487      || test "x$enable_jtreg_failure_handler" = "x"; then
64488    if test "x$JT_HOME" = "x"; then
64489      BUILD_FAILURE_HANDLER=false
64490      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64491$as_echo "no, missing jtreg" >&6; }
64492    else
64493      BUILD_FAILURE_HANDLER=true
64494      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64495$as_echo "yes, jtreg present" >&6; }
64496    fi
64497  else
64498    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64499  fi
64500
64501
64502
64503
64504  # Check whether --enable-generate-classlist was given.
64505if test "${enable_generate_classlist+set}" = set; then :
64506  enableval=$enable_generate_classlist;
64507fi
64508
64509
64510  # Check if it's likely that it's possible to generate the classlist. Depending
64511  # on exact jvm configuration it could be possible anyway.
64512  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
64513    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64514  else
64515    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64516  fi
64517
64518  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64519$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64520  if test "x$enable_generate_classlist" = "xyes"; then
64521    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64522$as_echo "yes, forced" >&6; }
64523    ENABLE_GENERATE_CLASSLIST="true"
64524    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64525      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64526$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64527    fi
64528  elif test "x$enable_generate_classlist" = "xno"; then
64529    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64530$as_echo "no, forced" >&6; }
64531    ENABLE_GENERATE_CLASSLIST="false"
64532  elif test "x$enable_generate_classlist" = "x"; then
64533    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64534      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64535$as_echo "yes" >&6; }
64536      ENABLE_GENERATE_CLASSLIST="true"
64537    else
64538      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64539$as_echo "no" >&6; }
64540      ENABLE_GENERATE_CLASSLIST="false"
64541    fi
64542  else
64543    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64544  fi
64545
64546
64547
64548
64549###############################################################################
64550#
64551# Configure parts of the build that only affect the build performance,
64552# not the result.
64553#
64554###############################################################################
64555
64556
64557  # How many cores do we have on this build system?
64558
64559# Check whether --with-num-cores was given.
64560if test "${with_num_cores+set}" = set; then :
64561  withval=$with_num_cores;
64562fi
64563
64564  if test "x$with_num_cores" = x; then
64565    # The number of cores were not specified, try to probe them.
64566
64567  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64568$as_echo_n "checking for number of cores... " >&6; }
64569  NUM_CORES=1
64570  FOUND_CORES=no
64571
64572  if test -f /proc/cpuinfo; then
64573    # Looks like a Linux (or cygwin) system
64574    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64575    FOUND_CORES=yes
64576  elif test -x /usr/sbin/psrinfo; then
64577    # Looks like a Solaris system
64578    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64579    FOUND_CORES=yes
64580  elif test -x /usr/sbin/sysctl; then
64581    # Looks like a MacOSX system
64582    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64583    FOUND_CORES=yes
64584  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64585    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64586    FOUND_CORES=yes
64587  elif test -n "$NUMBER_OF_PROCESSORS"; then
64588    # On windows, look in the env
64589    NUM_CORES=$NUMBER_OF_PROCESSORS
64590    FOUND_CORES=yes
64591  fi
64592
64593  if test "x$FOUND_CORES" = xyes; then
64594    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64595$as_echo "$NUM_CORES" >&6; }
64596  else
64597    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64598$as_echo "could not detect number of cores, defaulting to 1" >&6; }
64599    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64600$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64601  fi
64602
64603  else
64604    NUM_CORES=$with_num_cores
64605  fi
64606
64607
64608
64609  # How much memory do we have on this build system?
64610
64611# Check whether --with-memory-size was given.
64612if test "${with_memory_size+set}" = set; then :
64613  withval=$with_memory_size;
64614fi
64615
64616  if test "x$with_memory_size" = x; then
64617    # The memory size was not specified, try to probe it.
64618
64619  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64620$as_echo_n "checking for memory size... " >&6; }
64621  # Default to 1024 MB
64622  MEMORY_SIZE=1024
64623  FOUND_MEM=no
64624
64625  if test -f /proc/meminfo; then
64626    # Looks like a Linux (or cygwin) system
64627    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64628    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64629    FOUND_MEM=yes
64630  elif test -x /usr/sbin/prtconf; then
64631    # Looks like a Solaris or AIX system
64632    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64633    FOUND_MEM=yes
64634  elif test -x /usr/sbin/sysctl; then
64635    # Looks like a MacOSX system
64636    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64637    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64638    FOUND_MEM=yes
64639  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64640    # Windows, but without cygwin
64641    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64642    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64643    FOUND_MEM=yes
64644  fi
64645
64646  if test "x$FOUND_MEM" = xyes; then
64647    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64648$as_echo "$MEMORY_SIZE MB" >&6; }
64649  else
64650    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64651$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64652    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64653$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64654  fi
64655
64656  else
64657    MEMORY_SIZE=$with_memory_size
64658  fi
64659
64660
64661
64662  # Provide a decent default number of parallel jobs for make depending on
64663  # number of cores, amount of memory and machine architecture.
64664
64665# Check whether --with-jobs was given.
64666if test "${with_jobs+set}" = set; then :
64667  withval=$with_jobs;
64668fi
64669
64670  if test "x$with_jobs" = x; then
64671    # Number of jobs was not specified, calculate.
64672    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64673$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64674    # Approximate memory in GB.
64675    memory_gb=`expr $MEMORY_SIZE / 1024`
64676    # Pick the lowest of memory in gb and number of cores.
64677    if test "$memory_gb" -lt "$NUM_CORES"; then
64678      JOBS="$memory_gb"
64679    else
64680      JOBS="$NUM_CORES"
64681    fi
64682    if test "$JOBS" -eq "0"; then
64683      JOBS=1
64684    fi
64685    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64686$as_echo "$JOBS" >&6; }
64687  else
64688    JOBS=$with_jobs
64689  fi
64690
64691
64692
64693  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64694
64695# Check whether --with-test-jobs was given.
64696if test "${with_test_jobs+set}" = set; then :
64697  withval=$with_test_jobs;
64698fi
64699
64700  if test "x$with_test_jobs" = x; then
64701      TEST_JOBS=0
64702  else
64703      TEST_JOBS=$with_test_jobs
64704  fi
64705
64706
64707
64708# Setup arguments for the boot jdk (after cores and memory have been setup)
64709
64710  ##############################################################################
64711  #
64712  # Specify jvm options for anything that is run with the Boot JDK.
64713  # Not all JVM:s accept the same arguments on the command line.
64714  #
64715
64716# Check whether --with-boot-jdk-jvmargs was given.
64717if test "${with_boot_jdk_jvmargs+set}" = set; then :
64718  withval=$with_boot_jdk_jvmargs;
64719fi
64720
64721
64722  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64723$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64724
64725  # Disable special log output when a debug build is used as Boot JDK...
64726
64727  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64728  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64729  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64730  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64731  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64732  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64733    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64734    JVM_ARG_OK=true
64735  else
64736    $ECHO "Arg failed:" >&5
64737    $ECHO "$OUTPUT" >&5
64738    JVM_ARG_OK=false
64739  fi
64740
64741
64742  # Force en-US environment
64743
64744  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64745  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64746  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64747  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64748  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64749  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64750    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64751    JVM_ARG_OK=true
64752  else
64753    $ECHO "Arg failed:" >&5
64754    $ECHO "$OUTPUT" >&5
64755    JVM_ARG_OK=false
64756  fi
64757
64758
64759  # Apply user provided options.
64760
64761  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64762  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64763  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64764  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64765  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64766  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64767    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64768    JVM_ARG_OK=true
64769  else
64770    $ECHO "Arg failed:" >&5
64771    $ECHO "$OUTPUT" >&5
64772    JVM_ARG_OK=false
64773  fi
64774
64775
64776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64777$as_echo "$boot_jdk_jvmargs" >&6; }
64778
64779  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64780  JAVA_FLAGS=$boot_jdk_jvmargs
64781
64782
64783
64784  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64785$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64786
64787  # Starting amount of heap memory.
64788
64789  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64790  $ECHO "Command: $JAVA -Xms64M -version" >&5
64791  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64792  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64793  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64794  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64795    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64796    JVM_ARG_OK=true
64797  else
64798    $ECHO "Arg failed:" >&5
64799    $ECHO "$OUTPUT" >&5
64800    JVM_ARG_OK=false
64801  fi
64802
64803  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64804
64805  # Maximum amount of heap memory and stack size.
64806  JVM_HEAP_LIMIT_32="1024"
64807  # Running a 64 bit JVM allows for and requires a bigger heap
64808  JVM_HEAP_LIMIT_64="1600"
64809  STACK_SIZE_32=768
64810  STACK_SIZE_64=1536
64811  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64812  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64813    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64814  fi
64815  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64816    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64817  fi
64818  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64819    JVM_HEAP_LIMIT_32=512
64820    JVM_HEAP_LIMIT_64=512
64821  fi
64822
64823  if test "x$BOOT_JDK_BITS" = "x32"; then
64824    STACK_SIZE=$STACK_SIZE_32
64825    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64826  else
64827    STACK_SIZE=$STACK_SIZE_64
64828    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64829  fi
64830
64831  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64832  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64833  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64834  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64835  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64836  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64837    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64838    JVM_ARG_OK=true
64839  else
64840    $ECHO "Arg failed:" >&5
64841    $ECHO "$OUTPUT" >&5
64842    JVM_ARG_OK=false
64843  fi
64844
64845
64846  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64847  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64848  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64849  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64850  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64851  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64852    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64853    JVM_ARG_OK=true
64854  else
64855    $ECHO "Arg failed:" >&5
64856    $ECHO "$OUTPUT" >&5
64857    JVM_ARG_OK=false
64858  fi
64859
64860
64861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64862$as_echo "$boot_jdk_jvmargs_big" >&6; }
64863
64864  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64865
64866
64867  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64868    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64869    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64870  else
64871    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64872    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64873  fi
64874  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64875  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64876  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64877$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64879$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64880
64881
64882  # By default, the main javac compilations use big
64883  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64884
64885
64886  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64887$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64888
64889  # Use serial gc for small short lived tools if possible
64890
64891  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64892  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64893  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64894  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64895  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64896  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64897    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64898    JVM_ARG_OK=true
64899  else
64900    $ECHO "Arg failed:" >&5
64901    $ECHO "$OUTPUT" >&5
64902    JVM_ARG_OK=false
64903  fi
64904
64905
64906  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64907  $ECHO "Command: $JAVA -Xms32M -version" >&5
64908  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64909  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64910  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64911  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64912    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64913    JVM_ARG_OK=true
64914  else
64915    $ECHO "Arg failed:" >&5
64916    $ECHO "$OUTPUT" >&5
64917    JVM_ARG_OK=false
64918  fi
64919
64920
64921  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64922  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64923  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64924  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64925  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64926  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64927    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64928    JVM_ARG_OK=true
64929  else
64930    $ECHO "Arg failed:" >&5
64931    $ECHO "$OUTPUT" >&5
64932    JVM_ARG_OK=false
64933  fi
64934
64935
64936  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64937  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64938  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64939  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64940  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64941  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64942    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64943    JVM_ARG_OK=true
64944  else
64945    $ECHO "Arg failed:" >&5
64946    $ECHO "$OUTPUT" >&5
64947    JVM_ARG_OK=false
64948  fi
64949
64950
64951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64952$as_echo "$boot_jdk_jvmargs_small" >&6; }
64953
64954  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64955
64956
64957  JAVA_TOOL_FLAGS_SMALL=""
64958  for f in $JAVA_FLAGS_SMALL; do
64959    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64960  done
64961
64962
64963
64964# Setup smart javac (after cores and memory have been setup)
64965
64966
64967# Check whether --with-sjavac-server-java was given.
64968if test "${with_sjavac_server_java+set}" = set; then :
64969  withval=$with_sjavac_server_java;
64970fi
64971
64972
64973  if test "x$with_sjavac_server_java" != x; then
64974    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64975    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64976    if test "x$FOUND_VERSION" = x; then
64977      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64978    fi
64979  else
64980    SJAVAC_SERVER_JAVA="$JAVA"
64981  fi
64982
64983
64984  if test "$MEMORY_SIZE" -gt "3000"; then
64985
64986  $ECHO "Check if jvm arg is ok: -d64" >&5
64987  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64988  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64989  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64990  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64991  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64992    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64993    JVM_ARG_OK=true
64994  else
64995    $ECHO "Arg failed:" >&5
64996    $ECHO "$OUTPUT" >&5
64997    JVM_ARG_OK=false
64998  fi
64999
65000    if test "$JVM_ARG_OK" = true; then
65001      JVM_64BIT=true
65002      JVM_ARG_OK=false
65003    fi
65004  fi
65005
65006  MX_VALUE=`expr $MEMORY_SIZE / 2`
65007  if test "$JVM_64BIT" = true; then
65008    # Set ms lower than mx since more than one instance of the server might
65009    # get launched at the same time before they figure out which instance won.
65010    MS_VALUE=512
65011    if test "$MX_VALUE" -gt "2048"; then
65012      MX_VALUE=2048
65013    fi
65014  else
65015    MS_VALUE=256
65016    if test "$MX_VALUE" -gt "1500"; then
65017      MX_VALUE=1500
65018    fi
65019  fi
65020  if test "$MX_VALUE" -lt "512"; then
65021    MX_VALUE=512
65022  fi
65023
65024  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65025  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65026  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65027  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65028  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65029  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65030    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65031    JVM_ARG_OK=true
65032  else
65033    $ECHO "Arg failed:" >&5
65034    $ECHO "$OUTPUT" >&5
65035    JVM_ARG_OK=false
65036  fi
65037
65038
65039
65040  # Check whether --enable-sjavac was given.
65041if test "${enable_sjavac+set}" = set; then :
65042  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65043else
65044  ENABLE_SJAVAC="no"
65045fi
65046
65047  if test "x$JVM_ARG_OK" = "xfalse"; then
65048    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65049$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65050    ENABLE_SJAVAC="no"
65051  fi
65052  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65053$as_echo_n "checking whether to use sjavac... " >&6; }
65054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65055$as_echo "$ENABLE_SJAVAC" >&6; }
65056
65057
65058  # Check whether --enable-javac-server was given.
65059if test "${enable_javac_server+set}" = set; then :
65060  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65061else
65062  ENABLE_JAVAC_SERVER="yes"
65063fi
65064
65065  if test "x$JVM_ARG_OK" = "xfalse"; then
65066    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65067$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65068    ENABLE_JAVAC_SERVER="no"
65069  fi
65070  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65071$as_echo_n "checking whether to use javac server... " >&6; }
65072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65073$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65074
65075
65076  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65077    # When using a server javac, the small client instances do not need much
65078    # resources.
65079    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65080  fi
65081
65082
65083# Setup use of icecc if requested
65084
65085  # Check whether --enable-icecc was given.
65086if test "${enable_icecc+set}" = set; then :
65087  enableval=$enable_icecc;
65088fi
65089
65090
65091  if test "x${enable_icecc}" = "xyes"; then
65092
65093
65094
65095  # Publish this variable in the help.
65096
65097
65098  if [ -z "${ICECC_CMD+x}" ]; then
65099    # The variable is not set by user, try to locate tool using the code snippet
65100    for ac_prog in icecc
65101do
65102  # Extract the first word of "$ac_prog", so it can be a program name with args.
65103set dummy $ac_prog; ac_word=$2
65104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65105$as_echo_n "checking for $ac_word... " >&6; }
65106if ${ac_cv_path_ICECC_CMD+:} false; then :
65107  $as_echo_n "(cached) " >&6
65108else
65109  case $ICECC_CMD in
65110  [\\/]* | ?:[\\/]*)
65111  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65112  ;;
65113  *)
65114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65115for as_dir in $PATH
65116do
65117  IFS=$as_save_IFS
65118  test -z "$as_dir" && as_dir=.
65119    for ac_exec_ext in '' $ac_executable_extensions; do
65120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65121    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65123    break 2
65124  fi
65125done
65126  done
65127IFS=$as_save_IFS
65128
65129  ;;
65130esac
65131fi
65132ICECC_CMD=$ac_cv_path_ICECC_CMD
65133if test -n "$ICECC_CMD"; then
65134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65135$as_echo "$ICECC_CMD" >&6; }
65136else
65137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65138$as_echo "no" >&6; }
65139fi
65140
65141
65142  test -n "$ICECC_CMD" && break
65143done
65144
65145  else
65146    # The variable is set, but is it from the command line or the environment?
65147
65148    # Try to remove the string !ICECC_CMD! from our list.
65149    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65150    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65151      # If it failed, the variable was not from the command line. Ignore it,
65152      # but warn the user (except for BASH, which is always set by the calling BASH).
65153      if test "xICECC_CMD" != xBASH; then
65154        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65155$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65156      fi
65157      # Try to locate tool using the code snippet
65158      for ac_prog in icecc
65159do
65160  # Extract the first word of "$ac_prog", so it can be a program name with args.
65161set dummy $ac_prog; ac_word=$2
65162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65163$as_echo_n "checking for $ac_word... " >&6; }
65164if ${ac_cv_path_ICECC_CMD+:} false; then :
65165  $as_echo_n "(cached) " >&6
65166else
65167  case $ICECC_CMD in
65168  [\\/]* | ?:[\\/]*)
65169  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65170  ;;
65171  *)
65172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65173for as_dir in $PATH
65174do
65175  IFS=$as_save_IFS
65176  test -z "$as_dir" && as_dir=.
65177    for ac_exec_ext in '' $ac_executable_extensions; do
65178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65179    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65181    break 2
65182  fi
65183done
65184  done
65185IFS=$as_save_IFS
65186
65187  ;;
65188esac
65189fi
65190ICECC_CMD=$ac_cv_path_ICECC_CMD
65191if test -n "$ICECC_CMD"; then
65192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65193$as_echo "$ICECC_CMD" >&6; }
65194else
65195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65196$as_echo "no" >&6; }
65197fi
65198
65199
65200  test -n "$ICECC_CMD" && break
65201done
65202
65203    else
65204      # If it succeeded, then it was overridden by the user. We will use it
65205      # for the tool.
65206
65207      # First remove it from the list of overridden variables, so we can test
65208      # for unknown variables in the end.
65209      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65210
65211      # Check if we try to supply an empty value
65212      if test "x$ICECC_CMD" = x; then
65213        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65214$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65216$as_echo_n "checking for ICECC_CMD... " >&6; }
65217        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65218$as_echo "disabled" >&6; }
65219      else
65220        # Check if the provided tool contains a complete path.
65221        tool_specified="$ICECC_CMD"
65222        tool_basename="${tool_specified##*/}"
65223        if test "x$tool_basename" = "x$tool_specified"; then
65224          # A command without a complete path is provided, search $PATH.
65225          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65226$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65227          # Extract the first word of "$tool_basename", so it can be a program name with args.
65228set dummy $tool_basename; ac_word=$2
65229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65230$as_echo_n "checking for $ac_word... " >&6; }
65231if ${ac_cv_path_ICECC_CMD+:} false; then :
65232  $as_echo_n "(cached) " >&6
65233else
65234  case $ICECC_CMD in
65235  [\\/]* | ?:[\\/]*)
65236  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65237  ;;
65238  *)
65239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65240for as_dir in $PATH
65241do
65242  IFS=$as_save_IFS
65243  test -z "$as_dir" && as_dir=.
65244    for ac_exec_ext in '' $ac_executable_extensions; do
65245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65246    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65248    break 2
65249  fi
65250done
65251  done
65252IFS=$as_save_IFS
65253
65254  ;;
65255esac
65256fi
65257ICECC_CMD=$ac_cv_path_ICECC_CMD
65258if test -n "$ICECC_CMD"; then
65259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65260$as_echo "$ICECC_CMD" >&6; }
65261else
65262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65263$as_echo "no" >&6; }
65264fi
65265
65266
65267          if test "x$ICECC_CMD" = x; then
65268            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65269          fi
65270        else
65271          # Otherwise we believe it is a complete path. Use it as it is.
65272          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65273$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65274          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65275$as_echo_n "checking for ICECC_CMD... " >&6; }
65276          if test ! -x "$tool_specified"; then
65277            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65278$as_echo "not found" >&6; }
65279            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65280          fi
65281          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65282$as_echo "$tool_specified" >&6; }
65283        fi
65284      fi
65285    fi
65286
65287  fi
65288
65289
65290
65291  if test "x$ICECC_CMD" = x; then
65292    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65293  fi
65294
65295
65296    old_path="$PATH"
65297
65298    # Look for icecc-create-env in some known places
65299    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65300
65301
65302
65303  # Publish this variable in the help.
65304
65305
65306  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65307    # The variable is not set by user, try to locate tool using the code snippet
65308    for ac_prog in icecc-create-env
65309do
65310  # Extract the first word of "$ac_prog", so it can be a program name with args.
65311set dummy $ac_prog; ac_word=$2
65312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65313$as_echo_n "checking for $ac_word... " >&6; }
65314if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65315  $as_echo_n "(cached) " >&6
65316else
65317  case $ICECC_CREATE_ENV in
65318  [\\/]* | ?:[\\/]*)
65319  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65320  ;;
65321  *)
65322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65323for as_dir in $PATH
65324do
65325  IFS=$as_save_IFS
65326  test -z "$as_dir" && as_dir=.
65327    for ac_exec_ext in '' $ac_executable_extensions; do
65328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65329    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65331    break 2
65332  fi
65333done
65334  done
65335IFS=$as_save_IFS
65336
65337  ;;
65338esac
65339fi
65340ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65341if test -n "$ICECC_CREATE_ENV"; then
65342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65343$as_echo "$ICECC_CREATE_ENV" >&6; }
65344else
65345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65346$as_echo "no" >&6; }
65347fi
65348
65349
65350  test -n "$ICECC_CREATE_ENV" && break
65351done
65352
65353  else
65354    # The variable is set, but is it from the command line or the environment?
65355
65356    # Try to remove the string !ICECC_CREATE_ENV! from our list.
65357    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65358    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65359      # If it failed, the variable was not from the command line. Ignore it,
65360      # but warn the user (except for BASH, which is always set by the calling BASH).
65361      if test "xICECC_CREATE_ENV" != xBASH; then
65362        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65363$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65364      fi
65365      # Try to locate tool using the code snippet
65366      for ac_prog in icecc-create-env
65367do
65368  # Extract the first word of "$ac_prog", so it can be a program name with args.
65369set dummy $ac_prog; ac_word=$2
65370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65371$as_echo_n "checking for $ac_word... " >&6; }
65372if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65373  $as_echo_n "(cached) " >&6
65374else
65375  case $ICECC_CREATE_ENV in
65376  [\\/]* | ?:[\\/]*)
65377  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65378  ;;
65379  *)
65380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65381for as_dir in $PATH
65382do
65383  IFS=$as_save_IFS
65384  test -z "$as_dir" && as_dir=.
65385    for ac_exec_ext in '' $ac_executable_extensions; do
65386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65387    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65389    break 2
65390  fi
65391done
65392  done
65393IFS=$as_save_IFS
65394
65395  ;;
65396esac
65397fi
65398ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65399if test -n "$ICECC_CREATE_ENV"; then
65400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65401$as_echo "$ICECC_CREATE_ENV" >&6; }
65402else
65403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65404$as_echo "no" >&6; }
65405fi
65406
65407
65408  test -n "$ICECC_CREATE_ENV" && break
65409done
65410
65411    else
65412      # If it succeeded, then it was overridden by the user. We will use it
65413      # for the tool.
65414
65415      # First remove it from the list of overridden variables, so we can test
65416      # for unknown variables in the end.
65417      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65418
65419      # Check if we try to supply an empty value
65420      if test "x$ICECC_CREATE_ENV" = x; then
65421        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65422$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65423        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65424$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65425        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65426$as_echo "disabled" >&6; }
65427      else
65428        # Check if the provided tool contains a complete path.
65429        tool_specified="$ICECC_CREATE_ENV"
65430        tool_basename="${tool_specified##*/}"
65431        if test "x$tool_basename" = "x$tool_specified"; then
65432          # A command without a complete path is provided, search $PATH.
65433          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65434$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65435          # Extract the first word of "$tool_basename", so it can be a program name with args.
65436set dummy $tool_basename; ac_word=$2
65437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65438$as_echo_n "checking for $ac_word... " >&6; }
65439if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65440  $as_echo_n "(cached) " >&6
65441else
65442  case $ICECC_CREATE_ENV in
65443  [\\/]* | ?:[\\/]*)
65444  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65445  ;;
65446  *)
65447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65448for as_dir in $PATH
65449do
65450  IFS=$as_save_IFS
65451  test -z "$as_dir" && as_dir=.
65452    for ac_exec_ext in '' $ac_executable_extensions; do
65453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65454    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65456    break 2
65457  fi
65458done
65459  done
65460IFS=$as_save_IFS
65461
65462  ;;
65463esac
65464fi
65465ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65466if test -n "$ICECC_CREATE_ENV"; then
65467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65468$as_echo "$ICECC_CREATE_ENV" >&6; }
65469else
65470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65471$as_echo "no" >&6; }
65472fi
65473
65474
65475          if test "x$ICECC_CREATE_ENV" = x; then
65476            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65477          fi
65478        else
65479          # Otherwise we believe it is a complete path. Use it as it is.
65480          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65481$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65482          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65483$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65484          if test ! -x "$tool_specified"; then
65485            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65486$as_echo "not found" >&6; }
65487            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65488          fi
65489          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65490$as_echo "$tool_specified" >&6; }
65491        fi
65492      fi
65493    fi
65494
65495  fi
65496
65497
65498
65499  if test "x$ICECC_CREATE_ENV" = x; then
65500    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65501  fi
65502
65503
65504    # Use icecc-create-env to create a minimal compilation environment that can
65505    # be sent to the other hosts in the icecream cluster.
65506    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65507    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65508    # Older versions of icecc does not have the --gcc parameter
65509    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65510      icecc_gcc_arg="--gcc"
65511    fi
65512    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65513
65514  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65515      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65516          ${icecc_create_env_log} 2>&1 )
65517  if test "$?" != "0"; then
65518    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65519$as_echo "$as_me: icecc-create-env output:" >&6;}
65520    cat \
65521          ${icecc_create_env_log}
65522    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65523  fi
65524
65525    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65526      # For clang, the icecc compilerwrapper is needed. It usually resides next
65527      # to icecc-create-env.
65528
65529
65530
65531  # Publish this variable in the help.
65532
65533
65534  if [ -z "${ICECC_WRAPPER+x}" ]; then
65535    # The variable is not set by user, try to locate tool using the code snippet
65536    for ac_prog in compilerwrapper
65537do
65538  # Extract the first word of "$ac_prog", so it can be a program name with args.
65539set dummy $ac_prog; ac_word=$2
65540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65541$as_echo_n "checking for $ac_word... " >&6; }
65542if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65543  $as_echo_n "(cached) " >&6
65544else
65545  case $ICECC_WRAPPER in
65546  [\\/]* | ?:[\\/]*)
65547  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65548  ;;
65549  *)
65550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65551for as_dir in $PATH
65552do
65553  IFS=$as_save_IFS
65554  test -z "$as_dir" && as_dir=.
65555    for ac_exec_ext in '' $ac_executable_extensions; do
65556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65557    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65559    break 2
65560  fi
65561done
65562  done
65563IFS=$as_save_IFS
65564
65565  ;;
65566esac
65567fi
65568ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65569if test -n "$ICECC_WRAPPER"; then
65570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65571$as_echo "$ICECC_WRAPPER" >&6; }
65572else
65573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65574$as_echo "no" >&6; }
65575fi
65576
65577
65578  test -n "$ICECC_WRAPPER" && break
65579done
65580
65581  else
65582    # The variable is set, but is it from the command line or the environment?
65583
65584    # Try to remove the string !ICECC_WRAPPER! from our list.
65585    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65586    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65587      # If it failed, the variable was not from the command line. Ignore it,
65588      # but warn the user (except for BASH, which is always set by the calling BASH).
65589      if test "xICECC_WRAPPER" != xBASH; then
65590        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65591$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65592      fi
65593      # Try to locate tool using the code snippet
65594      for ac_prog in compilerwrapper
65595do
65596  # Extract the first word of "$ac_prog", so it can be a program name with args.
65597set dummy $ac_prog; ac_word=$2
65598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65599$as_echo_n "checking for $ac_word... " >&6; }
65600if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65601  $as_echo_n "(cached) " >&6
65602else
65603  case $ICECC_WRAPPER in
65604  [\\/]* | ?:[\\/]*)
65605  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65606  ;;
65607  *)
65608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65609for as_dir in $PATH
65610do
65611  IFS=$as_save_IFS
65612  test -z "$as_dir" && as_dir=.
65613    for ac_exec_ext in '' $ac_executable_extensions; do
65614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65615    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65617    break 2
65618  fi
65619done
65620  done
65621IFS=$as_save_IFS
65622
65623  ;;
65624esac
65625fi
65626ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65627if test -n "$ICECC_WRAPPER"; then
65628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65629$as_echo "$ICECC_WRAPPER" >&6; }
65630else
65631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65632$as_echo "no" >&6; }
65633fi
65634
65635
65636  test -n "$ICECC_WRAPPER" && break
65637done
65638
65639    else
65640      # If it succeeded, then it was overridden by the user. We will use it
65641      # for the tool.
65642
65643      # First remove it from the list of overridden variables, so we can test
65644      # for unknown variables in the end.
65645      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65646
65647      # Check if we try to supply an empty value
65648      if test "x$ICECC_WRAPPER" = x; then
65649        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65650$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65651        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65652$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65653        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65654$as_echo "disabled" >&6; }
65655      else
65656        # Check if the provided tool contains a complete path.
65657        tool_specified="$ICECC_WRAPPER"
65658        tool_basename="${tool_specified##*/}"
65659        if test "x$tool_basename" = "x$tool_specified"; then
65660          # A command without a complete path is provided, search $PATH.
65661          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65662$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65663          # Extract the first word of "$tool_basename", so it can be a program name with args.
65664set dummy $tool_basename; ac_word=$2
65665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65666$as_echo_n "checking for $ac_word... " >&6; }
65667if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65668  $as_echo_n "(cached) " >&6
65669else
65670  case $ICECC_WRAPPER in
65671  [\\/]* | ?:[\\/]*)
65672  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65673  ;;
65674  *)
65675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65676for as_dir in $PATH
65677do
65678  IFS=$as_save_IFS
65679  test -z "$as_dir" && as_dir=.
65680    for ac_exec_ext in '' $ac_executable_extensions; do
65681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65682    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65684    break 2
65685  fi
65686done
65687  done
65688IFS=$as_save_IFS
65689
65690  ;;
65691esac
65692fi
65693ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65694if test -n "$ICECC_WRAPPER"; then
65695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65696$as_echo "$ICECC_WRAPPER" >&6; }
65697else
65698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65699$as_echo "no" >&6; }
65700fi
65701
65702
65703          if test "x$ICECC_WRAPPER" = x; then
65704            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65705          fi
65706        else
65707          # Otherwise we believe it is a complete path. Use it as it is.
65708          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65709$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65710          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65711$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65712          if test ! -x "$tool_specified"; then
65713            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65714$as_echo "not found" >&6; }
65715            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65716          fi
65717          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65718$as_echo "$tool_specified" >&6; }
65719        fi
65720      fi
65721    fi
65722
65723  fi
65724
65725
65726
65727  if test "x$ICECC_WRAPPER" = x; then
65728    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65729  fi
65730
65731
65732
65733  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65734      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65735  if test "$?" != "0"; then
65736    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65737$as_echo "$as_me: icecc-create-env output:" >&6;}
65738    cat ${icecc_create_env_log}
65739    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65740  fi
65741
65742    else
65743      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65744    fi
65745    PATH="$old_path"
65746    # The bundle with the compiler gets a name based on checksums. Parse log file
65747    # to find it.
65748    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65749    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65750    if test ! -f ${ICECC_ENV_BUNDLE}; then
65751      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65752    fi
65753    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65754$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65755    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65756$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65757    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65758
65759    if test "x${COMPILE_TYPE}" = "xcross"; then
65760      # If cross compiling, create a separate env package for the build compiler
65761      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65762      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65763      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65764
65765  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65766      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65767            ${icecc_create_env_log_build} 2>&1 )
65768  if test "$?" != "0"; then
65769    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65770$as_echo "$as_me: icecc-create-env output:" >&6;}
65771    cat \
65772            ${icecc_create_env_log_build}
65773    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65774  fi
65775
65776      elif test "x${BUILD_CC##*/}" = "xclang"; then
65777
65778  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65779      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65780  if test "$?" != "0"; then
65781    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65782$as_echo "$as_me: icecc-create-env output:" >&6;}
65783    cat ${icecc_create_env_log_build}
65784    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65785  fi
65786
65787      else
65788        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65789      fi
65790      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65791      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65792      if test ! -f ${ICECC_ENV_BUNDLE}; then
65793        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65794      fi
65795      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65796$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65797      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65798$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65799      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65800          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65801    else
65802      BUILD_ICECC="${ICECC}"
65803    fi
65804
65805
65806  fi
65807
65808
65809# Can the C/C++ compiler use precompiled headers?
65810
65811
65812  ###############################################################################
65813  #
65814  # Can the C/C++ compiler use precompiled headers?
65815  #
65816  # Check whether --enable-precompiled-headers was given.
65817if test "${enable_precompiled_headers+set}" = set; then :
65818  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65819else
65820  ENABLE_PRECOMPH=yes
65821fi
65822
65823
65824  USE_PRECOMPILED_HEADER=1
65825  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65826$as_echo_n "checking If precompiled header is enabled... " >&6; }
65827  if test "x$ENABLE_PRECOMPH" = xno; then
65828    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65829$as_echo "no, forced" >&6; }
65830    USE_PRECOMPILED_HEADER=0
65831  elif test "x$ICECC" != "x"; then
65832    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65833$as_echo "no, does not work effectively with icecc" >&6; }
65834    USE_PRECOMPILED_HEADER=0
65835  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65836    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65837$as_echo "no, does not work with Solaris Studio" >&6; }
65838    USE_PRECOMPILED_HEADER=0
65839  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65840    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65841$as_echo "no, does not work with xlc" >&6; }
65842    USE_PRECOMPILED_HEADER=0
65843  else
65844    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65845$as_echo "yes" >&6; }
65846  fi
65847
65848  if test "x$ENABLE_PRECOMPH" = xyes; then
65849    # Check that the compiler actually supports precomp headers.
65850    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65851      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65852$as_echo_n "checking that precompiled headers work... " >&6; }
65853      echo "int alfa();" > conftest.h
65854      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65855      if test ! -f conftest.hpp.gch; then
65856        USE_PRECOMPILED_HEADER=0
65857        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65858$as_echo "no" >&6; }
65859      else
65860        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65861$as_echo "yes" >&6; }
65862      fi
65863      $RM conftest.h conftest.hpp.gch
65864    fi
65865  fi
65866
65867
65868
65869
65870# Setup use of ccache, if available
65871
65872  # Check whether --enable-ccache was given.
65873if test "${enable_ccache+set}" = set; then :
65874  enableval=$enable_ccache;
65875fi
65876
65877
65878  CCACHE_STATUS=
65879  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65880$as_echo_n "checking is ccache enabled... " >&6; }
65881  if test "x$enable_ccache" = xyes; then
65882    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65883      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65884$as_echo "yes" >&6; }
65885      OLD_PATH="$PATH"
65886      if test "x$TOOLCHAIN_PATH" != x; then
65887        PATH=$TOOLCHAIN_PATH:$PATH
65888      fi
65889
65890
65891
65892  # Publish this variable in the help.
65893
65894
65895  if [ -z "${CCACHE+x}" ]; then
65896    # The variable is not set by user, try to locate tool using the code snippet
65897    for ac_prog in ccache
65898do
65899  # Extract the first word of "$ac_prog", so it can be a program name with args.
65900set dummy $ac_prog; ac_word=$2
65901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65902$as_echo_n "checking for $ac_word... " >&6; }
65903if ${ac_cv_path_CCACHE+:} false; then :
65904  $as_echo_n "(cached) " >&6
65905else
65906  case $CCACHE in
65907  [\\/]* | ?:[\\/]*)
65908  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65909  ;;
65910  *)
65911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65912for as_dir in $PATH
65913do
65914  IFS=$as_save_IFS
65915  test -z "$as_dir" && as_dir=.
65916    for ac_exec_ext in '' $ac_executable_extensions; do
65917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65918    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65920    break 2
65921  fi
65922done
65923  done
65924IFS=$as_save_IFS
65925
65926  ;;
65927esac
65928fi
65929CCACHE=$ac_cv_path_CCACHE
65930if test -n "$CCACHE"; then
65931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65932$as_echo "$CCACHE" >&6; }
65933else
65934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65935$as_echo "no" >&6; }
65936fi
65937
65938
65939  test -n "$CCACHE" && break
65940done
65941
65942  else
65943    # The variable is set, but is it from the command line or the environment?
65944
65945    # Try to remove the string !CCACHE! from our list.
65946    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65947    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65948      # If it failed, the variable was not from the command line. Ignore it,
65949      # but warn the user (except for BASH, which is always set by the calling BASH).
65950      if test "xCCACHE" != xBASH; then
65951        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65952$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65953      fi
65954      # Try to locate tool using the code snippet
65955      for ac_prog in ccache
65956do
65957  # Extract the first word of "$ac_prog", so it can be a program name with args.
65958set dummy $ac_prog; ac_word=$2
65959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65960$as_echo_n "checking for $ac_word... " >&6; }
65961if ${ac_cv_path_CCACHE+:} false; then :
65962  $as_echo_n "(cached) " >&6
65963else
65964  case $CCACHE in
65965  [\\/]* | ?:[\\/]*)
65966  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65967  ;;
65968  *)
65969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65970for as_dir in $PATH
65971do
65972  IFS=$as_save_IFS
65973  test -z "$as_dir" && as_dir=.
65974    for ac_exec_ext in '' $ac_executable_extensions; do
65975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65976    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65978    break 2
65979  fi
65980done
65981  done
65982IFS=$as_save_IFS
65983
65984  ;;
65985esac
65986fi
65987CCACHE=$ac_cv_path_CCACHE
65988if test -n "$CCACHE"; then
65989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65990$as_echo "$CCACHE" >&6; }
65991else
65992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65993$as_echo "no" >&6; }
65994fi
65995
65996
65997  test -n "$CCACHE" && break
65998done
65999
66000    else
66001      # If it succeeded, then it was overridden by the user. We will use it
66002      # for the tool.
66003
66004      # First remove it from the list of overridden variables, so we can test
66005      # for unknown variables in the end.
66006      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66007
66008      # Check if we try to supply an empty value
66009      if test "x$CCACHE" = x; then
66010        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66011$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66012        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66013$as_echo_n "checking for CCACHE... " >&6; }
66014        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66015$as_echo "disabled" >&6; }
66016      else
66017        # Check if the provided tool contains a complete path.
66018        tool_specified="$CCACHE"
66019        tool_basename="${tool_specified##*/}"
66020        if test "x$tool_basename" = "x$tool_specified"; then
66021          # A command without a complete path is provided, search $PATH.
66022          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66023$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66024          # Extract the first word of "$tool_basename", so it can be a program name with args.
66025set dummy $tool_basename; ac_word=$2
66026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66027$as_echo_n "checking for $ac_word... " >&6; }
66028if ${ac_cv_path_CCACHE+:} false; then :
66029  $as_echo_n "(cached) " >&6
66030else
66031  case $CCACHE in
66032  [\\/]* | ?:[\\/]*)
66033  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66034  ;;
66035  *)
66036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66037for as_dir in $PATH
66038do
66039  IFS=$as_save_IFS
66040  test -z "$as_dir" && as_dir=.
66041    for ac_exec_ext in '' $ac_executable_extensions; do
66042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66043    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66045    break 2
66046  fi
66047done
66048  done
66049IFS=$as_save_IFS
66050
66051  ;;
66052esac
66053fi
66054CCACHE=$ac_cv_path_CCACHE
66055if test -n "$CCACHE"; then
66056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66057$as_echo "$CCACHE" >&6; }
66058else
66059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66060$as_echo "no" >&6; }
66061fi
66062
66063
66064          if test "x$CCACHE" = x; then
66065            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66066          fi
66067        else
66068          # Otherwise we believe it is a complete path. Use it as it is.
66069          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66070$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66071          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66072$as_echo_n "checking for CCACHE... " >&6; }
66073          if test ! -x "$tool_specified"; then
66074            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66075$as_echo "not found" >&6; }
66076            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66077          fi
66078          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66079$as_echo "$tool_specified" >&6; }
66080        fi
66081      fi
66082    fi
66083
66084  fi
66085
66086
66087
66088  if test "x$CCACHE" = x; then
66089    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66090  fi
66091
66092
66093      PATH="$OLD_PATH"
66094      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66095      CCACHE_STATUS="Active ($CCACHE_VERSION)"
66096    else
66097      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66098$as_echo "no" >&6; }
66099      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66100$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66101    fi
66102  elif test "x$enable_ccache" = xno; then
66103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66104$as_echo "no, explicitly disabled" >&6; }
66105    CCACHE_STATUS="Disabled"
66106  elif test "x$enable_ccache" = x; then
66107    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66108$as_echo "no" >&6; }
66109  else
66110    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66111$as_echo "unknown" >&6; }
66112    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66113  fi
66114
66115
66116
66117# Check whether --with-ccache-dir was given.
66118if test "${with_ccache_dir+set}" = set; then :
66119  withval=$with_ccache_dir;
66120fi
66121
66122
66123  if test "x$with_ccache_dir" != x; then
66124    # When using a non home ccache directory, assume the use is to share ccache files
66125    # with other users. Thus change the umask.
66126    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66127    if test "x$CCACHE" = x; then
66128      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66129$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66130    fi
66131  fi
66132
66133  if test "x$CCACHE" != x; then
66134
66135  if test "x$CCACHE" != x; then
66136    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
66137      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66138          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
66139      if test "x$HAS_BAD_CCACHE" != "x"; then
66140        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
66141      fi
66142    fi
66143    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
66144      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66145          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66146      if test "x$HAS_BAD_CCACHE" != "x"; then
66147        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66148      fi
66149      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66150$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66151      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66152      PUSHED_FLAGS="$CXXFLAGS"
66153      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66154      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66155/* end confdefs.h.  */
66156
66157int
66158main ()
66159{
66160
66161  ;
66162  return 0;
66163}
66164_ACEOF
66165if ac_fn_cxx_try_compile "$LINENO"; then :
66166  CC_KNOWS_CCACHE_TRICK=yes
66167else
66168  CC_KNOWS_CCACHE_TRICK=no
66169fi
66170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66171      CXXFLAGS="$PUSHED_FLAGS"
66172      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66174$as_echo "yes" >&6; }
66175        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66176
66177        CCACHE_SLOPPINESS=pch_defines,time_macros
66178      else
66179        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66180$as_echo "no" >&6; }
66181        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66182      fi
66183    fi
66184
66185    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66186        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66187
66188    if test "x$SET_CCACHE_DIR" != x; then
66189      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66190      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66191    fi
66192  fi
66193
66194  fi
66195
66196
66197###############################################################################
66198#
66199# And now the finish...
66200#
66201###############################################################################
66202
66203# Check for some common pitfalls
66204
66205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66206    file_to_test="$SRC_ROOT/LICENSE"
66207    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66208      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
66209    fi
66210  fi
66211
66212
66213  # Did user specify any unknown variables?
66214
66215  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66216    # Replace the separating ! with spaces before presenting for end user.
66217    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66218    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66219$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66220  fi
66221
66222
66223  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66224$as_echo_n "checking if build directory is on local disk... " >&6; }
66225
66226  # df -l lists only local disks; if the given directory is not found then
66227  # a non-zero exit code is given
66228  if test "x$DF" = x; then
66229    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66230      # msys does not have df; use Windows "net use" instead.
66231      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66232      if test "x$IS_NETWORK_DISK" = x; then
66233        OUTPUT_DIR_IS_LOCAL="yes"
66234      else
66235        OUTPUT_DIR_IS_LOCAL="no"
66236      fi
66237    else
66238      # No df here, say it's local
66239      OUTPUT_DIR_IS_LOCAL="yes"
66240    fi
66241  else
66242    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66243      OUTPUT_DIR_IS_LOCAL="yes"
66244    else
66245      OUTPUT_DIR_IS_LOCAL="no"
66246    fi
66247  fi
66248
66249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66250$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66251
66252
66253
66254  # Check if the user has any old-style ALT_ variables set.
66255  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66256
66257  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66258  # Since we can't properly handle the dependencies for this, warn the user about the situation
66259  if test -e $OUTPUT_ROOT/spec.gmk; then
66260    IS_RECONFIGURE=yes
66261  else
66262    IS_RECONFIGURE=no
66263  fi
66264
66265
66266# At the end, call the custom hook. (Dummy macro if no custom sources available)
66267
66268
66269# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66270
66271  # Keep feature lists sorted and free of duplicates
66272  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66273  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66274  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66275  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66276  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66277  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66278  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66279
66280  # Validate features
66281  for variant in $JVM_VARIANTS; do
66282    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66283$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66284    features_var_name=JVM_FEATURES_$variant
66285    JVM_FEATURES_TO_TEST=${!features_var_name}
66286    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66287$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66288    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66289    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66290    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66291    if test "x$INVALID_FEATURES" != x; then
66292      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66293    fi
66294  done
66295
66296
66297# We're messing a bit with internal autoconf variables to put the config.status
66298# in the output directory instead of the current directory.
66299CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66300
66301# Create the actual output files. Now the main work of configure is done.
66302cat >confcache <<\_ACEOF
66303# This file is a shell script that caches the results of configure
66304# tests run on this system so they can be shared between configure
66305# scripts and configure runs, see configure's option --config-cache.
66306# It is not useful on other systems.  If it contains results you don't
66307# want to keep, you may remove or edit it.
66308#
66309# config.status only pays attention to the cache file if you give it
66310# the --recheck option to rerun configure.
66311#
66312# `ac_cv_env_foo' variables (set or unset) will be overridden when
66313# loading this file, other *unset* `ac_cv_foo' will be assigned the
66314# following values.
66315
66316_ACEOF
66317
66318# The following way of writing the cache mishandles newlines in values,
66319# but we know of no workaround that is simple, portable, and efficient.
66320# So, we kill variables containing newlines.
66321# Ultrix sh set writes to stderr and can't be redirected directly,
66322# and sets the high bit in the cache file unless we assign to the vars.
66323(
66324  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66325    eval ac_val=\$$ac_var
66326    case $ac_val in #(
66327    *${as_nl}*)
66328      case $ac_var in #(
66329      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66330$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66331      esac
66332      case $ac_var in #(
66333      _ | IFS | as_nl) ;; #(
66334      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66335      *) { eval $ac_var=; unset $ac_var;} ;;
66336      esac ;;
66337    esac
66338  done
66339
66340  (set) 2>&1 |
66341    case $as_nl`(ac_space=' '; set) 2>&1` in #(
66342    *${as_nl}ac_space=\ *)
66343      # `set' does not quote correctly, so add quotes: double-quote
66344      # substitution turns \\\\ into \\, and sed turns \\ into \.
66345      sed -n \
66346	"s/'/'\\\\''/g;
66347	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66348      ;; #(
66349    *)
66350      # `set' quotes correctly as required by POSIX, so do not add quotes.
66351      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66352      ;;
66353    esac |
66354    sort
66355) |
66356  sed '
66357     /^ac_cv_env_/b end
66358     t clear
66359     :clear
66360     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66361     t end
66362     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66363     :end' >>confcache
66364if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66365  if test -w "$cache_file"; then
66366    if test "x$cache_file" != "x/dev/null"; then
66367      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66368$as_echo "$as_me: updating cache $cache_file" >&6;}
66369      if test ! -f "$cache_file" || test -h "$cache_file"; then
66370	cat confcache >"$cache_file"
66371      else
66372        case $cache_file in #(
66373        */* | ?:*)
66374	  mv -f confcache "$cache_file"$$ &&
66375	  mv -f "$cache_file"$$ "$cache_file" ;; #(
66376        *)
66377	  mv -f confcache "$cache_file" ;;
66378	esac
66379      fi
66380    fi
66381  else
66382    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66383$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66384  fi
66385fi
66386rm -f confcache
66387
66388test "x$prefix" = xNONE && prefix=$ac_default_prefix
66389# Let make expand exec_prefix.
66390test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66391
66392# Transform confdefs.h into DEFS.
66393# Protect against shell expansion while executing Makefile rules.
66394# Protect against Makefile macro expansion.
66395#
66396# If the first sed substitution is executed (which looks for macros that
66397# take arguments), then branch to the quote section.  Otherwise,
66398# look for a macro that doesn't take arguments.
66399ac_script='
66400:mline
66401/\\$/{
66402 N
66403 s,\\\n,,
66404 b mline
66405}
66406t clear
66407:clear
66408s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
66409t quote
66410s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
66411t quote
66412b any
66413:quote
66414s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66415s/\[/\\&/g
66416s/\]/\\&/g
66417s/\$/$$/g
66418H
66419:any
66420${
66421	g
66422	s/^\n//
66423	s/\n/ /g
66424	p
66425}
66426'
66427DEFS=`sed -n "$ac_script" confdefs.h`
66428
66429
66430ac_libobjs=
66431ac_ltlibobjs=
66432U=
66433for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66434  # 1. Remove the extension, and $U if already installed.
66435  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66436  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66437  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66438  #    will be set to the directory where LIBOBJS objects are built.
66439  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66440  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66441done
66442LIBOBJS=$ac_libobjs
66443
66444LTLIBOBJS=$ac_ltlibobjs
66445
66446
66447
66448: "${CONFIG_STATUS=./config.status}"
66449ac_write_fail=0
66450ac_clean_files_save=$ac_clean_files
66451ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66452{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66453$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66454as_write_fail=0
66455cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66456#! $SHELL
66457# Generated by $as_me.
66458# Run this file to recreate the current configuration.
66459# Compiler output produced by configure, useful for debugging
66460# configure, is in config.log if it exists.
66461
66462debug=false
66463ac_cs_recheck=false
66464ac_cs_silent=false
66465
66466SHELL=\${CONFIG_SHELL-$SHELL}
66467export SHELL
66468_ASEOF
66469cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66470## -------------------- ##
66471## M4sh Initialization. ##
66472## -------------------- ##
66473
66474# Be more Bourne compatible
66475DUALCASE=1; export DUALCASE # for MKS sh
66476if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66477  emulate sh
66478  NULLCMD=:
66479  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66480  # is contrary to our usage.  Disable this feature.
66481  alias -g '${1+"$@"}'='"$@"'
66482  setopt NO_GLOB_SUBST
66483else
66484  case `(set -o) 2>/dev/null` in #(
66485  *posix*) :
66486    set -o posix ;; #(
66487  *) :
66488     ;;
66489esac
66490fi
66491
66492
66493as_nl='
66494'
66495export as_nl
66496# Printing a long string crashes Solaris 7 /usr/bin/printf.
66497as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66498as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66499as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66500# Prefer a ksh shell builtin over an external printf program on Solaris,
66501# but without wasting forks for bash or zsh.
66502if test -z "$BASH_VERSION$ZSH_VERSION" \
66503    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66504  as_echo='print -r --'
66505  as_echo_n='print -rn --'
66506elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66507  as_echo='printf %s\n'
66508  as_echo_n='printf %s'
66509else
66510  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66511    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66512    as_echo_n='/usr/ucb/echo -n'
66513  else
66514    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66515    as_echo_n_body='eval
66516      arg=$1;
66517      case $arg in #(
66518      *"$as_nl"*)
66519	expr "X$arg" : "X\\(.*\\)$as_nl";
66520	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66521      esac;
66522      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66523    '
66524    export as_echo_n_body
66525    as_echo_n='sh -c $as_echo_n_body as_echo'
66526  fi
66527  export as_echo_body
66528  as_echo='sh -c $as_echo_body as_echo'
66529fi
66530
66531# The user is always right.
66532if test "${PATH_SEPARATOR+set}" != set; then
66533  PATH_SEPARATOR=:
66534  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66535    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66536      PATH_SEPARATOR=';'
66537  }
66538fi
66539
66540
66541# IFS
66542# We need space, tab and new line, in precisely that order.  Quoting is
66543# there to prevent editors from complaining about space-tab.
66544# (If _AS_PATH_WALK were called with IFS unset, it would disable word
66545# splitting by setting IFS to empty value.)
66546IFS=" ""	$as_nl"
66547
66548# Find who we are.  Look in the path if we contain no directory separator.
66549as_myself=
66550case $0 in #((
66551  *[\\/]* ) as_myself=$0 ;;
66552  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66553for as_dir in $PATH
66554do
66555  IFS=$as_save_IFS
66556  test -z "$as_dir" && as_dir=.
66557    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66558  done
66559IFS=$as_save_IFS
66560
66561     ;;
66562esac
66563# We did not find ourselves, most probably we were run as `sh COMMAND'
66564# in which case we are not to be found in the path.
66565if test "x$as_myself" = x; then
66566  as_myself=$0
66567fi
66568if test ! -f "$as_myself"; then
66569  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66570  exit 1
66571fi
66572
66573# Unset variables that we do not need and which cause bugs (e.g. in
66574# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66575# suppresses any "Segmentation fault" message there.  '((' could
66576# trigger a bug in pdksh 5.2.14.
66577for as_var in BASH_ENV ENV MAIL MAILPATH
66578do eval test x\${$as_var+set} = xset \
66579  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66580done
66581PS1='$ '
66582PS2='> '
66583PS4='+ '
66584
66585# NLS nuisances.
66586LC_ALL=C
66587export LC_ALL
66588LANGUAGE=C
66589export LANGUAGE
66590
66591# CDPATH.
66592(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66593
66594
66595# as_fn_error STATUS ERROR [LINENO LOG_FD]
66596# ----------------------------------------
66597# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66598# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66599# script with STATUS, using 1 if that was 0.
66600as_fn_error ()
66601{
66602  as_status=$1; test $as_status -eq 0 && as_status=1
66603  if test "$4"; then
66604    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66605    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66606  fi
66607  $as_echo "$as_me: error: $2" >&2
66608  as_fn_exit $as_status
66609} # as_fn_error
66610
66611
66612# as_fn_set_status STATUS
66613# -----------------------
66614# Set $? to STATUS, without forking.
66615as_fn_set_status ()
66616{
66617  return $1
66618} # as_fn_set_status
66619
66620# as_fn_exit STATUS
66621# -----------------
66622# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66623as_fn_exit ()
66624{
66625  set +e
66626  as_fn_set_status $1
66627  exit $1
66628} # as_fn_exit
66629
66630# as_fn_unset VAR
66631# ---------------
66632# Portably unset VAR.
66633as_fn_unset ()
66634{
66635  { eval $1=; unset $1;}
66636}
66637as_unset=as_fn_unset
66638# as_fn_append VAR VALUE
66639# ----------------------
66640# Append the text in VALUE to the end of the definition contained in VAR. Take
66641# advantage of any shell optimizations that allow amortized linear growth over
66642# repeated appends, instead of the typical quadratic growth present in naive
66643# implementations.
66644if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66645  eval 'as_fn_append ()
66646  {
66647    eval $1+=\$2
66648  }'
66649else
66650  as_fn_append ()
66651  {
66652    eval $1=\$$1\$2
66653  }
66654fi # as_fn_append
66655
66656# as_fn_arith ARG...
66657# ------------------
66658# Perform arithmetic evaluation on the ARGs, and store the result in the
66659# global $as_val. Take advantage of shells that can avoid forks. The arguments
66660# must be portable across $(()) and expr.
66661if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66662  eval 'as_fn_arith ()
66663  {
66664    as_val=$(( $* ))
66665  }'
66666else
66667  as_fn_arith ()
66668  {
66669    as_val=`expr "$@" || test $? -eq 1`
66670  }
66671fi # as_fn_arith
66672
66673
66674if expr a : '\(a\)' >/dev/null 2>&1 &&
66675   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66676  as_expr=expr
66677else
66678  as_expr=false
66679fi
66680
66681if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66682  as_basename=basename
66683else
66684  as_basename=false
66685fi
66686
66687if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66688  as_dirname=dirname
66689else
66690  as_dirname=false
66691fi
66692
66693as_me=`$as_basename -- "$0" ||
66694$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66695	 X"$0" : 'X\(//\)$' \| \
66696	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66697$as_echo X/"$0" |
66698    sed '/^.*\/\([^/][^/]*\)\/*$/{
66699	    s//\1/
66700	    q
66701	  }
66702	  /^X\/\(\/\/\)$/{
66703	    s//\1/
66704	    q
66705	  }
66706	  /^X\/\(\/\).*/{
66707	    s//\1/
66708	    q
66709	  }
66710	  s/.*/./; q'`
66711
66712# Avoid depending upon Character Ranges.
66713as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66714as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66715as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66716as_cr_digits='0123456789'
66717as_cr_alnum=$as_cr_Letters$as_cr_digits
66718
66719ECHO_C= ECHO_N= ECHO_T=
66720case `echo -n x` in #(((((
66721-n*)
66722  case `echo 'xy\c'` in
66723  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66724  xy)  ECHO_C='\c';;
66725  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66726       ECHO_T='	';;
66727  esac;;
66728*)
66729  ECHO_N='-n';;
66730esac
66731
66732rm -f conf$$ conf$$.exe conf$$.file
66733if test -d conf$$.dir; then
66734  rm -f conf$$.dir/conf$$.file
66735else
66736  rm -f conf$$.dir
66737  mkdir conf$$.dir 2>/dev/null
66738fi
66739if (echo >conf$$.file) 2>/dev/null; then
66740  if ln -s conf$$.file conf$$ 2>/dev/null; then
66741    as_ln_s='ln -s'
66742    # ... but there are two gotchas:
66743    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66744    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66745    # In both cases, we have to default to `cp -pR'.
66746    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66747      as_ln_s='cp -pR'
66748  elif ln conf$$.file conf$$ 2>/dev/null; then
66749    as_ln_s=ln
66750  else
66751    as_ln_s='cp -pR'
66752  fi
66753else
66754  as_ln_s='cp -pR'
66755fi
66756rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66757rmdir conf$$.dir 2>/dev/null
66758
66759
66760# as_fn_mkdir_p
66761# -------------
66762# Create "$as_dir" as a directory, including parents if necessary.
66763as_fn_mkdir_p ()
66764{
66765
66766  case $as_dir in #(
66767  -*) as_dir=./$as_dir;;
66768  esac
66769  test -d "$as_dir" || eval $as_mkdir_p || {
66770    as_dirs=
66771    while :; do
66772      case $as_dir in #(
66773      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66774      *) as_qdir=$as_dir;;
66775      esac
66776      as_dirs="'$as_qdir' $as_dirs"
66777      as_dir=`$as_dirname -- "$as_dir" ||
66778$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66779	 X"$as_dir" : 'X\(//\)[^/]' \| \
66780	 X"$as_dir" : 'X\(//\)$' \| \
66781	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66782$as_echo X"$as_dir" |
66783    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66784	    s//\1/
66785	    q
66786	  }
66787	  /^X\(\/\/\)[^/].*/{
66788	    s//\1/
66789	    q
66790	  }
66791	  /^X\(\/\/\)$/{
66792	    s//\1/
66793	    q
66794	  }
66795	  /^X\(\/\).*/{
66796	    s//\1/
66797	    q
66798	  }
66799	  s/.*/./; q'`
66800      test -d "$as_dir" && break
66801    done
66802    test -z "$as_dirs" || eval "mkdir $as_dirs"
66803  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66804
66805
66806} # as_fn_mkdir_p
66807if mkdir -p . 2>/dev/null; then
66808  as_mkdir_p='mkdir -p "$as_dir"'
66809else
66810  test -d ./-p && rmdir ./-p
66811  as_mkdir_p=false
66812fi
66813
66814
66815# as_fn_executable_p FILE
66816# -----------------------
66817# Test if FILE is an executable regular file.
66818as_fn_executable_p ()
66819{
66820  test -f "$1" && test -x "$1"
66821} # as_fn_executable_p
66822as_test_x='test -x'
66823as_executable_p=as_fn_executable_p
66824
66825# Sed expression to map a string onto a valid CPP name.
66826as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66827
66828# Sed expression to map a string onto a valid variable name.
66829as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66830
66831
66832exec 6>&1
66833## ----------------------------------- ##
66834## Main body of $CONFIG_STATUS script. ##
66835## ----------------------------------- ##
66836_ASEOF
66837test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66838
66839cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66840# Save the log message, to keep $0 and so on meaningful, and to
66841# report actual input values of CONFIG_FILES etc. instead of their
66842# values after options handling.
66843ac_log="
66844This file was extended by OpenJDK $as_me jdk9, which was
66845generated by GNU Autoconf 2.69.  Invocation command line was
66846
66847  CONFIG_FILES    = $CONFIG_FILES
66848  CONFIG_HEADERS  = $CONFIG_HEADERS
66849  CONFIG_LINKS    = $CONFIG_LINKS
66850  CONFIG_COMMANDS = $CONFIG_COMMANDS
66851  $ $0 $@
66852
66853on `(hostname || uname -n) 2>/dev/null | sed 1q`
66854"
66855
66856_ACEOF
66857
66858case $ac_config_files in *"
66859"*) set x $ac_config_files; shift; ac_config_files=$*;;
66860esac
66861
66862
66863
66864cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66865# Files that config.status was made for.
66866config_files="$ac_config_files"
66867
66868_ACEOF
66869
66870cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66871ac_cs_usage="\
66872\`$as_me' instantiates files and other configuration actions
66873from templates according to the current configuration.  Unless the files
66874and actions are specified as TAGs, all are instantiated by default.
66875
66876Usage: $0 [OPTION]... [TAG]...
66877
66878  -h, --help       print this help, then exit
66879  -V, --version    print version number and configuration settings, then exit
66880      --config     print configuration, then exit
66881  -q, --quiet, --silent
66882                   do not print progress messages
66883  -d, --debug      don't remove temporary files
66884      --recheck    update $as_me by reconfiguring in the same conditions
66885      --file=FILE[:TEMPLATE]
66886                   instantiate the configuration file FILE
66887
66888Configuration files:
66889$config_files
66890
66891Report bugs to <build-dev@openjdk.java.net>.
66892OpenJDK home page: <http://openjdk.java.net>."
66893
66894_ACEOF
66895cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66896ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66897ac_cs_version="\\
66898OpenJDK config.status jdk9
66899configured by $0, generated by GNU Autoconf 2.69,
66900  with options \\"\$ac_cs_config\\"
66901
66902Copyright (C) 2012 Free Software Foundation, Inc.
66903This config.status script is free software; the Free Software Foundation
66904gives unlimited permission to copy, distribute and modify it."
66905
66906ac_pwd='$ac_pwd'
66907srcdir='$srcdir'
66908AWK='$AWK'
66909test -n "\$AWK" || AWK=awk
66910_ACEOF
66911
66912cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66913# The default lists apply if the user does not specify any file.
66914ac_need_defaults=:
66915while test $# != 0
66916do
66917  case $1 in
66918  --*=?*)
66919    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66920    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66921    ac_shift=:
66922    ;;
66923  --*=)
66924    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66925    ac_optarg=
66926    ac_shift=:
66927    ;;
66928  *)
66929    ac_option=$1
66930    ac_optarg=$2
66931    ac_shift=shift
66932    ;;
66933  esac
66934
66935  case $ac_option in
66936  # Handling of the options.
66937  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66938    ac_cs_recheck=: ;;
66939  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66940    $as_echo "$ac_cs_version"; exit ;;
66941  --config | --confi | --conf | --con | --co | --c )
66942    $as_echo "$ac_cs_config"; exit ;;
66943  --debug | --debu | --deb | --de | --d | -d )
66944    debug=: ;;
66945  --file | --fil | --fi | --f )
66946    $ac_shift
66947    case $ac_optarg in
66948    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66949    '') as_fn_error $? "missing file argument" ;;
66950    esac
66951    as_fn_append CONFIG_FILES " '$ac_optarg'"
66952    ac_need_defaults=false;;
66953  --he | --h |  --help | --hel | -h )
66954    $as_echo "$ac_cs_usage"; exit ;;
66955  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66956  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66957    ac_cs_silent=: ;;
66958
66959  # This is an error.
66960  -*) as_fn_error $? "unrecognized option: \`$1'
66961Try \`$0 --help' for more information." ;;
66962
66963  *) as_fn_append ac_config_targets " $1"
66964     ac_need_defaults=false ;;
66965
66966  esac
66967  shift
66968done
66969
66970ac_configure_extra_args=
66971
66972if $ac_cs_silent; then
66973  exec 6>/dev/null
66974  ac_configure_extra_args="$ac_configure_extra_args --silent"
66975fi
66976
66977_ACEOF
66978cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66979if \$ac_cs_recheck; then
66980  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66981  shift
66982  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66983  CONFIG_SHELL='$SHELL'
66984  export CONFIG_SHELL
66985  exec "\$@"
66986fi
66987
66988_ACEOF
66989cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66990exec 5>>config.log
66991{
66992  echo
66993  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66994## Running $as_me. ##
66995_ASBOX
66996  $as_echo "$ac_log"
66997} >&5
66998
66999_ACEOF
67000cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67001_ACEOF
67002
67003cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67004
67005# Handling of arguments.
67006for ac_config_target in $ac_config_targets
67007do
67008  case $ac_config_target in
67009    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67010    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67011    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67012    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67013    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67014
67015  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67016  esac
67017done
67018
67019
67020# If the user did not use the arguments to specify the items to instantiate,
67021# then the envvar interface is used.  Set only those that are not.
67022# We use the long form for the default assignment because of an extremely
67023# bizarre bug on SunOS 4.1.3.
67024if $ac_need_defaults; then
67025  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67026fi
67027
67028# Have a temporary directory for convenience.  Make it in the build tree
67029# simply because there is no reason against having it here, and in addition,
67030# creating and moving files from /tmp can sometimes cause problems.
67031# Hook for its removal unless debugging.
67032# Note that there is a small window in which the directory will not be cleaned:
67033# after its creation but before its name has been assigned to `$tmp'.
67034$debug ||
67035{
67036  tmp= ac_tmp=
67037  trap 'exit_status=$?
67038  : "${ac_tmp:=$tmp}"
67039  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67040' 0
67041  trap 'as_fn_exit 1' 1 2 13 15
67042}
67043# Create a (secure) tmp directory for tmp files.
67044
67045{
67046  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67047  test -d "$tmp"
67048}  ||
67049{
67050  tmp=./conf$$-$RANDOM
67051  (umask 077 && mkdir "$tmp")
67052} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67053ac_tmp=$tmp
67054
67055# Set up the scripts for CONFIG_FILES section.
67056# No need to generate them if there are no CONFIG_FILES.
67057# This happens for instance with `./config.status config.h'.
67058if test -n "$CONFIG_FILES"; then
67059
67060
67061ac_cr=`echo X | tr X '\015'`
67062# On cygwin, bash can eat \r inside `` if the user requested igncr.
67063# But we know of no other shell where ac_cr would be empty at this
67064# point, so we can use a bashism as a fallback.
67065if test "x$ac_cr" = x; then
67066  eval ac_cr=\$\'\\r\'
67067fi
67068ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67069if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67070  ac_cs_awk_cr='\\r'
67071else
67072  ac_cs_awk_cr=$ac_cr
67073fi
67074
67075echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67076_ACEOF
67077
67078
67079{
67080  echo "cat >conf$$subs.awk <<_ACEOF" &&
67081  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67082  echo "_ACEOF"
67083} >conf$$subs.sh ||
67084  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67085ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67086ac_delim='%!_!# '
67087for ac_last_try in false false false false false :; do
67088  . ./conf$$subs.sh ||
67089    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67090
67091  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67092  if test $ac_delim_n = $ac_delim_num; then
67093    break
67094  elif $ac_last_try; then
67095    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67096  else
67097    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67098  fi
67099done
67100rm -f conf$$subs.sh
67101
67102cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67103cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67104_ACEOF
67105sed -n '
67106h
67107s/^/S["/; s/!.*/"]=/
67108p
67109g
67110s/^[^!]*!//
67111:repl
67112t repl
67113s/'"$ac_delim"'$//
67114t delim
67115:nl
67116h
67117s/\(.\{148\}\)..*/\1/
67118t more1
67119s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67120p
67121n
67122b repl
67123:more1
67124s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67125p
67126g
67127s/.\{148\}//
67128t nl
67129:delim
67130h
67131s/\(.\{148\}\)..*/\1/
67132t more2
67133s/["\\]/\\&/g; s/^/"/; s/$/"/
67134p
67135b
67136:more2
67137s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67138p
67139g
67140s/.\{148\}//
67141t delim
67142' <conf$$subs.awk | sed '
67143/^[^""]/{
67144  N
67145  s/\n//
67146}
67147' >>$CONFIG_STATUS || ac_write_fail=1
67148rm -f conf$$subs.awk
67149cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67150_ACAWK
67151cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67152  for (key in S) S_is_set[key] = 1
67153  FS = ""
67154
67155}
67156{
67157  line = $ 0
67158  nfields = split(line, field, "@")
67159  substed = 0
67160  len = length(field[1])
67161  for (i = 2; i < nfields; i++) {
67162    key = field[i]
67163    keylen = length(key)
67164    if (S_is_set[key]) {
67165      value = S[key]
67166      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67167      len += length(value) + length(field[++i])
67168      substed = 1
67169    } else
67170      len += 1 + keylen
67171  }
67172
67173  print line
67174}
67175
67176_ACAWK
67177_ACEOF
67178cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67179if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67180  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67181else
67182  cat
67183fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67184  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67185_ACEOF
67186
67187# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67188# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67189# trailing colons and then remove the whole line if VPATH becomes empty
67190# (actually we leave an empty line to preserve line numbers).
67191if test "x$srcdir" = x.; then
67192  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67193h
67194s///
67195s/^/:/
67196s/[	 ]*$/:/
67197s/:\$(srcdir):/:/g
67198s/:\${srcdir}:/:/g
67199s/:@srcdir@:/:/g
67200s/^:*//
67201s/:*$//
67202x
67203s/\(=[	 ]*\).*/\1/
67204G
67205s/\n//
67206s/^[^=]*=[	 ]*$//
67207}'
67208fi
67209
67210cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67211fi # test -n "$CONFIG_FILES"
67212
67213
67214eval set X "  :F $CONFIG_FILES      "
67215shift
67216for ac_tag
67217do
67218  case $ac_tag in
67219  :[FHLC]) ac_mode=$ac_tag; continue;;
67220  esac
67221  case $ac_mode$ac_tag in
67222  :[FHL]*:*);;
67223  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67224  :[FH]-) ac_tag=-:-;;
67225  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67226  esac
67227  ac_save_IFS=$IFS
67228  IFS=:
67229  set x $ac_tag
67230  IFS=$ac_save_IFS
67231  shift
67232  ac_file=$1
67233  shift
67234
67235  case $ac_mode in
67236  :L) ac_source=$1;;
67237  :[FH])
67238    ac_file_inputs=
67239    for ac_f
67240    do
67241      case $ac_f in
67242      -) ac_f="$ac_tmp/stdin";;
67243      *) # Look for the file first in the build tree, then in the source tree
67244	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67245	 # because $ac_f cannot contain `:'.
67246	 test -f "$ac_f" ||
67247	   case $ac_f in
67248	   [\\/$]*) false;;
67249	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67250	   esac ||
67251	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67252      esac
67253      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67254      as_fn_append ac_file_inputs " '$ac_f'"
67255    done
67256
67257    # Let's still pretend it is `configure' which instantiates (i.e., don't
67258    # use $as_me), people would be surprised to read:
67259    #    /* config.h.  Generated by config.status.  */
67260    configure_input='Generated from '`
67261	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67262	`' by configure.'
67263    if test x"$ac_file" != x-; then
67264      configure_input="$ac_file.  $configure_input"
67265      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67266$as_echo "$as_me: creating $ac_file" >&6;}
67267    fi
67268    # Neutralize special characters interpreted by sed in replacement strings.
67269    case $configure_input in #(
67270    *\&* | *\|* | *\\* )
67271       ac_sed_conf_input=`$as_echo "$configure_input" |
67272       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67273    *) ac_sed_conf_input=$configure_input;;
67274    esac
67275
67276    case $ac_tag in
67277    *:-:* | *:-) cat >"$ac_tmp/stdin" \
67278      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67279    esac
67280    ;;
67281  esac
67282
67283  ac_dir=`$as_dirname -- "$ac_file" ||
67284$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67285	 X"$ac_file" : 'X\(//\)[^/]' \| \
67286	 X"$ac_file" : 'X\(//\)$' \| \
67287	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67288$as_echo X"$ac_file" |
67289    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67290	    s//\1/
67291	    q
67292	  }
67293	  /^X\(\/\/\)[^/].*/{
67294	    s//\1/
67295	    q
67296	  }
67297	  /^X\(\/\/\)$/{
67298	    s//\1/
67299	    q
67300	  }
67301	  /^X\(\/\).*/{
67302	    s//\1/
67303	    q
67304	  }
67305	  s/.*/./; q'`
67306  as_dir="$ac_dir"; as_fn_mkdir_p
67307  ac_builddir=.
67308
67309case "$ac_dir" in
67310.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67311*)
67312  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67313  # A ".." for each directory in $ac_dir_suffix.
67314  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67315  case $ac_top_builddir_sub in
67316  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67317  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67318  esac ;;
67319esac
67320ac_abs_top_builddir=$ac_pwd
67321ac_abs_builddir=$ac_pwd$ac_dir_suffix
67322# for backward compatibility:
67323ac_top_builddir=$ac_top_build_prefix
67324
67325case $srcdir in
67326  .)  # We are building in place.
67327    ac_srcdir=.
67328    ac_top_srcdir=$ac_top_builddir_sub
67329    ac_abs_top_srcdir=$ac_pwd ;;
67330  [\\/]* | ?:[\\/]* )  # Absolute name.
67331    ac_srcdir=$srcdir$ac_dir_suffix;
67332    ac_top_srcdir=$srcdir
67333    ac_abs_top_srcdir=$srcdir ;;
67334  *) # Relative name.
67335    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67336    ac_top_srcdir=$ac_top_build_prefix$srcdir
67337    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67338esac
67339ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67340
67341
67342  case $ac_mode in
67343  :F)
67344  #
67345  # CONFIG_FILE
67346  #
67347
67348_ACEOF
67349
67350cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67351# If the template does not know about datarootdir, expand it.
67352# FIXME: This hack should be removed a few years after 2.60.
67353ac_datarootdir_hack=; ac_datarootdir_seen=
67354ac_sed_dataroot='
67355/datarootdir/ {
67356  p
67357  q
67358}
67359/@datadir@/p
67360/@docdir@/p
67361/@infodir@/p
67362/@localedir@/p
67363/@mandir@/p'
67364case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67365*datarootdir*) ac_datarootdir_seen=yes;;
67366*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67367  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67368$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67369_ACEOF
67370cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67371  ac_datarootdir_hack='
67372  s&@datadir@&$datadir&g
67373  s&@docdir@&$docdir&g
67374  s&@infodir@&$infodir&g
67375  s&@localedir@&$localedir&g
67376  s&@mandir@&$mandir&g
67377  s&\\\${datarootdir}&$datarootdir&g' ;;
67378esac
67379_ACEOF
67380
67381# Neutralize VPATH when `$srcdir' = `.'.
67382# Shell code in configure.ac might set extrasub.
67383# FIXME: do we really want to maintain this feature?
67384cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67385ac_sed_extra="$ac_vpsub
67386$extrasub
67387_ACEOF
67388cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67389:t
67390/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67391s|@configure_input@|$ac_sed_conf_input|;t t
67392s&@top_builddir@&$ac_top_builddir_sub&;t t
67393s&@top_build_prefix@&$ac_top_build_prefix&;t t
67394s&@srcdir@&$ac_srcdir&;t t
67395s&@abs_srcdir@&$ac_abs_srcdir&;t t
67396s&@top_srcdir@&$ac_top_srcdir&;t t
67397s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67398s&@builddir@&$ac_builddir&;t t
67399s&@abs_builddir@&$ac_abs_builddir&;t t
67400s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67401$ac_datarootdir_hack
67402"
67403eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67404  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67405
67406test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67407  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67408  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
67409      "$ac_tmp/out"`; test -z "$ac_out"; } &&
67410  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67411which seems to be undefined.  Please make sure it is defined" >&5
67412$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67413which seems to be undefined.  Please make sure it is defined" >&2;}
67414
67415  rm -f "$ac_tmp/stdin"
67416  case $ac_file in
67417  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67418  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67419  esac \
67420  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67421 ;;
67422
67423
67424
67425  esac
67426
67427done # for ac_tag
67428
67429
67430as_fn_exit 0
67431_ACEOF
67432ac_clean_files=$ac_clean_files_save
67433
67434test $ac_write_fail = 0 ||
67435  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67436
67437
67438# configure is writing to config.log, and then calls config.status.
67439# config.status does its own redirection, appending to config.log.
67440# Unfortunately, on DOS this fails, as config.log is still kept open
67441# by configure, so config.status won't be able to write to it; its
67442# output is simply discarded.  So we exec the FD to /dev/null,
67443# effectively closing config.log, so it can be properly (re)opened and
67444# appended to by config.status.  When coming back to configure, we
67445# need to make the FD available again.
67446if test "$no_create" != yes; then
67447  ac_cs_success=:
67448  ac_config_status_args=
67449  test "$silent" = yes &&
67450    ac_config_status_args="$ac_config_status_args --quiet"
67451  exec 5>/dev/null
67452  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67453  exec 5>>config.log
67454  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67455  # would make configure fail if this is the last instruction.
67456  $ac_cs_success || as_fn_exit 1
67457fi
67458if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67459  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67460$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67461fi
67462
67463
67464# After AC_OUTPUT, we need to do final work
67465
67466
67467  # Try to move config.log (generated by autoconf) to the configure-support directory.
67468  if test -e ./config.log; then
67469    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67470  fi
67471
67472  # Rotate our log file (configure.log)
67473  if test -e "$OUTPUT_ROOT/configure.log.old"; then
67474    $RM -f "$OUTPUT_ROOT/configure.log.old"
67475  fi
67476  if test -e "$OUTPUT_ROOT/configure.log"; then
67477    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67478  fi
67479
67480  # Move configure.log from current directory to the build output root
67481  if test -e ./configure.log; then
67482    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67483  fi
67484
67485  # Make the compare script executable
67486  $CHMOD +x $OUTPUT_ROOT/compare.sh
67487
67488
67489# Finally output some useful information to the user
67490
67491  # Finally output some useful information to the user
67492
67493  printf "\n"
67494  printf "====================================================\n"
67495  if test "x$no_create" != "xyes"; then
67496    if test "x$IS_RECONFIGURE" != "xyes"; then
67497      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67498    else
67499      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67500    fi
67501  else
67502    if test "x$IS_RECONFIGURE" != "xyes"; then
67503      printf "A configuration has been successfully checked but not created\n"
67504    else
67505      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67506    fi
67507  fi
67508  if test "x$CONFIGURE_COMMAND_LINE" != x; then
67509    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67510  else
67511    printf "using default settings.\n"
67512  fi
67513
67514  printf "\n"
67515  printf "Configuration summary:\n"
67516  printf "* Debug level:    $DEBUG_LEVEL\n"
67517  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67518  printf "* JDK variant:    $JDK_VARIANT\n"
67519  printf "* JVM variants:   $JVM_VARIANTS\n"
67520  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67521  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67522
67523  printf "\n"
67524  printf "Tools summary:\n"
67525  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67526    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67527  fi
67528  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67529  if test "x$TOOLCHAIN_VERSION" != "x"; then
67530    print_version=" $TOOLCHAIN_VERSION"
67531  fi
67532  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67533  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67534  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67535
67536  printf "\n"
67537  printf "Build performance summary:\n"
67538  printf "* Cores to use:   $JOBS\n"
67539  printf "* Memory limit:   $MEMORY_SIZE MB\n"
67540  if test "x$CCACHE_STATUS" != "x"; then
67541    printf "* ccache status:  $CCACHE_STATUS\n"
67542  fi
67543  printf "\n"
67544
67545  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67546    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67547    printf "will result in longer build times.\n"
67548    printf "\n"
67549  fi
67550
67551  if test "x$FOUND_ALT_VARIABLES" != "x"; then
67552    printf "WARNING: You have old-style ALT_ environment variables set.\n"
67553    printf "These are not respected, and will be ignored. It is recommended\n"
67554    printf "that you clean your environment. The following variables are set:\n"
67555    printf "$FOUND_ALT_VARIABLES\n"
67556    printf "\n"
67557  fi
67558
67559  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67560    printf "WARNING: Your build output directory is not on a local disk.\n"
67561    printf "This will severely degrade build performance!\n"
67562    printf "It is recommended that you create an output directory on a local disk,\n"
67563    printf "and run the configure script again from that directory.\n"
67564    printf "\n"
67565  fi
67566
67567  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67568    printf "WARNING: The result of this configuration has overridden an older\n"
67569    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67570    printf "proper build. Failure to do so might result in strange build problems.\n"
67571    printf "\n"
67572  fi
67573
67574  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67575    printf "WARNING: The result of this configuration was not saved.\n"
67576    printf "You should run without '--no-create | -n' to create the configuration.\n"
67577    printf "\n"
67578  fi
67579
67580
67581
67582  # Locate config.log.
67583  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67584    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67585  elif test -e "./config.log"; then
67586    CONFIG_LOG_PATH="."
67587  fi
67588
67589  if test -e "$CONFIG_LOG_PATH/config.log"; then
67590    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67591    if test $? -eq 0; then
67592      printf "The following warnings were produced. Repeated here for convenience:\n"
67593      # We must quote sed expression (using []) to stop m4 from eating the [].
67594      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67595      printf "\n"
67596    fi
67597  fi
67598
67599